-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor au-core-medreq-03 (FHIR-46498, FHIR-48362) #260
base: master
Are you sure you want to change the base?
Conversation
The PR should include both technical corrections on this invariant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See continued conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes requested.
@@ -248,7 +248,7 @@ | |||
<key value="au-core-medreq-03"/> | |||
<severity value="error"/> | |||
<human value="Date shall be precise to the day or, if not available, the Data Absent Reason extension shall be present"/> | |||
<expression value="(toString().length() >= 8) xor extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').exists()"/> | |||
<expression value="(value.exists() and value.toString().length() >= 10 and extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').exists().not()) or (value.empty() and extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').exists())"/> | |||
<xpath value="(f:matches(f:effectiveDateTime, /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)) and not(exists(f:extension[@url='http://hl7.org/fhir/StructureDefinition/data-absent-reason']))) or (not(f:matches(f:effectiveDateTime, /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))) and exists(f:extension[@url='http://hl7.org/fhir/StructureDefinition/data-absent-reason']))"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update xpath to match the updated expression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not convinced this is the solution. Could not get it to work with FHIRPath Lab either.
I've raised a question in Zulip: MedicationRequest.authoredOn allow precise date or DAR ext; @JayMurdoch, could you please follow up if there is no response by early next week?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see inline comments
@JayMurdoch
@heathfrankel provided a simplified version of this: Initial test in Fhirpath-lab using HAPI validator passed, see Could you please test both expressions? |
@dbojicic Test results - behaved as expected
Test results - behaved as expected
Proceeding with 2nd option as discussed with @dbojicic, @brettesler-ext, @johnscarter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @JayMurdoch , just a few minor changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor change
FHIR-46498: medreq-03 allows non-precise date if Data Absent Reason is present
FHIR-48362: correct to require min length of 10