@healthcloudai/hc-sdk 3.7.0 → 3.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.
Files changed (35) hide show
  1. package/dist/index.cjs +51 -0
  2. package/dist/index.d.cts +784 -369
  3. package/dist/index.d.ts +784 -369
  4. package/dist/index.js +51 -0
  5. package/docs/clients/ProviderClient.md +8 -0
  6. package/docs/docs-manifest.json +26 -3
  7. package/docs/examples/index.md +8 -0
  8. package/docs/index.md +8 -0
  9. package/docs/models/ProviderAppointment.md +24 -0
  10. package/docs/models/ProviderAppointmentResponse.md +17 -0
  11. package/docs/models/ProviderAppointmentsResponse.md +18 -0
  12. package/docs/models/ProviderEncounterListResponse.md +18 -0
  13. package/docs/models/ProviderEncounterResponse.md +17 -0
  14. package/docs/models/ProviderPatientAddress.md +22 -0
  15. package/docs/models/ProviderPatientPhone.md +19 -0
  16. package/docs/models/ProviderPatientRecordResponse.md +24 -0
  17. package/docs/models/ProviderPatientSummary.md +27 -0
  18. package/docs/models/UpdateEncounterClinicalNoteRequest.md +24 -0
  19. package/docs/models/UpdateEncounterClinicalNoteResponse.md +19 -0
  20. package/docs/models/UpdateEncounterStatusRequest.md +21 -0
  21. package/docs/models/UpdateEncounterStatusResponse.md +19 -0
  22. package/docs/models/index.md +15 -0
  23. package/docs/models/provider.LoginResponse.md +1 -0
  24. package/docs/models/provider.RefreshTokenRequest.md +18 -0
  25. package/docs/models/provider.RefreshTokenResponse.md +21 -0
  26. package/docs/operations/provider.getAppointment.md +148 -0
  27. package/docs/operations/provider.getEncounter.md +120 -0
  28. package/docs/operations/provider.getPatientRecord.md +122 -0
  29. package/docs/operations/provider.listAppointments.md +176 -0
  30. package/docs/operations/provider.listEncounters.md +123 -0
  31. package/docs/operations/provider.login.md +7 -6
  32. package/docs/operations/provider.refreshToken.md +115 -0
  33. package/docs/operations/provider.updateEncounterClinicalNote.md +154 -0
  34. package/docs/operations/provider.updateEncounterStatus.md +152 -0
  35. package/package.json +1 -1
@@ -0,0 +1,115 @@
1
+ # Refresh practitioner access tokens
2
+
3
+ Operation ID: `provider.refreshToken`
4
+
5
+ Refresh practitioner access tokens
6
+
7
+ ## Public method
8
+
9
+ `refreshToken`
10
+
11
+ Signature: `provider.refreshToken(request)`
12
+
13
+ Return type: `Promise<ProviderRefreshTokenResponse>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **UNSPECIFIED**
18
+
19
+ ## Prerequisites
20
+
21
+ None documented.
22
+
23
+ ## HTTP
24
+
25
+ `POST /auth/refresh`
26
+
27
+ ## Path parameters
28
+
29
+ None.
30
+
31
+ ## Query parameters
32
+
33
+ None.
34
+
35
+ ## Body parameters
36
+
37
+ | Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
38
+ |---|---|---:|---|---|---|---:|---|
39
+ | `body` | [`provider.RefreshTokenRequest`](../models/provider.RefreshTokenRequest.md) | No | | | | Yes | |
40
+
41
+ Request model: [`provider.RefreshTokenRequest`](../models/provider.RefreshTokenRequest.md)
42
+
43
+ ## Request example
44
+
45
+ ```json
46
+ {
47
+ "refresh_token": "string",
48
+ "tenant_id": "string"
49
+ }
50
+ ```
51
+
52
+ ## Success responses
53
+
54
+ | Status | Shape | Content type | Description |
55
+ |---|---|---|---|
56
+ | `200` | [`provider.RefreshTokenResponse`](../models/provider.RefreshTokenResponse.md) | application/json | Refreshed practitioner tokens |
57
+
58
+ ## Success response examples
59
+
60
+ ### 200
61
+
62
+ ```json
63
+ {
64
+ "access_token": "string",
65
+ "expires_in": 0,
66
+ "id_token": "string",
67
+ "refresh_token": "string",
68
+ "token_type": "Bearer"
69
+ }
70
+ ```
71
+
72
+ ## Common errors
73
+
74
+ None declared in canonical OpenAPI.
75
+
76
+ ## Error examples
77
+
78
+ None declared in canonical OpenAPI.
79
+
80
+ ## NodeJS / TypeScript implementation
81
+
82
+ ```ts
83
+ import { HCSDK } from "@healthcloudai/hc-sdk";
84
+ import type { ProviderRefreshTokenRequest } from "@healthcloudai/hc-sdk";
85
+ ```
86
+
87
+ ```ts
88
+ const request = {
89
+ "refresh_token": "string",
90
+ "tenant_id": "string"
91
+ };
92
+
93
+ const result = await provider.refreshToken(request);
94
+ ```
95
+
96
+ ## cURL
97
+
98
+ ```bash
99
+ curl -X POST \
100
+ -H 'Content-Type: application/json' \
101
+ -d '{"refresh_token":"string","tenant_id":"string"}' \
102
+ 'https://dev-api-provider.health.cloud/auth/refresh'
103
+ ```
104
+
105
+ ## Notes
106
+
107
+ None.
108
+
109
+ ## Prepared Test Console scenario
110
+
111
+ No canonical scenario is currently associated.
112
+
113
+ ## Real response
114
+
115
+ 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@healthcloudai/hc-sdk",
3
- "version": "3.7.0",
3
+ "version": "3.9.0",
4
4
  "description": "All-in-one HealthCloud SDK with typed platform APIs and secure connector clients.",
5
5
  "author": "Healthcheck Systems Inc",
6
6
  "license": "MIT",