Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
marceloarocha committed Jul 9, 2024
1 parent d839cc6 commit 90cfdb4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions services/alert_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,29 +688,29 @@ def _alert_kidney(
if (
"swrtz2" in exams
and exams["swrtz2"]["value"]
and drug_attributes[6].kidney > exams["swrtz2"]["value"]
and drug_attributes.kidney > exams["swrtz2"]["value"]
and exams["age"] <= 17
):
alert[
"text"
] = f"""
Medicamento deve sofrer ajuste de posologia ou contraindicado, já que a função renal do paciente
({str(exams["swrtz2"]["value"])} mL/min/1.73m²) está abaixo de
{str(drug_attributes[6].kidney)} mL/min. (Schwartz 2)
{str(drug_attributes.kidney)} mL/min. (Schwartz 2)
"""
return alert

if (
"swrtz1" in exams
and exams["swrtz1"]["value"]
and drug_attributes[6].kidney > exams["swrtz1"]["value"]
and drug_attributes.kidney > exams["swrtz1"]["value"]
and exams["age"] <= 17
):
alert[
"text"
] = f"""
Medicamento deve sofrer ajuste de posologia ou contraindicado, já que a função renal do paciente
({str(exams["swrtz1"]["value"])} mL/min/1.73m²) está abaixo de {str(drug_attributes[6].kidney)}
({str(exams["swrtz1"]["value"])} mL/min/1.73m²) está abaixo de {str(drug_attributes.kidney)}
mL/min. (Schwartz 1)
"""
return alert
Expand Down

0 comments on commit 90cfdb4

Please sign in to comment.