Skip to main content

Patient Unmerge Operation

Experimental

This is an experimental operation within CareConnect that is not yet supported by any Netsmart CareRecord or other solution.

The Patient Unmerge operation is an experimental operation to allow for reversing a previous merge operation based loosely on the draft HL7 FHIR Patient Merge Operation.

Authorization

This operation will require the application obtain authorization to update a Patient using one of the following SMART clinical scopes.

  • v1: [patient|user|system]/Patient.[write|*]
  • v2: [patient|user|system]/Patient.[u] (future)

Parameters

UseNameCardinalityTypeDocumentation
INsource-patient1..1ReferenceA direct resource reference to the source patient resource.
INtarget-patient1..1ReferenceA direct resource reference to the target patient resource.
This is the surviving patient resource, the target for the merge.
INpreview0..1booleanThis parameter is not yet supported by any Netsmart CareRecord or solution
If this is set to true then the merge will not be actually performed; an OperationOutcome will be returned in the Parameters response that will indicate that no merge has occurred and may include other diagnostic info if desired, such as the scale of the merge.
e.g. Issue.details.text "Preview only Patient merge - no issues detected"
e.g. Issue.diagnostics "Merge would update: 10 years of content or 120 resources"
The resulting target patient resource will also be returned in the result.
OUToutcome1..1OperationOutcomeThe outcome of the operation. On success this will provide a success statement or warnings related to the change. If the operation was unsuccessful, the OperationOutcome will include the reason for the failure.

Examples

curl -X POST 'https://fhir.netsmartcloud.com/v4/Patient/$unmerge' \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d @payload.json

Payloads

Sample Unmerge Request Payload

{
"resourceType": "Parameters",
"parameter": [
{
"name": "source-patient",
"valueReference": "Patient/2"
},
{
"name": "target-patient",
"valueReference": "Patient/1"
}
]
}

Sample Unmerge Response Payload

Unmerge Success
{
"resourceType": "Parameters",
"parameter": [
{
"name": "source-patient",
"valueReference": "Patient/2"
},
{
"name": "target-patient",
"valueReference": "Patient/1"
},
{
"name": "outcome",
"resource": {
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "information",
"code": "informational",
"details": {
"text": "Success message"
}
}
]
}
}
}
]
}
Invalid Unmerge Payload or Other Unprocessable Request
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"details": {
"text": "Exception message"
}
}
]
}
Rejections or Other Unmerge Processing Errors
{
"resourceType": "Parameters",
"parameter": [
{
"name": "source-patient",
"valueReference": "Patient/2"
},
{
"name": "target-patient",
"valueReference": "Patient/1"
},
{
"name": "outcome",
"resource": {
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"details": {
"text": "err: Source Patient not found"
}
}
]
}
}
}
]
}

Errors

To be written.

Integration Patterns

Unmerge Workflow

  1. Identify Merge to Reverse

    • Locate previously merged patients
    • Validate unmerge is appropriate
    • Determine source and target patients
  2. Prepare Unmerge Request

    • Create Parameters with patient references
    • Consider using preview mode first
    • Include proper authorization
  3. Execute Unmerge

    • Submit unmerge operation
    • Process OperationOutcome response
    • Handle success or failure scenarios

Best Practices

  • Always use preview mode first to validate unmerge feasibility
  • Document unmerge decisions and rationale
  • Test unmerge operations in non-production environments
  • Implement proper access controls for unmerge operations

Relationships to Other Resources

Error Handling

For comprehensive error handling information, see Common Errors.

Support

For technical support with Patient Unmerge operations:

  • Contact: Netsmart Technologies, Inc.
  • Documentation: Extended Operations
  • Status: Experimental functionality