Structure definition: Contained resources

#1

Hello,
I am creating structure definition for document reference resource.
It has subject which references a contained resource.

How do I present this in structure definition?

0 Likes

#2

Look at http://build.fhir.org/documentreference-example.xml
the Practitioner is contained, its id is a2 and it is referred to from author using #a2

0 Likes

#3

Thank you, how ever I’m looking to see how to present this in structure definition.

0 Likes

#4

First, make sure you’re using ‘contained’ appropriately. ‘contained’ isn’t intended as an easy transport mechanism, it’s used when the ‘contained’ resource doesn’t have enough information/identity to stand as an independent resource. If a resource is ‘contained’, then it can’t be effectively searched on its own and essentially has to stay as a ‘contained’ resource.

To profile and say that a resource must be contained, you can use the aggregationMode on the Reference element in the referencing profile to indicate that the target resource must be contained.

0 Likes