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
| Use | Name | Cardinality | Type | Documentation |
|---|---|---|---|---|
| IN | source-patient | 1..1 | Reference | A direct resource reference to the source patient resource. |
| IN | target-patient | 1..1 | Reference | A direct resource reference to the target patient resource. This is the surviving patient resource, the target for the merge. |
| IN | preview | 0..1 | boolean | This 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. |
| OUT | outcome | 1..1 | OperationOutcome | The 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
- Production
- Preview
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
curl -X POST 'https://fhirtest.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.