Skip to content

Consistently Sort Sessions by Date - #479

Merged
jayfo merged 14 commits into
uwscope:developfrom
jayfo:sessionsSortByDate
Mar 17, 2024
Merged

Consistently Sort Sessions by Date#479
jayfo merged 14 commits into
uwscope:developfrom
jayfo:sessionsSortByDate

Conversation

@jayfo

@jayfo jayfo commented Mar 13, 2024

Copy link
Copy Markdown
Contributor

The underlying order of sessions objects has been based on _id, which in turn corresponds to the order in which documents were added to the database. This often appears to also be sorted by date, but that correlation breaks down if a session is edited. A new document will be created for the edit, which will appear most recent regardless of its underlying date.

This was showing up as several weird behaviors:

  • Incorrect and even negative values in the Caseload:

    Screenshot 2024-03-13 at 07-19-17 SCOPE Registry

  • Incorrect dates in the patient summary:

    Screenshot 2024-03-13 at 06-07-23 SCOPE Registry

  • Incorrect dates and potentially incorrect data in treatment summary:

    Screenshot 2024-03-13 at 07-15-04 SCOPE Registry

This update fixes all of these issues, consistently sorting sessions by date before using them.

@jayfo jayfo added this to the v0.13.0 milestone Mar 13, 2024
@jayfo
jayfo merged commit 978410b into uwscope:develop Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant