Manage Encounters


ADT^A01: Admit a patient

Overview

This will create a new Encounter for the specified patient.

Relevant Entities

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

Update Behaviour

Message Entity Matching Criteria Behaviour (Matched) Behaviour (Not Matched)
A01 [[Encounter]] [[Encounter.External ID]] as derived from PV1-19.1 The [[Message]] will be handled as indicated below. A new [[Encounter]] will be created with this message.
  [[Message]] An HL7-derived Encounter can contain zero or one admission event [[Message]]. If the [[Encounter]] has been matched, then there will be at most one admission event [[Message]], so no other IDs are required for matching. The admission event [[Message]] is replaced with the information in this message. The admission event [[Message]] is added to the [[Encounter]].

Definition


Segment Field Component Description Example Data Model
MSH

Message header. This conforms to PKB's standard definition.
 
PID

Patient identification. This conforms to PKB's standard definition.
 
PV1

Patient visit information. This contains most of the relevant Encounter information that PKB processes. See here for further details of our approach to Encounters.
 

PV1-2
Patient class
 


PV1-2.1 Patient class. Allowed values are defined in Code Set PKBCS04. I [[Message.Class]]

[ PV1-3 ]


 


PV1-3.9 Free text description of the location. My Ward [[Message->Location.Description]]

[ PV1-7 ]
Attending doctor
[[Message->External Participant.Name]]

[[Message->External Participant.Role]] will be set to ATTENDER.


PV1-7.2 Family name Jones  


[ PV1-7.3 ] Given name Stuart  


[ PV1-7.4 ]
Middle names James  


[ PV1-7.6 ] Prefix Dr  

[ PV1-8 ]
Referring doctor
[[Message->External Participant.Name]]

[[Message->External Participant.Role]] will be set to REFERRER.


PV1-8.2 Family name Smith  


[ PV1-8.3 ] Given name William  


[ PV1-8.4 ] Middle names
 


[ PV1-8.6 ] Prefix Dr  

[ PV1-9 ]
Consulting doctor
[[Message->External Participant.Name]]

[[Message->External Participant.Role]] will be set to CONSULTANT.


PV1-9.2 Family name Foster  


[ PV1-9.3 ] Given name Terry  


[ PV1-9.4 ] Middle names
 


[ PV1-9.6 ] Prefix Mr  

[ PV1-10 ]
Hospital service. See here for more information on code sets.
 


PV1-10.1 Hospital service code
[[Message.Specialty]]

PV1-19
Visit ID. This is used by PKB to uniquely identify an Encounter.
 


PV1-19.1 Visit ID V00001 [[Encounter.External ID]]

[ PV1-44 ]
Admit datetime. Timestamp of admission for the entire Encounter.
 


PV1-44.1 Admit timestamp 201508011200 [[Message.Timestamp]]

If not provided, MSH-7 will be used.
  PV1-45
Discharge datetime. Timestamp of discharge for the entire Encounter.   Ignored by an A01

The message subject will be automatically generated based on the [[Message.Class]].

I :  Inpatient visit
O : Outpatient visit
A : GP visit
E : Emergency
H : Home visit
F : In field care
D : Extended outpatient treatment
V : Electronic communication

[[Message.Subject]]

The message content will be automatically generated based on the [[Message.Class]]. For example:

"Mr John Smith admitted to My Ward at 01/Jan/2017 16:32:46"

[[Message.Content]]


Examples

MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A01|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
PV1|1|I|^^^^^^^^My Ward||||^Jones^Stuart^James^^Dr^|^Smith^William^^^Dr^|^Foster^Terry^^^Mr^||||||||||V00001|||||||||||||||||||||||||201508011000|201508011200

Response

PKB will respond with a standard HL7 acknowledgement.

ADT^A02: Transfer a patient

Overview

Records a patient transfer.

Relevant Entities

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

Update Behaviour

