This page is part of the Argonaut Scheduling Implementation Guide (v1.0.0: Release) based on FHIR R3. This is the current published version. For a full list of available versions, see the Directory of published versions
Appointment_Book
OPERATION: Appointment_Book
The official URL for this operation definition is:
http://fhir.org/guides/argonaut-scheduling/OperationDefinition/appointment-book
Request to book a selected Appointment. This operation follows the appointment availability and optional hold interactiona. This operaton completes the booking of an appointment. The server determines if the nominated appointment is still available (i.e., all the required actors and physical assets needed for the appointment are still available) and either accepts or rejects the hold request and updates the resource status accordingly. See the Appointment State Diagram for further details on statuses.
URL: [base]/Appointment/$book
URL: [base]/Appointment/[id]/$book
Parameters
Use | Name | Cardinality | Type | Binding | Documentation |
IN | appt-id | 0..1 | uri |
A resource id for one of proposed Appointments returned by a prior |
|
IN | appt-resource | 0..1 | Appointment (Argonaut Appointment Profile) |
When prefetching open Slots, an Argonaut Appointment Profile resource is created by the Client Application and is exchanged with the FHIR Scheduler (EHR). This parameter represents this profile and is the same as used for the |
|
IN | cancelled-appt-id | 0..1 | uri |
For this implementation, rescheduling is two step process of cancelling an appointment and rebooking a new appointment. This parameter represents the resource id (e.g., Resource/1234) of the cancelled Appointment and the |
|
IN | patient-id | 0..* | uri |
A resource id for the Patient(s) participant in the resource (e.g., Patient/1234). References can be to an absolute URL, but servers only perform this operation on their own patients. For existing patients the client may need to fetch Patient ID using RESTful |
|
IN | comment | 0..1 | string |
Comments or special instructions |
|
OUT | return | 0..1 | Bundle (Argonaut Appointment Bundle Profile) |
An Argonaut Appointment Bundle Profile of type |
-
This operation is not idempotent and may only be invoked by performing an HTTP POST.
-
When using the
appt-resource
as the only input parameter, the payload can be either the Appointment resource or use the Parameters format as shown in the examples below
The operation can be invoked as follows:
POST [base]/Appointment/[id]/$book
when usingappt-id
as an input parameterPOST [base]/Appointment/$book
when usingappt-resource
as an input parameter
Examples
1) Using appt-id
as an input parameter
Request
POST [base]/Appointment/proposed-appt2a-1/$book
Request body
{
"resourceType": "Parameters",
"parameter": [
{
"name": "appt-id",
"valueUrl" : "Appointment/proposed-appt2a-1"
},
{
"name": "patient-id",
"valueUrl" : "Patient/1234"
}
]
}
Response
HTTP/1.1 200 OK
[other headers]
Response body
{
"resourceType": "Bundle",
"id": "derm-booked",
"type": "searchset",
"total": 1,
"entry": [{
"fullUrl": "http://server/path/Appointment/booked-derm-appt",
"resource": {
"resourceType": "Appointment",
"id": "booked-derm-appt",
...snip...
"status" : "booked",
"serviceType" : [
...snip...
]
"entry": [{
"fullUrl": "http://server/path/OperationOutcome/oo-booked-derm-appt",
"resource": {
"resourceType": "OperationOutcome",
"id": "oo-booked-derm-appt",
.. snip ...
}
]
}
2) Using appt-resource
as an input parameter
Request
POST [base]/Appointment/$book
Appointment resource as request body
{
"resourceType" : "Appointment",
...snip...
"status" : "pending",
"serviceType" : [
...snip...
"start" : "2017-07-17T01:00:00Z",
"end" : "2017-07-17T01:15:00Z",
"participant" : [
{
"actor" : {
"reference" : "Practitioner/dr-y",
"display" : "Dr Y"
...snip...
}
Parameter format as request body
{
"resourceType": "Parameters",
"parameter": [
{
"name": "appt-resource",
"resource":{
"resourceType" : "Appointment",
"id" : "proposed-appt2",
...snip...
"status" : "pending",
"serviceType" : [
...snip...
"start" : "2017-07-17T01:00:00Z",
"end" : "2017-07-17T01:15:00Z",
"participant" : [
{
"actor" : {
"reference" : "Practitioner/dr-y",
"display" : "Dr Y"
...snip...
}
}
]
}
Response
HTTP/1.1 201 Created
Location: [base]/Appointment/argo-appt-1/_history/1
[other headers]
Response body
{
"resourceType": "Bundle",
"id": "argo-appt-1",
"type": "searchset",
"total": 2,
"entry": [{
"fullUrl": "http://server/path/Appointment/scheduled-appt2a",
"resource": {
"resourceType": "Appointment",
"id": "held-appt2a",
...snip...
"status" : "booked",
"serviceType" : [
...snip...
"fullUrl": "http://server/path/OperationOutcome/oo-held-appt1a",
"resource": {
"resourceType": "OperationOutcome",
"id": "oo-held-appt1a-appt1a",
.. snip ...
}
]
}