Skip to content

Commit

Permalink
fix: cid was using wrong column
Browse files Browse the repository at this point in the history
  • Loading branch information
TanookiVerde committed Aug 16, 2024
1 parent 9f71331 commit 3217196
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/routers/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,10 @@ async def get_patient_encounters(
# CIDs
cids = []
for cid in result['condicoes']:
if cid.get('descricao') is not None:
cids.append(cid['descricao'])
nome, descricao = cid.get('id'), cid.get('descricao')
if nome is None or descricao is None:
continue
cids.append(f"{nome} - {descricao}")

encounter = {
"entry_datetime": read_timestamp(result['entrada_datahora'], format='datetime'),
Expand Down

0 comments on commit 3217196

Please sign in to comment.