Class EIDHelper

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

@Service public class EIDHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    EIDHelper(ca.uhn.fhir.context.FhirContext theFhirContext, IMdmSettings theMdmSettings)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    eidMatchExists(List<CanonicalEID> theFirstResourceEids, List<CanonicalEID> theSecondResourceEids)
    Determines whether two lists of CanonicalEID have any intersection.
    getExternalEid(org.hl7.fhir.instance.model.api.IBaseResource theResource)
    Given an IAnyResource representing a type supported by MDM, retrieve their externally-assigned EID, represented as a CanonicalEID
    getHapiEid(org.hl7.fhir.instance.model.api.IAnyResource theResource)
    Given an IAnyResource representing a type supported by MDM, retrieve their internally-assigned EID, represented as a CanonicalEID
    boolean
    hasEidOverlap(org.hl7.fhir.instance.model.api.IAnyResource theExistingGoldenResource, org.hl7.fhir.instance.model.api.IAnyResource theComparingGoldenResource)
    An incoming resource is a potential duplicate if it matches a source resource that has a golden resource with an official EID, but the incoming resource also has an EID that does not match.

    Methods inherited from class java.lang.Object

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

    • EIDHelper

      @Autowired public EIDHelper(ca.uhn.fhir.context.FhirContext theFhirContext, IMdmSettings theMdmSettings)
  • Method Details

    • createHapiEid

    • getExternalEid

      public List<CanonicalEID> getExternalEid(org.hl7.fhir.instance.model.api.IBaseResource theResource)
      Given an IAnyResource representing a type supported by MDM, retrieve their externally-assigned EID, represented as a CanonicalEID
      Parameters:
      theResource - the resource to extract the EID from.
      Returns:
      An optional CanonicalEID representing the external EID. Absent if the EID is not present.
    • getHapiEid

      public List<CanonicalEID> getHapiEid(org.hl7.fhir.instance.model.api.IAnyResource theResource)
      Given an IAnyResource representing a type supported by MDM, retrieve their internally-assigned EID, represented as a CanonicalEID
      Parameters:
      theResource - the resource to extract the EID from.
      Returns:
      An optional CanonicalEID representing the internal EID. Absent if the EID is not present.
    • eidMatchExists

      public boolean eidMatchExists(List<CanonicalEID> theFirstResourceEids, List<CanonicalEID> theSecondResourceEids)
      Determines whether two lists of CanonicalEID have any intersection. Two resources are considered a match if a single CanonicalEID matches between the two collections.
      Parameters:
      theFirstResourceEids - the first EID
      theSecondResourceEids - the second EID
      Returns:
      a boolean indicating whether there is a match between these two identifier sets.
    • hasEidOverlap

      public boolean hasEidOverlap(org.hl7.fhir.instance.model.api.IAnyResource theExistingGoldenResource, org.hl7.fhir.instance.model.api.IAnyResource theComparingGoldenResource)
      An incoming resource is a potential duplicate if it matches a source resource that has a golden resource with an official EID, but the incoming resource also has an EID that does not match.