visit the hl7 website
Provincial Client Registry (PCR) HL7 FHIR® Contribution Implementation Guide v1.0.0-draft1
fhir-logo
  • Index
  • Home
    • Home
    • Introduction
    • Relationship to other Specifications
    • Scope
    • Glossary
  • Business Context
    • Business Context
    • Business Model
    • Business Data
    • Use Cases
    • Business Rules
    • Contribution Models
  • Technical Context
    • Technical Context
    • Implementer Responsibility
    • Conformance Rules
    • Connectivity Summary
  • FHIR Artifacts
    • FHIR Artifacts
    • Interactions
    • Operations
    • Profiles
    • Terminology
    • System URIs
    • Examples
    • Capability Statement
    • Response Handling
    • Downloads
  • Change Log
    • Change Log
    • Known Issues & Future Developments
    • Revision History
    1. Index
    2. FHIR Artifacts
    3. Operations
    4. Patient Merge

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:

{
"resourceType": "Parameters",
"id": "parameters-merge-input-example",
"meta": {
"profile": [
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-parameters-merge-input"
]
},
"parameter": [
{
"name": "merge-reason",
"valueCodeableConcept": {
"coding": [
{
"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",
"valueIdentifier": {
"system": "https://hospital.example.ca/user-id",
"value": "USER12345"
}
},
{
"name": "source-patient",
"valueReference": {
"reference": "Patient/patient-contribution-source-example"
}
},
{
"name": "source-patient-identifier",
"valueIdentifier": {
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "https://hospital.example.ca/mrn",
"value": "MRN123456"
}
},
{
"name": "target-patient",
"valueReference": {
"reference": "Patient/patient-contribution-target-example"
}
},
{
"name": "target-patient-identifier",
"valueIdentifier": {
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "https://hospital.example.ca/mrn",
"value": "MRN999999"
}
},
{
"name": "result-patient",
"resource": {
"resourceType": "Patient",
"id": "patient-contribution-merged-example",
"meta": {
"profile": [
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-patient-contribution"
]
},
"identifier": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "https://hospital.example.ca/mrn",
"value": "MRN999999"
},
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "https://hospital.example.ca/mrn",
"value": "MRN123456"
}
],
"active": true,
"name": [
{
"use": "official",
"family": "Smith",
"given": [
"Michael",
"John"
],
"_given": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
"valueCode": "MID"
}
]
},
null
]
}
],
"gender": "male",
"birthDate": "1985-06-15",
"address": [
{
"use": "home",
"type": "postal",
"line": [
"100 Main Street"
],
"city": "Toronto",
"state": "ON",
"postalCode": "M5V2T6",
"country": "CAN"
}
]
}
}
]
}

Response Body:

{
"resourceType": "Parameters",
"id": "parameters-merge-output-example",
"meta": {
"profile": [
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-parameters-merge-output"
]
},
"parameter": [
{
"name": "input",
"resource": {
"resourceType": "Parameters",
"id": "parameters-merge-input-example",
"meta": {
"profile": [
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-parameters-merge-input"
]
},
"parameter": [
{
"name": "merge-reason",
"valueCodeableConcept": {
"coding": [
{
"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",
"valueIdentifier": {
"system": "https://hospital.example.ca/user-id",
"value": "USER12345"
}
},
{
"name": "source-patient",
"valueReference": {
"reference": "Patient/patient-contribution-source-example"
}
},
{
"name": "source-patient-identifier",
"valueIdentifier": {
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "https://hospital.example.ca/mrn",
"value": "MRN123456"
}
},
{
"name": "target-patient",
"valueReference": {
"reference": "Patient/patient-contribution-target-example"
}
},
{
"name": "target-patient-identifier",
"valueIdentifier": {
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "https://hospital.example.ca/mrn",
"value": "MRN999999"
}
},
{
"name": "result-patient",
"resource": {
"resourceType": "Patient",
"id": "patient-contribution-merged-example",
"meta": {
"profile": [
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-patient-contribution"
]
},
"identifier": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "https://hospital.example.ca/mrn",
"value": "MRN999999"
},
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "https://hospital.example.ca/mrn",
"value": "MRN123456"
}
],
"active": true,
"name": [
{
"use": "official",
"family": "Smith",
"given": [
"Michael",
"John"
],
"_given": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
"valueCode": "MID"
}
]
},
null
]
}
],
"gender": "male",
"birthDate": "1985-06-15",
"address": [
{
"use": "home",
"type": "postal",
"line": [
"100 Main Street"
],
"city": "Toronto",
"state": "ON",
"postalCode": "M5V2T6",
"country": "CAN"
}
]
}
}
]
}
},
{
"name": "result",
"resource": {
"resourceType": "Patient",
"id": "patient-contribution-merged-example",
"meta": {
"profile": [
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/profile-patient-contribution"
]
},
"identifier": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "https://hospital.example.ca/mrn",
"value": "MRN999999"
},
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR"
}
]
},
"system": "https://hospital.example.ca/mrn",
"value": "MRN123456"
}
],
"active": true,
"name": [
{
"use": "official",
"family": "Smith",
"given": [
"Michael",
"John"
],
"_given": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier",
"valueCode": "MID"
}
]
},
null
]
}
],
"gender": "male",
"birthDate": "1985-06-15",
"address": [
{
"use": "home",
"type": "postal",
"line": [
"100 Main Street"
],
"city": "Toronto",
"state": "ON",
"postalCode": "M5V2T6",
"country": "CAN"
}
]
}
},
{
"name": "outcome",
"resource": {
"resourceType": "OperationOutcome",
"id": "operationoutcome-example-success",
"meta": {
"profile": [
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/pcr-operationoutcome-contribution"
]
},
"issue": [
{
"severity": "information",
"code": "informational",
"details": {
"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:

{
"resourceType": "OperationOutcome",
"id": "operationoutcome-example-merge-error",
"meta": {
"profile": [
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/pcr-operationoutcome-contribution"
]
},
"issue": [
{
"severity": "error",
"code": "required",
"details": {
"text": "Both source-patient and target-patient are required for a merge request."
},
"expression": [
"Parameters.parameter.where(name = 'source-patient')",
"Parameters.parameter.where(name = 'target-patient')"
]
}
]
}

Example Patient Not Found HTTP Response: 404 Not Found

Message Body:

{
"resourceType": "OperationOutcome",
"id": "operationoutcome-example-notfound",
"meta": {
"profile": [
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/pcr-operationoutcome-contribution"
]
},
"issue": [
{
"severity": "error",
"code": "not-found",
"details": {
"text": "No Patient resource was found for id 987654."
},
"expression": [
"Patient.id"
]
}
]
}

Example Version Conflict HTTP Response: 412 Precondition Failed

Message Body:

{
"resourceType": "OperationOutcome",
"id": "operationoutcome-example-versionconflict",
"meta": {
"profile": [
"http://ontariohealth.ca/fhir/pcr/StructureDefinition/pcr-operationoutcome-contribution"
]
},
"issue": [
{
"severity": "error",
"code": "conflict",
"details": {
"text": "The submitted resource version does not match the current server version. Retrieve the latest Patient version and resubmit the update."
},
"expression": [
"Patient.meta.versionId"
]
}
]
}

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
Version: 1.0.0 FHIR Version: R4.0.1

Powered by SIMPLIFIER.NET

HL7® and FHIR® are the registered trademarks of Health Level Seven International