Message Entity Matching Criteria Behaviour (Matched) Behaviour (Not Matched)
A02 [[Encounter]] [[Encounter.External ID]] as derived from PV1-19.1 The [[Message]] will be handled as indicated below. A new [[Encounter]] will be created with this message.
  [[Message]] Transfer event [[Message]]s are not uniquely identifiable. N/A The transfer event [[Message]] will be added to the [[Encounter]].

Definition

This is identical in format to the ADT^A01, except that EVN-6 is used for the Message timestamp instead of PV1-44, as shown below:

Segment Field Component Description Example Data Model
EVN

Event Type
 

[ EVN-6 ]
Event Occurred
 


EVN-6.1 Event occurred 201508011200 [[Message.Timestamp]]

If not provided, MSH-7 will be used.
PV1



 

PV1-44
Admit datetime. Timestamp of admission for the entire Encounter.
Ignored by an A02
  PV1-45   Discharge datetime. Timestamp of discharge for the entire Encounter.   Ignored by an A02

Examples

MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A02|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
EVN||||||201508011100|
PV1|1|I|^^^^^^^^My Ward||||^Jones^Stuart^James^^Dr^|^Smith^William^^^Dr^|^Foster^Terry^^^Mr^||||||||||V00001|||||||||||||||||||||||||201508011000|201508011200


ADT^A03: Discharge a patient

Overview

Records a patient discharge.

Relevant Entities

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

Update Behaviour

Message Entity Matching Criteria Behaviour (Matched) Behaviour (Not Matched)
A03 [[Encounter]] [[Encounter.External ID]] as derived from PV1-19.1 The [[Message]] will be handled as indicated below. A new [[Encounter]] will be created with this message.
  [[Message]] An HL7-derived Encounter can contain zero or one discharge event [[Message]]. If the [[Encounter]] has been matched, then there will be at most one discharge event [[Message]], so no other IDs are required for matching. The discharge event [[Message]] is replaced with the information in this message. The discharge event [[Message]] is added to the [[Encounter]].

Definition

This is identical in format to the ADT^A01, except that PV1-45 is used for the Message timestamp instead of PV1-44, as shown below:

Segment Field Component Description Example Data Model
PV1



 

PV1-44
Admit datetime. Timestamp of admission for the entire Encounter.
Ignored by an A03

[ PV1-45 ]
Discharge datetime. Timestamp of discharge for the entire Encounter.

PV1-45.1 Discharge timestamp 201508011200 [[Message.Timestamp]]

If not provided, MSH-7 will be used.

Examples

MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A03|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
PV1|1|I|^^^^^^^^My Ward||||^Jones^Stuart^James^^Dr^|^Smith^William^^^Dr^|^Foster^Terry^^^Mr^||||||||||V00001|||||||||||||||||||||||||201508011000|201508011200


ADT^A05: Pre-Admit a Patient

Overview

Records an expected future admission of a patient.

Additionally, an appointment will be created in the patient's calendar.

Relevant Entities

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

Update Behaviour

Message Entity Matching Criteria Behaviour (Matched) Behaviour (Not Matched)
A05 [[Encounter]] [[Encounter.External ID]] as derived from PV1-19.1 The [[Message]] will be handled as indicated below. A new [[Encounter]] will be created with this message.
  [[Message]] An HL7-derived Encounter can contain zero or one pre-admit event [[Message]]. If the [[Encounter]] has been matched, then there will be at most one pre-admit event [[Message]], so no other IDs are required for matching. The pre-admit event [[Message]] is replaced with the information in this message. The pre-admit event [[Message]] will be added to the [[Encounter]].
  [[Appointment]] PKB maintains an internal link joining the [[Encounter]] to the [[Appointment]]. No additional external IDs required. The [[Appointment]] information is replaced with the information in this message. A new [[Appointment]] is created and associated with this [[Encounter]].

Definition

