Stream: fhir/infrastructure-wg
Topic: Code system problem
Grahame Grieve (Jul 20 2018 at 21:51):
So at this time, it's not possible to put a contained code system inside a value set.
Grahame Grieve (Jul 20 2018 at 21:51):
I think that this is a problem - it should be possible to do that.
Grahame Grieve (Jul 20 2018 at 21:51):
the reason is because there's no trackable internal reference from the value set to the code system.
Grahame Grieve (Jul 20 2018 at 21:52):
the issue is this invariant:
Grahame Grieve (Jul 20 2018 at 21:52):
contained.where((('#'+id in ( %resource.descendants().reference | %resource.descendants().as(canonical))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#' ).exists()).not()).trace('unmatched', id).empty())
Grahame Grieve (Jul 20 2018 at 21:54):
so I think that this invariant should say:
Grahame Grieve (Jul 20 2018 at 21:55):
contained.where((('#'+id in ( %resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url)) ) or descendants().where(reference = '#').exists() ).exists()).not()).trace('unmatched', id).empty())
Grahame Grieve (Jul 20 2018 at 21:55):
two changes: there's no reason to look for a canonical reference of # to the containing resource. I just can't see how that would be valid
Grahame Grieve (Jul 20 2018 at 21:55):
and the other case is to allow a contained resource referenced by uri or url - e.g. a code system or a binary in a document reference
Lloyd McKenzie (Jul 20 2018 at 23:52):
Canonical reference of # to the containing reference - code system pointing to its definitional value set?
Grahame Grieve (Jul 21 2018 at 00:08):
the code system is not referred to by it's definitional value set that contains it?
Lloyd McKenzie (Jul 21 2018 at 00:18):
It would be, but the Code System would refer to the ValueSet too.
Grahame Grieve (Jul 21 2018 at 00:26):
so the question is not, 'what is valid?', but 'what satisfies the contained resource requirement?'
Lloyd McKenzie (Jul 21 2018 at 00:44):
A contained resource pointing to the container by canonical would meet the requirement. Perhaps a Concept map contained within a ValueSet?
Lloyd McKenzie (Jul 21 2018 at 00:45):
(on the grounds that the two must be maintained together and managed in sync)
Grahame Grieve (Jul 21 2018 at 07:52):
this, it turns out, is GF#17330
Last updated: Apr 12 2022 at 19:14 UTC