ADT A28

ADT A28: Create a new medical record

Overview

This message will either create or update a medical record in PKB. If the specified medical record (identified by the PID segment) is not found, it will be created. Otherwise, it will be updated.

If an update is performed, then the entire set of medications, allergies or diagnoses sent by your Organisation will be replaced, depending on what is sent. Note - this includes any medications, allergies or diagnoses added by a Professional from your Organisation. For example, if a Professional from your Organisation manually adds an allergy, but then a different allergy is provided in an A28 message from your Organisation, the entry manually added by the Professional will be replaced.

If an update is performed to a medical record that sits outside of your Organisation then the update will be performed to that medical record but the record will remain in it's current Organisation / Organisation Network. The act of sending an A28 from your Organisation will not automatically add or invite the patient to your Organisation.

If you provide an email address in the message then this will be added to the record and the patient will be sent an email invitation to register (unless they have already registered, in which case they are sent a request to confirm the newly added email address). See here for more information on how PKB handles email addresses.

Relevant entities

Please click through to the Data Model to explore the presentation of these entities in the web interface.

Update behaviour

[[Patient]]

Matched on: See our notes on identifiers & matching for full details of our approach to matching [[Patient]] entities via HL7.

When matched: Partial update will be performed on the [[Patient]] if the supplied MSH-7 timestamp is greater than or equal to [[Patient.Entered Timestamp]] held on the record. Note: the [[Patient.Entered Timestamp]] may have been set via any route e.g HL7, FHIR or UI. See our PID specification for which fields will be left unmodified if a blank is provided.

When not matched: New [[Patient]] created. [[Patient.Entered Timestamp]] will be set to the value in MSH-7.

[[Contact]]

Matched on: [[Contact.Type]] and [[Contact.Value]]. Note that only email contacts can be added via HL7 - the phone number is stored directly on the [[Patient]].

When matched: No action. Any contacts already known will remain on the record.

When not matched: New [[Contact]] created. If this is the first email address for the record then an invitation to register will be sent to the email address. If there was already an email address on the record then a confirmation request will be sent to the email address. See our notes on email address handling for more information.

[[National ID]]

Matched on: Since only a single National ID for any given National ID Type is permitted on a medical record, an instance of a National ID for a patient can be matched on the [[National ID Type]] alone.

When matched: The corresponding [[National ID.Value]] is updated if a valid value was provided. An existing National ID can be changed but not removed.

When not matched: New [[National ID]] added to the medical record.

[[National ID Type]]

Matched on: [[National ID Type.HL7 Assigning Authority]] as derived from PID-2.4 and PID-3.4 and [[National ID Type.HL7 Type Code]] as derived from PID-2.5 and PID-3.5.

When matched: Matching the type is a prerequisite for processing the corresponding National ID.

When not matched: The corresponding National ID is silently ignored. New types cannot be created via HL7 messaging.

[[Organisation Level ID]]

Matched on: [[Organisation Level ID.Value]] as derived from PID-2.1 and PID-3.1 in conjunction with the specified [[Organisation Level ID Type]]

When matched: No action. Any Organisation Level IDs already known will remain on the record.

When not matched: New [[Organisation Level ID]] added to the medical record.

[[Organisation Level ID Type]]

Matched on: [[Organisation Level ID Type.HL7 Assigning Authority]] as derived from PID-2.4 and PID-3.4 and [[Organisation Level ID Type.HL7 Type Code]] as derived from PID-2.5 and PID-3.5.

When matched: Matching the type is a prerequisite for processing the corresponding Organisation Level ID.

When not matched: The corresponding Organisation Level ID is silently ignored. New types cannot be created via HL7 messaging.

[[Team Level ID]]

Matched on: [[Team Level ID.Value]] as derived from PID-2.1 and PID-3.1 in conjunction with the specified [[Team Level ID Type]]

When matched: No action. Any Team Level IDs already known will remain on the record.

When not matched: New [[Team Level ID]] added to the medical record.

[[Team Level ID Type]]

Matched on: [[Team Level ID Type.HL7 Assigning Authority]] as derived from PID-2.4 and PID-3.4 and [[Team Level ID Type.HL7 Type Code]] as derived from PID-2.5 and PID-3.5.

When matched: Matching the type is a prerequisite for processing the corresponding Team Level ID.

When not matched: The corresponding Team Level ID is silently ignored. New types cannot be created via HL7 messaging.

[[Allergy]]

Matched on: [[Allergy.Allergen]] as derived from AL1-3

When matched: The matching [[Allergy]] is replaced with the new information. A partial update is not performed. Note: Any allergies previously stored by this organisation, but which were not provided this time, will be deleted.

When not matched: A new [[Allergy]] is added to the medical record.

[[Diagnosis]]

Matched on: [[Diagnosis.Diagnosis]] as derived from DG1-3

When matched: The matching [[Diagnosis]] is replaced with the new information. A partial update is not performed. Note: Any diagnoses previously stored by this organisation, but which were not provided this time, will be deleted.

When not matched: A new [[Diagnosis]] is added to the medical record.

[[Medication]]

Matched on: [[Medication.Substance]] as derived from ZRX-2 and [[Medication.Start Date]] as derived from ZRX-1.4. Note: a match on both Substance and Start Date is sought first, but failing that a match on just Substance is accepted.

When matched: The matching [[Medication]] is replaced with the new information. A partial update is not performed. Note: Any medications previously stored by this organisation, but which were not provided this time, will be deleted.

When not matched: A new [[Medication]] is added to the medical record.

Definition

ADT A28

Examples

Create a new patient with these IDs, demographics, medications list, allergies, and diagnoses.

MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A28|ABC0000000001|P|2.4

PID|||9999999999^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||Flat name^1, The Road^London^London^SW1A 1AA^GBR||01234567890^PRN~07123456789^PRS|^NET^^john.smith@company.com~01234098765^WPN||||||||||||||||N|

AL1|1||^Paracetamol^|^Mild^|Coughing|201408310408

NTE|||||^Foster^John^Harry^^Dr|

DG1|1||^Asthma^||201408310408|||||||||||^Foster^John^Harry^^Dr|

ZRX|^Once A Day^^201409020909^201409160909|^Paracetamol^|1||^Tablet^||^Instructions||||||^Foster^John^Harry^^Dr|

ZTM|first_alias~second_alias~third_alias|

Response

PKB will respond with a standard HL7 acknowledgement.