@healthcloudai/hc-sdk 3.6.1 → 3.8.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 +44 -0
- package/dist/index.d.cts +905 -30
- package/dist/index.d.ts +905 -30
- package/dist/index.js +44 -0
- package/docs/clients/OpenAIClient.md +1 -1
- package/docs/clients/ProviderClient.md +7 -0
- package/docs/docs-manifest.json +23 -4
- package/docs/examples/index.md +8 -1
- package/docs/index.md +8 -1
- package/docs/models/GetScanUploadUrlRequest.md +1 -1
- package/docs/models/OpenAIChatJsonRequest.md +1 -0
- package/docs/models/ProviderAppointment.md +24 -0
- package/docs/models/ProviderAppointmentResponse.md +17 -0
- package/docs/models/ProviderAppointmentsResponse.md +18 -0
- package/docs/models/ProviderEncounterListResponse.md +18 -0
- package/docs/models/ProviderEncounterResponse.md +17 -0
- package/docs/models/ProviderPatientAddress.md +22 -0
- package/docs/models/ProviderPatientPhone.md +19 -0
- package/docs/models/ProviderPatientRecordResponse.md +24 -0
- package/docs/models/ProviderPatientSummary.md +27 -0
- package/docs/models/UpdateEncounterClinicalNoteRequest.md +24 -0
- package/docs/models/UpdateEncounterClinicalNoteResponse.md +19 -0
- package/docs/models/UpdateEncounterStatusRequest.md +21 -0
- package/docs/models/UpdateEncounterStatusResponse.md +19 -0
- package/docs/models/index.md +13 -1
- package/docs/operations/connectors.athenaSearchAllergens.md +2 -2
- package/docs/operations/connectors.openaiChatJson.md +2 -2
- package/docs/operations/diagnostics.getScanUploadUrl.md +27 -11
- package/docs/operations/provider.getAppointment.md +148 -0
- package/docs/operations/provider.getEncounter.md +120 -0
- package/docs/operations/provider.getPatientRecord.md +122 -0
- package/docs/operations/provider.listAppointments.md +176 -0
- package/docs/operations/provider.listEncounters.md +123 -0
- package/docs/operations/provider.updateEncounterClinicalNote.md +154 -0
- package/docs/operations/provider.updateEncounterStatus.md +152 -0
- package/package.json +1 -1
- package/docs/models/AthenaSearchAllergensResponse.md +0 -15
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# List tenant encounters
|
|
2
|
+
|
|
3
|
+
Operation ID: `provider.listEncounters`
|
|
4
|
+
|
|
5
|
+
List FHIR encounter records scoped to the authenticated provider's tenant. The optional status query value must be a supported HealthCloud encounter status.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`listEncounters`
|
|
10
|
+
|
|
11
|
+
Signature: `provider.listEncounters(filters)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<ProviderEncounterListResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **AUTHENTICATED**
|
|
18
|
+
|
|
19
|
+
Schemes: `bearerAuth`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
None documented.
|
|
24
|
+
|
|
25
|
+
## HTTP
|
|
26
|
+
|
|
27
|
+
`GET /encounters`
|
|
28
|
+
|
|
29
|
+
## Path parameters
|
|
30
|
+
|
|
31
|
+
None.
|
|
32
|
+
|
|
33
|
+
## Query parameters
|
|
34
|
+
|
|
35
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
36
|
+
|---|---|---:|---|---|---|---:|---|
|
|
37
|
+
| `status` | `string|null` | No | | | | Yes | Optional HealthCloud encounter status |
|
|
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` | [`ProviderEncounterListResponse`](../models/ProviderEncounterListResponse.md) | application/json | Tenant encounters |
|
|
54
|
+
|
|
55
|
+
## Success response examples
|
|
56
|
+
|
|
57
|
+
### 200
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"encounters": [
|
|
62
|
+
{}
|
|
63
|
+
],
|
|
64
|
+
"total": 0
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Common errors
|
|
69
|
+
|
|
70
|
+
| Status | Shape | Content type | Description |
|
|
71
|
+
|---|---|---|---|
|
|
72
|
+
| `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | status is not a supported encounter status |
|
|
73
|
+
| `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Provider Bearer authentication is required |
|
|
74
|
+
|
|
75
|
+
## Error examples
|
|
76
|
+
|
|
77
|
+
### 400 — Unsupported status
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"error": "'bad' is not a valid EncounterStatus"
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 401 — No provider JWT
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"error": "Provider authorization required"
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## NodeJS / TypeScript implementation
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
const filters = "<FILTERS>";
|
|
101
|
+
|
|
102
|
+
const result = await provider.listEncounters(filters);
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## cURL
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
curl -X GET \
|
|
109
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
110
|
+
'https://dev-api-provider.health.cloud/encounters?status=%3CSTATUS%3E'
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Notes
|
|
114
|
+
|
|
115
|
+
None.
|
|
116
|
+
|
|
117
|
+
## Prepared Test Console scenario
|
|
118
|
+
|
|
119
|
+
No canonical scenario is currently associated.
|
|
120
|
+
|
|
121
|
+
## Real response
|
|
122
|
+
|
|
123
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Update encounter notes and assessment
|
|
2
|
+
|
|
3
|
+
Operation ID: `provider.updateEncounterClinicalNote`
|
|
4
|
+
|
|
5
|
+
Update a tenant-scoped FHIR encounter's notes and/or assessment. For an encounter linked to the configured EHR, notes are mirrored to SOAP subjective and assessment to SOAP assessment before the FHIR update. A linked record without a configured EHR is rejected; an unlinked record is updated in FHIR only.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`updateEncounterClinicalNote`
|
|
10
|
+
|
|
11
|
+
Signature: `provider.updateEncounterClinicalNote(encounterId, request)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<UpdateEncounterClinicalNoteResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **AUTHENTICATED**
|
|
18
|
+
|
|
19
|
+
Schemes: `bearerAuth`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
None documented.
|
|
24
|
+
|
|
25
|
+
## HTTP
|
|
26
|
+
|
|
27
|
+
`PATCH /encounters/{encounter_id}/clinical-note`
|
|
28
|
+
|
|
29
|
+
## Path parameters
|
|
30
|
+
|
|
31
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
32
|
+
|---|---|---:|---|---|---|---:|---|
|
|
33
|
+
| `encounter_id` | `string` | Yes | | | | No | |
|
|
34
|
+
|
|
35
|
+
## Query parameters
|
|
36
|
+
|
|
37
|
+
None.
|
|
38
|
+
|
|
39
|
+
## Body parameters
|
|
40
|
+
|
|
41
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
42
|
+
|---|---|---:|---|---|---|---:|---|
|
|
43
|
+
| `body` | [`UpdateEncounterClinicalNoteRequest`](../models/UpdateEncounterClinicalNoteRequest.md) | No | | | | Yes | |
|
|
44
|
+
|
|
45
|
+
Request model: [`UpdateEncounterClinicalNoteRequest`](../models/UpdateEncounterClinicalNoteRequest.md)
|
|
46
|
+
|
|
47
|
+
## Request example
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"assessment": "Stable for follow-up.",
|
|
52
|
+
"notes": "Patient reports symptoms improving."
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Success responses
|
|
57
|
+
|
|
58
|
+
| Status | Shape | Content type | Description |
|
|
59
|
+
|---|---|---|---|
|
|
60
|
+
| `200` | [`UpdateEncounterClinicalNoteResponse`](../models/UpdateEncounterClinicalNoteResponse.md) | application/json | FHIR and linked EHR clinical note updated |
|
|
61
|
+
|
|
62
|
+
## Success response examples
|
|
63
|
+
|
|
64
|
+
### 200
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"ehr_status": "updated",
|
|
69
|
+
"encounter": {},
|
|
70
|
+
"fhir_status": "updated"
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Common errors
|
|
75
|
+
|
|
76
|
+
| Status | Shape | Content type | Description |
|
|
77
|
+
|---|---|---|---|
|
|
78
|
+
| `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Neither notes nor assessment was supplied |
|
|
79
|
+
| `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Provider Bearer authentication is required |
|
|
80
|
+
| `409` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The encounter is linked but no EHR integration is configured |
|
|
81
|
+
| `502` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The EHR or FHIR update failed after request validation |
|
|
82
|
+
|
|
83
|
+
## Error examples
|
|
84
|
+
|
|
85
|
+
### 400 — No clinical content
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"error": "notes or assessment is required"
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 401 — No provider JWT
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"error": "Provider authorization required"
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 409 — Linked EHR unavailable
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"error": "Encounter is linked to an EHR but no EHR integration is configured"
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 502 — EHR update failure
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"error": "EHR update failed"
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## NodeJS / TypeScript implementation
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
const encounterId = "<ENCOUNTER_ID>";
|
|
125
|
+
|
|
126
|
+
const request = {
|
|
127
|
+
"assessment": "Stable for follow-up.",
|
|
128
|
+
"notes": "Patient reports symptoms improving."
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const result = await provider.updateEncounterClinicalNote(encounterId, request);
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## cURL
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
curl -X PATCH \
|
|
138
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
139
|
+
-H 'Content-Type: application/json' \
|
|
140
|
+
-d '{"assessment":"Stable for follow-up.","notes":"Patient reports symptoms improving."}' \
|
|
141
|
+
'https://dev-api-provider.health.cloud/encounters/%3CENCOUNTER_ID%3E/clinical-note'
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Notes
|
|
145
|
+
|
|
146
|
+
None.
|
|
147
|
+
|
|
148
|
+
## Prepared Test Console scenario
|
|
149
|
+
|
|
150
|
+
No canonical scenario is currently associated.
|
|
151
|
+
|
|
152
|
+
## Real response
|
|
153
|
+
|
|
154
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Update encounter status
|
|
2
|
+
|
|
3
|
+
Operation ID: `provider.updateEncounterStatus`
|
|
4
|
+
|
|
5
|
+
Update a tenant-scoped FHIR encounter status. When the encounter is linked to Athena, the backend writes the practice's flow-board patient status before FHIR, using a fixed HealthCloud->Athena mapping (arrived -> ready for staff, triaged -> ready for provider, in-progress -> with provider, finished -> checked out). HealthCloud statuses without a flow-board equivalent (planned, onleave, cancelled, entered-in-error, unknown) skip the Athena mirror and update FHIR only, returning ehr_status='skipped'. Closing (finished) also stamps period.end and the recorded visit length; starting (in-progress) stamps period.start when missing. Provider clients never submit Athena IDs.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`updateEncounterStatus`
|
|
10
|
+
|
|
11
|
+
Signature: `provider.updateEncounterStatus(encounterId, request)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<UpdateEncounterStatusResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **AUTHENTICATED**
|
|
18
|
+
|
|
19
|
+
Schemes: `bearerAuth`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
None documented.
|
|
24
|
+
|
|
25
|
+
## HTTP
|
|
26
|
+
|
|
27
|
+
`PATCH /encounters/{encounter_id}/status`
|
|
28
|
+
|
|
29
|
+
## Path parameters
|
|
30
|
+
|
|
31
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
32
|
+
|---|---|---:|---|---|---|---:|---|
|
|
33
|
+
| `encounter_id` | `string` | Yes | | | | No | |
|
|
34
|
+
|
|
35
|
+
## Query parameters
|
|
36
|
+
|
|
37
|
+
None.
|
|
38
|
+
|
|
39
|
+
## Body parameters
|
|
40
|
+
|
|
41
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
42
|
+
|---|---|---:|---|---|---|---:|---|
|
|
43
|
+
| `body` | [`UpdateEncounterStatusRequest`](../models/UpdateEncounterStatusRequest.md) | No | | | | Yes | |
|
|
44
|
+
|
|
45
|
+
Request model: [`UpdateEncounterStatusRequest`](../models/UpdateEncounterStatusRequest.md)
|
|
46
|
+
|
|
47
|
+
## Request example
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"status": "arrived"
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Success responses
|
|
56
|
+
|
|
57
|
+
| Status | Shape | Content type | Description |
|
|
58
|
+
|---|---|---|---|
|
|
59
|
+
| `200` | [`UpdateEncounterStatusResponse`](../models/UpdateEncounterStatusResponse.md) | application/json | FHIR and linked EHR encounter status updated |
|
|
60
|
+
|
|
61
|
+
## Success response examples
|
|
62
|
+
|
|
63
|
+
### 200
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"ehr_status": "updated",
|
|
68
|
+
"encounter": {},
|
|
69
|
+
"fhir_status": "updated"
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Common errors
|
|
74
|
+
|
|
75
|
+
| Status | Shape | Content type | Description |
|
|
76
|
+
|---|---|---|---|
|
|
77
|
+
| `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The HealthCloud status is invalid |
|
|
78
|
+
| `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Provider Bearer authentication is required |
|
|
79
|
+
| `409` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The encounter is linked but no EHR integration is configured |
|
|
80
|
+
| `502` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The EHR or FHIR update failed after request validation |
|
|
81
|
+
|
|
82
|
+
## Error examples
|
|
83
|
+
|
|
84
|
+
### 400 — Invalid status
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"error": "status must be a valid HealthCloud encounter status"
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 401 — No provider JWT
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"error": "Provider authorization required"
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 409 — Linked EHR unavailable
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"error": "Encounter is linked to an EHR but no EHR integration is configured"
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 502 — EHR update failure
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"error": "EHR update failed"
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## NodeJS / TypeScript implementation
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
const encounterId = "<ENCOUNTER_ID>";
|
|
124
|
+
|
|
125
|
+
const request = {
|
|
126
|
+
"status": "arrived"
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const result = await provider.updateEncounterStatus(encounterId, request);
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## cURL
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
curl -X PATCH \
|
|
136
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
137
|
+
-H 'Content-Type: application/json' \
|
|
138
|
+
-d '{"status":"arrived"}' \
|
|
139
|
+
'https://dev-api-provider.health.cloud/encounters/%3CENCOUNTER_ID%3E/status'
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Notes
|
|
143
|
+
|
|
144
|
+
None.
|
|
145
|
+
|
|
146
|
+
## Prepared Test Console scenario
|
|
147
|
+
|
|
148
|
+
No canonical scenario is currently associated.
|
|
149
|
+
|
|
150
|
+
## Real response
|
|
151
|
+
|
|
152
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
package/package.json
CHANGED