Class EIDHelper

    • Constructor Detail

      • EIDHelper

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

      • getExternalEid

        public List<CanonicalEIDgetExternalEid​(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<CanonicalEIDgetHapiEid​(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.