Skip to content

Support date ranges in C-FIND query identifier#49

Merged
steventux merged 3 commits intomainfrom
feat/support-date-range-c-find-queries
Mar 18, 2026
Merged

Support date ranges in C-FIND query identifier#49
steventux merged 3 commits intomainfrom
feat/support-date-range-c-find-queries

Conversation

@steventux
Copy link
Contributor

@steventux steventux commented Mar 17, 2026

Description

Conformance to DICOM Scheduled Procedure Step Start Date means support for date ranges.
See
https://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.2.2.2.5.html

image

If the query param is '*' matches on any date will be returned.
If the query param starts with '-' matches on records before and including the date param will be returned.
If the query param ends with '-' matches on records on and after the date param will be returned.
If the query param contains '-' between two date params, records between and including the two dates will be returned.

Jira link

https://nhsd-jira.digital.nhs.uk/browse/DTOSS-12470

Review notes

Review checklist

  • Check database queries are correctly scoped to current_provider

"ORDER BY scheduled_date, scheduled_time"
),
["20240101"],
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a case for a few integration tests confirming that a given input returns a given output, or are we operating on the time-worn principle that "SELECT isn't broken"?

Copy link
Contributor Author

@steventux steventux Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good point, I had to amend the date range query, I've added integration test coverage here: e9b0fd1#diff-98e9cf22fda17f1dcd5b44914bc967c70ca8c9cc0c2f85721fc7a9bf2a408269R99-R158

@steventux steventux force-pushed the feat/support-date-range-c-find-queries branch 2 times, most recently from 5ab54f4 to e9b0fd1 Compare March 17, 2026 16:52
Conformance to DICOM Scheduled Procedure Step Start Date means support for date ranges.
If the query param is '*' matches on any date will be returned.
If the query param starts with '-' matches on records until the date param will be returned.
If the query param ends with '-' matches on records on and after the date param will be returned.
If the query param contains '-' between two date params, records between and including the two dates will be returned.
@steventux steventux force-pushed the feat/support-date-range-c-find-queries branch from 50518b8 to 9352a19 Compare March 18, 2026 12:02
@steventux steventux merged commit 95fa43c into main Mar 18, 2026
6 checks passed
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.

2 participants