IHE UK Patient Administration Management (Unofficial)
0.1.0 - ci-build United Kingdom flag

IHE UK Patient Administration Management (Unofficial) - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

ExampleScenario: Inpatient admission, leave and discharge

Official URL: https://fhir.ihe-uk.org/ITI/PAM/ExampleScenario/InpatientLeaveAndDischarge Version: 0.1.0
Draft as of 2026-11-24 Computable Name: InpatientLeaveAndDischarge
sequenceDiagram
    autonumber
    participant PAS as Hospital PAS (York)
    participant IE as Integration Engine (ROUTE)
    participant GP as GP Practice (Malton)
    participant SC as Social Care (Local Authority)
    PAS->>IE: ADT^A01 Admit
    IE->>GP: ADT^A01 Admit
    PAS->>IE: ADT^A21 Leave of absence
    IE->>GP: ADT^A21 Leave of absence
    PAS->>IE: ADT^A22 Return from leave
    IE->>GP: ADT^A22 Return from leave
    PAS->>IE: ADT^A16 Pending discharge
    IE->>SC: ADT^A16 Pending discharge
    PAS->>IE: ADT^A03 Discharge
    IE->>GP: ADT^A03 Discharge
    IE->>SC: ADT^A03 Discharge
    Note over PAS,SC: every message is acknowledged (ACK) by its receiver

Events and recipients

Step Event IHE option Date/time (EVN-2) Encounter after the event GP Practice Social Care FHIR Message
1 ADT^A01 Admit Basic Subset 2 Nov 2026 14:30 in-progress, period.start ✓   scenario-a01
2 ADT^A21 Leave of absence Advanced Encounter Management 6 Nov 2026 10:00 onleave ✓   scenario-a21
3 ADT^A22 Return from leave Advanced Encounter Management 8 Nov 2026 18:00 in-progress ✓   scenario-a22
4 ADT^A16 Pending discharge Pending Event Management 10 Nov 2026 09:00 in-progress, expected discharge 12 Nov 2026 11:00 (PV2-9)   ✓ scenario-a16
5 ADT^A03 Discharge Basic Subset 12 Nov 2026 11:30 finished, period.end, discharge destination ✓ ✓ scenario-a03

Hospital Provider Spell

Every message identifies the same stay as an admitted patient, the Hospital Provider Spell 5000123:

  • in HL7 v2.5.1, PV1-19 Visit Number with CX-5 = AN (5000123^^^RCB^AN);
  • in FHIR, Encounter.identifier (Hospital Provider Spell Identifier) of the same Encounter resource, Encounter/inpatient-spell-5000123, in every message. Each message carries the Encounter as it is after the event, so a Consumer updates one Encounter rather than creating a new one.

HL7 v2 Table 0203 has no Hospital Provider Spell type, so AN (Account number) is used as an interim workaround.

HL7 v2.5.1 messages

The messages as sent by the PAS to the integration engine. The engine forwards them unchanged to the GP practice and social care, apart from MSH-5/MSH-6.

1. ADT^A01 Admit

MSH|^~\&|PAS|RCB|ROUTE|ROUTE|202611021430||ADT^A01^ADT_A01|SCN0000001|P|2.5.1|||||GBR|UNICODE UTF-8|en||ITKv1.0
EVN||202611021430|||OP000123^Cortana^Emily^^^Miss^^RCB55|202611021430
PID|1||9999999557^^^NHS&2.16.840.1.113883.2.1.4.1&ISO^NH||EDITESTPATIENT^TEN^^^MRS^^L||19800101|F|||1 TEST STREET^^BRACKNELL^BERKSHIRE^RG12 9AX^GBR^H||+441234567890||en
PD1|||MALTON GP PRACTICE^^Y06601^^^^^^^Y06601|G5612908^Townley^Gregory^^^Dr^^^GMC
PV1|1|I|RCB^OBS1^BAY2-6^RCB55|22|||C3456789^Darwin^Samuel^^^Dr^^^GMC|G5612908^Townley^Gregory^^^Dr^^^GMC|C3456789^Darwin^Samuel^^^Dr^^^GMC|300||||19|||C3456789^Darwin^Samuel^^^Dr^^^GMC||5000123^^^RCB^AN|||||||||||||||||||||||||202611021430
ZU1|202611021300|1

FHIR Message: scenario-a01

