Skip to content

Commit

Permalink
Merge pull request #201 from prefeitura-rio/frontend/patient-using-bi…
Browse files Browse the repository at this point in the history
…g-query-data

preparing professional extraction to array rather than single value
  • Loading branch information
TanookiVerde committed Aug 19, 2024
2 parents a2e3913 + 2194110 commit 1683178
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/routers/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ async def get_patient_encounters(
# Responsible professional
professional = result.get('profissional_saude_responsavel')
if professional:
if isinstance(professional, list):
professional = professional[0] if len(professional) > 0 else {}
professional = {
"name": professional.get('nome'),
"role": professional.get('especialidade')
Expand Down

0 comments on commit 1683178

Please sign in to comment.