Stream: implementers
Topic: MetadataResource
Kevin Olbrich (Jan 30 2018 at 03:52):
@Lloyd McKenzie @Grahame Grieve what is the 'MetadataResource' for, and why isn't it documented?
Lloyd McKenzie (Jan 30 2018 at 04:09):
It's a tooling artifact that helps us maintain consistency across a bunch of the infrastructure resources more easily. It appears in the source, but not in the published build.
Kevin Olbrich (Jan 30 2018 at 04:13):
FYI, not documenting it makes life more difficult for people trying to use the definitions for code generation
Grahame Grieve (Jan 30 2018 at 04:13):
hmm. where did you run into it?
Kevin Olbrich (Jan 30 2018 at 04:15):
I'm refining my code generation tools for Ruby and happened to notice it.
Grahame Grieve (Jan 30 2018 at 04:16):
I think you should generally ignore it
Kevin Olbrich (Jan 30 2018 at 04:17):
I can't really or several resources would be missing attributes that appear in the spec.
Grahame Grieve (Jan 30 2018 at 04:18):
that definitely should not be the case. what attributes?
Kevin Olbrich (Jan 30 2018 at 04:20):
If I don't account for it in my code generation tools then all the attributes that appear on MetadataResource (like experimental
, publisher
, status
) don't show up.
Kevin Olbrich (Jan 30 2018 at 04:21):
It's easy for me to do in ruby, however, since I can just mixin that resource.
Lloyd McKenzie (Jan 30 2018 at 04:43):
Are you generating code from the source or from the published structure definitions? The latter should have it. The former is super dangerous to rely on...
Kevin Olbrich (Jan 30 2018 at 04:46):
Getting them from here... http://hl7.org/fhir/2018Jan/definitions.json.zip
Grahame Grieve (Jan 30 2018 at 05:11):
this is because they're not shown on the actual resources? surely not?
Kevin Olbrich (Feb 01 2018 at 15:10):
@Lloyd McKenzie @Grahame Grieve It looks like there are a lot of resources that use the MetadataResource extension but still have all of the same elements defined (e.g. CapabilityStatement, ActivityDefinition, etc...) . The only difference I see is that the short
and definition
elements of those resources' reference the name of the resource. If I understand how you are using this, it might be possible to alter the short
and definition
texts to just say something like Logical URI to reference this resource (globally unique)
. This would let you remove the duplicate sections from all the other resources and keep the definition in one place without substantially altering the descriptions.
Grahame Grieve (Feb 01 2018 at 15:18):
there's deeper differences than that. And we didn't want to have abstract descriptions like that. The descriptions differ by more than that too
Kevin Olbrich (Feb 01 2018 at 15:19):
ok, then why include the MetadataResource in those resources at all if you are just going to override them?
Grahame Grieve (Feb 01 2018 at 15:21):
it's a way of enforcing as much consistency as we can without having it completely (since we can't)
Kevin Olbrich (Feb 01 2018 at 15:23):
Does your tooling do something special in this case or does redefining the elements in the resource effectively ignore the ones in the MetadataResource?
Grahame Grieve (Feb 01 2018 at 15:28):
metadataresource is just a template of a resource. you can override anything in the actual resource
Nick George (Oct 17 2019 at 18:42):
What's the story with MetadataResource? It's structure definition exists in the resources bundle but there's no page at http://hl7.org/fhir/StructureDefinition/MetadataResource and there's no corresponding ResourceTypeCode
Nick George (Oct 17 2019 at 18:43):
hmm I see the old discussion - have similar issue, that code-genning on all resources makes metadataresource cause problems. Maybe just drop it from the resources bundle?
Nick George (Oct 17 2019 at 18:45):
something to consider anyway, not a big deal one way or the other
Grahame Grieve (Oct 17 2019 at 21:31):
we need to so something with it so it's not a special case. But I think that the reference libaries use it extensively, so it's not going to go away
Last updated: Apr 12 2022 at 19:14 UTC