Magentus Practice Management FHIR® Implementation Guide
1.3.4 - Release
Australia
This page is part of the Magentus Practice Management FHIR Implementation Guide (v1.3.4: Releases Draft) based on FHIR (HL7® FHIR® Standard) R4. No current official version has been published yet. For a full list of available versions, see the Directory of published versions
Theatre Bookings use a combination of Appointment and AppointmentResponse resources to negotiate agreement for finalisation of a Theatre Booking. Appointment resources are created and managed by the VMO while AppointmentResponses are created by participants in the booking to indicate their ability to participate, or in our case the acceptance of the proposed Theatre Booking to the hospital. Participants can include people, equipment, and locations.
The full set of participant slices on EBookingsAppointment.participant is shown below. Each slice has a fixed participant.type coding so a hospital can discriminate roles without inspecting the actor reference. required = #required is set on the patient, hospital, and provider slices in the profile.
| Slice | Role | participant.type coding |
actor target |
Cardinality |
|---|---|---|---|---|
patient |
Patient | http://snomed.info/sct | 116154003 Patient |
EBookingsPatient | 1..1 MS |
hospital |
Hospital | http://snomed.info/sct | 22232009 Hospital |
GSHealthcareService (with hospital provider number) | 0..1 MS |
provider |
Primary VMO / specialist | http://terminology.hl7.org/CodeSystem/v3-ParticipationType | PPRF primary performer |
EBookingsVMO or GSPractitionerRole | 1..1 MS |
assistant |
Assistant | http://terminology.hl7.org/CodeSystem/v3-ParticipationType | SPRF secondary performer |
PractitionerRole |
0..1 MS |
anaesthetist |
Anaesthetist | http://snomed.info/sct | 88189002 Anaesthetist |
PractitionerRole |
0..1 MS |
paediatrician |
Paediatrician | http://snomed.info/sct | 82296001 Paediatrician |
PractitionerRole |
0..1 MS |
At this stage, the Hospital is only focussed on the Hospital's role in the Theatre Booking which is inclusive of location/theatre, staff, and equipment as managed by the Hospital. In future, we expect to represent these as independent participants so that theatre booking agreement can be more transparent and granular.
The FHIR Resources for a Theatre Booking as manifested through a FHIR Appointment are shown in the diagram below. The Appointment is at the centre of this set of FHIR Resources and related resources link to/from this resource allowing the package of resources to be discovered through an Appointment-based search.
Required and Must-Support elements on EBookingsAppointment:
| Field | Cardinality | Notes |
|---|---|---|
status |
1..1 MS | pending | booked | fulfilled | cancelled. See Theatre Booking Status Changes. |
serviceType.text |
1..1 MS | Procedure name (free-text, no coding). |
reasonCode.text |
0..1 MS | Pre-op diagnosis (free-text). |
start / end |
MS | Proposed operation date/time. end is required when start is populated. |
patientInstruction |
MS | Fasting instructions. The platform sends the fasting instructions only here, as text. See the note below. |
basedOn |
1..1 MS | Reference to the EBookingsServiceRequest (procedure). The identifier slot (must-support) expects an HPI-O scoped local order identifier with system, value and assigner.display. The platform sends the reference and an identifier. The identifier is a copy of the global-procedure-id identifier of the procedure ServiceRequest. See Booking identifiers. |
comment |
MS | Pre-op notes (free-text). |
participant |
1..* MS | See the Participants table above. Patient and provider slices are mandatory (and required = #required); hospital is required = #required when present. |
supportingInformation |
0..* MS | Anaesthetic ServiceRequest, prosthesis Device, and PDF DocumentReferences. See below. |
extension[lastModified] |
0..1 MS | EBookingsAppointmentLastModifiedExt — updated for every change of significance to the booking. See Theatre Booking Content Changes. |
supportingInformation on EBookingsAppointment is open-sliced with three Magentus-defined slices. Each slice has a different cardinality and role:
| Slice | Cardinality | Target profile | Purpose |
|---|---|---|---|
anaesthetic |
0..1 MS | Bookings Anaesthetic Request (ServiceRequest) |
Anaesthetic-specific request alongside the procedure ServiceRequest |
prosthesis |
0..1 MS | Bookings Prosthesis (Device) |
Implanted prosthesis details for the procedure |
pdf |
0..* MS | Bookings PDF (DocumentReference, contentType fixed to application/pdf) |
Arbitrary PDF attachments — admission forms, signed consent scans, anaesthetic questionnaires, etc. Use DocumentReference.description and .type/.category to differentiate kinds. Inline base64 via content.attachment.data for small files; persistent link via content.attachment.url for larger or pre-uploaded files. |
The anaesthetic and prosthesis slots can be carried either by reference (a standalone resource on the server) or contained inside the EBookingsAppointment. The pdf slot is reference-only — there is no contained slice for PDFs.
The procedure EBookingsServiceRequest carries the identifiers of a booking. This guide describes one identifier: a procedure identifier, preferably in an HPI-O scoped local order identifier system, with assigner.display.
Current behaviour: the platform sends these identifiers on the procedure
ServiceRequest:
Element systemvalueThe same for a new booking of the same procedure? identifierhttp://geniesolutions.com.au/fhir/global-procedure-idA 20-character code made from the practice organisation and the booking No. Each booking has its own value identifier, when the practice system gives a procedure idhttp://geniesolutions.com.au/fhir/procedure-id/[practice organisation id]The practice system's procedure id. A value that is not 1 to 20 digits is replaced by a 64-bit hash, in decimal Yes requisition(typePGN)An HPI-O scoped order system, or http://fhir.geniesolutions.io/Identifier/GenGtu-scoped/order/[location id]The booking's request id No Both
identifierentries haveuse=secondaryandassigner.display=Genie Solutions.Appointment.basedOncarries thereferenceand anidentifier. Theidentifieris a copy of theglobal-procedure-ididentifier, with the sameuse,system,valueandassigner.display.A practice can book a procedure again after its booking was cancelled. With Gentu, a later save of the same procedure creates a new booking: a new
Appointment, a newServiceRequest, and new values for every identifier exceptprocedure-id. A consumer that must link the new booking to the cancelled one uses theprocedure-ididentifier.
Unlike traditional healthcare integration approaches, our approach to Theatre Booking is not based on a point-to-point messaging model. Instead the VMO Practice Management System (PMS) and the Hospital interact through a shared FHIR server in which Appointments and AppointmentResponses are stored and then acted upon. Each partner tracks change in this common FHIR repository to understand the status of a Theatre Booking. Monitoring for booking changes can either be through polling with a FHIR search or via a subscription to changes based on search criteria of interest. Key to these interactions are changes in the Status of the Appointment and Status of a participant's agreement within the AppointmentResponse. There may be multiple iterations of Appointment updates and AppointmentResponses.
Profiles referenced directly from the Appointment and the wider booking graph:
| Magentus Profile | FHIR® Resource |
|---|---|
| Bookings Appointment | Appointment |
| Bookings ServiceRequest | ServiceRequest |
| Bookings Encounter | Encounter |
| Bookings Consent | Consent |
| Bookings ChargeItem | ChargeItem |
| Bookings Adverse Reaction (not currently supported, see below) | AllergyIntolerance |
| Bookings Infection Risk (not currently supported, see below) | Condition |
| Bookings Changes | Basic |
| Bookings Patient | Patient |
| Bookings Next of Kin | RelatedPerson |
| Magentus Practitioner | Practitioner |
| Magentus PractitionerRole | PractitionerRole |
| Magentus VMO PractitionerRole | PractitionerRole |
| Magentus VMO Organization | Organization |
| Magentus Hospital HealthcareService | HealthcareService |
| Magentus Organization | Organization |
supportingInformation reference targets on the Appointment:
| Magentus Profile | FHIR® Resource | Slice |
|---|---|---|
| Bookings Anaesthetic Request | ServiceRequest | anaesthetic |
| Bookings Prosthesis | Device | prosthesis |
| Bookings PDF | DocumentReference | pdf |
Profiles carried as contained resources:
| Magentus Profile | FHIR® Resource | Container |
|---|---|---|
| Bookings Anaesthetic Request | ServiceRequest | EBookingsAppointment.contained[anaesthetic] (alternative to reference) |
| Bookings Prosthesis | Device | EBookingsAppointment.contained[prosthesis] (alternative to reference) |
| Magentus Coverage | Coverage | EBookingsServiceRequest.contained[coverage], referenced from insurance |
Current behaviour: the platform sends the fasting instructions as text in
Appointment.patientInstruction, copied from the practice's instructions. It does not populate the fasting-time extension (request-fasting-time) on theServiceRequest. A consumer reads the fasting instructions fromAppointment.patientInstruction.
Not currently supported: the platform does not send adverse reactions (
AllergyIntolerance) or infection risks (Condition) with a theatre booking, in theServiceRequestor as separate resources. The profiles and the_revincludeparameters for them stay in this guide for later use. Their absence does not mean that the patient has no adverse reactions or infection risks.
The FHIR Resources generated and referenced by the Bookings Partner are shown in the diagram below.
The FHIR Profiles used by the Bookings Partner are listed below.
| Magentus Profile | FHIR® Resource |
|---|---|
| Bookings Appointment Response | AppointmentResponse |
When a hospital receives a new or updated Appointment, it creates an AppointmentResponse to indicate its participation status. The response references the Appointment and identifies the hospital via a GSHealthcareService actor carrying the hospital's provider number.
Key fields
| Field | Description |
|---|---|
appointment |
Relative reference to the Appointment being responded to. |
participantType |
SNOMED CT coding — use code 22232009 (Hospital) for hospital responses or 116154003 (Patient) for patient responses (system http://snomed.info/sct). |
actor |
The hospital, identified by its provider number in actor.identifier, or a reference to the EBookingsPatient. See the note below the table. |
participantStatus |
accepted | declined | tentative | needs-action. See Response Statuses and Hospital Triage for what each one means and its effect on the booking. |
start |
With needs-action, a requested new date/time where the hospital is proposing a change. With accepted, it may echo the booked time for information only, and Appointment.start stays the source of truth. Not expected with tentative or declined — see Response Statuses and Hospital Triage. |
comment |
Optional free-text note accompanying the status (e.g. "Awaiting admission form from patient"). |
Identifying the hospital. The platform creates a new hospital HealthcareService for each booking, so a hospital has no stable HealthcareService id to reference. A hospital response identifies the hospital by its provider number in actor.identifier. That identifier SHALL carry type = http://terminology.hl7.org/CodeSystem/v2-0203#PRN, with the provider number in value. Also send the hospital name in actor.display. actor.reference is optional. If a hospital sends one, it SHOULD reference the HealthcareService of that booking, from Appointment.participant.actor. The reference in the example below is for illustration only.
Current behaviour: the platform finds the hospital participant by
actor.identifier.valueandactor.identifier.type. It does not comparesystem. Iftypeis absent, it comparesactor.displaywith the participant's display name. If that does not match exactly, the response fails each time the platform tries to process it.
Creating a response
POST [base]/AppointmentResponse
{
"resourceType": "AppointmentResponse",
"meta": {
"profile": ["http://fhir.geniesolutions.io/StructureDefinition/ebookings-appointmentresponse"]
},
"identifier": [{ "system": "https://example.org/ashford-private-hospital/appointment-response", "value": "AR-000123" }],
"appointment": { "reference": "Appointment/840fdd86-f273-4c56-89af-cc5dcda59" },
"start": "2022-04-01T11:45:00.000+10:00",
"participantType": [{ "coding": [{ "system": "http://snomed.info/sct", "code": "22232009", "display": "Hospital" }] }],
"actor": {
"reference": "HealthcareService/ashford-private-hospital",
"identifier": {
"type": { "coding": [{ "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "PRN" }], "text": "Hospital Provider Number" },
"system": "https://www.health.gov.au/resources/publications/list-of-declared-hospitals",
"value": "0065020L"
},
"display": "Ashford Private Hospital"
},
"participantStatus": "accepted",
"comment": "Awaiting admission form from patient"
}
See AppointmentResponse Example for a full example.
Updating a response
To change an existing response (e.g. from tentative to accepted), PUT to the existing resource. Use the If-Match header carrying the resource's current meta.versionId so the server can detect lost updates (optimistic concurrency). The server keeps a version of each resource (versioning = versioned in the CapabilityStatement) and checks If-Match when a client sends it. If-Match is optional: a PUT without it replaces the current version. If the If-Match version is not the current version, the server returns 409 Conflict. Read the response again, and then retry with the new version.
PUT [base]/AppointmentResponse/[id]
If-Match: W/"4"
Send a changed response. A PUT with unchanged content makes no new version, and the server sends no subscription notification for it. The platform learns of a response only through such a notification, so it does not see a response that you send again with no change. To confirm a booking again, for example after a practice change returned the hospital participant to tentative, send a response that differs from the stored one: for example, with a new comment.
Hospitals rarely accept a booking in one step. A booking typically passes through two layers, and the response status tells the VMO which layer it has reached.
needs-action.tentative to say the booking has progressed but no acceptance decision has been made.The clerk then sends it to the PAS and responds accepted, raises a needs-action of their own, or declines.
participantStatus |
Meaning | Resulting Appointment.status |
|---|---|---|
needs-action |
The hospital needs something from the VMO before it can proceed | pending |
tentative |
Cleared automated triage, awaiting a human decision. Nothing is required from the VMO | pending |
accepted |
The booking is confirmed | booked |
declined |
The hospital will not fulfil the booking | unchanged — the VMO decides whether to cancel |
Current behaviour: the platform does not leave the booking unchanged after a
declinedresponse. When a hospital or a patient respondsdeclined, the platform setsAppointment.statustocancelledand tells the practice. The VMO does not cancel the booking. A consumer should expect adeclinedresponse to be followed by an update of theAppointmenttocancelled. A hospital that will not fulfil a booking respondsdeclined. It does not change theAppointmentitself. If Magentus changes this behaviour, the change log will announce the change before the platform changes.
Two points follow from this.
tentative always leaves the booking pending. If the Appointment was already booked — for example the booking was modified and re-entered triage — a tentative response returns it to pending.tentative is not a resting state. It records progress, not a decision, and is expected to resolve to accepted, needs-action or declined. A VMO should not treat it as an outcome.The distinction that matters to a VMO is whether action is required. needs-action asks the VMO for something. tentative asks for nothing and simply reports movement.
start is a proposal only with needs-action. A counter-proposed operation time is a request to the practice, so only the one status that asks for something can carry one. With accepted, start may echo the booked time for information, as in the worked example below. It should match Appointment.start. If it does not, Appointment.start stays the source of truth and the placer ignores the difference. A hospital that wants a different time sends needs-action. With tentative or declined, start is not expected: tentative reports that no decision has been made, and declined ends the hospital's involvement. A placer treats start as a proposal only when participantStatus is needs-action.
Send a comment with a tentative response. It is the hospital's opportunity to say where the booking sits and when a decision is likely — "with the booking clerk, expected Thursday", "theatre list not yet drafted for that week". This is worth doing, and it is the best defence against the stall described below.
A comment on a tentative response is informational only. Unlike a comment accompanying needs-action, it never implies work for the practice. A VMO should read it for context and must not treat it as a task.
Current behaviour: the platform shows the practice a response
commentonly withneeds-action(as the action required) and withdeclined(as the reason). It does not pass on acommentwithtentativeoraccepted, and it does not readstartorend. A response with the sameparticipantStatusas the hospital's current status is not processed, so a newcommenton it does not reach the practice. A hospital that needs the practice to see a proposed time puts that time in thecommentof aneeds-actionresponse. The guidance above onstart,endand thetentativecomment remains the target.
That last point carries a hazard. needs-action prompts the VMO, so it surfaces on its own — someone is waiting on the practice and the practice can see it. tentative prompts nobody. The booking is waiting on a hospital clerk, and nothing on the VMO side asks for attention.
A booking can therefore sit at tentative indefinitely, for ordinary human reasons: the clerk is away, the queue is long, the item was missed, the person has moved on. Neither system is at fault and no error is raised. The booking simply goes quiet while the operation date approaches.
A placer should age-monitor for this rather than wait to be told. The condition is:
Appointment is still pending, andAppointmentResponse for it has participantStatus of tentative, andSearch for the responses to a booking and take the most recent by meta.lastUpdated:
GET [base]/AppointmentResponse?appointment=Appointment/[id]&_sort=-_lastUpdated&_count=1
Set the tolerance against the operation date, not the response date. A booking tentative for a fortnight with theatre three months away is unremarkable; the same booking with theatre next week needs a phone call. Escalation is a practice matter, not a FHIR one — the remedy is to contact the hospital, not to change the resource. A placer must not resolve a tentative on the hospital's behalf.
A Theatre List is a snapshot of multiple theatre bookings — typically a day's operating list for a hospital — packaged as a FHIR document for sharing with the hospital. A theatre list is distinct from an individual booking: bookings are negotiated between the VMO and the hospital via Appointment and AppointmentResponse, whereas a theatre list is a read-only, attested record at a point in time that aggregates many bookings into a single artefact.
The list is modelled as a Bundle of type = #document whose first entry is a Composition. Each section of the Composition corresponds to one booking and references the booking's Appointment, ServiceRequest, Consent, and other supporting resources via Bundle entry fullUrl.
See Theatre List for the document shape, per-booking section structure, status mapping, and a worked example.
Profiles
| Magentus Profile | FHIR® Resource |
|---|---|
| Theatre List Bundle | Bundle (type = #document) |
| Theatre List Composition | Composition |
Bookings that end up in a cancelled state do not change from that final state. However, pending and booked states for a Theatre Booking can change depending on the status of an AppointmentResponse received from a Hospital and other business needs of the VMO. The following diagram shows the status changes in a booking.
The valid Appointment.status transitions are:
| From | To | Trigger |
|---|---|---|
pending |
booked |
Hospital responds with accepted |
pending |
pending |
Hospital responds with tentative — cleared automated triage, awaiting a human decision |
pending |
cancelled |
VMO cancels before hospital acceptance |
booked |
pending |
Hospital responds with needs-action (e.g. proposing a date change) |
booked |
pending |
Hospital responds with tentative — a modified booking has re-entered triage |
booked |
pending |
VMO saves a change to the booking. The platform returns the hospital participant to tentative — see Participant status after a practice change |
booked |
cancelled |
VMO or hospital cancels a confirmed booking |
A tentative response can only leave the booking in pending. See Response Statuses and Hospital Triage.
cancelled is a terminal state — no further transitions are permitted once a booking reaches this status.
fulfilled is not currently used. That the booked procedure was performed is not recorded on the Appointment in this release. The hospital records the admission on the Encounter instead, and sets Encounter.status = finished and period.end when the patient is discharged. A practice may take a finished encounter to mean that the procedure was performed, unless the booking was cancelled. For an inpatient stay, discharge can be days after the operation.
Every change that the practice saves returns the booking to pending and the hospital participant to tentative, also when the booking was booked. The platform makes this change, not the hospital. This is by design:
Appointment.participant.status is mandatory (1..1) and bound to a fixed value set: accepted | declined | tentative | needs-action. The platform cannot leave it empty.Appointment or to any linked resource, makes the hospital's previous response out of date. That response was for the previous version of the booking. So the platform replaces the old status before the hospital responds again.tentative is the only code that does not claim a decision. accepted and declined state a decision. In this IG, needs-action means that the hospital needs something from the practice. The R4 definition of tentative also allows a status that a system creates and that needs further processing.participant.status optional (0..1). This IG is based on R4.A hospital should treat each new Appointment version with its participant at tentative as a booking that needs triage again. It compares the new version with its stored copy to find what changed, and responds accepted to confirm the booking again. That response must differ from the stored one, or the platform does not see it (see Send a changed response in Responding to a Booking). The same save sets the patient participant to accepted. So a status from an earlier patient response, other than accepted, no longer shows on the Appointment. Each AppointmentResponse stays as it was.
Current behaviour: the
Basicchange record does not show the return of the hospital participant totentative. Compare theAppointmentwith your stored copy to see it.
Theatre Bookings typically go through a series of changes from the time they meet the minimum data set and are accepted into the FHIR server as a booking, up until the time of theatre. These changes are of a mixed blessing. Dealing with bookings that may change means that bookings will likely be accessible earlier and thus carry the intent of theatre if not the final theatre form. Restricting or inhibiting bookings from early exposure to the hospital is more likely to result in later sharing of theatre bookings by VMOs and less time to more efficiently use theatre slots or hospital resources.
Booking changes will reflect in one or more FHIR resources that are part of the Theatre Booking data set. There are a few ways of being notified of and processing these changes:
Appointment.Appointment resource for tracking changes and creation.
Appointment resource and these will not automatically create a notifiable change or creation in the Appointment subscription.Appointment again each time the practice saves a change, with a new lastModified, also when the change is in another resource. So every practice change makes a new Appointment version. The platform also updates the Appointment after a hospital response and after a cancellation. A change that a hospital makes to the Encounter does not change the Appointment. A removed ChargeItem is deleted in a separate step just after the save.Appointment does carry a lastModified extension which is updated when a 'change of significance' has occurred in the booking data. However, this is only a time field and does not tell you what changed. The table below lists which resource changes count as a significant change for the purposes of bumping lastModified.Basic resource that tracks changes, additions, and modifications to data in the booking. A customised Subscription can include this change data in the notification for an Appointment.| Change | Bumps lastModified? |
|---|---|
Appointment.status transition |
Yes |
Appointment.start / end update |
Yes |
Appointment.participant set changes (add/remove/change actor) |
Yes |
Linked ServiceRequest (procedure) update |
Yes |
| Patient demographics change | Yes |
ChargeItem code added/removed |
Yes |
| Anaesthetic, prosthesis or consent resource added/changed | Yes |
Adding a free-text practitioner comment only |
No — minor update |
Adding a EBookingsPDF attachment |
Yes |
Basic change resource itself. It will tell you of changes in the whole of the appointment/booking data including the links to the resources and attributes that have changed. You can then decide whether that resource should be downloaded so the nature of the change can be investigated. See Basic Change Subscription below for a worked example.Option (3) is the recommended approach. A hospital that does its own change discovery instead of a subscription should poll the Appointment, not the individual resources. See Polling for Changes. Whichever is chosen a clear path should be defined for
A change to a consent — including replacement of the signed form and withdrawal — is always conveyed as an updated Consent resource. Consumers are not expected to detect document changes by polling the URL. See Bookings Consent for the document repository, custody and withdrawal arrangements.
Current behaviour: the platform does not follow the significance table above in every case.
lastModifiedis set on every change that the practice saves, including a comment-only change. It is not set when the platform updates theAppointmentafter a hospital response or a cancellation.- There is one
Basicchange record per booking. Each change makes a new version of it, with the sameid. The current version holds the latest difference. The previous versions hold the earlier differences:GET [base]/Basic/[id]/_history. A consumer that misses a notification reads the earlier differences there.- When a booking is created, the
Basicrecord lists every resource in the booking as added.- After a hospital response or a cancellation, the
Basicrecord holds only the changes to theAppointment.- A change that a hospital makes produces no
Basicrecord.- A removed
ChargeItemis deleted in a separate step after the rest of the change is saved. For a short time a reader can still find it.- The
Consentgets a new version on every practice save, also when the consent did not change. See the current behaviour note in Bookings Consent.A consumer that must not miss a change should keep its own copy of each booking and compare each new version with it.
The following GET searches for Appointments which are either in a pending or cancelled state that were last updated after a provided time.
Example
GET [base]/Appointment?status=pending,cancelled&_lastUpdated=gt2022-12-13T12:30:00Z
In order to retrieve all booking data for the above Theatre Bookings, use the following _include and _revinclude parameters.
| Parameter | Value | Description |
|---|---|---|
| _include | Appointment:actor | Hospital, VMO, Patient |
| _revinclude | Basic:subject | Version difference overview |
| _include | Appointment:based-on:ServiceRequest | Procedure |
| _include | Appointment:supporting-info | Anaesthetic ServiceRequest, prosthesis Device, and PDF DocumentReferences |
| _include:iterate | Patient:organization | Managing organization for patient |
| _include:iterate | ServiceRequest:requester | Practitioner VMO |
| _include:iterate | PractitionerRole:practitioner | Practitioner VMO (likely redundant) |
| _include:iterate | PractitionerRole:organization | VMO practice |
| _revinclude:iterate | Encounter:based-on | Hospital admission encounter for the procedure |
| _revinclude:iterate | Consent:data | Consent for procedure |
| _revinclude:iterate | ChargeItem:context | Cost codes (MBS+) for procedure |
| _revinclude:iterate | Condition:subject:Patient | Infection risks for patient |
| _revinclude:iterate | AllergyIntolerance:patient | Adverse reactions for patient |
| _revinclude:iterate | RelatedPerson:patient | Next of kin |
Example
GET [base]/Appointment?status=pending,cancelled & _lastUpdated=gt2022-12-13T12:30:00Z & _include=Appointment:actor & _revinclude=Basic:subject & _include=Appointment:based-on:ServiceRequest & _include:iterate=Patient:organization & _include:iterate=PractitionerRole:practitioner & _include:iterate=PractitionerRole:organization & _revinclude:iterate=Encounter:based-on & _revinclude:iterate=ChargeItem:context & _revinclude:iterate=Consent:data & _revinclude:iterate=Condition:subject:Patient & _revinclude:iterate=AllergyIntolerance:patient & _revinclude:iterate=RelatedPerson:patient
Note that
Basic resource which is profiled to carry a specification of all additions, deletions, and modifications to the whole appointment (see Theatre Booking Changes)HealthcareService included with the practice Organization resourceAn example search response is shown in Bookings Appointment SearchSet Bundle
A similar approach is used to search for a specific Appointment with a known id.
Example
GET [base]/Appointment?_id=840fdd86-f273-4c56-89af-cc5dcda59 & _revinclude=Basic:subject & _include=Appointment:based-on &_include:iterate=ServiceRequest:requester & _include=Appointment:actor & _revinclude:iterate=Encounter:based-on &_revinclude:iterate=Consent:data & _include:iterate=Patient:organization & _revinclude:iterate=ChargeItem:context &_include:iterate=PractitionerRole:practitioner & _include:iterate=PractitionerRole:organization
The recommended way to learn of changes is a subscription to the Basic change record (option 3 in Theatre Booking Content Changes). A hospital that does its own change discovery instead polls the server. A subscriber can also poll, as a check for missed notifications. The CapabilityStatement declares these interactions:
_lastUpdated search (SHALL) on Appointment, AppointmentResponse, Patient, ServiceRequest, Encounter, Consent and ChargeItem, with _sort=_lastUpdated and paging.vread (SHOULD) on Appointment, Patient, ServiceRequest, Encounter, Consent and ChargeItem: [type]/_history, [type]/[id]/_history and [type]/[id]/_history/[vid].vread (SHOULD) on Basic: Basic/[id]/_history gives the earlier change records of a booking.Poll at booking level. One practice save changes several resources at the same time, and most of them do not reference the Appointment. If you poll, poll the Appointment, not the individual resources, and get the whole booking in the same request with the _include and _revinclude parameters of Including Other Data Relevant to the Appointment:
GET [base]/Appointment?_lastUpdated=gt2026-10-06T00:00:00Z&_sort=_lastUpdated&_include=Appointment:actor&_revinclude=Basic:subject&...
Process each booking as one unit. Compare the retrieved booking with your copy to find what changed, and decide if the change is significant for you. The platform writes the Appointment again on every practice save, so a new Appointment version marks every practice change (see the current behaviour note in Theatre Booking Content Changes). Use the searches on the other resource types, and history, for reconciliation: for example, to make sure that you missed no change.
If you poll each resource type. Then you must map each change back to its booking. The paths are:
| Changed resource | Path to the booking Appointment |
|---|---|
ServiceRequest (procedure) |
Appointment.basedOn references it |
Encounter |
Encounter.basedOn → ServiceRequest ← Appointment.basedOn |
Consent |
Consent.provision.data → ServiceRequest ← Appointment.basedOn |
ChargeItem |
ChargeItem.context → Encounter → ServiceRequest ← Appointment.basedOn |
Patient |
Shared by all bookings of that patient in the partition. A change can come from a save of any of them |
Practitioner, PractitionerRole, Organization |
Shared by all bookings of that practice in the partition |
One practice save gives a new version of several of these resources, and they can come back in different polls. Group the changes by booking before you act on them.
Example
GET [base]/Consent?_lastUpdated=gt2026-10-06T00:00:00Z&_sort=_lastUpdated
GET [base]/ChargeItem/_history?_since=2026-10-06T00:00:00Z
When you poll:
ChargeItems. The platform deletes a ChargeItem when the practice removes it from the booking, and a search does not return a deleted resource. Compare the ChargeItems of each booking with your copy, or read the type-level history. In a history Bundle a delete is an entry with request.method = DELETE and no resource.ChargeItem that the platform deletes just after the save is then absent from the retrieval.Current behaviour: in production the server can answer a read from a replica, so a read can lag a write by a short time.
ETag, the Location header or the returned resource._lastUpdated, start each poll a little before the end of the previous one. Discard a resource that you already have, by id and meta.versionId. Do not discard a whole booking because its Appointment version is the same. Each time a booking comes back, compare all its linked resources with your copy. A ChargeItem that the platform deleted after the first retrieval is absent only from the later one.identifier on each AppointmentResponse that you create, with a system that your organisation controls. If you do not know whether a create succeeded, wait a short time, then search for the response by that identifier: GET [base]/AppointmentResponse?identifier=[system]|[value]. Create the response again only if the search finds nothing. Do not search straight after the create, because the search can miss a response that the server has just written.In order to receive notifications from the FHIR Server when resources of interest are created or updated, a Subscription is registered. A subscription request includes the following properties.
| Property | Description | Example |
|---|---|---|
| criteria | Search criteria to match resources of interest | Appointment?status=pending,cancelled |
| status | Fixed: requested | requested |
| reason | Reason the subscription is being created | Discover updates to the Appointment resource |
| channel.type | Fixed: rest-hook | rest-hook |
| channel.endpoint | Web service URL where webhook is posted | https://webhook.site/bbd78ee4-e267-4633-8acc-38a5e1dc54a0 |
| channel.header | Authorization header to be used in the subscription notification | Authorization: Bearer secret-token-abc-123 |
| channel.payload | Optional: mime-type of the payload to be included in the notification | application/fhir+json |
If the Subscription is successfully processed by the FHIR server, the Subscription.status will be changed to active. There are other optional attributes in a FHIR Subscription. Amongst these is Subscription.end that specifies a time at which the Subscription should be ended.
Example
The following example creates a new Subscription for the Appointment resource filtering on the status values of pending OR cancelled (Note: the comma delimitor between parameter values represents an OR, see https://hl7.org/fhir/r4/search.html#combining).
POST [base]/Subscription
{
"resourceType": "Subscription",
"criteria": "Appointment?status=pending,cancelled",
"status": "requested",
"reason": "Appointment pending and cancelled subscription",
"channel": {
"type": "rest-hook",
"endpoint": "https://webhook.site/bbd78ee4-e267-4633-8acc-38a5e1dc54a0",
"header": ["Authorization: Bearer secret-token-abc-123"]
}
}
The recommended approach (option 3 in Theatre Booking Content Changes) is to subscribe to the Basic change resource rather than the Appointment directly, so that any change of significance anywhere in the booking is notified. The following example additionally uses the Smile CDR subscription-payload-search-criteria extension to control the notification payload — it re-reads the matched Basic resource and _includes its subject so the notification carries both the change data and the Appointment it belongs to.
The
channel.headervalues below are illustrative placeholders only — supply your own credentials.
POST [base]/Subscription
{
"resourceType": "Subscription",
"extension": [
{
"url": "http://hapifhir.io/fhir/StructureDefinition/subscription-payload-search-criteria",
"valueString": "Basic?_id=${matched_resource_id}&_include=Basic:subject"
}
],
"status": "requested",
"reason": "Change resource additions and modifications plus include the related Appointment",
"criteria": "Basic?",
"channel": {
"type": "rest-hook",
"endpoint": "https://api.acmehospital.com.au/notification-api/notify",
"payload": "application/fhir+json",
"header": [
"Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=",
"client_id: example-client-id",
"client_secret: example-client-secret"
]
}
}
For the notification this subscription produces, see Notification for a Payload Search Criteria Subscription.
The notification's HTTP method and body depend on the Subscription. This is Smile CDR / HAPI rest-hook delivery behaviour — base FHIR R4 does not mandate either:
| Subscription | Method and target | Body |
|---|---|---|
No payload, no extension |
POST to channel.endpoint |
Empty. A ping; the receiver then fetches the data by search. |
payload set, no extension |
PUT to [endpoint]/[ResourceType]/[id] |
The single matching resource. Deletions arrive as an HTTP DELETE. |
payload set and the subscription-payload-search-criteria extension present |
POST to channel.endpoint |
A transaction Bundle carrying every resource the criteria returned. |
When you use the subscription-payload-search-criteria extension, also set payload. This IG does not describe a Subscription that has the extension but no payload.
Receivers must therefore accept both POST and PUT on the endpoint.
Example — no payload
POST https://webhook.site/bbd78ee4-e267-4633-8acc-38a5e1dc54a0
Authorization: Bearer secret-token-abc-123
The Basic Change Subscription above carries the subscription-payload-search-criteria extension, so its notifications take the third form. Smile CDR runs the criteria as a search, then delivers the results as a FHIR transaction. Four consequences matter to a receiver:
transaction Bundle, not a searchset. There is no total and no link.request.method of PUT and a request.url, not a search.mode.fullUrl is relative (Basic/[id]), because it defaults to the versionless resource id._included resources are flattened into one list. Nothing marks which was which, so distinguish them by resource type or by following Basic.subject.Do not execute the Bundle as a transaction against your own store. It is a delivery envelope, and the PUT verbs are an artefact of how Smile CDR packages the search results.
Examples — the Basic Change Subscription
The two notifications below are complete. They show what a hospital receives from the Basic Change Subscription. Example 1 is for a booking that a practice has just created. It uses the same booking as the other eBookings examples, for example the Appointment example. Example 2 is output from a platform test environment, with synthetic data, for a booking that has changed after creation.
Points to note:
Basic per booking. The platform keeps one change record per booking. Its id stays the same, and each change makes a new version of it. Version 1 comes with the creation. Example 2 shows version 2. The earlier versions stay in the server history (Basic/[id]/_history). See the current behaviour note in Theatre Booking Content Changes.Appointment itself. The hospital participant starts at tentative.ChargeItem, is given as a string, because the resource no longer exists.extension[ebookings-appointment-lastModified-ext].valueDateTime, Consent.dateTime and ServiceRequest.authoredOn change each time the practice saves the booking. They do not mean that the hospital must act.Appointment can be older than the change record. In Example 2 the change record is version 2 from 24 September, but the Appointment is version 2 from 27 August. Its lastModified does not show the change that the record lists. Do not assume that the resources in a notification already contain the listed changes. Read the referenced resources if you need their current state.meta.source and the pms-tenant-id tag are set by the platform. They carry no booking information.The change records are also published as example resources: EBookingDifferenceCreatedExample (Example 1), and EBookingDifferenceModifiedExample, a typical practice save in which a ChargeItem is removed and another added, the comment and fasting instruction change, and the consent form is attached.
Example 1 — booking created
POST https://api.acmehospital.com.au/notification-api/notify
Content-Type: application/fhir+json
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "Basic/a7f3c1e0-92b4-4d51-8e6c-1f0b2d3a4c5e",
"resource": {
"resourceType": "Basic",
"id": "a7f3c1e0-92b4-4d51-8e6c-1f0b2d3a4c5e",
"meta": {
"versionId": "1",
"lastUpdated": "2022-02-01T08:00:00.117+10:00",
"profile": [
"http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference"
]
},
"extension": [
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference-addition",
"valueReference": {
"reference": "ServiceRequest/8e25f073-cbaa-4ff5-af3c-cc13db829ac6"
}
},
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference-addition",
"valueReference": {
"reference": "Appointment/840fdd86-f273-4c56-89af-cc5dcda592ab"
}
},
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference-addition",
"valueReference": {
"reference": "Practitioner/7d66ccbc-8185-4c6f-a0ae-257b65ef675c"
}
},
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference-addition",
"valueReference": {
"reference": "ChargeItem/d16c9bd2-db58-482a-a572-83a094676d68"
}
},
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference-addition",
"valueReference": {
"reference": "ChargeItem/c4a180ea-a865-46f6-ba3d-a82fd83c58f9"
}
},
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference-addition",
"valueReference": {
"reference": "Consent/ecaf5c8d-5f6b-46b2-89e2-6a96304d6358"
}
},
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference-addition",
"valueReference": {
"reference": "Encounter/1a1fafa9-c22c-4557-9670-4010f68f0745"
}
},
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference-addition",
"valueReference": {
"reference": "Patient/6ad72107-5bf0-4100-a948-24e91f77abf5"
}
},
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference-addition",
"valueReference": {
"reference": "Organization/fec5f6ca-f9e7-4c54-92b9-385d2fac8328"
}
},
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference-addition",
"valueReference": {
"reference": "PractitionerRole/7dadc12c-859a-449e-9244-3e0fdca6553c"
}
},
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference-addition",
"valueReference": {
"reference": "HealthcareService/c17392bb-5f86-4906-be86-71e6f7634e77"
}
}
],
"code": {
"coding": [
{
"code": "Difference",
"system": "http://fhir.geniesolutions.io/CodeSystem/basic-type"
}
]
},
"subject": {
"reference": "Appointment/840fdd86-f273-4c56-89af-cc5dcda592ab"
}
},
"request": {
"method": "PUT",
"url": "Basic/a7f3c1e0-92b4-4d51-8e6c-1f0b2d3a4c5e"
}
},
{
"fullUrl": "Appointment/840fdd86-f273-4c56-89af-cc5dcda592ab",
"resource": {
"resourceType": "Appointment",
"id": "840fdd86-f273-4c56-89af-cc5dcda592ab",
"meta": {
"versionId": "1",
"lastUpdated": "2022-02-01T08:00:00.117+10:00",
"profile": [
"http://fhir.geniesolutions.io/StructureDefinition/ebookings-appointment"
]
},
"participant": [
{
"type": [
{
"coding": [
{
"code": "PPRF",
"system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
"display": "primary performer"
}
]
}
],
"required": "required",
"actor": {
"identifier": {
"type": {
"coding": [
{
"system": "http://terminology.hl7.org.au/CodeSystem/v2-0203",
"code": "UPIN"
}
],
"text": "Medicare Provider Number"
},
"system": "http://ns.electronichealth.net.au/id/medicare-provider-number",
"value": "2426621B"
},
"reference": "PractitionerRole/7dadc12c-859a-449e-9244-3e0fdca6553c",
"display": "Trevor Wright"
},
"status": "accepted"
},
{
"type": [
{
"coding": [
{
"code": "116154003",
"system": "http://snomed.info/sct",
"display": "Patient"
}
]
}
],
"required": "required",
"actor": {
"reference": "Patient/6ad72107-5bf0-4100-a948-24e91f77abf5"
},
"status": "accepted"
},
{
"type": [
{
"coding": [
{
"code": "22232009",
"system": "http://snomed.info/sct",
"display": "Hospital"
}
]
}
],
"required": "required",
"actor": {
"identifier": {
"type": {
"coding": [
{
"code": "PRN",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203"
}
],
"text": "Hospital Provider Number"
},
"system": "https://www.health.gov.au/resources/publications/list-of-declared-hospitals",
"value": "0065020L"
},
"reference": "HealthcareService/c17392bb-5f86-4906-be86-71e6f7634e77",
"display": "Ashford Private Hospital"
},
"status": "tentative"
},
{
"type": [
{
"coding": [
{
"code": "SPRF",
"system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
"display": "secondary performer"
}
]
}
],
"actor": {
"display": "Dr Andrew Demo"
},
"status": "tentative"
},
{
"type": [
{
"coding": [
{
"code": "88189002",
"system": "http://snomed.info/sct",
"display": "Anaesthetist"
}
]
}
],
"actor": {
"display": "Dr Geoff Dolittle"
},
"status": "tentative"
},
{
"type": [
{
"coding": [
{
"code": "82296001",
"system": "http://snomed.info/sct",
"display": "Paediatrician"
}
]
}
],
"actor": {
"display": "Dr Mary Smith"
},
"status": "accepted"
}
],
"extension": [
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-appointment-lastModified-ext",
"valueDateTime": "2022-02-01T08:00:00.000+10:00"
}
],
"status": "pending",
"serviceType": [
{
"text": "Knee Replacement"
}
],
"start": "2022-04-01T11:45:00.000+10:00",
"end": "2022-04-01T12:00:00.000+10:00",
"created": "2022-02-01T08:00:00.000+10:00",
"reasonCode": [
{
"text": "Sore stomach"
}
],
"basedOn": [
{
"reference": "ServiceRequest/8e25f073-cbaa-4ff5-af3c-cc13db829ac6",
"identifier": {
"value": "36",
"system": "http://ns.electronichealth.net.au/id/hpio-scoped/order/1.0/8003621566684455",
"assigner": {
"display": "Jonathanport Medical Centre"
}
}
}
],
"patientInstruction": "Fast from 2:00 AM",
"comment": "Preoperative notes",
"supportingInformation": [
{
"reference": "#2"
},
{
"reference": "#3"
}
],
"contained": [
{
"resourceType": "Device",
"id": "2",
"meta": {
"profile": [
"http://fhir.geniesolutions.io/StructureDefinition/ebookings-prosthesis"
]
},
"type": {
"coding": [
{
"code": "53350007",
"system": "http://snomed.info/sct",
"display": "Prosthesis"
}
]
},
"deviceName": [
{
"type": "user-friendly-name",
"name": "Syntho-Knee"
}
],
"patient": {
"reference": "Patient/6ad72107-5bf0-4100-a948-24e91f77abf5"
},
"note": [
{
"text": "Syntho-Knee Serial|33228331"
}
]
},
{
"resourceType": "ServiceRequest",
"id": "3",
"meta": {
"profile": [
"http://fhir.geniesolutions.io/StructureDefinition/ebookings-anaestheticrequest"
]
},
"intent": "plan",
"code": {
"coding": [
{
"code": "LA",
"system": "http://fhir.geniesolutions.io/CodeSystem/gs-anaesthetictype",
"display": "LA"
}
],
"text": "Local Anaesthetic"
},
"status": "active",
"subject": {
"reference": "Patient/6ad72107-5bf0-4100-a948-24e91f77abf5"
}
}
]
},
"request": {
"method": "PUT",
"url": "Appointment/840fdd86-f273-4c56-89af-cc5dcda592ab"
}
}
]
}
Example 2 — booking changed after creation
The hospital declined this booking, so the platform set the Appointment to cancelled and the hospital participant to declined (see the current behaviour note in Response Statuses and Hospital Triage). The change record lists a later change to lastModified and to the contained anaesthetic request.
POST https://api.acmehospital.com.au/notification-api/notify
Content-Type: application/fhir+json
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "Basic/28e1d263-1014-468a-8a9d-4065b63f9177",
"resource": {
"resourceType": "Basic",
"id": "28e1d263-1014-468a-8a9d-4065b63f9177",
"meta": {
"versionId": "2",
"lastUpdated": "2026-09-24T04:43:27.965+00:00",
"source": "#1kfXNhxkEM1FgEYJ",
"profile": [
"http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference"
]
},
"extension": [
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-difference-modification",
"extension": [
{
"url": "reference",
"valueReference": {
"reference": "Appointment/65d61fce-b496-5994-9500-f4846ea717cc"
}
},
{
"url": "attributeList",
"extension": [
{
"url": "attribute",
"valueString": "extension[ebookings-appointment-lastModified-ext].valueDateTime"
},
{
"url": "attribute",
"valueString": "supportingInformation[ServiceRequest]"
}
]
}
]
}
],
"code": {
"coding": [
{
"system": "http://fhir.geniesolutions.io/CodeSystem/basic-type",
"code": "Difference"
}
]
},
"subject": {
"reference": "Appointment/65d61fce-b496-5994-9500-f4846ea717cc"
}
},
"request": {
"method": "PUT",
"url": "Basic/28e1d263-1014-468a-8a9d-4065b63f9177"
}
},
{
"fullUrl": "Appointment/65d61fce-b496-5994-9500-f4846ea717cc",
"resource": {
"resourceType": "Appointment",
"id": "65d61fce-b496-5994-9500-f4846ea717cc",
"meta": {
"versionId": "2",
"lastUpdated": "2026-08-27T23:37:02.956+00:00",
"source": "#J0oUtPkukm1skeHO",
"profile": [
"http://fhir.geniesolutions.io/StructureDefinition/ebookings-appointment"
],
"tag": [
{
"system": "http://geniesolutions.com.au/fhir/pms-tenant-id",
"code": "GEN00005-1B4199028EDF460B8E19B7A99AF1CF7F"
}
]
},
"contained": [
{
"resourceType": "ServiceRequest",
"id": "1",
"meta": {
"profile": [
"http://fhir.geniesolutions.io/StructureDefinition/ebookings-anaestheticrequest"
]
},
"status": "active",
"intent": "plan",
"code": {
"coding": [
{
"system": "http://fhir.geniesolutions.io/CodeSystem/gs-anaesthetictype",
"code": "GA+Block",
"display": "GA+Block"
}
],
"text": "General anaesthesia and block"
},
"subject": {
"reference": "Patient/60723c99-9dce-59c4-b2f5-08a9bb81b603",
"display": "Dr. Sebastian Patel"
}
},
{
"resourceType": "Device",
"id": "2",
"meta": {
"profile": [
"http://fhir.geniesolutions.io/StructureDefinition/ebookings-prosthesis"
]
},
"deviceName": [
{
"name": "stark huzzah",
"type": "user-friendly-name"
}
],
"type": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53350007",
"display": "Prosthesis"
}
]
},
"patient": {
"reference": "Patient/60723c99-9dce-59c4-b2f5-08a9bb81b603",
"display": "Dr. Sebastian Patel"
},
"note": [
{
"text": "Serial NHZRR7EZCMB592143"
}
]
}
],
"extension": [
{
"url": "http://fhir.geniesolutions.io/StructureDefinition/ebookings-appointment-lastModified-ext",
"valueDateTime": "2026-08-27T23:36:14.132Z"
}
],
"status": "cancelled",
"serviceType": [
{
"text": "throttle wan jackal"
}
],
"reasonCode": [
{
"text": "hm boohoo gee meh via"
}
],
"supportingInformation": [
{
"reference": "#1"
},
{
"reference": "#2"
}
],
"start": "2023-01-24T04:02:27.517Z",
"end": "2023-01-24T08:02:55.522Z",
"comment": "healthily garrote loud editorialise",
"patientInstruction": "in snob fooey decommission conscience",
"basedOn": [
{
"reference": "ServiceRequest/1e71147c-7cd8-5bb1-a25e-47bdb1af3a45"
}
],
"participant": [
{
"type": [
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "116154003",
"display": "Patient"
}
]
}
],
"actor": {
"reference": "Patient/60723c99-9dce-59c4-b2f5-08a9bb81b603",
"display": "Dr. Sebastian Patel"
},
"required": "required",
"status": "accepted"
},
{
"type": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
"code": "PPRF",
"display": "primary performer"
}
]
}
],
"actor": {
"reference": "PractitionerRole/db0ceabd-7e36-5389-b403-d046865759ff",
"identifier": {
"type": {
"coding": [
{
"system": "http://terminology.hl7.org.au/CodeSystem/v2-0203",
"code": "UPIN"
}
],
"text": "Medicare Provider Number"
},
"system": "http://ns.electronichealth.net.au/id/medicare-provider-number",
"value": "609470KT"
},
"display": "Mr. Luke Weber"
},
"required": "required",
"status": "accepted"
},
{
"type": [
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "22232009",
"display": "Hospital"
}
]
}
],
"actor": {
"reference": "HealthcareService/f069d03a-fa14-5998-a961-a83e78772255",
"identifier": {
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "PRN",
"display": "Provider number"
}
],
"text": "Hospital Provider Number"
},
"system": "https://www.health.gov.au/resources/publications/list-of-declared-hospitals",
"value": "W3D0F3QG"
},
"display": "King - Ross"
},
"required": "required",
"status": "declined"
},
{
"type": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
"code": "SPRF",
"display": "secondary performer"
}
]
}
],
"actor": {
"display": "Ms. Gabriella Sauer"
},
"status": "accepted"
},
{
"type": [
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "88189002",
"display": "Anesthesiologist"
}
]
}
],
"actor": {
"display": "Molly Marvin"
},
"status": "accepted"
}
]
},
"request": {
"method": "PUT",
"url": "Appointment/65d61fce-b496-5994-9500-f4846ea717cc"
}
}
]
}
One substitution quirk to allow for: ${matched_resource_id} expands to the versionless qualified id, so Basic?_id=${matched_resource_id} becomes Basic?_id=Basic/a7f3c1e0-…. Smile CDR accepts that form; it is worth knowing when reading server search logs.
The subscription notification shall respond as quickly as possible with a success status of 200 OK or 202 Accepted, and an empty body. The latter is normally returned when the request is accepted for processing but processing will commence after the response has been returned, which is the preferred approach for subscription notifications.
Any error response may result in a subsequent retry by the FHIR Server to submit the Subscription Notification until the number of retries is exceeded at which time the FHIR Server will stop the subscription. See Managing Subscriptions and Errors for more details.
If no payload is specified in the Subscription or additional Theatre Booking data is required then it is up the hospital to retrieve the data from the FHIR server using a search. This will be different depending on whether the notification included FHIR resource data such as an Appointment or if it was an empty notification.
If the id of the Appointment is available through the notification data then this can be used as the basis of the FHIR search. This is described in Retrieving a Specific Appointment above.
If an empty notification was received then a search for all recent Theatre Booking changes should be performed as described in Retrieving a Theatre Booking above.
Note
If the Subscription is for the Basic changes resource and that resource arrives in the notification body — see Notification for a Payload Search Criteria Subscription — then data in that resource is sufficient to find all the changed Theatre Booking content. Note that this is not all the Theatre Booking data but rather links to only that which has changed. If the entire Theatre Booking data is required then follow the Retrieving a Specific Appointment guidance based on the Basic.subject reference to the Appointment.
A Theatre Booking arrives at the hospital with a patient already populated on the VMO side. The hospital must reconcile this against its own patient master index. EBookingsPatient carries the identifier slices needed to do this:
| Slice | Identifier | Purpose |
|---|---|---|
ihi |
Individual Healthcare Identifier (HI Service) | National canonical identifier — preferred for matching where present |
medicare |
Medicare card number | Common in private practice |
dva |
DVA file number | Veterans' Affairs entitlement |
insurancemember |
Private health-fund member number | Private patients |
mrn |
Local medical record number | Hospital-issued; may be absent on inbound bookings |
The matching algorithm is the receiver's responsibility. Recommended ordering: IHI exact match → Medicare exact match → DVA exact match → demographic match (family name + given + DOB + sex). When no confident match exists, the hospital should create a new candidate record and flag for manual reconciliation rather than silently merge.
The Magentus platform uses OAuth 2.0 with the client_credentials grant (SMART on FHIR backend services). Each hospital group has its own client. Magentus supplies the connection details, including the base URL, to each hospital group.
[base] includes a partition for the hospital group: https://<api host>/<partition>/. Every request in this guide is made against that base.AppointmentResponse resources and its own Subscription resources. It SHALL NOT create, update or delete Appointment, Patient, ServiceRequest, ChargeItem, Consent or the other resources that make up a booking. The platform writes these resources again each time the practice saves a change, and it does not read changes that a hospital makes to them. An update to Encounter.status is optional (see Theatre Booking Status Changes). The platform also writes the Encounter again each time the practice saves a change.Subscription.channel.header ("Authorization: Bearer …"), as the Registering Subscriptions example shows, so that the endpoint can verify the FHIR server.Conformance failures are returned in standard FHIR shape — implementations should not surface them as opaque HTTP errors.
| HTTP status | Meaning | Body |
|---|---|---|
400 Bad Request |
Malformed JSON, unparseable resource, invalid search parameters | OperationOutcome with severity=error and details |
401 Unauthorized |
Missing or invalid bearer token | OperationOutcome |
403 Forbidden |
Authenticated but lacking the scope or permission for this resource type or instance | OperationOutcome |
404 Not Found |
Resource id does not exist | OperationOutcome |
409 Conflict |
The If-Match version is not the current version (lost update). The server returns 409, not 412, for this case. See Responding to a Booking |
OperationOutcome |
412 Precondition Failed |
Other precondition failure | OperationOutcome |
422 Unprocessable Entity |
Resource parsed but violates a profile constraint (invariant, slice, binding, cardinality) | OperationOutcome with one issue per violation, including location (FHIRPath into the failing element) |
Business validation errors that are specific to the Theatre Booking workflow (for example, theatre slot conflict, hospital declines acceptance) are conveyed via Appointment.status / AppointmentResponse.participantStatus transitions and the Basic change record, not via HTTP error responses — the booking resource is accepted by the server even when the business outcome is a decline.