When we have a reference in a resource which can be more than one type of resource...
Closed this issue · 3 comments
nirzaf commented
When we have a reference in a resource which can be more than one type of resource, How we can define the return type in the resolver since we do not know it can be a reference to any type of them
For example, in Appointment Resource, we have a participant field which can be
"Patient", "Practitioner", "PractitionerRole", "RelatedPerson", "Device", "HealthcareService", "Location"
How to define the return type of the resolver in such scenarios?
pjirsa commented
The ResourceReference
coming from FHIR may contain a type
property. In which case the referenced resource must resolve to that type. Otherwise, the type can be inferred from the relative URL of the reference
property.
see: ResourceReference
pjirsa commented