2. ADT^A21 Leave of absence

MSH|^~\&|PAS|RCB|ROUTE|ROUTE|202611061000||ADT^A21^ADT_A21|SCN0000002|P|2.5.1|||||GBR|UNICODE UTF-8|en||ITKv1.0
EVN||202611061000|||OP000123^Cortana^Emily^^^Miss^^RCB55|202611061000
PID|1||9999999557^^^NHS&2.16.840.1.113883.2.1.4.1&ISO^NH||EDITESTPATIENT^TEN^^^MRS^^L||19800101|F|||1 TEST STREET^^BRACKNELL^BERKSHIRE^RG12 9AX^GBR^H||+441234567890||en
PD1|||MALTON GP PRACTICE^^Y06601^^^^^^^Y06601|G5612908^Townley^Gregory^^^Dr^^^GMC
PV1|1|I|RCB^OBS1^BAY2-6^RCB55|22|||C3456789^Darwin^Samuel^^^Dr^^^GMC|G5612908^Townley^Gregory^^^Dr^^^GMC|C3456789^Darwin^Samuel^^^Dr^^^GMC|300||||19|||C3456789^Darwin^Samuel^^^Dr^^^GMC||5000123^^^RCB^AN|||||||||||||||||||||||||202611021430

FHIR Message: scenario-a21

3. ADT^A22 Return from leave of absence

MSH|^~\&|PAS|RCB|ROUTE|ROUTE|202611081800||ADT^A22^ADT_A21|SCN0000003|P|2.5.1|||||GBR|UNICODE UTF-8|en||ITKv1.0
EVN||202611081800|||OP000123^Cortana^Emily^^^Miss^^RCB55|202611081800
PID|1||9999999557^^^NHS&2.16.840.1.113883.2.1.4.1&ISO^NH||EDITESTPATIENT^TEN^^^MRS^^L||19800101|F|||1 TEST STREET^^BRACKNELL^BERKSHIRE^RG12 9AX^GBR^H||+441234567890||en
PD1|||MALTON GP PRACTICE^^Y06601^^^^^^^Y06601|G5612908^Townley^Gregory^^^Dr^^^GMC
PV1|1|I|RCB^OBS1^BAY2-6^RCB55|22|||C3456789^Darwin^Samuel^^^Dr^^^GMC|G5612908^Townley^Gregory^^^Dr^^^GMC|C3456789^Darwin^Samuel^^^Dr^^^GMC|300||||19|||C3456789^Darwin^Samuel^^^Dr^^^GMC||5000123^^^RCB^AN|||||||||||||||||||||||||202611021430

FHIR Message: scenario-a22

4. ADT^A16 Pending discharge

MSH|^~\&|PAS|RCB|ROUTE|ROUTE|202611100900||ADT^A16^ADT_A16|SCN0000004|P|2.5.1|||||GBR|UNICODE UTF-8|en||ITKv1.0
EVN||202611100900|||OP000123^Cortana^Emily^^^Miss^^RCB55|202611100900
PID|1||9999999557^^^NHS&2.16.840.1.113883.2.1.4.1&ISO^NH||EDITESTPATIENT^TEN^^^MRS^^L||19800101|F|||1 TEST STREET^^BRACKNELL^BERKSHIRE^RG12 9AX^GBR^H||+441234567890||en
PD1|||MALTON GP PRACTICE^^Y06601^^^^^^^Y06601|G5612908^Townley^Gregory^^^Dr^^^GMC
PV1|1|I|RCB^OBS1^BAY2-6^RCB55|22|||C3456789^Darwin^Samuel^^^Dr^^^GMC|G5612908^Townley^Gregory^^^Dr^^^GMC|C3456789^Darwin^Samuel^^^Dr^^^GMC|300||||19|||C3456789^Darwin^Samuel^^^Dr^^^GMC||5000123^^^RCB^AN|||||||||||||||||||||||||202611021430
PV2|||||||||202611121100

FHIR Message: scenario-a16

5. ADT^A03 Discharge

