---
title: "ADT A27 (Cancel A Pending Admission)"
canonical: "https://wiki.patientsknowbest.com/space/api/3364946987/ADT%20A27%20(Cancel%20A%20Pending%20Admission)"
format: markdown
---
> Macro (toc)

# 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

- Encounter information is used to populate[ ](http://www.google.com/url?q=http%3A%2F%2Fdev.patientsknowbest.com%2Fhome%2Fdata-model%23TOC-Encounter&sa=D&sntz=1&usg=AOvVaw2Htu10Sp6-dKBOzPbI0I7l)<u>[[[Encounter]]](https://wiki.patientsknowbest.com/space/api/3744497665/Entity%3A+Encounter)</u> and[ ](http://www.google.com/url?q=http%3A%2F%2Fdev.patientsknowbest.com%2Fhome%2Fdata-model%23TOC-Encounter&sa=D&sntz=1&usg=AOvVaw2Htu10Sp6-dKBOzPbI0I7l)<u>[[[Encounter Event]]](https://wiki.patientsknowbest.com/space/api/3744497665/Entity%3A+Encounter)</u> entities
- Encounter information is also used to create an[ ](http://www.google.com/url?q=http%3A%2F%2Fdev.patientsknowbest.com%2Fhome%2Fdata-model%23TOC-Appointment&sa=D&sntz=1&usg=AOvVaw2b4AZDXyHgNVkc4xPV7Kdv)<u>[[[Appointment]]](https://wiki.patientsknowbest.com/space/api/3729195048/Entity%3A+Appointment)</u>

Please click through to the[ ](http://www.google.com/url?q=http%3A%2F%2Fdev.patientsknowbest.com%2Fhome%2Fdata-model&sa=D&sntz=1&usg=AOvVaw3H4dk1Ql5ZGfvclmnuHM_Y)<u>[Data Model](https://wiki.patientsknowbest.com/space/api/3363700789/Data+Model)</u> to explore the presentation of these entities in the web interface.

<details>
<summary>Update Behaviour</summary>

**[[Encounter]]**

<u>Matched on</u>: [[Encounter.External Encounter ID]] as derived from PV1-19.1

<u>When matched</u>: The [[Encounter Event]] will be handled as indicated below.

<u>When not matched</u>: Since this is a cancellation message, no action will be taken.

**[[Encounter Event]]**

<u>Matched on</u>: An Encounter can contain zero or one pending-admit [[Encounter Event]]s. If the [[Encounter]] has been matched, then there will be at most one pending-admit [[Encounter Event]], so no other IDs are required for matching.

<u>When matched</u>: If there is a pending-admit [[Encounter Event]] associated with this [[Encounter]], it will be deleted.

<u>When not matched</u>: No action.

**[[Appointment]]**

<u>Matched on</u>: PKB maintains an internal link joining the [[Encounter]] to the [[Appointment]]. No additional external IDs required.

<u>When matched</u>: The linked [[Appointment]] will be cancelled.

<u>When not matched</u>: No action.
</details>

## Definition

This is identical in format to the <u>[ADT A11](https://wiki.hub.patientsknowbest.com/wiki/spaces/api/pages/3364848631)</u>.

## Examples

> MSH|^~\&|SendingApp|SendingFacility|HL7API|PKB|20160102101112||ADT^A27|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|
> 
> PV1|1||||||||||||||||||V00001|

## Response

PKB will respond with a[ ](http://www.google.com/url?q=http%3A%2F%2Fdev.patientsknowbest.com%2Fhome%2Fhl7-api%2Fmessages%2Fack&sa=D&sntz=1&usg=AOvVaw19jl6l0RTsr4epvg_3z1Se)<u>[standard HL7 acknowledgement](https://wiki.hub.patientsknowbest.com/wiki/spaces/api/pages/3364848470)</u>.