Class MdmResourceUtil

java.lang.Object
ca.uhn.fhir.mdm.util.MdmResourceUtil

public final class MdmResourceUtil extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    containsTagWithSystem(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource)
     
    static boolean
    hasGoldenRecordSystemTag(org.hl7.fhir.instance.model.api.IBaseResource theIBaseResource)
     
    static boolean
    isGoldenRecord(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource)
     
    static boolean
    isGoldenRecordRedirected(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource)
     
    static boolean
    isMdmAllowed(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource)
    If the resource is tagged as not managed by MDM, return false.
    static boolean
    isMdmManaged(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 void
    removeTagWithSystem(org.hl7.fhir.instance.model.api.IBaseResource theResource, String theSystem)
     
    static org.hl7.fhir.instance.model.api.IBaseResource
    setGoldenResource(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource)
     
    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.
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isMdmAllowed

      public static boolean isMdmAllowed(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource)
      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

      public static boolean isMdmManaged(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.
      Parameters:
      theBaseResource - the resource to check.
      Returns:
      a boolean indicating whether or not MDM manages this FHIR resource.
    • isGoldenRecord

      public static boolean isGoldenRecord(org.hl7.fhir.instance.model.api.IBaseResource theBaseResource)
    • 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: