Class MergeOperationParametersUtil

java.lang.Object
ca.uhn.fhir.jpa.provider.merge.MergeOperationParametersUtil

Utility class for building FHIR Parameters resources for merge operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.hl7.fhir.instance.model.api.IBaseParameters
    buildMergeOperationOutputParameters(ca.uhn.fhir.context.FhirContext theFhirContext, MergeOperationOutcome theMergeOutcome, org.hl7.fhir.instance.model.api.IBaseResource theInputParameters)
    Builds the output Parameters resource for a Patient $merge operation following the FHIR specification.
    static org.hl7.fhir.instance.model.api.IBaseParameters
    buildMergeOperationOutputParameters(ca.uhn.fhir.context.FhirContext theFhirContext, org.hl7.fhir.instance.model.api.IBaseResource theOperationOutcome, org.hl7.fhir.instance.model.api.IBaseResource theUpdatedTargetResource, org.hl7.fhir.instance.model.api.IBaseResource theTask, org.hl7.fhir.instance.model.api.IBaseResource theInputParameters)
    Builds the output Parameters resource for a Patient $merge operation from individual components.
    inputParamsFromOperationParams(List<?> theSourcePatientIdentifier, List<?> theTargetPatientIdentifier, org.hl7.fhir.instance.model.api.IBaseReference theSourcePatient, org.hl7.fhir.instance.model.api.IBaseReference theTargetPatient, org.hl7.fhir.instance.model.api.IPrimitiveType<Boolean> thePreview, org.hl7.fhir.instance.model.api.IPrimitiveType<Boolean> theDeleteSource, org.hl7.fhir.instance.model.api.IBaseResource theResultPatient, List<ca.uhn.fhir.model.api.IProvenanceAgent> theProvenanceAgents, org.hl7.fhir.instance.model.api.IBaseResource theOriginalInputParameters, int theResourceLimit)
    Build MergeOperationInputParameters from REST operation parameters.
    inputParamsFromParameters(ca.uhn.fhir.context.FhirContext theFhirContext, org.hl7.fhir.instance.model.api.IBaseParameters theParameters, int theResourceLimit, List<ca.uhn.fhir.model.api.IProvenanceAgent> theProvenanceAgents)
    Build MergeOperationInputParameters from a FHIR Parameters resource.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • buildMergeOperationOutputParameters

      public static org.hl7.fhir.instance.model.api.IBaseParameters buildMergeOperationOutputParameters(ca.uhn.fhir.context.FhirContext theFhirContext, MergeOperationOutcome theMergeOutcome, org.hl7.fhir.instance.model.api.IBaseResource theInputParameters)
      Builds the output Parameters resource for a Patient $merge operation following the FHIR specification.

      The output Parameters includes:

      • input - The original input parameters
      • outcome - OperationOutcome describing the merge result
      • result - Updated target patient (optional, not included in preview mode)
      • task - Task resource tracking the merge (optional)

      Parameters:
      theFhirContext - FHIR context for building Parameters resource
      theMergeOutcome - Merge operation outcome containing the result
      theInputParameters - Original input parameters to include in output
      Returns:
      Parameters resource with merge operation output in FHIR $merge format
    • buildMergeOperationOutputParameters

      public static org.hl7.fhir.instance.model.api.IBaseParameters buildMergeOperationOutputParameters(ca.uhn.fhir.context.FhirContext theFhirContext, org.hl7.fhir.instance.model.api.IBaseResource theOperationOutcome, org.hl7.fhir.instance.model.api.IBaseResource theUpdatedTargetResource, org.hl7.fhir.instance.model.api.IBaseResource theTask, org.hl7.fhir.instance.model.api.IBaseResource theInputParameters)
      Builds the output Parameters resource for a Patient $merge operation from individual components.

      This overload is useful when you have the merge result components separately rather than wrapped in a MergeOperationOutcome object.

      Parameters:
      theFhirContext - FHIR context for building Parameters resource
      theOperationOutcome - Operation outcome describing the merge result
      theUpdatedTargetResource - Updated target patient resource (may be null in preview mode)
      theTask - Task resource tracking the merge operation (may be null)
      theInputParameters - Original input parameters to include in output
      Returns:
      Parameters resource with merge operation output in FHIR $merge format
    • inputParamsFromOperationParams

      public static MergeOperationInputParameters inputParamsFromOperationParams(List<?> theSourcePatientIdentifier, List<?> theTargetPatientIdentifier, org.hl7.fhir.instance.model.api.IBaseReference theSourcePatient, org.hl7.fhir.instance.model.api.IBaseReference theTargetPatient, org.hl7.fhir.instance.model.api.IPrimitiveType<Boolean> thePreview, org.hl7.fhir.instance.model.api.IPrimitiveType<Boolean> theDeleteSource, org.hl7.fhir.instance.model.api.IBaseResource theResultPatient, List<ca.uhn.fhir.model.api.IProvenanceAgent> theProvenanceAgents, org.hl7.fhir.instance.model.api.IBaseResource theOriginalInputParameters, int theResourceLimit)
      Build MergeOperationInputParameters from REST operation parameters. This method is used by REST providers that receive individual operation parameters.
      Parameters:
      theSourcePatientIdentifier - list of source patient identifiers
      theTargetPatientIdentifier - list of target patient identifiers
      theSourcePatient - source patient reference
      theTargetPatient - target patient reference
      thePreview - preview flag
      theDeleteSource - delete source flag
      theResultPatient - result patient resource
      theProvenanceAgents - provenance agents for audit
      theOriginalInputParameters - original input parameters for provenance
      Returns:
      MergeOperationInputParameters ready for use with ResourceMergeService
    • inputParamsFromParameters

      public static MergeOperationInputParameters inputParamsFromParameters(ca.uhn.fhir.context.FhirContext theFhirContext, org.hl7.fhir.instance.model.api.IBaseParameters theParameters, int theResourceLimit, List<ca.uhn.fhir.model.api.IProvenanceAgent> theProvenanceAgents)
      Build MergeOperationInputParameters from a FHIR Parameters resource. Extracts all merge operation parameters according to the FHIR spec.
      Parameters:
      theParameters - FHIR Parameters resource containing merge operation inputs
      theProvenanceAgents - the obtained provenance agents
      Returns:
      MergeOperationInputParameters ready for use with ResourceMergeService