@healthcloudai/hc-sdk 2.8.0 → 2.9.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.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/docs/docs-manifest.json +2 -2
- package/docs/models/SetPreferredPharmacyResponse.md +20 -0
- package/docs/models/index.md +1 -1
- package/docs/models/patient.LoginResponse.md +1 -0
- package/docs/operations/patient.checkInEncounter.md +2 -61
- package/docs/operations/patient.createQuestionnaireResponse.md +1 -1
- package/docs/operations/patient.login.md +8 -7
- package/docs/operations/patient.setPreferredPharmacy.md +3 -4
- package/docs/operations/patient.updatePhone.md +42 -1
- package/docs/operations/person.updatePhone.md +42 -1
- package/docs/operations/provider.updatePhone.md +42 -1
- package/package.json +1 -1
- package/docs/models/OrganizationResource.md +0 -19
|
@@ -56,73 +56,14 @@ Request model: [`CheckInEncounterRequest`](../models/CheckInEncounterRequest.md)
|
|
|
56
56
|
|
|
57
57
|
| Status | Shape | Content type | Description |
|
|
58
58
|
|---|---|---|---|
|
|
59
|
-
| `200` |
|
|
59
|
+
| `200` | `object` | application/json | Encounter checked in and linked to the EHR encounter, plus athena_patient_id |
|
|
60
60
|
|
|
61
61
|
## Success response examples
|
|
62
62
|
|
|
63
63
|
### 200
|
|
64
64
|
|
|
65
65
|
```json
|
|
66
|
-
{
|
|
67
|
-
"appointment_id": "string",
|
|
68
|
-
"athena_appointment_id": "string",
|
|
69
|
-
"athena_encounter_id": "string",
|
|
70
|
-
"created_by": "self",
|
|
71
|
-
"created_date": "2026-01-01T09:00:00Z",
|
|
72
|
-
"diagnoses": [
|
|
73
|
-
{
|
|
74
|
-
"condition_display": "string",
|
|
75
|
-
"condition_id": "string",
|
|
76
|
-
"rank": 1,
|
|
77
|
-
"use_code": "CC"
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"encounter_class": "AMB",
|
|
81
|
-
"encounter_id": "00000000-0000-0000-0000-000000000000",
|
|
82
|
-
"fhir_id": "string",
|
|
83
|
-
"hospitalization": {
|
|
84
|
-
"admit_source_code": "string",
|
|
85
|
-
"destination_id": "string",
|
|
86
|
-
"discharge_disposition": "home",
|
|
87
|
-
"origin_id": "string",
|
|
88
|
-
"pre_admission_id": "string",
|
|
89
|
-
"re_admission_code": "string"
|
|
90
|
-
},
|
|
91
|
-
"length_minutes": 0,
|
|
92
|
-
"locations": [
|
|
93
|
-
{
|
|
94
|
-
"location_display": "string",
|
|
95
|
-
"location_id": "string",
|
|
96
|
-
"period_end": "2026-01-01T09:00:00Z",
|
|
97
|
-
"period_start": "2026-01-01T09:00:00Z",
|
|
98
|
-
"status": "active"
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
"notes": "string",
|
|
102
|
-
"participants": [
|
|
103
|
-
{
|
|
104
|
-
"participant_type": "PPRF",
|
|
105
|
-
"period_end": "2026-01-01T09:00:00Z",
|
|
106
|
-
"period_start": "2026-01-01T09:00:00Z",
|
|
107
|
-
"practitioner_display": "string",
|
|
108
|
-
"practitioner_id": "string"
|
|
109
|
-
}
|
|
110
|
-
],
|
|
111
|
-
"patient_id": "string",
|
|
112
|
-
"period_end": "2026-01-01T09:00:00Z",
|
|
113
|
-
"period_start": "2026-01-01T09:00:00Z",
|
|
114
|
-
"priority_code": "string",
|
|
115
|
-
"priority_display": "string",
|
|
116
|
-
"reason_code": "string",
|
|
117
|
-
"reason_display": "string",
|
|
118
|
-
"service_provider_display": "string",
|
|
119
|
-
"service_provider_id": "string",
|
|
120
|
-
"service_type_code": "string",
|
|
121
|
-
"service_type_display": "string",
|
|
122
|
-
"status": "planned",
|
|
123
|
-
"type_code": "string",
|
|
124
|
-
"type_display": "string"
|
|
125
|
-
}
|
|
66
|
+
{}
|
|
126
67
|
```
|
|
127
68
|
|
|
128
69
|
## Common errors
|
|
@@ -10,7 +10,7 @@ Create a FHIR QuestionnaireResponse for the given Questionnaire. `patient_id` is
|
|
|
10
10
|
|
|
11
11
|
Signature: `patient.createQuestionnaireResponse(questionnaireId, request)`
|
|
12
12
|
|
|
13
|
-
Return type: `Promise<
|
|
13
|
+
Return type: `Promise<QuestionnaireResponseCreated>`
|
|
14
14
|
|
|
15
15
|
## Authentication
|
|
16
16
|
|
|
@@ -62,13 +62,14 @@ Request model: [`patient.LoginRequest`](../models/patient.LoginRequest.md)
|
|
|
62
62
|
|
|
63
63
|
```json
|
|
64
64
|
{
|
|
65
|
-
"access_token": "
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
65
|
+
"access_token": "string",
|
|
66
|
+
"athena_patient_id": "string",
|
|
67
|
+
"cognito_sub": "string",
|
|
68
|
+
"expires_in": 0,
|
|
69
|
+
"fhir_patient_id": "string",
|
|
70
|
+
"id_token": "string",
|
|
71
|
+
"refresh_token": "string",
|
|
72
|
+
"telehealth_id": 0,
|
|
72
73
|
"token_type": "Bearer"
|
|
73
74
|
}
|
|
74
75
|
```
|
|
@@ -64,7 +64,7 @@ Request model: [`SetPreferredPharmacyRequest`](../models/SetPreferredPharmacyReq
|
|
|
64
64
|
|
|
65
65
|
| Status | Shape | Content type | Description |
|
|
66
66
|
|---|---|---|---|
|
|
67
|
-
| `200` | [`
|
|
67
|
+
| `200` | [`SetPreferredPharmacyResponse`](../models/SetPreferredPharmacyResponse.md) | application/json | The saved preferred-pharmacy FHIR Organization resource, plus the Athena mirror outcome |
|
|
68
68
|
|
|
69
69
|
## Success response examples
|
|
70
70
|
|
|
@@ -72,9 +72,8 @@ Request model: [`SetPreferredPharmacyRequest`](../models/SetPreferredPharmacyReq
|
|
|
72
72
|
|
|
73
73
|
```json
|
|
74
74
|
{
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"resourceType": "Organization"
|
|
75
|
+
"athena_pharmacy_error": "string",
|
|
76
|
+
"athena_pharmacy_status": "string"
|
|
78
77
|
}
|
|
79
78
|
```
|
|
80
79
|
|
|
@@ -70,12 +70,21 @@ Request model: [`patient.UpdatePhoneRequest`](../models/patient.UpdatePhoneReque
|
|
|
70
70
|
|
|
71
71
|
| Status | Shape | Content type | Description |
|
|
72
72
|
|---|---|---|---|
|
|
73
|
-
| `400` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Bad request — phone is missing or
|
|
73
|
+
| `400` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Bad request — phone is missing, malformed, or not a dialable number |
|
|
74
74
|
| `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing, invalid, expired, or non-patient Bearer JWT |
|
|
75
75
|
| `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The authenticated patient has no FHIR Patient record |
|
|
76
|
+
| `502` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The SMS provider could not be reached or rejected our credentials. The phone number itself was accepted; this is a server-side fault, so the request may be retried unchanged. |
|
|
76
77
|
|
|
77
78
|
## Error examples
|
|
78
79
|
|
|
80
|
+
### 400 — Not E.164 format
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"error": "phone: 'abc-def-ghij' is not a valid phone number. Expected E.164 format (e.g. +12065551234)"
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
79
88
|
### 400 — phone is required
|
|
80
89
|
|
|
81
90
|
```json
|
|
@@ -84,6 +93,22 @@ Request model: [`patient.UpdatePhoneRequest`](../models/patient.UpdatePhoneReque
|
|
|
84
93
|
}
|
|
85
94
|
```
|
|
86
95
|
|
|
96
|
+
### 400 — The number is well-formed but the SMS provider will not deliver to it (e.g. a landline, or an unsubscribed recipient)
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"error": "Twilio error 21614: 'To' number is not a valid mobile number"
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 400 — Correct length and E.164, but not a dialable US/Canada number
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"error": "phone: '+11234123412' is not a dialable US/Canada number — the area code and exchange code must each start with 2-9 and must not be a service code like 411 (e.g. +12065551234)"
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
87
112
|
### 401 — Missing or invalid access token
|
|
88
113
|
|
|
89
114
|
```json
|
|
@@ -100,6 +125,22 @@ Request model: [`patient.UpdatePhoneRequest`](../models/patient.UpdatePhoneReque
|
|
|
100
125
|
}
|
|
101
126
|
```
|
|
102
127
|
|
|
128
|
+
### 502 — Our SMS provider credentials are invalid or expired
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"error": "Twilio error 20003: Authentication Error - invalid username"
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### 502 — The SMS provider returned a server error
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"error": "Twilio error: Internal Server Error"
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
103
144
|
## NodeJS / TypeScript implementation
|
|
104
145
|
|
|
105
146
|
```ts
|
|
@@ -72,11 +72,20 @@ Request model: [`person.UpdatePhoneRequest`](../models/person.UpdatePhoneRequest
|
|
|
72
72
|
|
|
73
73
|
| Status | Shape | Content type | Description |
|
|
74
74
|
|---|---|---|---|
|
|
75
|
-
| `400` | [`person.ErrorResponse`](../models/person.ErrorResponse.md) | application/json | phone was not supplied, or the update/OTP dispatch
|
|
75
|
+
| `400` | [`person.ErrorResponse`](../models/person.ErrorResponse.md) | application/json | phone was not supplied, is not a dialable number, or the update/OTP dispatch was rejected because of it |
|
|
76
76
|
| `401` | [`person.ErrorResponse`](../models/person.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
|
|
77
|
+
| `502` | [`person.ErrorResponse`](../models/person.ErrorResponse.md) | application/json | The SMS provider could not be reached or rejected our credentials. The phone number itself was accepted; this is a server-side fault, so the request may be retried unchanged. |
|
|
77
78
|
|
|
78
79
|
## Error examples
|
|
79
80
|
|
|
81
|
+
### 400 — Not E.164 format
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"error": "phone: 'abc-def-ghij' is not a valid phone number. Expected E.164 format (e.g. +12065551234)"
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
80
89
|
### 400 — Required field is missing
|
|
81
90
|
|
|
82
91
|
```json
|
|
@@ -85,6 +94,22 @@ Request model: [`person.UpdatePhoneRequest`](../models/person.UpdatePhoneRequest
|
|
|
85
94
|
}
|
|
86
95
|
```
|
|
87
96
|
|
|
97
|
+
### 400 — The number is well-formed but the SMS provider will not deliver to it
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"error": "Twilio error 21614: 'To' number is not a valid mobile number"
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 400 — Correct length and E.164, but not a dialable US/Canada number
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"error": "phone: '+11234123412' is not a dialable US/Canada number — the area code and exchange code must each start with 2-9 and must not be a service code like 411 (e.g. +12065551234)"
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
88
113
|
### 401 — Missing or invalid access token
|
|
89
114
|
|
|
90
115
|
```json
|
|
@@ -93,6 +118,22 @@ Request model: [`person.UpdatePhoneRequest`](../models/person.UpdatePhoneRequest
|
|
|
93
118
|
}
|
|
94
119
|
```
|
|
95
120
|
|
|
121
|
+
### 502 — Our SMS provider credentials are invalid or expired
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"error": "Twilio error 20003: Authentication Error - invalid username"
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 502 — The SMS provider returned a server error
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"error": "Twilio error: Internal Server Error"
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
96
137
|
## NodeJS / TypeScript implementation
|
|
97
138
|
|
|
98
139
|
```ts
|
|
@@ -72,11 +72,20 @@ Request model: [`provider.UpdatePhoneRequest`](../models/provider.UpdatePhoneReq
|
|
|
72
72
|
|
|
73
73
|
| Status | Shape | Content type | Description |
|
|
74
74
|
|---|---|---|---|
|
|
75
|
-
| `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | phone was not supplied, or the update/OTP dispatch
|
|
75
|
+
| `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | phone was not supplied, is not a dialable number, or the update/OTP dispatch was rejected because of it |
|
|
76
76
|
| `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
|
|
77
|
+
| `502` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The SMS provider could not be reached or rejected our credentials. The phone number itself was accepted; this is a server-side fault, so the request may be retried unchanged. |
|
|
77
78
|
|
|
78
79
|
## Error examples
|
|
79
80
|
|
|
81
|
+
### 400 — Not E.164 format
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"error": "phone: 'abc-def-ghij' is not a valid phone number. Expected E.164 format (e.g. +12065551234)"
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
80
89
|
### 400 — Required field is missing
|
|
81
90
|
|
|
82
91
|
```json
|
|
@@ -85,6 +94,22 @@ Request model: [`provider.UpdatePhoneRequest`](../models/provider.UpdatePhoneReq
|
|
|
85
94
|
}
|
|
86
95
|
```
|
|
87
96
|
|
|
97
|
+
### 400 — The number is well-formed but the SMS provider will not deliver to it
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"error": "Twilio error 21614: 'To' number is not a valid mobile number"
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 400 — Correct length and E.164, but not a dialable US/Canada number
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"error": "phone: '+11234123412' is not a dialable US/Canada number — the area code and exchange code must each start with 2-9 and must not be a service code like 411 (e.g. +12065551234)"
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
88
113
|
### 401 — Missing or invalid access token
|
|
89
114
|
|
|
90
115
|
```json
|
|
@@ -93,6 +118,22 @@ Request model: [`provider.UpdatePhoneRequest`](../models/provider.UpdatePhoneReq
|
|
|
93
118
|
}
|
|
94
119
|
```
|
|
95
120
|
|
|
121
|
+
### 502 — Our SMS provider credentials are invalid or expired
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"error": "Twilio error 20003: Authentication Error - invalid username"
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 502 — The SMS provider returned a server error
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"error": "Twilio error: Internal Server Error"
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
96
137
|
## NodeJS / TypeScript implementation
|
|
97
138
|
|
|
98
139
|
```ts
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# OrganizationResource
|
|
2
|
-
|
|
3
|
-
Model ID: `OrganizationResource`
|
|
4
|
-
|
|
5
|
-
A FHIR R4 Organization resource exactly as the FHIR server returned it. HealthCloud stores and echoes the resource without reshaping it, so the remaining fields are those the FHIR specification defines for this resource type.
|
|
6
|
-
|
|
7
|
-
Type: `object`
|
|
8
|
-
|
|
9
|
-
## Fields
|
|
10
|
-
|
|
11
|
-
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
-
|---|---|---:|---|---|---|---:|---|
|
|
13
|
-
| `id` | `string` | No | | | | No | Server-assigned logical id. |
|
|
14
|
-
| `meta` | `object` | No | | | | No | FHIR resource metadata (versionId, lastUpdated). |
|
|
15
|
-
| `resourceType` | `string` | Yes | | | | No | |
|
|
16
|
-
|
|
17
|
-
## Example
|
|
18
|
-
|
|
19
|
-
None declared in canonical OpenAPI.
|