@healthcloudai/hc-sdk 3.28.0 → 3.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +80 -2
- package/dist/index.d.cts +894 -7
- package/dist/index.d.ts +894 -7
- package/dist/index.js +80 -2
- package/docs/clients/PatientClient.md +6 -0
- package/docs/clients/ProviderClient.md +3 -0
- package/docs/docs-manifest.json +26 -3
- package/docs/examples/index.md +9 -0
- package/docs/index.md +9 -0
- package/docs/models/AvailabilityWindow.md +19 -0
- package/docs/models/BookPracticeAppointmentRequest.md +18 -0
- package/docs/models/CreatePracticeInviteRequest.md +17 -0
- package/docs/models/GetPatientResponse.md +1 -0
- package/docs/models/ListNotificationsResponse.md +4 -1
- package/docs/models/MarkNotificationsReadRequest.md +18 -0
- package/docs/models/MarkNotificationsReadResponse.md +20 -0
- package/docs/models/PatientDemographics.md +1 -0
- package/docs/models/PracticeAppointment.md +26 -0
- package/docs/models/PracticeAppointmentResponse.md +17 -0
- package/docs/models/PracticeAppointmentsResponse.md +19 -0
- package/docs/models/PracticeAvailability.md +22 -0
- package/docs/models/PracticeAvailabilityResponse.md +18 -0
- package/docs/models/PracticeInviteResponse.md +20 -0
- package/docs/models/PracticeSlot.md +19 -0
- package/docs/models/PracticeSlotsResponse.md +21 -0
- package/docs/models/ProviderPatientProfile.md +1 -0
- package/docs/models/ReschedulePracticeAppointmentRequest.md +17 -0
- package/docs/models/index.md +14 -0
- package/docs/models/patient.RegisterRequest.md +1 -0
- package/docs/models/patient.RegisterResponse.md +1 -0
- package/docs/operations/fieldagent.listPatients.md +1 -0
- package/docs/operations/patient.bookPracticeAppointment.md +180 -0
- package/docs/operations/patient.cancelPracticeAppointment.md +158 -0
- package/docs/operations/patient.getPatient.md +1 -0
- package/docs/operations/patient.getPatientSidebarPatientSidebar.md +1 -0
- package/docs/operations/patient.listNotifications.md +22 -11
- package/docs/operations/patient.listPracticeAppointmentSlots.md +149 -0
- package/docs/operations/patient.listPracticeAppointments.md +156 -0
- package/docs/operations/patient.markNotificationsRead.md +122 -0
- package/docs/operations/patient.register.md +4 -1
- package/docs/operations/patient.reschedulePracticeAppointment.md +182 -0
- package/docs/operations/provider.createPracticeInvite.md +140 -0
- package/docs/operations/provider.getPatientProfile.md +1 -0
- package/docs/operations/provider.getPracticeAvailability.md +136 -0
- package/docs/operations/provider.setPracticeAvailability.md +168 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# PracticeInviteResponse
|
|
2
|
+
|
|
3
|
+
Model ID: `PracticeInviteResponse`
|
|
4
|
+
|
|
5
|
+
The invite a patient registers with.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `expires_at` | `string` | Yes | date-time | | | No | When the invite stops working (ISO 8601, UTC). |
|
|
14
|
+
| `invite_code` | `string` | Yes | | | | No | Give this to the patient. It is shown once and works once. |
|
|
15
|
+
| `practice_id` | `string` | Yes | | | | No | The practice the invite is for. |
|
|
16
|
+
| `registration_path` | `string` | Yes | | | | No | Path on the patient app's host that opens registration with the code filled in. |
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
None declared in canonical OpenAPI.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# PracticeSlot
|
|
2
|
+
|
|
3
|
+
Model ID: `PracticeSlot`
|
|
4
|
+
|
|
5
|
+
A bookable telehealth slot.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `end` | `string` | Yes | date-time | | | No | End, ISO 8601 with the practice's UTC offset. |
|
|
14
|
+
| `slot_id` | `string` | Yes | | | | No | Identifies the slot; send it to book. It is only valid while the slot is free. |
|
|
15
|
+
| `start` | `string` | Yes | date-time | | | No | Start, ISO 8601 with the practice's UTC offset. |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
None declared in canonical OpenAPI.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# PracticeSlotsResponse
|
|
2
|
+
|
|
3
|
+
Model ID: `PracticeSlotsResponse`
|
|
4
|
+
|
|
5
|
+
GET /practice-appointment-slots.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `practice_display` | `string|null` | No | | | | Yes | |
|
|
14
|
+
| `practice_id` | `string|null` | No | | | | Yes | The patient's practice, or null when the patient has none. |
|
|
15
|
+
| `slot_minutes` | `integer|null` | No | | | | Yes | |
|
|
16
|
+
| `slots` | array of [`PracticeSlot`](./PracticeSlot.md) | No | | | | No | |
|
|
17
|
+
| `timezone` | `string|null` | No | | | | Yes | |
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
None declared in canonical OpenAPI.
|
|
@@ -32,6 +32,7 @@ Type: `object`
|
|
|
32
32
|
| `openloop_patient_id` | `string|null` | No | | | | Yes | OpenLoop patient id, when linked. |
|
|
33
33
|
| `patient_id` | `string` | Yes | | | | No | FHIR Patient resource id. |
|
|
34
34
|
| `phones` | array of [`Phone`](./Phone.md) | No | | | | No | |
|
|
35
|
+
| `practice_id` | `string|null` | No | | | | Yes | The patient's practice (a Practitioner id), or null when the patient has none. |
|
|
35
36
|
| `preferred_language` | `string|null` | No | | | | Yes | |
|
|
36
37
|
| `race` | array of [`Race`](./Race.md) | No | | | | No | |
|
|
37
38
|
| `sex_at_birth` | [`SexAtBirth`](./SexAtBirth.md) | No | | | | Yes | |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# ReschedulePracticeAppointmentRequest
|
|
2
|
+
|
|
3
|
+
Model ID: `ReschedulePracticeAppointmentRequest`
|
|
4
|
+
|
|
5
|
+
POST /practice-appointments/{appointment_id}/reschedule.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `slot_id` | `string` | Yes | | | | No | The slot to move the appointment to, from GET /practice-appointment-slots. |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
None declared in canonical OpenAPI.
|
package/docs/models/index.md
CHANGED
|
@@ -351,6 +351,7 @@
|
|
|
351
351
|
- [AthenaUploadPrescriptionCardImageResponse](AthenaUploadPrescriptionCardImageResponse.md)
|
|
352
352
|
- [AthenaVitalFailedReading](AthenaVitalFailedReading.md)
|
|
353
353
|
- [AthenaVitalsMirrorResult](AthenaVitalsMirrorResult.md)
|
|
354
|
+
- [PracticeAvailabilityWindow](AvailabilityWindow.md)
|
|
354
355
|
- [BloodPressureVital](BloodPressureVital.md)
|
|
355
356
|
- [BodyHeight](BodyHeight.md)
|
|
356
357
|
- [BodyHeightVital](BodyHeightVital.md)
|
|
@@ -359,6 +360,7 @@
|
|
|
359
360
|
- [BodyWeight](BodyWeight.md)
|
|
360
361
|
- [BodyWeightVital](BodyWeightVital.md)
|
|
361
362
|
- [BookAppointmentRequest](BookAppointmentRequest.md)
|
|
363
|
+
- [BookPracticeAppointmentRequest](BookPracticeAppointmentRequest.md)
|
|
362
364
|
- [CalAssignScheduleToEventTypeRequest](CalAssignScheduleToEventTypeRequest.md)
|
|
363
365
|
- [CalAssignScheduleToEventTypeResponse](CalAssignScheduleToEventTypeResponse.md)
|
|
364
366
|
- [CalAvailableSlotsResponse](CalAvailableSlotsResponse.md)
|
|
@@ -465,6 +467,7 @@
|
|
|
465
467
|
- [CreateMedicationRequest](CreateMedicationRequest.md)
|
|
466
468
|
- [CreateMedicationResponse](CreateMedicationResponse.md)
|
|
467
469
|
- [CreateTelehealthTokenRequest](CreatePatientTokenRequest.md)
|
|
470
|
+
- [CreatePracticeInviteRequest](CreatePracticeInviteRequest.md)
|
|
468
471
|
- [CreateProviderPatientRequest](CreateProviderPatientRequest.md)
|
|
469
472
|
- [CreateTelehealthTokenRequest](CreateProviderTokenRequest.md)
|
|
470
473
|
- [CreateQuestionnaireRequest](CreateQuestionnaireRequest.md)
|
|
@@ -1302,6 +1305,8 @@
|
|
|
1302
1305
|
- [LocationStatus](LocationStatus.md)
|
|
1303
1306
|
- [ProviderLogoutResponse](LogoutResponse.md)
|
|
1304
1307
|
- [MaritalStatus](MaritalStatus.md)
|
|
1308
|
+
- [MarkNotificationsReadRequest](MarkNotificationsReadRequest.md)
|
|
1309
|
+
- [MarkNotificationsReadResponse](MarkNotificationsReadResponse.md)
|
|
1305
1310
|
- [mcp.ConnectResponse](mcp.ConnectResponse.md)
|
|
1306
1311
|
- [McpJsonRpcRequest](McpFieldagentRequest.md)
|
|
1307
1312
|
- [McpJsonRpcResponse](McpFieldagentResponse.md)
|
|
@@ -1497,6 +1502,14 @@
|
|
|
1497
1502
|
- [PolicyDocument](PolicyDocument.md)
|
|
1498
1503
|
- [PortalRole](PortalRole.md)
|
|
1499
1504
|
- [PositionCode](PositionCode.md)
|
|
1505
|
+
- [PracticeAppointment](PracticeAppointment.md)
|
|
1506
|
+
- [PracticeAppointmentResponse](PracticeAppointmentResponse.md)
|
|
1507
|
+
- [PracticeAppointmentsResponse](PracticeAppointmentsResponse.md)
|
|
1508
|
+
- [PracticeAvailability](PracticeAvailability.md)
|
|
1509
|
+
- [PracticeAvailabilityResponse](PracticeAvailabilityResponse.md)
|
|
1510
|
+
- [PracticeInviteResponse](PracticeInviteResponse.md)
|
|
1511
|
+
- [PracticeSlot](PracticeSlot.md)
|
|
1512
|
+
- [PracticeSlotsResponse](PracticeSlotsResponse.md)
|
|
1500
1513
|
- [Practitioner](Practitioner.md)
|
|
1501
1514
|
- [PreferredPharmacy](PreferredPharmacy.md)
|
|
1502
1515
|
- [PresenceRecord](PresenceRecord.md)
|
|
@@ -1663,6 +1676,7 @@
|
|
|
1663
1676
|
- [ReplaceInsuranceRequest](ReplaceInsuranceRequest.md)
|
|
1664
1677
|
- [ReplaceInsuranceResponse](ReplaceInsuranceResponse.md)
|
|
1665
1678
|
- [RescheduleAppointmentRequest](RescheduleAppointmentRequest.md)
|
|
1679
|
+
- [ReschedulePracticeAppointmentRequest](ReschedulePracticeAppointmentRequest.md)
|
|
1666
1680
|
- [RespiratoryRate](RespiratoryRate.md)
|
|
1667
1681
|
- [RetireInsuranceRequest](RetireInsuranceRequest.md)
|
|
1668
1682
|
- [RetireInsuranceResponse](RetireInsuranceResponse.md)
|
|
@@ -28,6 +28,7 @@ Type: `object`
|
|
|
28
28
|
| `ethnicity` | [`Ethnicity`](./Ethnicity.md) | No | | | `null` | Yes | Hispanic or Latino ethnicity status, optional. Mirrored to Athena `ethnicitycode`. |
|
|
29
29
|
| `first_name` | `string` | Yes | | | | No | Patient's given (first) name. |
|
|
30
30
|
| `flags` | `object|null` | No | | | `null` | Yes | Boolean feature/state flags keyed by flag name. Recognized key: AUTO_VERIFY_EMAIL — if true, skips email OTP verification and auto-logs the patient in. |
|
|
31
|
+
| `invite_code` | `string|null` | No | | | `null` | Yes | A practice's invite code. A valid, unused, unexpired code makes the new patient that practice's patient (see `practice_id` on the patient). An invalid, expired or used code rejects the registration with 400 and a `code` of invalid_invite, invite_expired or invite_used; the patient is never registered without the practice they were invited to. |
|
|
31
32
|
| `last_name` | `string` | Yes | | | | No | Patient's family (last) name. |
|
|
32
33
|
| `marital_status` | [`MaritalStatus`](./MaritalStatus.md) | No | | | `null` | Yes | Marital status, optional. Mirrored to Athena `maritalstatus`. |
|
|
33
34
|
| `password` | `string` | Yes | | | | No | Initial password, minimum 8 characters. |
|
|
@@ -20,6 +20,7 @@ Type: `object`
|
|
|
20
20
|
| `fhir_patient_id` | `string` | Yes | | | | No | Newly created FHIR Patient resource ID. |
|
|
21
21
|
| `id_token` | `string|null` | No | | | | Yes | Cognito ID token, present only when the tenant's flow auto-signs the user in after registration. |
|
|
22
22
|
| `openloop_drivers_license_status` | `string|null` | No | | | | Yes | Outcome of mirroring the driver's license image to the patient's Healthie (OpenLoop) account, present only when a driver's license image was submitted with registration. |
|
|
23
|
+
| `practice_id` | `string|null` | No | | | | Yes | The practice the new patient now belongs to, present only when the registration used a valid `invite_code`. |
|
|
23
24
|
| `steadymd_drivers_license_status` | `string|null` | No | | | | Yes | Outcome of mirroring the driver's license image to the patient's SteadyMD intake, present only when a driver's license image was submitted with registration. |
|
|
24
25
|
| `telehealth_id` | `integer|null` | Yes | | | | Yes | Telehealth platform numeric user ID assigned at registration. |
|
|
25
26
|
|
|
@@ -142,6 +142,7 @@ None declared in canonical OpenAPI.
|
|
|
142
142
|
"patient_id": "00000000-0000-0000-0000-000000000000",
|
|
143
143
|
"phones": [],
|
|
144
144
|
"photo_binary_id": "string",
|
|
145
|
+
"practice_id": "string",
|
|
145
146
|
"preferred_language": "en",
|
|
146
147
|
"preferred_pharmacy": {
|
|
147
148
|
"address_city": "string",
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# Book a telehealth appointment with the patient's practice
|
|
2
|
+
|
|
3
|
+
Operation ID: `patient.bookPracticeAppointment`
|
|
4
|
+
|
|
5
|
+
Books the slot (`slot_id` from GET /practice-appointment-slots). Two patients cannot take one slot: the loser gets 409 `slot_taken`. 409 `no_practice` when the patient has no practice, 409 `slot_unavailable` when the time is no longer a bookable slot, 502 `mirror_failed` when an Athena-integrated tenant's Athena booking failed (nothing is booked). The patient and the practice are notified. The response carries the video link.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`bookPracticeAppointment`
|
|
10
|
+
|
|
11
|
+
Signature: `patient.bookPracticeAppointment(request)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<PracticeAppointmentResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **AUTHENTICATED**
|
|
18
|
+
|
|
19
|
+
Schemes: `bearerAuth`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
None documented.
|
|
24
|
+
|
|
25
|
+
## HTTP
|
|
26
|
+
|
|
27
|
+
`POST /practice-appointments`
|
|
28
|
+
|
|
29
|
+
## Path parameters
|
|
30
|
+
|
|
31
|
+
None.
|
|
32
|
+
|
|
33
|
+
## Query parameters
|
|
34
|
+
|
|
35
|
+
None.
|
|
36
|
+
|
|
37
|
+
## Body parameters
|
|
38
|
+
|
|
39
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
40
|
+
|---|---|---:|---|---|---|---:|---|
|
|
41
|
+
| `body` | [`BookPracticeAppointmentRequest`](../models/BookPracticeAppointmentRequest.md) | Yes | | | | No | |
|
|
42
|
+
|
|
43
|
+
Request model: [`BookPracticeAppointmentRequest`](../models/BookPracticeAppointmentRequest.md)
|
|
44
|
+
|
|
45
|
+
## Request example
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"reason": "string",
|
|
50
|
+
"slot_id": "string"
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Success responses
|
|
55
|
+
|
|
56
|
+
| Status | Shape | Content type | Description |
|
|
57
|
+
|---|---|---|---|
|
|
58
|
+
| `201` | [`PracticeAppointmentResponse`](../models/PracticeAppointmentResponse.md) | application/json | The booked appointment |
|
|
59
|
+
|
|
60
|
+
## Success response examples
|
|
61
|
+
|
|
62
|
+
### 201
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"appointment": {
|
|
67
|
+
"appointment_id": "string",
|
|
68
|
+
"end": "2026-01-01T09:00:00Z",
|
|
69
|
+
"practice_display": "string",
|
|
70
|
+
"practice_id": "string",
|
|
71
|
+
"previous_appointment_id": "string",
|
|
72
|
+
"reason": "string",
|
|
73
|
+
"slot_id": "string",
|
|
74
|
+
"start": "2026-01-01T09:00:00Z",
|
|
75
|
+
"status": "string",
|
|
76
|
+
"telehealth_link": "string"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Common errors
|
|
82
|
+
|
|
83
|
+
| Status | Shape | Content type | Description |
|
|
84
|
+
|---|---|---|---|
|
|
85
|
+
| `400` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | |
|
|
86
|
+
| `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
|
|
87
|
+
| `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | |
|
|
88
|
+
| `409` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | |
|
|
89
|
+
| `502` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | |
|
|
90
|
+
|
|
91
|
+
## Error examples
|
|
92
|
+
|
|
93
|
+
### 400
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"details": [
|
|
98
|
+
{}
|
|
99
|
+
],
|
|
100
|
+
"error": "string"
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 401 — Missing or invalid access token
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"error": "Authorization required"
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 404
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"details": [
|
|
117
|
+
{}
|
|
118
|
+
],
|
|
119
|
+
"error": "string"
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### 409
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"details": [
|
|
128
|
+
{}
|
|
129
|
+
],
|
|
130
|
+
"error": "string"
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 502
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"details": [
|
|
139
|
+
{}
|
|
140
|
+
],
|
|
141
|
+
"error": "string"
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## NodeJS / TypeScript implementation
|
|
146
|
+
|
|
147
|
+
```ts
|
|
148
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
const request = {
|
|
153
|
+
"reason": "string",
|
|
154
|
+
"slot_id": "string"
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const result = await patient.bookPracticeAppointment(request);
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## cURL
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
curl -X POST \
|
|
164
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
165
|
+
-H 'Content-Type: application/json' \
|
|
166
|
+
-d '{"reason":"string","slot_id":"string"}' \
|
|
167
|
+
'https://dev-api-patient.health.cloud/practice-appointments'
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Notes
|
|
171
|
+
|
|
172
|
+
None.
|
|
173
|
+
|
|
174
|
+
## Prepared Test Console scenario
|
|
175
|
+
|
|
176
|
+
No canonical scenario is currently associated.
|
|
177
|
+
|
|
178
|
+
## Real response
|
|
179
|
+
|
|
180
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Cancel a telehealth appointment with the patient's practice
|
|
2
|
+
|
|
3
|
+
Operation ID: `patient.cancelPracticeAppointment`
|
|
4
|
+
|
|
5
|
+
Cancels one of the caller's own practice appointments at any time before it starts (there is no cancellation window). Repeating a cancellation changes nothing. 404 for anyone else's appointment, 409 `already_started` once it has begun. The slot is free again. The patient and the practice are notified.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`cancelPracticeAppointment`
|
|
10
|
+
|
|
11
|
+
Signature: `patient.cancelPracticeAppointment(appointmentId)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<PracticeAppointmentResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **AUTHENTICATED**
|
|
18
|
+
|
|
19
|
+
Schemes: `bearerAuth`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
None documented.
|
|
24
|
+
|
|
25
|
+
## HTTP
|
|
26
|
+
|
|
27
|
+
`POST /practice-appointments/{appointment_id}/cancel`
|
|
28
|
+
|
|
29
|
+
## Path parameters
|
|
30
|
+
|
|
31
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
32
|
+
|---|---|---:|---|---|---|---:|---|
|
|
33
|
+
| `appointment_id` | `string` | Yes | | | | No | |
|
|
34
|
+
|
|
35
|
+
## Query parameters
|
|
36
|
+
|
|
37
|
+
None.
|
|
38
|
+
|
|
39
|
+
## Body parameters
|
|
40
|
+
|
|
41
|
+
None.
|
|
42
|
+
|
|
43
|
+
Request model: None.
|
|
44
|
+
|
|
45
|
+
## Request example
|
|
46
|
+
|
|
47
|
+
None declared in canonical OpenAPI.
|
|
48
|
+
|
|
49
|
+
## Success responses
|
|
50
|
+
|
|
51
|
+
| Status | Shape | Content type | Description |
|
|
52
|
+
|---|---|---|---|
|
|
53
|
+
| `200` | [`PracticeAppointmentResponse`](../models/PracticeAppointmentResponse.md) | application/json | The cancelled appointment |
|
|
54
|
+
|
|
55
|
+
## Success response examples
|
|
56
|
+
|
|
57
|
+
### 200
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"appointment": {
|
|
62
|
+
"appointment_id": "string",
|
|
63
|
+
"end": "2026-01-01T09:00:00Z",
|
|
64
|
+
"practice_display": "string",
|
|
65
|
+
"practice_id": "string",
|
|
66
|
+
"previous_appointment_id": "string",
|
|
67
|
+
"reason": "string",
|
|
68
|
+
"slot_id": "string",
|
|
69
|
+
"start": "2026-01-01T09:00:00Z",
|
|
70
|
+
"status": "string",
|
|
71
|
+
"telehealth_link": "string"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Common errors
|
|
77
|
+
|
|
78
|
+
| Status | Shape | Content type | Description |
|
|
79
|
+
|---|---|---|---|
|
|
80
|
+
| `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
|
|
81
|
+
| `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | |
|
|
82
|
+
| `409` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | |
|
|
83
|
+
| `502` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | |
|
|
84
|
+
|
|
85
|
+
## Error examples
|
|
86
|
+
|
|
87
|
+
### 401 — Missing or invalid access token
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"error": "Authorization required"
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 404
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"details": [
|
|
100
|
+
{}
|
|
101
|
+
],
|
|
102
|
+
"error": "string"
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 409
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"details": [
|
|
111
|
+
{}
|
|
112
|
+
],
|
|
113
|
+
"error": "string"
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 502
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"details": [
|
|
122
|
+
{}
|
|
123
|
+
],
|
|
124
|
+
"error": "string"
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## NodeJS / TypeScript implementation
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
```ts
|
|
135
|
+
const appointmentId = "<APPOINTMENT_ID>";
|
|
136
|
+
|
|
137
|
+
const result = await patient.cancelPracticeAppointment(appointmentId);
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## cURL
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
curl -X POST \
|
|
144
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
145
|
+
'https://dev-api-patient.health.cloud/practice-appointments/%3CAPPOINTMENT_ID%3E/cancel'
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Notes
|
|
149
|
+
|
|
150
|
+
None.
|
|
151
|
+
|
|
152
|
+
## Prepared Test Console scenario
|
|
153
|
+
|
|
154
|
+
No canonical scenario is currently associated.
|
|
155
|
+
|
|
156
|
+
## Real response
|
|
157
|
+
|
|
158
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -132,6 +132,7 @@ None declared in canonical OpenAPI.
|
|
|
132
132
|
"patient_id": "00000000-0000-0000-0000-000000000000",
|
|
133
133
|
"phones": [],
|
|
134
134
|
"photo_binary_id": "string",
|
|
135
|
+
"practice_id": "string",
|
|
135
136
|
"preferred_language": "en",
|
|
136
137
|
"preferred_pharmacy": {
|
|
137
138
|
"address_city": "string",
|
|
@@ -136,6 +136,7 @@ None declared in canonical OpenAPI.
|
|
|
136
136
|
"patient_id": "00000000-0000-0000-0000-000000000000",
|
|
137
137
|
"phones": [],
|
|
138
138
|
"photo_binary_id": "string",
|
|
139
|
+
"practice_id": "string",
|
|
139
140
|
"preferred_language": "en",
|
|
140
141
|
"preferred_pharmacy": {
|
|
141
142
|
"address_city": "string",
|
|
@@ -8,7 +8,7 @@ Return all FHIR Communication notifications for the authenticated patient. Requi
|
|
|
8
8
|
|
|
9
9
|
`listNotifications`
|
|
10
10
|
|
|
11
|
-
Signature: `patient.listNotifications()`
|
|
11
|
+
Signature: `patient.listNotifications(query)`
|
|
12
12
|
|
|
13
13
|
Return type: `Promise<JsonValue>`
|
|
14
14
|
|
|
@@ -32,7 +32,10 @@ None.
|
|
|
32
32
|
|
|
33
33
|
## Query parameters
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
36
|
+
|---|---|---:|---|---|---|---:|---|
|
|
37
|
+
| `limit` | `integer` | No | | | | No | |
|
|
38
|
+
| `unread_only` | `boolean` | No | | | | No | |
|
|
36
39
|
|
|
37
40
|
## Body parameters
|
|
38
41
|
|
|
@@ -58,16 +61,19 @@ None declared in canonical OpenAPI.
|
|
|
58
61
|
{
|
|
59
62
|
"notifications": [
|
|
60
63
|
{
|
|
61
|
-
"createdAt": "
|
|
62
|
-
"description": "
|
|
63
|
-
"icon": "
|
|
64
|
-
"id": "
|
|
64
|
+
"createdAt": "string",
|
|
65
|
+
"description": "string",
|
|
66
|
+
"icon": "string",
|
|
67
|
+
"id": "string",
|
|
65
68
|
"read": false,
|
|
66
|
-
"severity": "
|
|
67
|
-
"title": "
|
|
69
|
+
"severity": "string",
|
|
70
|
+
"title": "string"
|
|
68
71
|
}
|
|
69
72
|
],
|
|
70
|
-
"patient_id": "
|
|
73
|
+
"patient_id": "string",
|
|
74
|
+
"total": 0,
|
|
75
|
+
"truncated": false,
|
|
76
|
+
"unread_count": 0
|
|
71
77
|
}
|
|
72
78
|
```
|
|
73
79
|
|
|
@@ -103,7 +109,12 @@ import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
|
103
109
|
```
|
|
104
110
|
|
|
105
111
|
```ts
|
|
106
|
-
const
|
|
112
|
+
const query = {
|
|
113
|
+
"limit": 1,
|
|
114
|
+
"unread_only": true
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const result = await patient.listNotifications(query);
|
|
107
118
|
```
|
|
108
119
|
|
|
109
120
|
## cURL
|
|
@@ -111,7 +122,7 @@ const result = await patient.listNotifications();
|
|
|
111
122
|
```bash
|
|
112
123
|
curl -X GET \
|
|
113
124
|
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
114
|
-
'https://dev-api-patient.health.cloud/patients/notifications'
|
|
125
|
+
'https://dev-api-patient.health.cloud/patients/notifications?limit=1&unread_only=true'
|
|
115
126
|
```
|
|
116
127
|
|
|
117
128
|
## Notes
|