Stream: implementers
Topic: Period with reversed dates - behavior
Veliyan Georgiev (Dec 07 2018 at 17:52):
Hello,
What should the FHIR server return when a resource is posted with a period property where the start date is after the end date (by accident).
HAPI FHIR i.e. doesn't seem to care
Yunwei Wang (Dec 07 2018 at 19:44):
That should be part of your business logic.
Jeffrey Taylor (Dec 07 2018 at 20:53):
Should the FHIR server throw an error if it notices this is the case? This (https://www.hl7.org/fhir/http.html#create) seems to say maybe a 422 should be thrown? However, when looking at an implementation like HAPI FHIR, this validation doesn't happen.
For someone implementing their own server - anyone have any recommendations?
Yunwei Wang (Dec 10 2018 at 16:28):
FHIR server MAY return error if the server has additional validation rules to enforce that logic.
Lloyd McKenzie (Dec 11 2018 at 02:04):
We have a rule that low must be <= high if both are present, but don't have an equivalent rule for Period. I've submitted GF#19751 to address this. That will make it more than just a business rule in R5. You'll be free to accept data that breaks the rule, but will be non-conformant if you emit data that breaks the rule.
Veliyan Georgiev (Dec 12 2018 at 13:03):
@Lloyd McKenzie Thanks Lloyd. That makes much sense.
Last updated: Apr 12 2022 at 19:14 UTC