This is identical in format to the ADT^A01, except that an [[Appointment]] entity will also be populated. In addition, since this message is typically used for future events, PV2-8 and EVN-3 will also be considered when determining both the Message timestamp and the Appointment start time. This is shown below.

Segment Field Component Description Example Data Model
(Encounters)
Data Model
(Appointments)
[ EVN ]



   

EVN-3
Timestamp of planned event

 


EVN-3.1 Timestamp 201508011200 [[Message.Timestamp]]
if PV2-8 was not provided.
 [[Appointment.Start Timestamp]]
if PV2-8 was not provided.
PV1



   

PV1-2
Patient class

 


PV1-2.1 Patient class. Allowed values are defined in Code Set PKBCS04. I [[Message.Class]] [[Appointment.Subject]]

PV1-3
Location

 


PV1-3.9 Free text description of the location. My Ward [[Message->Location.Description]] [[Appointment.Location]]

[ PV1-44 ]
Admit datetime. Timestamp of admission for the entire Encounter.

 


PV1-44.1 Admit timestamp 201508011200 [[Message.Timestamp]]
if neither PV2-8 nor EVN-3 were provided.

If PV1-44 also not provided, MSH-7 will be used.
[[Appointment.Start Timestamp]]
if neither PV2-8 nor EVN-3 were provided.

If PV1-44 also not provided, MSH-7 will be used.
[ PV2 ]



   

PV2-8
Expected admit date/time

 


PV2-8.1 Timestamp 201508011200 [[Message.Timestamp]] [[Appointment.Start Timestamp]]
[ ZSC ]

The purpose of this custom segment is to allow you to specify attributes of the auto-generated [[Appointment]] which would otherwise be set from the SCH segment for SIU messages.
   

[ ZSC-8 ]
Appointment type. See here for more information on code sets.

 


[ ZSC-8.1 ] Appointment type code T01
[[Appointment.Type.Code]]


[ ZSC-8.3 ] Appointment type coding system INT
[[Appointment.Type.Coding System]]


The appointment will not have an end time recorded.

[[Appointment.End Timestamp]]

Examples

MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A05|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
PV1|1|I|^^^^^^^^My Ward||||^Jones^Stuart^James^^Dr^|^Smith^William^^^Dr^|^Foster^Terry^^^Mr^||||||||||V00001|||||||||||||||||||||||||201508011000|201508011200


ADT^A08: Update an Encounter

Overview

Records an update to Encounter information.

Relevant Entities

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

Update Behaviour

Message Entity Matching Criteria Behaviour (Matched) Behaviour (Not Matched)
A08 [[Encounter]] [[Encounter.External ID]] as derived from PV1-19.1 The [[Message]] will be handled as indicated below. A new [[Encounter]] will be created with this message.
  [[Message]] : Admission Event An HL7-derived Encounter can contain zero or one admission event [[Message]]. If the [[Encounter]] has been matched, then there will be at most one admission event [[Message]], so no other IDs are required for matching. The timestamp of the existing admission event [[Message]] will be updated to the admit timestamp provided on this update event [[Message]], if one was provided and which differs.  No action.
  [[Message]] : Discharge Event An HL7-derived Encounter can contain zero or one discharge event [[Message]]. If the [[Encounter]] has been matched, then there will be at most one discharge event [[Message]], so no other IDs are required for matching. The timestamp of the existing discharge event [[Message]] will be updated to the discharge timestamp provided on this update event [[Message]], if one was provided and which differs. No action.
  [[Message]] : Update Event Update event [[Message]]s are not uniquely identifiable. N/A The update event [[Message]] will be added to the [[Encounter]].

Definition

This is identical in format to the ADT^A01, except that timestamp of the update event [[Message]] will be taken from EVN-6, and PV1-44 and PV1-45 will be checked only for updates to the timestamp of admission and/or discharge event [[Message]]s, where they exist. This is shown below:

Segment Field Component Description Example Data Model
[ EVN ]

Event Type
 
  [ EVN-6 ]   Event Occurred    
    EVN-6.1 Event Occurred 201508011200 [[Message.Timestamp]] : Update Event

If not provided, MSH-7 will be used.
PV1          

[ PV1-44 ]
Admit datetime. Timestamp of admission for the entire Encounter.
 

PV1-44.1 Admit timestamp 201508011200 [[Message.Timestamp]] : Admission Event

If not provided, no update is performed.
  [ PV1-45 ]   Discharge datetime. Timestamp of discharge for the entire Encounter.    
    PV1-45.1 Discharge timestamp 201508011200 [[Message.Timestamp]] : Discharge Event

If not provided, no update is performed.

Examples

MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A08|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
PV1|1|I|^^^^^^^^My Ward||||^Jones^Stuart^James^^Dr^|^Smith^William^^^Dr^|^Foster^Terry^^^Mr^||||||||||V00001|||||||||||||||||||||||||201508011000|201508011200


ADT^A11: Cancel an admission

Overview

This will cancel the admission event associated with this Encounter, if one exists.

Note that if there are other (non-admission) event Messages associated with this Encounter, then the Encounter will not be removed, i.e. it will continue to exist but without an admission event Message.

Relevant Entities

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

Update Behaviour

Message Entity Matching Criteria Behaviour (Matched) Behaviour (Not Matched)
A11 [[Encounter]] [[Encounter.External ID]] as derived from PV1-19.1 The [[Message]] will be handled as indicated below. Since this is a cancellation message, no action will be taken.
  [[Message]] An HL7-derived Encounter can contain zero or one admit event [[Message]]. If the [[Encounter]] has been matched, then there will be at most one admit event [[Message]], so no other IDs are required for matching. If there is an admission event [[Message]] associated with this [[Encounter]], it will be deleted. No action.

Definition


Segment Field Component Description Example Data Model
MSH

Message header. This conforms to PKB's standard definition.
 
PID

Patient identification. This conforms to PKB's standard definition.
 
PV1

Patient visit information. This contains most of the relevant Encounter information that PKB processes. See here for further details of our approach to Encounters.
 

PV1-19
Visit ID. This is used by PKB to uniquely identify an Encounter.
 


PV1-19.1 Visit ID V00001 [[Encounter.External ID]]

Examples

MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A11|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
PV1|1||||||||||||||||||V00001|


ADT^A12: Cancel a transfer

Overview

This will cancel the most recent transfer event associated with this Encounter, if one exists.

Relevant Entities

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

Update Behaviour

Message Entity Matching Criteria Behaviour (Matched) Behaviour (Not Matched)
A12 [[Encounter]] [[Encounter.External ID]] as derived from PV1-19.1 The [[Message]] will be handled as indicated below. Since this is a cancellation message, no action will be taken.
  [[Message]] Transfer event [[Message]]s are not uniquely identifiable. Instead, matching is done based on timestamp. If there is one or more transfer event [[Message]]s associated with this [[Encounter]], the most recent will be deleted. No action.

Definition

This is identical in format to the ADT^A11.

Examples

MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A12|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
PV1|1||||||||||||||||||V00001|

ADT^A13: Cancel a discharge

Overview

This will cancel the discharge event associated with this Encounter, if one exists.

Relevant Entities

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

Update Behaviour

Message Entity Matching Criteria Behaviour (Matched) Behaviour (Not Matched)
A13 [[Encounter]] [[Encounter.External ID]] as derived from PV1-19.1 The [[Message]] will be handled as indicated below. Since this is a cancellation message, no action will be taken.
  [[Message]] An HL7-derived Encounter can contain zero or one discharge event [[Message]]. If the [[Encounter]] has been matched, then there will be at most one discharge event [[Message]], so no other IDs are required for matching. If there is a discharge event [[Message]] associated with this [[Encounter]], it will be deleted. No action.

