retrieveParentResource

fun retrieveParentResource(childResource: Resource, parentResourceType: String, fhirPathExpression: String): Resource?

This method retrieve a parentResource for a given relatedResource from the facts map It fetches a list of facts of the given parentResourceType then iterates through this list in order to return a resource whose logical id matches the subject reference retrieved via fhirPath from the childResource

  • The logical Id of the parentResource parentResourceType

  • The ResourceType the parentResources belong to fhirPathExpression

  • A fhir path expression used to retrieve the logical Id from the parent resources