FHIR Chat · Period with reversed dates - behavior · implementers

Stream: implementers

Topic: Period with reversed dates - behavior


view this post on Zulip 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

view this post on Zulip Yunwei Wang (Dec 07 2018 at 19:44):

That should be part of your business logic.

view this post on Zulip 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?

view this post on Zulip Yunwei Wang (Dec 10 2018 at 16:28):

FHIR server MAY return error if the server has additional validation rules to enforce that logic.

view this post on Zulip 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.

view this post on Zulip 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