MSH|^~\&|PAS|RCB|ROUTE|ROUTE|202611121130||ADT^A03^ADT_A03|SCN0000005|P|2.5.1|||||GBR|UNICODE UTF-8|en||ITKv1.0
EVN||202611121130|||OP000123^Cortana^Emily^^^Miss^^RCB55|202611121130
PID|1||9999999557^^^NHS&2.16.840.1.113883.2.1.4.1&ISO^NH||EDITESTPATIENT^TEN^^^MRS^^L||19800101|F|||1 TEST STREET^^BRACKNELL^BERKSHIRE^RG12 9AX^GBR^H||+441234567890||en
PD1|||MALTON GP PRACTICE^^Y06601^^^^^^^Y06601|G5612908^Townley^Gregory^^^Dr^^^GMC
PV1|1|I|RCB^OBS1^BAY2-6^RCB55|22|||C3456789^Darwin^Samuel^^^Dr^^^GMC|G5612908^Townley^Gregory^^^Dr^^^GMC|C3456789^Darwin^Samuel^^^Dr^^^GMC|300||||19|||C3456789^Darwin^Samuel^^^Dr^^^GMC||5000123^^^RCB^AN|||||||||||||||||1|19|||||||202611021430|202611121130

FHIR Message: scenario-a03

Routing

The integration engine applies the routing rules. The GP practice is identified by the patient's registered practice (PD1-3, ODS code Y06601). Social care is identified by local agreement, for example by the patient's local authority of residence.

The GP practice receives the events that tell it where its patient is. Social care receives the pending discharge, so that it can plan care and support at home before the expected discharge date, and the discharge itself. Each Consumer only needs to support the events it receives. A Consumer that does not support an option application-rejects messages for it (see PAM Actor Options).

