ADT in Canada

In Canada, your system sends HL7 v2 admission, discharge, and transfer (ADT) messages to Health Gorilla. Health Gorilla uses them to keep each patient's record accurate and up to date as the patient moves between facilities.

The Canadian ADT service works differently from the United States ADT Data Service: there's no patient roster to maintain, and Health Gorilla doesn't send notifications back to your system. Your system sends ADT messages, and Health Gorilla returns an HL7 v2 acknowledgment for each one.

Patient Identifiers

Include both of these identifiers in the PID segment of every ADT message, each tagged with its identifier type code:

  • Health Card Number (HCN): identifier type HCN. Identifies the patient across facilities.
  • Medical Record Number (MRN): identifier type PT. Identifies the patient within the facility that assigned it.

Health Gorilla uses these identifiers, along with the patient's name and date of birth, to match each message to the correct patient. A message for a patient Health Gorilla hasn't matched creates a new record, and a message that matches an existing patient updates it. Health Gorilla needs a first name, last name, and date of birth to create or update a patient from a message.

Supported ADT Event Types

Health Gorilla accepts the following HL7 v2 ADT event types in Canada. If you send an event type outside this set, Health Gorilla returns an HL7 v2 acknowledgment rejecting the message.

Event TypeDescription
A01Admit or visit notification
A02Transfer a patient
A03Discharge or end visit
A04Register a patient
A05Pre-admit a patient
A08Update patient information
A14Pending admit
A21Patient goes on a leave of absence
A40Merge duplicate patient records

Canada accepts the A40 patient merge event. The A29 patient delete event is accepted in the United States only.

Patient Merge (A40)

When Health Gorilla receives an A40 message, it merges the two patient records named in that message, so the patient's information stays consolidated. Send one when your system finds a duplicate.

Requirements for a Merge Message

Three fields are required on an A40. Several conditions beyond field presence also apply, and those are described after the table.

FieldRequirement
EVN-4Merge, which is case-insensitive. To reverse a merge, contact Health Gorilla rather than sending a reversal message.
PID-3The identifiers of the primary patient, the record that remains after the merge. Include the Medical Record Number tagged with identifier type PT.
MRG-1The identifiers of the prior patient, the duplicate record. Include the Medical Record Number tagged with identifier type PT.

Health Gorilla matches both patients on the Medical Record Number. The Health Card Number identifies a patient across facilities on other message types, and Health Gorilla still validates it on an A40, but it matches a merge on the Medical Record Number alone. Health Gorilla rejects an A40 that carries only a Health Card Number.

Both Medical Record Numbers must already identify a patient Health Gorilla holds, and each must match exactly one patient. Two consequences are worth planning for:

  • The primary patient has to exist first. Health Gorilla rejects an A40 whose primary patient it hasn't seen before rather than creating one.
  • A Medical Record Number has to be unique across your organization, not only within the facility that assigned it. Health Gorilla matches the number across your whole organization rather than scoping it to a facility, so if two facilities issue the same number to different patients, Health Gorilla matches both records and rejects the message.

The patient's name and date of birth don't affect whether the merge is applied. Health Gorilla updates the primary patient's demographics from the A40 only when the message carries a first name, a last name, a full date of birth, and a gender. Without all four, the merge still applies and the demographics are left as they are.

Example Merge Message

In the following A40, Health Gorilla merges the patient with Medical Record Number MRN20055 into the patient with Medical Record Number MRN10022.

MSH|^~\&|SENDING_APP|1.2.3.4.5|HEALTHGORILLA|HG|20260901120000||ADT^A40|MSG00001|P|2.5
EVN|A40|20260901120000||Merge
PID|1||MRN10022^^^^PT~1234567890^^^^HCN||DOE^JANE^A||19850214|F|||123 MAIN ST^^TORONTO^ON^M5H2N2^CAN||^PRN^PH^^^416^5551234
MRG|MRN20055^^^^PT

Acknowledgments

Health Gorilla returns an HL7 v2 acknowledgment for every A40.

MSA-1Meaning
AAThe merge was applied.
ARHealth Gorilla rejected the message. MSA-3 gives the reason.
AEHealth Gorilla encountered an error processing the message.

Health Gorilla always gives the reason for a rejection in MSA-3, so start there when a merge doesn't take effect. When more than one thing is wrong, the reasons are joined with a semicolon.

CauseWhat to check
The sending facility in MSH-4 isn't recognizedConfirm the facility identifier with Health Gorilla. A message is rejected on this before any patient matching, so nothing else in it is evaluated.
EVN-4 is missing, or holds a value that isn't recognizedSend Merge.
A Medical Record Number is missing from PID-3 or MRG-1Confirm both segments carry a Medical Record Number tagged with identifier type PT.
A Medical Record Number matches no patient, or matches more than oneConfirm both patients already exist in Health Gorilla, and that the number is unique across your organization.

If a rejection doesn't match any of the causes above, contact Health Gorilla.

Health Gorilla rejects a replayed A40 whose merge already applied, because the duplicate record no longer exists.

After a Merge

The primary patient's identifiers are used going forward, and the duplicate patient's information is consolidated under the primary patient. Requests that use the duplicate patient's former identifier still resolve to the primary patient, so no change is needed on your side.

The merge applies only within Health Gorilla. It doesn't change records in your system or in a provincial registry.