Package ca.uhn.fhir.mdm.util
Class EIDHelper
java.lang.Object
ca.uhn.fhir.mdm.util.EIDHelper
-
Constructor Summary
ConstructorDescriptionEIDHelper
(ca.uhn.fhir.context.FhirContext theFhirContext, IMdmSettings theMdmSettings) -
Method Summary
Modifier and TypeMethodDescriptionboolean
eidMatchExists
(List<CanonicalEID> theFirstResourceEids, List<CanonicalEID> theSecondResourceEids) Determines whether two lists ofCanonicalEID
have any intersection.getExternalEid
(org.hl7.fhir.instance.model.api.IBaseResource theResource) Given anIAnyResource
representing a type supported by MDM, retrieve their externally-assigned EID, represented as aCanonicalEID
getHapiEid
(org.hl7.fhir.instance.model.api.IAnyResource theResource) Given anIAnyResource
representing a type supported by MDM, retrieve their internally-assigned EID, represented as aCanonicalEID
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.
-
Constructor Details
-
EIDHelper
@Autowired public EIDHelper(ca.uhn.fhir.context.FhirContext theFhirContext, IMdmSettings theMdmSettings)
-
-
Method Details
-
createHapiEid
-
getExternalEid
Given anIAnyResource
representing a type supported by MDM, retrieve their externally-assigned EID, represented as aCanonicalEID
- 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
Given anIAnyResource
representing a type supported by MDM, retrieve their internally-assigned EID, represented as aCanonicalEID
- 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 ofCanonicalEID
have any intersection. Two resources are considered a match if a singleCanonicalEID
matches between the two collections.- Parameters:
theFirstResourceEids
- the first EIDtheSecondResourceEids
- 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.
-