Scheduling Support
From Hiasobi - FHIR
Revision as of 12:27, 19 June 2018 by Brett Esler (Talk | contribs)
Contents
Search appointment books as Schedule resource
See: Core FHIR Resources Appointment, Schedule, Slot
REQUEST
Appointment books may be broken in to periods during a single day.
Get 'all' is 6 weeks of all practitioners as Schedule resource:
GET [base]/Schedule HTTP/1.1 Accept: application/fhir+json
Get all schedules for a practitioner:
GET [base]/Schedule?actor=Practitioner/<practitioner id> HTTP/1.1 Accept: application/fhir+json
Get all schedules for a location:
GET [base]/Schedule?actor=Location/<location id> HTTP/1.1 Accept: application/fhir+json
Get all schedules for a practitioner at a location on a date:
GET [base]/Schedule?date=<date>&actor=Practitioner/<practitioner id>&actor=Location/<location id> HTTP/1.1 Accept: application/fhir+json
Can include Practitioner and Locations details also
&_include=Schedule:actor
RESPONSE
- Return a FHIR Bundle
- Bundle.entry will contain Schedule entries
- Example response in xml and json format:
{
"resourceType":"Bundle",
"id":"e877b7c9-f68b-4f20-9211-194fca2e5f67",
"meta":{
"versionId":"20180619112404",
"lastUpdated":"2018-06-19T01:24:04.171+00:00"
},
"type":"searchset",
"total":7,
"link":[
{
"relation":"self",
"url":"http://demo.oridashi.com.au:8297/Schedule?date=2018-06-21&_include=Schedule:actor"
},
{
"relation":"last",
"url":"http://demo.oridashi.com.au:8297/Schedule?date=2018-06-21&_include=Schedule:actor&_page=1&_snapshot=636650042440156250"
}
],
"entry":[
{
"fullUrl":"http://demo.oridashi.com.au:8297/Schedule/6FA2AA1CA439ABFB38D48297E0ACC3FF.1-20180621-30600-18000-900-1",
"resource":{
"resourceType":"Schedule",
"id":"6FA2AA1CA439ABFB38D48297E0ACC3FF.1-20180621-30600-18000-900-1",
"meta":{
"versionId":"20180619012404",
"lastUpdated":"2018-06-19T01:24:04.078+00:00"
},
"extension":[
{
"url":"http://oridashi.com.au/fhir/StructureDefinition/schedule-default-duration",
"valueQuantity":{
"value":900,
"unit":"s"
}
}
],
"actor":[
{
"reference":"Practitioner/6FA2AA1CA439ABFB38D48297E0ACC3FF.1"
},
{
"reference":"Location/6FA2AA1CA439ABFB38D48297E0ACC3FF.1"
}
],
"planningHorizon":{
"start":"2018-06-21T08:30:00+10:00",
"end":"2018-06-21T13:30:00+10:00"
}
}
},
{
"fullUrl":"http://demo.oridashi.com.au:8297/Practitioner/6FA2AA1CA439ABFB38D48297E0ACC3FF.1",
"resource":{
"resourceType":"Practitioner",
"id":"6FA2AA1CA439ABFB38D48297E0ACC3FF.1",
"meta":{
"versionId":"20180124042613",
"lastUpdated":"2018-01-24T04:26:13+00:00"
},
"text":{
"status":"generated",
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>D'Sousa, Frederick Tao</p></div>"
},
"identifier":[
{
"use":"usual",
"type":{
"coding":[
{
"system":"http://hl7.org.au/v2/0203",
"code":"PRESC",
"display":"Prescriber Number"
}
],
"text":"Prescriber Number"
},
"system":"http://ns.electronichealth.net.au/id/medicare-prescriber-number",
"value":"453221"
}
],
"active":true,
"name":[
{
"use":"official",
"family":"D'Sousa",
"given":[
"Frederick Tao"
],
"prefix":[
"Dr"
]
}
],
"telecom":[
{
"system":"phone",
"value":"456131345",
"use":"home"
},
{
"system":"phone",
"value":"05645613121",
"use":"mobile"
},
{
"system":"email",
"value":"findacure7@bpsoftware.com.au",
"use":"work"
}
]
}
},
{
"fullUrl":"http://demo.oridashi.com.au:8297/Location/6FA2AA1CA439ABFB38D48297E0ACC3FF.1",
"resource":{
"resourceType":"Location",
"id":"6FA2AA1CA439ABFB38D48297E0ACC3FF.1",
"meta":{
"versionId":"20170919041016",
"lastUpdated":"2017-09-19T04:10:16+00:00"
},
"text":{
"status":"generated",
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Oridashi BP Test Practice</p></div>"
},
"identifier":[
{
"use":"usual",
"type":{
"text":"Facility Id"
},
"system":"http://oridashi.com.au/id/facilityid",
"value":"6FA2AA1CA439ABFB38D48297E0ACC3FF"
}
],
"status":"active",
"name":"Oridashi BP Test Practice",
"mode":"instance",
"telecom":[
{
"system":"phone",
"value":"0423083847",
"use":"work"
},
{
"system":"fax",
"value":"0394951418",
"use":"work"
},
{
"system":"email",
"value":"frontdesk2@oridashi.com.au",
"use":"work"
}
],
"address":{
"use":"work",
"line":[
"3 Main Street",
"Plaza Del Pinto"
],
"city":"Thornbury",
"state":"VIC",
"postalCode":"3071"
},
"managingOrganization":{
"reference":"Organization/6FA2AA1CA439ABFB38D48297E0ACC3FF.0"
}
}
},
{
"fullUrl":"http://demo.oridashi.com.au:8297/Schedule/6FA2AA1CA439ABFB38D48297E0ACC3FF.5-20180621-30600-14400-900-1",
"resource":{
"resourceType":"Schedule",
"id":"6FA2AA1CA439ABFB38D48297E0ACC3FF.5-20180621-30600-14400-900-1",
"meta":{
"versionId":"20180619012404",
"lastUpdated":"2018-06-19T01:24:04.093+00:00"
},
"extension":[
{
"url":"http://oridashi.com.au/fhir/StructureDefinition/schedule-default-duration",
"valueQuantity":{
"value":900,
"unit":"s"
}
}
],
"actor":[
{
"reference":"Practitioner/6FA2AA1CA439ABFB38D48297E0ACC3FF.5"
},
{
"reference":"Location/6FA2AA1CA439ABFB38D48297E0ACC3FF.1"
}
],
"planningHorizon":{
"start":"2018-06-21T08:30:00+10:00",
"end":"2018-06-21T12:30:00+10:00"
}
}
},
{
"fullUrl":"http://demo.oridashi.com.au:8297/Practitioner/6FA2AA1CA439ABFB38D48297E0ACC3FF.5",
"resource":{
"resourceType":"Practitioner",
"id":"6FA2AA1CA439ABFB38D48297E0ACC3FF.5",
"meta":{
"versionId":"20161229112606",
"lastUpdated":"2016-12-29T11:26:06+00:00"
},
"text":{
"status":"generated",
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>D'Nurse, Nadine</p></div>"
},
"active":true,
"name":[
{
"use":"official",
"family":"D'Nurse",
"given":[
"Nadine"
]
}
],
"telecom":[
{
"system":"phone",
"value":"784313465",
"use":"home"
},
{
"system":"phone",
"value":"097513132",
"use":"mobile"
},
{
"system":"email",
"value":"nadine.nurse@bpsoftware.com.au",
"use":"work"
}
]
}
},
{
"fullUrl":"http://demo.oridashi.com.au:8297/Schedule/6FA2AA1CA439ABFB38D48297E0ACC3FF.5-20180621-50400-13500-900-1",
"resource":{
"resourceType":"Schedule",
"id":"6FA2AA1CA439ABFB38D48297E0ACC3FF.5-20180621-50400-13500-900-1",
"meta":{
"versionId":"20180619012404",
"lastUpdated":"2018-06-19T01:24:04.109+00:00"
},
"extension":[
{
"url":"http://oridashi.com.au/fhir/StructureDefinition/schedule-default-duration",
"valueQuantity":{
"value":900,
"unit":"s"
}
}
],
"actor":[
{
"reference":"Practitioner/6FA2AA1CA439ABFB38D48297E0ACC3FF.5"
},
{
"reference":"Location/6FA2AA1CA439ABFB38D48297E0ACC3FF.1"
}
],
"planningHorizon":{
"start":"2018-06-21T14:00:00+10:00",
"end":"2018-06-21T17:45:00+10:00"
}
}
}
]
}
Search available slots as Slot resource
REQUEST
- LIMITED SUPPORT Get all slots in a given schedule (appointment book)
- add $_count=10000 if you don't want response bundle paging
GET [base]/Slot?schedule=<schedule.id> HTTP/1.1 Accept: application/fhir+json
RESPONSE
Appointment Details
- Create a FHIR Appointment resource instance to submit based on the slot start/end and practitioner info
- 1..1 status : pending (appointment is proposed)
- 1..1 start/ 1..1 end : date-time period for the appointment
- 0..1 description : top line summary text for the appointment
- 0..* participant : entities involved with the appointment
- actor.reference : reference the FHIR id of the entity
- 1..1 Practitioner participant must be provided (by reference); required = required (must attend); status = needs-action (system yet to accept)
- 0..1 Patient reference a patient if you can to link automatically in the PMS ; required = required (must attend); status = accepted (already confirmed)
- comment : further notes to include in the appointment
POST https://localhost.oridashi.com.au:8102/Appointment HTTP/1.1
Content-Length: 424
Accept: application/fhir+json
Content-Type: application/fhir+json
{
"resourceType":"Appointment",
"status":"pending",
"start":"2018-06-21T09:30:00+10:00",
"end":"2018-06-21T09:45:00+10:00",
"description":"Online Appointment",
"participant":[
{
"actor":{
"reference":"Practitioner/6FA2AA1CA439ABFB38D48297E0ACC3FF.1"
},
"required":"required",
"status":"needs-action"
},
{
"actor":{
"reference":"Patient/6FA2AA1CA439ABFB38D48297E0ACC3FF.2"
},
"required":"required",
"status":"accepted"
}
],
"comment":"test notes"
}
Typical Usage
Get calendars and include practitioners and locations; then get slots
GET https://localhost.oridashi.com.au:8102/Schedule?date=2018-06-19&_include=Schedule:actor HTTP/1.1 Accept: application/fhir+json
Get slots from all schedules e.g. slots for each schedule by id like:
GET https://localhost.oridashi.com.au:8102/Slot?schedule=6FA2AA1CA439ABFB38D48297E0ACC3FF.1-20180619-32400-3600-900-1 HTTP/1.1 Accept: application/fhir+json
Archive Material: Appointment Management