Stream: implementers
Topic: how to handle resources that do not fit their profiles ?
Georg Fette (Jan 23 2019 at 12:44):
Hello, how should the workflow take place for resources that do not fit the specifications of the server they are provideded by ?
The test server http://test.fhir.org provides the profile Condition and has a StructureDefinition for this profile in which the 'category' is defined with a cardinality of 1. Two of the Condition-resources provided by this server, however, have an array for category instead of the single object.
Do I have to check each resource for validity if it's fitting to the expected profile before I process it ?
Greetings
Lloyd McKenzie (Jan 23 2019 at 15:41):
Which version of the server are you looking at? r2, r3 or r4? The rules are different for each
Georg Fette (Jan 23 2019 at 15:48):
I am currently looking at r3. Where are the rules for the different versions documented ?
Lloyd McKenzie (Jan 23 2019 at 15:57):
The STU3 spec is here: http://hl7.org/fhir/STU3/condition.html. (And it supports a cardinality of 0..* for Condition.category)
Lloyd McKenzie (Jan 23 2019 at 15:58):
The R4 spec is at http://hl7.org/fhir. The R2 spec is at http://hl7.org/fhir/DSTU2
Georg Fette (Jan 23 2019 at 16:10):
yes, I am aware of the general specification of 'Condition' in stu3. With what I have a problem is that the testserver at http://test.fhir.org contains a StructureDefinition resource for the type 'Condition' that overrides the base definition of 0:* with 1:1.
Lloyd McKenzie (Jan 23 2019 at 16:21):
Anyone can edit anything on the test server - including changing the StructureDefinitions. However, when I query the definition, it clearly shows 0..*
http://test.fhir.org/r3/StructureDefinition?_id=Condition
Lloyd McKenzie (Jan 23 2019 at 16:22):
Are you referring to one of the profiles on Condition? It's totally fine for a profile to tighten the cardinality...
Georg Fette (Jan 23 2019 at 16:33):
ah, indeed, I was looking at 'argo-condition'. Sorry for the confusion.
But I am still pondering about the general question how to maintain the conformance between the profiles in the StructureDefinitions and the corresponing resources. Would I have to prevent/forbid changes to the existing StructureDefinition resources ?
Lloyd McKenzie (Jan 23 2019 at 16:38):
If you're going to expose profiles on your server that you expect systems to conform to, then yes it makes sense to prohibit them from being updated
Last updated: Apr 12 2022 at 19:14 UTC