Example #1
0
 def get(self):
     icd10s = lista_ICD10()
     print(str(len(icd10s)))
     if len(icd10s) > 0:
         return icd10s
     else:
         return "Formato incorrecto", 400
Example #2
0
 def get(self):
     informes = lista_informes()
     result = list()
     icd10s = lista_ICD10()
     for informe in informes:
         result.extend(informe.ICD10s)
     print(str(result))
     if result is None:
         return "Error", 404
     else:
         return result
Example #3
0
 def get(self, idInforme):
     informe = get_informe(idInforme)
     icd10s = lista_ICD10()
     result = list()
     for icd10 in icd10s:
         if informe.idInforme in icd10.informes:
             result.append(icd10)
     if result is None:
         return "Error", 404
     else:
         return result
Example #4
0
 def post(self, idInforme):
     if not request.json or not 'Codigo' in request.json:
         return "Formato incorrecto", 400
     informe = get_informe(idInforme)
     print(idInforme)
     print(informe.idInforme)
     informe.insert_icd10(request.json['Codigo'])
     icd10s = lista_ICD10()
     result = list()
     for icd10 in icd10s:
         if idInforme in icd10.informes:
             result.append(icd10)
     if result is None:
         return "Error", 404
     else:
         return result, 201
Example #5
0
def render_informe_formulario(idInforme):
    return render_template('Formulario/informe.html',
                           informe=get_informe(idInforme),
                           ICD10s=lista_ICD10(),
                           pruebas=get_prueba_from_informe(idInforme))