Class MdmSurvivorshipSvcImpl

java.lang.Object
ca.uhn.fhir.mdm.svc.MdmSurvivorshipSvcImpl
All Implemented Interfaces:
IMdmSurvivorshipService

public class MdmSurvivorshipSvcImpl extends Object implements IMdmSurvivorshipService
  • Field Details

    • myFhirContext

      protected final ca.uhn.fhir.context.FhirContext myFhirContext
  • Constructor Details

  • Method Details

    • applySurvivorshipRulesToGoldenResource

      public <T extends org.hl7.fhir.instance.model.api.IBase> void applySurvivorshipRulesToGoldenResource(T theTargetResource, T theGoldenResource, MdmTransactionContext theMdmTransactionContext)
      Description copied from interface: IMdmSurvivorshipService
      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
      Specified by:
      applySurvivorshipRulesToGoldenResource in interface IMdmSurvivorshipService
      Type Parameters:
      T - Resource type to apply the survivorship rules to
      Parameters:
      theTargetResource - Target resource to merge fields from
      theGoldenResource - Golden resource to merge fields into
      theMdmTransactionContext - Current transaction context
    • rebuildGoldenResourceWithSurvivorshipRules

      public <T extends org.hl7.fhir.instance.model.api.IBase> T rebuildGoldenResourceWithSurvivorshipRules(T theGoldenResourceBase, MdmTransactionContext theMdmTransactionContext)
      Description copied from interface: IMdmSurvivorshipService
      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.
      Specified by:
      rebuildGoldenResourceWithSurvivorshipRules in interface IMdmSurvivorshipService
      Type Parameters:
      T - - Resource type to apply the survivorship rules to
      Parameters:
      theGoldenResourceBase - - the golden resource to rebuild
      theMdmTransactionContext - - the transaction context