|
| 1 | +# `appointment-book` |
| 2 | + |
| 3 | +| Metadata | Value |
| 4 | +| ---- | ---- |
| 5 | +| specificationVersion | 1.0 |
| 6 | +| hookVersion | 1.0 |
| 7 | +| hookMaturity | 0 - Draft |
| 8 | + |
| 9 | +## Workflow |
| 10 | + |
| 11 | +This hook is invoked when the user is scheduling one or more future encounters/visits for the patient. It may be invoked at the start and end of the booking process and/or any time between those two points. It allows CDS Services to intervene in the decision of when future appointments should be scheduled, where they should be scheduled, what services should be booked, to identify actions that need to occur prior to scheduled appointments, etc. |
| 12 | + |
| 13 | +## Context |
| 14 | + |
| 15 | +The Patient whose appointment(s) are being booked, as well as the proposed Appointment records. |
| 16 | + |
| 17 | +Field | Optionality | Prefetch Token | Type | Description |
| 18 | +----- | -------- | ---- | ---- | ---- |
| 19 | +`userId` | REQUIRED | Yes | *string* | The id of the current user.<br />For this hook, the user could be of type [Practitioner](https://www.hl7.org/fhir/practitioner.html), [PractitionerRole](https://www.hl7.org/fhir/practitionerrole.html), [Patient](https://www.hl7.org/fhir/patient.html), or [RelatedPerson](https://www.hl7.org/fhir/relatedperson.html).<br />For example, `Practitioner/123` |
| 20 | +`patientId` | REQUIRED | Yes | *string* | The FHIR `Patient.id` of Patient appointment(s) is/are for |
| 21 | +`encounterId` | OPTIONAL | Yes | *string* | The FHIR `Encounter.id` of Encounter where booking was initiated |
| 22 | +`appointments` | REQUIRED | No | *object* | DSTU2/STU3/R4 - FHIR Bundle of Appointments in 'proposed' state |
| 23 | + |
| 24 | + |
| 25 | +### Examples (STU3) |
| 26 | + |
| 27 | +```json |
| 28 | +"context":{ |
| 29 | + "userId" : "PractitionerRole/A2340113", |
| 30 | + "patientId" : "1288992", |
| 31 | + "appointments" : [ |
| 32 | + { |
| 33 | + "resourceType": "Appointment", |
| 34 | + "id": "apt1", |
| 35 | + "status": "proposed", |
| 36 | + "serviceType": [ |
| 37 | + { |
| 38 | + "coding": [ |
| 39 | + { |
| 40 | + "code": "183", |
| 41 | + "display": "Sleep Medicine" |
| 42 | + } |
| 43 | + ] |
| 44 | + } |
| 45 | + ], |
| 46 | + "appointmentType": { |
| 47 | + "coding": [ |
| 48 | + { |
| 49 | + "system": "http://hl7.org/fhir/v2/0276", |
| 50 | + "code": "FOLLOWUP", |
| 51 | + "display": "A follow up visit from a previous appointment" |
| 52 | + } |
| 53 | + ] |
| 54 | + }, |
| 55 | + "reason": { |
| 56 | + "coding": { |
| 57 | + "system": "", |
| 58 | + "code": "1023001", |
| 59 | + "display": "Apnea" |
| 60 | + } |
| 61 | + }, |
| 62 | + "description": "CPAP adjustments", |
| 63 | + "start": "2019-08-10T09:00:00-06:00", |
| 64 | + "end": "2019-08-10T09:10:00:00-06:00", |
| 65 | + "created": "2019-08-01", |
| 66 | + "participant": [ |
| 67 | + { |
| 68 | + "actor": { |
| 69 | + "reference": "Patient/example", |
| 70 | + "display": "Peter James Chalmers" |
| 71 | + }, |
| 72 | + "required": "required", |
| 73 | + "status": "tentative" |
| 74 | + }, |
| 75 | + { |
| 76 | + "actor": { |
| 77 | + "reference": "Practitioner/example", |
| 78 | + "display": "Dr Adam Careful" |
| 79 | + }, |
| 80 | + "required": "required", |
| 81 | + "status": "accepted" |
| 82 | + } |
| 83 | + ] |
| 84 | + }, |
| 85 | + { |
| 86 | + "resourceType": "Appointment", |
| 87 | + "id": "apt1", |
| 88 | + "status": "proposed", |
| 89 | + "appointmentType": { |
| 90 | + "coding": [ |
| 91 | + { |
| 92 | + "system": "http://hl7.org/fhir/v2/0276", |
| 93 | + "code": "CHECKUP", |
| 94 | + "display": "A routine check-up, such as an annual physical" |
| 95 | + } |
| 96 | + ] |
| 97 | + }, |
| 98 | + "description": "Regular physical", |
| 99 | + "start": "2020-08-01T13:00:00-06:00", |
| 100 | + "end": "2020-08-01T13:30:00:00-06:00", |
| 101 | + "created": "2019-08-01", |
| 102 | + "participant": [ |
| 103 | + { |
| 104 | + "actor": { |
| 105 | + "reference": "Patient/example", |
| 106 | + "display": "Peter James Chalmers" |
| 107 | + }, |
| 108 | + "required": "required", |
| 109 | + "status": "tentative" |
| 110 | + }, |
| 111 | + { |
| 112 | + "actor": { |
| 113 | + "reference": "Practitioner/example", |
| 114 | + "display": "Dr Adam Careful" |
| 115 | + }, |
| 116 | + "required": "required", |
| 117 | + "status": "accepted" |
| 118 | + } |
| 119 | + ] |
| 120 | + } |
| 121 | + ] |
| 122 | +} |
| 123 | +``` |
| 124 | + |
| 125 | +```json |
| 126 | +"context":{ |
| 127 | + "userId" : "PractitionerRole/A2340113", |
| 128 | + "patientId" : "1288992", |
| 129 | + "encounterId" : "456", |
| 130 | + "appointment" : [ |
| 131 | + { |
| 132 | + "resourceType": "Appointment", |
| 133 | + "id": "example", |
| 134 | + "text": { |
| 135 | + "status": "generated", |
| 136 | + "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Brian MRI results discussion</div>" |
| 137 | + }, |
| 138 | + "status": "proposed", |
| 139 | + "serviceCategory": { |
| 140 | + "coding": [ |
| 141 | + { |
| 142 | + "system": "http://example.org/service-category", |
| 143 | + "code": "gp", |
| 144 | + "display": "General Practice" |
| 145 | + } |
| 146 | + ] |
| 147 | + }, |
| 148 | + "serviceType": [ |
| 149 | + { |
| 150 | + "coding": [ |
| 151 | + { |
| 152 | + "code": "52", |
| 153 | + "display": "General Discussion" |
| 154 | + } |
| 155 | + ] |
| 156 | + } |
| 157 | + ], |
| 158 | + "specialty": [ |
| 159 | + { |
| 160 | + "coding": [ |
| 161 | + { |
| 162 | + "system": "http://example.org/specialty", |
| 163 | + "code": "gp", |
| 164 | + "display": "General Practice" |
| 165 | + } |
| 166 | + ] |
| 167 | + } |
| 168 | + ], |
| 169 | + "appointmentType": { |
| 170 | + "coding": [ |
| 171 | + { |
| 172 | + "system": "http://example.org/appointment-type", |
| 173 | + "code": "follow", |
| 174 | + "display": "Followup" |
| 175 | + } |
| 176 | + ] |
| 177 | + }, |
| 178 | + "indication": [ |
| 179 | + { |
| 180 | + "reference": "Condition/example", |
| 181 | + "display": "Severe burn of left ear" |
| 182 | + } |
| 183 | + ], |
| 184 | + "priority": 5, |
| 185 | + "description": "Discussion on the results of your recent MRI", |
| 186 | + "start": "2013-12-10T09:00:00Z", |
| 187 | + "end": "2013-12-10T11:00:00Z", |
| 188 | + "created": "2013-10-10", |
| 189 | + "comment": "Further expand on the results of the MRI and determine the next actions that may be appropriate.", |
| 190 | + "incomingReferral": [ |
| 191 | + { |
| 192 | + "reference": "ReferralRequest/example" |
| 193 | + } |
| 194 | + ], |
| 195 | + "participant": [ |
| 196 | + { |
| 197 | + "actor": { |
| 198 | + "reference": "Patient/example", |
| 199 | + "display": "Peter James Chalmers" |
| 200 | + }, |
| 201 | + "required": "required", |
| 202 | + "status": "tentative" |
| 203 | + }, |
| 204 | + { |
| 205 | + "type": [ |
| 206 | + { |
| 207 | + "coding": [ |
| 208 | + { |
| 209 | + "system": "http://hl7.org/fhir/v3/ParticipationType", |
| 210 | + "code": "ATND" |
| 211 | + } |
| 212 | + ] |
| 213 | + } |
| 214 | + ], |
| 215 | + "actor": { |
| 216 | + "reference": "Practitioner/example", |
| 217 | + "display": "Dr Adam Careful" |
| 218 | + }, |
| 219 | + "required": "required", |
| 220 | + "status": "accepted" |
| 221 | + }, |
| 222 | + { |
| 223 | + "actor": { |
| 224 | + "reference": "Location/1", |
| 225 | + "display": "South Wing, second floor" |
| 226 | + }, |
| 227 | + "required": "required", |
| 228 | + "status": "action-needed" |
| 229 | + } |
| 230 | + ] |
| 231 | + } |
| 232 | + ] |
| 233 | +} |
| 234 | +``` |
| 235 | + |
| 236 | +## Change Log |
| 237 | + |
| 238 | +Version | Description |
| 239 | +---- | ---- |
| 240 | +1.0 | Initial Release |
| 241 | + |
0 commit comments