Package ca.uhn.fhir.mdm.api
Interface IMdmSurvivorshipService
- All Known Implementing Classes:
MdmSurvivorshipSvcImpl
public interface IMdmSurvivorshipService
Service that applies survivorship rules on target and golden resources.
-
Method Summary
Modifier and TypeMethodDescription<T extends org.hl7.fhir.instance.model.api.IBase>
voidapplySurvivorshipRulesToGoldenResource
(T theTargetResource, T theGoldenResource, MdmTransactionContext theMdmTransactionContext) Merges two golden resources by overwriting all field values on theGoldenResource param for CREATE_RESOURCE, UPDATE_RESOURCE, SUBMIT_RESOURCE_TO_MDM, UPDATE_LINK (when setting to MATCH) and MANUAL_MERGE_GOLDEN_RESOURCES.<T extends org.hl7.fhir.instance.model.api.IBase>
TrebuildGoldenResourceWithSurvivorshipRules
(T theGoldenResource, MdmTransactionContext theMdmTransactionContext) GoldenResources can have non-empty field data created from changes to the various resources that are matched to it (using some pre-defined survivorship rules).
-
Method Details
-
applySurvivorshipRulesToGoldenResource
<T extends org.hl7.fhir.instance.model.api.IBase> void applySurvivorshipRulesToGoldenResource(T theTargetResource, T theGoldenResource, MdmTransactionContext theMdmTransactionContext) Merges two golden resources by overwriting all field values on theGoldenResource param for CREATE_RESOURCE, UPDATE_RESOURCE, SUBMIT_RESOURCE_TO_MDM, UPDATE_LINK (when setting to MATCH) and MANUAL_MERGE_GOLDEN_RESOURCES. PID, identifiers and meta values are not affected by this operation. Applies survivorship rules to merge fields from the specified target resource to the golden resource. Survivorship rules may include, but not limited to the following data consolidation methods:- Length of field - apply the field value containing most or least number of characters - e.g. longest name
- Date time - all the field value from the oldest or the newest recrod - e.g. use the most recent phone number
- Frequency - use the most or least frequent number of occurrence - e.g. most common phone number
- Integer - number functions (largest, sum, avg) - e.g. number of patient encounters
- Quality of data - best quality data - e.g. data coming from a certain system is considered trusted and overrides all other values
- A hybrid approach combining all methods listed above as best fits
- Type Parameters:
T
- Resource type to apply the survivorship rules to- Parameters:
theTargetResource
- Target resource to merge fields fromtheGoldenResource
- Golden resource to merge fields intotheMdmTransactionContext
- Current transaction context
-
rebuildGoldenResourceWithSurvivorshipRules
<T extends org.hl7.fhir.instance.model.api.IBase> T rebuildGoldenResourceWithSurvivorshipRules(T theGoldenResource, MdmTransactionContext theMdmTransactionContext) GoldenResources can have non-empty field data created from changes to the various resources that are matched to it (using some pre-defined survivorship rules). If a match link between a source and golden resource is broken, this method will rebuild/repopulate the GoldenResource based on the current links and current survivorship rules.- Type Parameters:
T
- - Resource type to apply the survivorship rules to- Parameters:
theGoldenResource
- - the golden resource to rebuildtheMdmTransactionContext
- - the transaction context
-