
Package ca.uhn.fhir.mdm.util
Class EIDHelper
java.lang.Object
ca.uhn.fhir.mdm.util.EIDHelper
-
Constructor Summary
ConstructorsConstructorDescriptionEIDHelper(ca.uhn.fhir.context.FhirContext theFhirContext, IMdmSettings theMdmSettings) -
Method Summary
Modifier and TypeMethodDescriptionbooleaneidMatchExists(List<CanonicalEID> theFirstResourceEids, List<CanonicalEID> theSecondResourceEids) Determines whether two lists ofCanonicalEIDhave any intersection.getExternalEid(org.hl7.fhir.instance.model.api.IBaseResource theResource) Given anIAnyResourcerepresenting a type supported by MDM, retrieve their externally-assigned EID, represented as aCanonicalEIDgetHapiEid(org.hl7.fhir.instance.model.api.IAnyResource theResource) Given anIAnyResourcerepresenting a type supported by MDM, retrieve their internally-assigned EID, represented as aCanonicalEIDbooleanhasEidOverlap(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 anIAnyResourcerepresenting 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
CanonicalEIDrepresenting the external EID. Absent if the EID is not present.
-
getHapiEid
Given anIAnyResourcerepresenting 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
CanonicalEIDrepresenting the internal EID. Absent if the EID is not present.
-
eidMatchExists
public boolean eidMatchExists(List<CanonicalEID> theFirstResourceEids, List<CanonicalEID> theSecondResourceEids) Determines whether two lists ofCanonicalEIDhave any intersection. Two resources are considered a match if a singleCanonicalEIDmatches 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.
-