For a full list of available versions, see the Directory of published versions
4.2.1. Patient Merge
Patient Merge provides a RESTful approach to reconciling multiple managed patient identities within PCR that have been determined to represent the same individual. In a Patient Merge request, the patient identities to be consolidated are provided to PCR, which validates the request and evaluates the proposed merge using identity resolution, source authority, governance, and stewardship rules. PCR assesses the relationship between the identified records and determines the appropriate surviving Patient's Record while applying established identity management policies.
4.2.1.1. Usage
In the PCR Patient Merge operation, the request must contain a Parameters resource that identifies the managed patient identities to be merged and the designated surviving patient identity. PCR evaluates the merge request to ensure it complies with approved governance controls and identity management requirements. Upon successful validation, PCR associates the duplicate patient records to the surviving Patient's Record, preserves source contributions, lineage, and audit history, and maintains identity relationships in accordance with established policies. The result is a trusted and governed patient identity that reduces duplicate records, improves patient matching accuracy, and supports reliable patient identification across connected healthcare organizations.
POST: Patient Merge
Actor: Contributor
Role: Submits a Patient Merge operation request to the PCR.
Actor: PCR
Role: Receives, authenticates, validates, and merges patients.
4.2.1.2. Specification
Patient Merge Request
Patient Merge Input Parameters
The update interaction is performed by an HTTP POST command as shown:
POST [base-submit]/Patient/$merge
Patient Merge Response
Patient Merge Output Parameters
Example Patient Merge Request
HTTP Method:
POST
Headers:
Content-Type: application/fhir+json
Address:
[base-submit]/Patient/$merge
Message Body:
{
"id": "parameters-merge-input-example",
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-parameters-merge-input"
]
},
{
{
"system": "https://ehealthontario.ca/fhir/CodeSystem/pcr-merge-reason",
"code": "duplicate-record",
"display": "Duplicate patient record"
}
],
"text": "Duplicate record identified through governed reconciliation process."
}
},
{
"name": "merge-requester",
"system": "https://hospital.example.ca/user-id",
}
},
{
"name": "source-patient",
"reference": "Patient/patient-contribution-source-example"
}
},
{
"name": "source-patient-identifier",
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
}
]
},
"system": "https://hospital.example.ca/mrn",
}
},
{
"name": "target-patient",
"reference": "Patient/patient-contribution-target-example"
}
},
{
"name": "target-patient-identifier",
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
}
]
},
"system": "https://hospital.example.ca/mrn",
}
},
{
"name": "result-patient",
"id": "patient-contribution-merged-example",
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-patient-contribution"
]
},
{
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
}
]
},
"system": "https://hospital.example.ca/mrn",
},
{
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
}
]
},
"system": "https://hospital.example.ca/mrn",
}
],
{
],
{
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
}
]
},
null
]
}
],
]
}
}
]
}
Response Body:
{
"id": "parameters-merge-output-example",
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-parameters-merge-output"
]
},
{
"id": "parameters-merge-input-example",
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-parameters-merge-input"
]
},
{
{
"system": "https://ehealthontario.ca/fhir/CodeSystem/pcr-merge-reason",
"code": "duplicate-record",
"display": "Duplicate patient record"
}
],
"text": "Duplicate record identified through governed reconciliation process."
}
},
{
"name": "merge-requester",
"system": "https://hospital.example.ca/user-id",
}
},
{
"name": "source-patient",
"reference": "Patient/patient-contribution-source-example"
}
},
{
"name": "source-patient-identifier",
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
}
]
},
"system": "https://hospital.example.ca/mrn",
}
},
{
"name": "target-patient",
"reference": "Patient/patient-contribution-target-example"
}
},
{
"name": "target-patient-identifier",
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
}
]
},
"system": "https://hospital.example.ca/mrn",
}
},
{
"name": "result-patient",
"id": "patient-contribution-merged-example",
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-patient-contribution"
]
},
{
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
}
]
},
"system": "https://hospital.example.ca/mrn",
},
{
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
}
]
},
"system": "https://hospital.example.ca/mrn",
}
],
{
],
{
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
}
]
},
null
]
}
],
]
}
}
]
}
},
{
"id": "patient-contribution-merged-example",
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-patient-contribution"
]
},
{
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
}
]
},
"system": "https://hospital.example.ca/mrn",
},
{
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
}
]
},
"system": "https://hospital.example.ca/mrn",
}
],
{
],
{
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
}
]
},
null
]
}
],
]
}
},
{
"id": "operationoutcome-example-success",
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/pcr-operationoutcome-contribution"
]
},
{
"text": "Patient/patient-contribution-source-example was merged into Patient/patient-contribution-target-example. Patient/patient-contribution-merged-example is the retained patient identity."
}
}
]
}
}
]
}
Example Validation Failure
HTTP Response: 400 Bad Request
Message Body:
{
"id": "operationoutcome-example-merge-error",
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/pcr-operationoutcome-contribution"
]
},
{
"text": "Both source-patient and target-patient are required for a merge request."
},
"Parameters.parameter.where(name = 'source-patient')",
"Parameters.parameter.where(name = 'target-patient')"
]
}
]
}
Example Patient Not Found
HTTP Response: 404 Not Found
Message Body:
{
"id": "operationoutcome-example-notfound",
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/pcr-operationoutcome-contribution"
]
},
{
"text": "No Patient resource was found for id 987654."
},
]
}
]
}
Example Version Conflict
HTTP Response: 412 Precondition Failed
Message Body:
{
"id": "operationoutcome-example-versionconflict",
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/pcr-operationoutcome-contribution"
]
},
{
"text": "The submitted resource version does not match the current server version. Retrieve the latest Patient version and resubmit the update."
},
]
}
]
}
4.2.1.3. Supported Profiles
Patient Merge Input Parameters
Patient Merge Output Parameters
4.2.1.4. Expected Behavior
| Outcome |
Header HTTP Response |
Payload OperationOutcome |
Expected Handling |
| Merge completed |
200 OK |
Yes |
Return merge status, retained patient reference, source patient reference, and optional informational OperationOutcome. |
| Merge accepted for review |
202 Accepted |
Yes |
|
| Validation failure |
400 Bad Request |
Yes |
Return computable validation details when required merge inputs are missing or malformed. |
| Patient not found |
404 Not Found |
Yes |
Indicate that one or more referenced Patient records could not be resolved. |
| Unauthorized |
401 Unauthorized or 403 Forbidden |
No |
|
| Merge criteria conflict |
409 Conflict |
No |
Indicate that PCR merge governance rules prevent the requested merge. |
| Service failure |
5xx Server Error |
No |
|