
Package ca.uhn.fhir.mdm.util
Class MdmResourceUtil
java.lang.Object
ca.uhn.fhir.mdm.util.MdmResourceUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsTagWithSystem(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) static booleanhasGoldenRecordSystemTag(org.hl7.fhir.instance.model.api.IBaseResource theIBaseResource) static booleanisGoldenRecord(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) static booleanisGoldenRecordRedirected(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) static booleanisMdmAllowed(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) If the resource is tagged as not managed by MDM, return false.static booleanisMdmManaged(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) Checks for the presence of the MDM-managed tag, indicating the MDM system has ownership of this golden resource's links.static voidremoveTagWithSystem(org.hl7.fhir.instance.model.api.IBaseResource theResource, String theSystem) static org.hl7.fhir.instance.model.api.IBaseResourcesetGoldenResource(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) static org.hl7.fhir.instance.model.api.IBaseResourcesetGoldenResourceAsBlockedResourceGoldenResource(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) Adds the BLOCKED tag to the golden resource.static org.hl7.fhir.instance.model.api.IBaseResourcesetGoldenResourceRedirected(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) Sets the provided resource as 'redirected' golden resource.static org.hl7.fhir.instance.model.api.IBaseResourcesetMdmManaged(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) Sets the MDM-managed tag, indicating the MDM system has ownership of this Resource.
-
Method Details
-
isMdmAllowed
If the resource is tagged as not managed by MDM, return false. Otherwise true.- Parameters:
theBaseResource- The FHIR resource that is potentially managed by MDM.- Returns:
- A boolean indicating whether MDM can manage this resource.
-
isMdmManaged
Checks for the presence of the MDM-managed tag, indicating the MDM system has ownership of this golden resource's links.- Parameters:
theBaseResource- the resource to check.- Returns:
- a boolean indicating whether or not MDM manages this FHIR resource.
-
isGoldenRecord
-
hasGoldenRecordSystemTag
public static boolean hasGoldenRecordSystemTag(org.hl7.fhir.instance.model.api.IBaseResource theIBaseResource) -
containsTagWithSystem
public static boolean containsTagWithSystem(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) -
isGoldenRecordRedirected
public static boolean isGoldenRecordRedirected(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) -
removeTagWithSystem
public static void removeTagWithSystem(org.hl7.fhir.instance.model.api.IBaseResource theResource, @Nonnull String theSystem) -
setMdmManaged
public static org.hl7.fhir.instance.model.api.IBaseResource setMdmManaged(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) Sets the MDM-managed tag, indicating the MDM system has ownership of this Resource. No changes are made if resource is already managed by MDM.- Parameters:
theBaseResource- resource to set the tag for- Returns:
- Returns resource with the tag set.
-
setGoldenResource
public static org.hl7.fhir.instance.model.api.IBaseResource setGoldenResource(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) -
setGoldenResourceRedirected
public static org.hl7.fhir.instance.model.api.IBaseResource setGoldenResourceRedirected(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) Sets the provided resource as 'redirected' golden resource. This is done when a Golden Resource has been deprecated and is no longer the primary golden resource (for example, after a merge of 2 golden resources). -
setGoldenResourceAsBlockedResourceGoldenResource
public static org.hl7.fhir.instance.model.api.IBaseResource setGoldenResourceAsBlockedResourceGoldenResource(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource) Adds the BLOCKED tag to the golden resource. Because this is called *before* a resource is saved, we must add a new system/code combo to it- Parameters:
theBaseResource-- Returns:
-