Open mudlej opened 1 year ago
Thats a good find. We actually get these constraints straight from the specification and so what you found here is actually a spec bug: https://hl7.org/fhir/R4B/appointment.html#invs
It looks like that was reported to HL7 at https://jira.hl7.org/browse/FHIR-37896 and they already fixed it for R5. I think it would be reasonable to back-port that fix for our R4B implementation.
I think so. It's a typo in the specification, which results in the opposite of the expected behavior. Thanks for deciding to back-port the fix.
Describe the bug The expression in constraint 'app-4' for Appointment uses 'no-show' instead of 'noshow' which make it useless since there is no status 'no-show'.
Environment Using LinuxForHealth FHIR Server 5.1.1.
To Reproduce Steps to reproduce the behavior:
{ "severity": "error", "code": "invariant", "details": { "text": "app-4: Cancelation reason is only used for appointments that have been cancelled, or no-show" }, "expression": [ "Appointment" ] }
4- Using 'no-show' will be rejected as well because the status code is 'noshow'.Expected behavior The request should be accepted since it doesn't violate the rule.
Additional context This could be solved easily by removing the dash from the expression part of the constraint, as in the pull request.