Before sending events to social care, local information governance arrangements (for example the purpose of discharge planning and the patient's consent where required) shall be in place. Location Hiding shall be honoured by every Consumer.

Actors

NameTypeDescription
Patient - Mrs Editestpatient Person

EDITESTPATIENT TEN (test NHS Number 9999999557), registered with the Malton GP Practice

Hospital PAS - York Hospital System

Patient Encounter Supplier. The PAS of York and Scarborough Teaching Hospitals NHS Foundation Trust (RCB), which records the admission, leave, pending discharge and discharge

Integration Engine System

The Trust integration engine, addressed as ROUTE in MSH-5/MSH-6. It acts as a Patient Encounter Consumer to the PAS and as a Patient Encounter Supplier to the downstream systems, and decides which events each system receives

GP Practice - Malton GP Practice System

Patient Encounter Consumer. The GP clinical system of the Malton GP Practice (Y06601), where the patient is registered (PD1-3)

Social Care - Local Authority System

Patient Encounter Consumer. The adult social care system of the patient's local authority, which plans any care and support needed after discharge

Diagram

InpatientLeaveAndDischargeInpatientLeaveAndDischarge...a_patient. EDITESTPATIENT TEN .test NHS Number 9999999557.. registered with the Malton GP Practice . Patient - Mrs Editestpatient.....a_pas. .Patient Encounter Supplier..ActorDefinition-PatientEncounterSupplier.html.. The PAS of York and Scarborough Teaching Hospitals NHS Foundation Trust .RCB.. which records the admission. leave. pending discharge and discharge . Hospital PAS - York Hospital.....a_engine. The Trust integration engine. addressed as ROUTE in MSH-5.MSH-6. It acts as a Patient Encounter Consumer to the PAS and as a Patient Encounter Supplier to the downstream systems. and decides which events each system receives . Integration Engine.....a_gp. .Patient Encounter Consumer..ActorDefinition-PatientEncounterConsumer.html.. The GP clinical system of the Malton GP Practice .Y06601.. where the patient is registered .PD1-3. . GP Practice - Malton GP Practice.....a_socialcare. .Patient Encounter Consumer..ActorDefinition-PatientEncounterConsumer.html.. The adult social care system of the patient.s local authority. which plans any care and support needed after discharge . Social Care - Local Authority..Patient - Mrs EditestpatientPatient - Mrs EditestpatientHospital PAS - York HospitalHospital PAS - York HospitalIntegration EngineIntegration EngineGP Practice - Malton GP PracticeGP Practice - Malton GP PracticeSocial Care - Local AuthoritySocial Care - Local AuthorityInpatient admission, leave and dischargedetailsAdmit patient(payload)Notify GP of admission(payload)Patient goes on leave(payload)Notify GP of leave(payload)Patient returns from leave(payload)Notify GP of return(payload)Pending discharge(payload)Notify social care of pending discharge(payload)Discharge patient(payload)Notify GP of discharge(payload)Notify social care of discharge(payload)

Processes

Process: Inpatient admission, leave and discharge

Each event is sent by the PAS to the integration engine and routed to the GP practice and, for discharge planning, to social care. Every message is acknowledged (ACK) by its receiver.

StepNameDescriptionInitiatorReceiverRequestResponse
1 Admit patient - create (Details: FHIR Restful Interactions code create)

ITI-31 Basic Subset. HL7 v2 ADT^A01^ADT_A01

Hospital PAS - York Hospital Integration Engine PAM FHIR Message A01
2 Notify GP of admission - create (Details: FHIR Restful Interactions code create)

The GP practice knows its patient is in hospital

Integration Engine GP Practice - Malton GP Practice PAM FHIR Message A01
3 Patient goes on leave - create (Details: FHIR Restful Interactions code create)

ITI-31 Advanced Encounter Management Option. HL7 v2 ADT^A21^ADT_A21

Hospital PAS - York Hospital Integration Engine PAM FHIR Message A21
4 Notify GP of leave - create (Details: FHIR Restful Interactions code create)

The patient is at home, under the care of the hospital

Integration Engine GP Practice - Malton GP Practice PAM FHIR Message A21
5 Patient returns from leave - create (Details: FHIR Restful Interactions code create)

ITI-31 Advanced Encounter Management Option. HL7 v2 ADT^A22^ADT_A21

Hospital PAS - York Hospital Integration Engine PAM FHIR Message A22
6 Notify GP of return - create (Details: FHIR Restful Interactions code create)
Integration Engine GP Practice - Malton GP Practice PAM FHIR Message A22
7 Pending discharge - create (Details: FHIR Restful Interactions code create)

ITI-31 Pending Event Management Option. HL7 v2 ADT^A16^ADT_A16

Hospital PAS - York Hospital Integration Engine PAM FHIR Message A16
8 Notify social care of pending discharge - create (Details: FHIR Restful Interactions code create)

Social care arranges any care and support needed at home before the expected discharge date

Integration Engine Social Care - Local Authority PAM FHIR Message A16
9 Discharge patient - create (Details: FHIR Restful Interactions code create)

ITI-31 Basic Subset. HL7 v2 ADT^A03^ADT_A03

Hospital PAS - York Hospital Integration Engine PAM FHIR Message A03
10 Notify GP of discharge - create (Details: FHIR Restful Interactions code create)

The GP practice knows its patient is home

Integration Engine GP Practice - Malton GP Practice PAM FHIR Message A03
11 Notify social care of discharge - create (Details: FHIR Restful Interactions code create)

Social care confirms the discharge and starts the planned care and support

Integration Engine Social Care - Local Authority PAM FHIR Message A03

Instances

NameTypeContentDescription
Hospital Provider Spell 5000123 Encounter

The inpatient stay. PV1-19 5000123^^^RCB^AN. Encounter/inpatient-spell-5000123 in every FHIR Message

The inpatient stay. PV1-19 5000123^^^RCB^AN. Encounter/inpatient-spell-5000123 in every FHIR Message

The inpatient stay. PV1-19 5000123^^^RCB^AN. Encounter/inpatient-spell-5000123 in every FHIR Message

The inpatient stay. PV1-19 5000123^^^RCB^AN. Encounter/inpatient-spell-5000123 in every FHIR Message

The inpatient stay. PV1-19 5000123^^^RCB^AN. Encounter/inpatient-spell-5000123 in every FHIR Message

The inpatient stay. PV1-19 5000123^^^RCB^AN. Encounter/inpatient-spell-5000123 in every FHIR Message

Admission (ADT^A01) Bundle

Emergency admission on referral from the GP

  • PAM FHIR Message A01
here

Emergency admission on referral from the GP

Leave of absence (ADT^A21) Bundle

The patient goes home on leave

  • PAM FHIR Message A21
here

The patient goes home on leave

Return from leave of absence (ADT^A22) Bundle

The patient returns from leave

  • PAM FHIR Message A22
here

The patient returns from leave

Pending discharge (ADT^A16) Bundle

Expected discharge date/time in PV2-9

  • PAM FHIR Message A16
here

Expected discharge date/time in PV2-9

Discharge (ADT^A03) Bundle

Discharge date/time and discharge destination

  • PAM FHIR Message A03
here

Discharge date/time and discharge destination