FHIR Chat · Extension and context to resources and profiles. · conformance

Stream: conformance

Topic: Extension and context to resources and profiles.


view this post on Zulip M Crenshaw (Feb 26 2018 at 16:16):

I'm seeing a behavior in my profiles where I have extensions defined that does not seem correct to me and I'm hoping someone can help me understand this.
If an extension is defined in the context of a resources or profile, there does not seem to be any enforcement to which resources or profile the extension is created for.
Example.
1) I created extension called extA with context for ProcedureRequest.
2) Create a profile and extend the base resource to add ExtA and save, and restart the FHIR service.
3) Post a ProcedureRequest request including the new extension and the ProcedureRequest resource is created as expected - works fine.
4) But I can also post some other resource, example an Organization request including an extension (ExtA), and the organization resource is created with this extension. I think this should error and not create this resource with this extension.
5) If I create a resource with an extension not defined at all in my system all, I get an error as expected based on my system configuration.
a. "diagnostics": "The extension https://foo/some-extension/undefined is unknown, and not allowed here"

Similarly if I created two profiles on the same resource (ProcedureRequestProfile1 and ProcedureRequestProfile2)
ProcedureRequestProfile1 has the extension defined
ProcedureRequestProfile2 does not have the extension
I would expect that if I posted a request using the profile ProcedureRequestProfile2 with and extension defined in ProcedureRequestProfile1 to error and not create the resource, but it does create the resource.

Is there some additional configuration that I'm missing ?

view this post on Zulip Lloyd McKenzie (Feb 26 2018 at 16:25):

Servers could raise an error for that, but don't have to. (Servers don't have to validate input at all if they don't want to)

view this post on Zulip Michel Rutten (Feb 26 2018 at 16:25):

See here:
http://hl7.org/implement/standards/fhir/structuredefinition-definitions.html#StructureDefinition.context
http://hl7.org/implement/standards/fhir/structuredefinition-definitions.html#StructureDefinition.context


Last updated: Apr 12 2022 at 19:14 UTC