Definition

This is identical in format to the ADT^A11.

Examples

MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A13|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
PV1|1||||||||||||||||||V00001|

ADT^A14: Pending Admit

Overview

Records an expected future admission of a patient.

Additionally, an appointment will be created in the patient's calendar.

Relevant Entities

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

Update Behaviour

Message Entity Matching Criteria Behaviour (Matched) Behaviour (Not Matched)
A14 [[Encounter]] [[Encounter.External ID]] as derived from PV1-19.1 The [[Message]] will be handled as indicated below. A new [[Encounter]] will be created with this message.
  [[Message]] An HL7-derived Encounter can contain zero or one pending-admit event [[Message]]. If the [[Encounter]] has been matched, then there will be at most one pending-admit event [[Message]], so no other IDs are required for matching. The pending-admit event [[Message]] is replaced with the information in this message. The pending-admit event [[Message]] will be added to the [[Encounter]].
  [[Appointment]] PKB maintains an internal link joining the [[Encounter]] to the [[Appointment]]. No additional external IDs required. The [[Appointment]] information is replaced with the information in this message. A new [[Appointment]] is created and associated with this [[Encounter]].

Definition

This is identical in format to the ADT^A05.

Examples

MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A14|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
PV1|1|I|^^^^^^^^My Ward||||^Jones^Stuart^James^^Dr^|^Smith^William^^^Dr^|^Foster^Terry^^^Mr^||||||||||V00001|||||||||||||||||||||||||201508011000|201508011200

ADT^A27: Cancel Pending Admit

Overview

This will cancel the pending-admit event associated with this Encounter, if one exists. 

In addition, it will cancel the corresponding appointment in the patient's calendar that was created when the A14 message was received.

Relevant Entities

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

Update Behaviour

Message Entity Matching Criteria Behaviour (Matched) Behaviour (Not Matched)
A27 [[Encounter]] [[Encounter.External ID]] as derived from PV1-19.1 The [[Message]] will be handled as indicated below. Since this is a cancellation message, no action will be taken.
  [[Message]] An HL7-derived Encounter can contain zero or one pending-admit event [[Message]]. If the [[Encounter]] has been matched, then there will be at most one pending-admit event [[Message]], so no other IDs are required for matching. If there is a pending-admit event [[Message]] associated with this [[Encounter]], it will be deleted. No action.
  [[Appointment]] PKB maintains an internal link joining the [[Encounter]] to the [[Appointment]]. No additional external IDs required. The linked [[Appointment]] will be cancelled. No action.

Definition

This is identical in format to the ADT^A11.

Examples

MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A27|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
PV1|1||||||||||||||||||V00001|

ADT^A38: Cancel Pre-Admit

Overview

This will cancel the pre-admit event associated with this Encounter, if one exists.

In addition, it will cancel the corresponding appointment in the patient's calendar that was created when the A05 message was received.

Relevant Entities

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

Update Behaviour

Message Entity Matching Criteria Behaviour (Matched) Behaviour (Not Matched)
A38 [[Encounter]] [[Encounter.External ID]] as derived from PV1-19.1 The [[Message]] will be handled as indicated below. Since this is a cancellation message, no action will be taken.
  [[Message]] An HL7-derived Encounter can contain zero or one pre-admit event [[Message]]. If the [[Encounter]] has been matched, then there will be at most one pre-admit event [[Message]], so no other IDs are required for matching. The pre-admit event [[Message]] associated with this [[Encounter]] will be deleted. No action.
  [[Appointment]] PKB maintains an internal link joining the [[Encounter]] to the [[Appointment]]. No additional external IDs required. The linked [[Appointment]] will be cancelled. No action.

Definition

This is identical in format to the ADT^A11.

Examples

MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A38|ABC0000000001|P|2.4
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
PV1|1||||||||||||||||||V00001|

Comments