Skip to content

Commit

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

Sort patient encounters by entry_datetime
  • Loading branch information
TanookiVerde committed Aug 21, 2024
2 parents 98299cf + 8d556ec commit e05305c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/routers/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,7 @@ async def get_patient_encounters(
}
encounters.append(encounter)

# Sort Encounters by entry_datetime
encounters = sorted(encounters, key=lambda x: x['entry_datetime'], reverse=True)

return encounters

0 comments on commit e05305c

Please sign in to comment.