@healthcloudai/hc-sdk 3.29.0 → 3.30.1

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.js CHANGED
@@ -3317,8 +3317,21 @@ var PatientClient = class extends BaseServiceClient {
3317
3317
  pathParams: { dependent_id: dependentId }
3318
3318
  });
3319
3319
  }
3320
- listNotifications() {
3321
- return this.send("GET", "/patients/notifications", {});
3320
+ /**
3321
+ * The patient's notifications, newest first, with `total`, `unread_count` and `truncated` (GET /patients/notifications).
3322
+ * `limit` (1 to 200) returns only the newest that many; `unread_only` returns only the unread. Without arguments it returns
3323
+ * every notification (up to the API's safety bound; `truncated` says when that cut the list).
3324
+ */
3325
+ listNotifications(query) {
3326
+ return this.send("GET", "/patients/notifications", { query });
3327
+ }
3328
+ /**
3329
+ * Mark the patient's own notifications read (POST /patients/notifications/read): send either `notification_ids` (at most
3330
+ * 100) or `all_unread: true`, not both. Already-read ones are counted in `already_read`; ids that are not the patient's
3331
+ * come back in `not_found` and nothing is changed for them. Only the read flag changes.
3332
+ */
3333
+ markNotificationsRead(request) {
3334
+ return this.send("POST", "/patients/notifications/read", { body: request });
3322
3335
  }
3323
3336
  saveNotification(data, notificationId) {
3324
3337
  if (notificationId) {
@@ -85,6 +85,7 @@
85
85
  - [`listPracticeAppointments`](../operations/patient.listPracticeAppointments.md) — List the patient's telehealth appointments with their practice
86
86
  - [`listPracticeAppointmentSlots`](../operations/patient.listPracticeAppointmentSlots.md) — List the free telehealth slots of the patient's practice
87
87
  - [`listTestOrders`](../operations/patient.listTestOrders.md) — List diagnostic test orders
88
+ - [`markNotificationsRead`](../operations/patient.markNotificationsRead.md) — Mark notifications read
88
89
  - [`nearestLocations`](../operations/patient.nearestLocations.md) — Find nearby healthcare locations
89
90
  - [`getPhotoUploadUrl`](../operations/patient.photoUploadUrl.md) — Get a photo upload URL
90
91
  - [`placeTestOrder`](../operations/patient.placeTestOrder.md) — Place a diagnostic test order
@@ -1,5 +1,5 @@
1
1
  {
2
- "docsDataContentDigest": "sha256:e2f9f2a8f9070d00ae2223841fe044fd6f1a81fbb0722c3cee9fbc3f7942e24b",
2
+ "docsDataContentDigest": "sha256:24644360c14d6f45a0e6b0738ecee17ec9120a878b9a80e336bae7bc27be043e",
3
3
  "generatedFiles": [
4
4
  "authentication.md",
5
5
  "clients/AmsClient.md",
@@ -1303,6 +1303,8 @@
1303
1303
  "models/LocationStatus.md",
1304
1304
  "models/LogoutResponse.md",
1305
1305
  "models/MaritalStatus.md",
1306
+ "models/MarkNotificationsReadRequest.md",
1307
+ "models/MarkNotificationsReadResponse.md",
1306
1308
  "models/McpFieldagentRequest.md",
1307
1309
  "models/McpFieldagentResponse.md",
1308
1310
  "models/McpPatientRequest.md",
@@ -3232,6 +3234,7 @@
3232
3234
  "operations/patient.listPracticeAppointments.md",
3233
3235
  "operations/patient.listTestOrders.md",
3234
3236
  "operations/patient.login.md",
3237
+ "operations/patient.markNotificationsRead.md",
3235
3238
  "operations/patient.nearestLocations.md",
3236
3239
  "operations/patient.photoUploadUrl.md",
3237
3240
  "operations/patient.placeTestOrder.md",
@@ -3341,7 +3344,7 @@
3341
3344
  "operations/vitals.recordVitals.md"
3342
3345
  ],
3343
3346
  "language": "nodejs",
3344
- "modelCount": 2202,
3345
- "operationCount": 1082,
3347
+ "modelCount": 2204,
3348
+ "operationCount": 1083,
3346
3349
  "schemaVersion": 1
3347
3350
  }
@@ -977,6 +977,7 @@ Generated call examples use exact public surface signatures. Workflow examples r
977
977
  - [List the free telehealth slots of the patient's practice](../operations/patient.listPracticeAppointmentSlots.md)
978
978
  - [List diagnostic test orders](../operations/patient.listTestOrders.md)
979
979
  - [Log in a patient](../operations/patient.login.md)
980
+ - [Mark notifications read](../operations/patient.markNotificationsRead.md)
980
981
  - [Find nearby healthcare locations](../operations/patient.nearestLocations.md)
981
982
  - [Get a photo upload URL](../operations/patient.photoUploadUrl.md)
982
983
  - [Place a diagnostic test order](../operations/patient.placeTestOrder.md)
package/docs/index.md CHANGED
@@ -985,6 +985,7 @@ This directory is generated from the shared structured docs data. Do not edit ge
985
985
  - [List the free telehealth slots of the patient's practice](operations/patient.listPracticeAppointmentSlots.md) (`patient.listPracticeAppointmentSlots`)
986
986
  - [List diagnostic test orders](operations/patient.listTestOrders.md) (`patient.listTestOrders`)
987
987
  - [Log in a patient](operations/patient.login.md) (`patient.login`)
988
+ - [Mark notifications read](operations/patient.markNotificationsRead.md) (`patient.markNotificationsRead`)
988
989
  - [Find nearby healthcare locations](operations/patient.nearestLocations.md) (`patient.nearestLocations`)
989
990
  - [Get a photo upload URL](operations/patient.photoUploadUrl.md) (`patient.photoUploadUrl`)
990
991
  - [Place a diagnostic test order](operations/patient.placeTestOrder.md) (`patient.placeTestOrder`)
@@ -12,7 +12,7 @@ Type: `object`
12
12
  |---|---|---:|---|---|---|---:|---|
13
13
  | `request_id` | `string` | Yes | uuid | | | No | Stable ID for replay of this exact check; never automatically change on retry. |
14
14
  | `service_date` | `string|null` | No | | | | Yes | ISO date. Omit for the payer's current date, as Stedi recommends. |
15
- | `service_type_code` | `string` | Yes | | | | No | Requested X12 STC; not a product or procedure ID. |
15
+ | `service_type_code` | `string` | Yes | | | | No | Requested X12 STC. General coverage (30) returns all reported STC cost-sharing entries; other codes return exact matches. |
16
16
 
17
17
  ## Example
18
18
 
@@ -19,7 +19,7 @@ Type: `object`
19
19
  | `network_determination` | `string` | No | | | `"unknown"` | No | |
20
20
  | `reason` | `string` | Yes | | | | No | |
21
21
  | `service_date` | `string|null` | No | | | | Yes | |
22
- | `service_type_code` | `string` | Yes | | | | No | |
22
+ | `service_type_code` | `string` | Yes | | | | No | The requested STC. Each benefit preserves its own reported STC. |
23
23
  | `source` | `string` | No | | | `"stedi"` | No | |
24
24
  | `status` | `string` | Yes | | completed, pending, unavailable | | No | |
25
25
 
@@ -19,7 +19,7 @@ Type: `object`
19
19
  | `coverage_level` | `string` | No | | CHILDREN_ONLY, DEPENDENTS_ONLY, EMPLOYEE_AND_CHILDREN, EMPLOYEE_ONLY, EMPLOYEE_AND_SPOUSE, FAMILY, INDIVIDUAL, SPOUSE_AND_CHILDREN, SPOUSE_ONLY, UNKNOWN | `"UNKNOWN"` | No | |
20
20
  | `network` | `string` | No | | IN_NETWORK, OUT_OF_NETWORK, IN_AND_OUT_OF_NETWORK, UNKNOWN | `"UNKNOWN"` | No | |
21
21
  | `plan_index` | `integer` | Yes | | | | No | Keeps benefit entries from different returned plans separate. |
22
- | `service_type_code` | `string` | Yes | | | | No | |
22
+ | `service_type_code` | `string` | Yes | | | | No | Actual STC reported for this benefit; may differ from a general coverage (30) request. |
23
23
  | `time_period` | `string` | No | | HOUR, DAY, 24_HOURS, YEARS, SERVICE_YEAR, CALENDAR_YEAR, YEAR_TO_DATE, CONTRACT, EPISODE, VISIT, OUTLIER, REMAINING, EXCEEDED, NOT_EXCEEDED, LIFETIME, LIFETIME_REMAINING, MONTH, WEEK, ADMISSION, UNKNOWN | `"UNKNOWN"` | No | |
24
24
 
25
25
  ## Example
@@ -10,8 +10,11 @@ Type: `object`
10
10
 
11
11
  | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
12
  |---|---|---:|---|---|---|---:|---|
13
- | `notifications` | array of [`NotificationResponse`](./NotificationResponse.md) | Yes | | | | No | Notifications for the patient. |
13
+ | `notifications` | array of [`NotificationResponse`](./NotificationResponse.md) | Yes | | | | No | The patient's notifications, newest first (id breaks ties; notifications without a date last). |
14
14
  | `patient_id` | `string` | Yes | | | | No | FHIR Patient resource ID the notifications belong to. |
15
+ | `total` | `integer` | No | | | `0` | No | Notifications that match the request (`unread_only` applied), counted before `limit` cuts the list. |
16
+ | `truncated` | `boolean` | No | | | `false` | No | True when `limit` cut the list or the safety bound (1,000 notifications / 20 store pages) stopped the read, so `notifications` is not everything. |
17
+ | `unread_count` | `integer` | No | | | `0` | No | Unread notifications among ALL of the patient's notifications. |
15
18
 
16
19
  ## Example
17
20
 
@@ -0,0 +1,18 @@
1
+ # MarkNotificationsReadRequest
2
+
3
+ Model ID: `MarkNotificationsReadRequest`
4
+
5
+ Body of POST /patients/notifications/read: exactly one of `notification_ids` and `all_unread`.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `all_unread` | `boolean|null` | No | | | | Yes | True to mark every unread notification of the patient read. |
14
+ | `notification_ids` | `array|null` | No | | | | Yes | Ids of the patient's notifications to mark read (at most 100). |
15
+
16
+ ## Example
17
+
18
+ None declared in canonical OpenAPI.
@@ -0,0 +1,20 @@
1
+ # MarkNotificationsReadResponse
2
+
3
+ Model ID: `MarkNotificationsReadResponse`
4
+
5
+ No description.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `already_read` | `integer` | Yes | | | | No | Requested notifications that were already read (left unchanged). |
14
+ | `marked` | `integer` | Yes | | | | No | Notifications that were unread and are now read. |
15
+ | `not_found` | `array` | Yes | | | | No | Requested ids that are not one of the caller's notifications. Nothing was read or changed for them. |
16
+ | `unread_count` | `integer` | Yes | | | | No | Unread notifications the patient has left. |
17
+
18
+ ## Example
19
+
20
+ None declared in canonical OpenAPI.
@@ -1305,6 +1305,8 @@
1305
1305
  - [LocationStatus](LocationStatus.md)
1306
1306
  - [ProviderLogoutResponse](LogoutResponse.md)
1307
1307
  - [MaritalStatus](MaritalStatus.md)
1308
+ - [MarkNotificationsReadRequest](MarkNotificationsReadRequest.md)
1309
+ - [MarkNotificationsReadResponse](MarkNotificationsReadResponse.md)
1308
1310
  - [mcp.ConnectResponse](mcp.ConnectResponse.md)
1309
1311
  - [McpJsonRpcRequest](McpFieldagentRequest.md)
1310
1312
  - [McpJsonRpcResponse](McpFieldagentResponse.md)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Operation ID: `patient.checkPatientInsuranceBenefits`
4
4
 
5
- Check reported copay, coinsurance, deductible and out-of-pocket benefits for one X12 STC. Requires a PATIENT-pool Bearer JWT; identity and tenant come from the token. Uses saved name/DOB and exactly one active primary self Coverage. The Stedi key and requesting NPI are resolved server-side. Calls Stedi POST /2026-06-01/eligibility-check once with a 12-second timeout and no redirects. Omit service_date for the payer current date. No STC 30 fallback or inferred amounts. Entries retain plan, coverage level, network, period and benefit dates; null amounts remain unknown. coinsurance_fraction is a decimal fraction (0.2 means 20%). additional_conditions flags payer restrictions that require review; free-form payer messages are not exposed. Reported network applicability does not verify clinician participation, and benefits are not a final price. Persist request_id and the exact request body. A FHIR Task is conditionally created before Stedi I/O. Replay returns the saved result without another Stedi call; a changed body returns 409. An uncertain write remains pending and needs reconciliation; never automatically generate a new ID after a timeout or pending result, since that could cause another billable vendor check.
5
+ One Patient endpoint returns payer-reported copay, coinsurance, deductible and out-of-pocket entries in the same benefits array. General coverage (service_type_code 30) includes all valid reported STC cost-sharing entries. Other requested codes return only exact matches. The top-level code identifies the request; each benefit keeps its actual reported service code, plan, level, network and period. A payer may omit types; missing benefits do not imply zero cost. Reported benefits are not a final charge or clinician network verification.
6
6
 
7
7
  ## Public method
8
8
 
@@ -195,10 +195,13 @@ curl -X POST \
195
195
  ## Notes
196
196
 
197
197
  - npm: patient.checkInsuranceBenefits(request). Python: patient.check_insurance_benefits(request). Persist the request_id and exact body before sending.
198
+ - All four benefit types use POST /insurance/benefits/check. Read copay/deductible/out_of_pocket from amount and coinsurance from coinsurance_fraction. Keep every returned entry separate; do not assume one copay or one rate for the whole plan.
199
+ - For a general request (30), preserve each benefit service_type_code when interpreting copay or coinsurance. Never treat a copay for one service as the price for another. Specific-service requests retain exact matching.
198
200
  - HTTP 202 is a typed pending outcome. Replay the original ID/body to read the saved result. Never automatically generate another ID after a timeout, pending result or uncertain storage failure.
199
201
  - Entries preserve individual/family, network applicability, annual/remaining period and plan separately. Missing amounts are unknown, not zero. coinsurance_fraction of 0.20 means 20%.
200
202
  - Reported benefits do not establish a final patient charge or clinician network participation. additional_conditions flags payer restrictions that require review.
201
203
  - Omit service_date for the payer's current date. Standard Stedi medical mock requests support only service_type_code 30 and require the published exact test subscriber values and a test-mode key.
204
+ - Existing request IDs replay the original saved snapshot, including pre-change narrower results. They never automatically trigger a fresh vendor check. Canonical examples illustrate response shape; deployed acceptance is recorded separately.
202
205
 
203
206
  ## Prepared Test Console scenario
204
207
 
@@ -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
- None.
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": "2026-08-10T23:36:51Z",
62
- "description": "Synthetic notification example",
63
- "icon": "info",
64
- "id": "notification-example-001",
64
+ "createdAt": "string",
65
+ "description": "string",
66
+ "icon": "string",
67
+ "id": "string",
65
68
  "read": false,
66
- "severity": "info",
67
- "title": "Test notification"
69
+ "severity": "string",
70
+ "title": "string"
68
71
  }
69
72
  ],
70
- "patient_id": "patient-example-001"
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 result = await patient.listNotifications();
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
@@ -0,0 +1,122 @@
1
+ # Mark notifications read
2
+
3
+ Operation ID: `patient.markNotificationsRead`
4
+
5
+ Marks the authenticated patient's own notifications read, either the given `notification_ids` (at most 100) or `all_unread`: send exactly one. Already-read notifications are counted in `already_read` and left unchanged; ids that are not the caller's notifications are listed in `not_found` and nothing is read or changed for them. Only the read flag changes.
6
+
7
+ ## Public method
8
+
9
+ `markNotificationsRead`
10
+
11
+ Signature: `patient.markNotificationsRead(request)`
12
+
13
+ Return type: `Promise<MarkNotificationsReadResponse>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **AUTHENTICATED**
18
+
19
+ Schemes: `bearerAuth`
20
+
21
+ ## Prerequisites
22
+
23
+ None documented.
24
+
25
+ ## HTTP
26
+
27
+ `POST /patients/notifications/read`
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` | [`MarkNotificationsReadRequest`](../models/MarkNotificationsReadRequest.md) | No | | | | No | |
42
+
43
+ Request model: [`MarkNotificationsReadRequest`](../models/MarkNotificationsReadRequest.md)
44
+
45
+ ## Request example
46
+
47
+ ```json
48
+ {
49
+ "all_unread": true,
50
+ "notification_ids": [
51
+ "string"
52
+ ]
53
+ }
54
+ ```
55
+
56
+ ## Success responses
57
+
58
+ | Status | Shape | Content type | Description |
59
+ |---|---|---|---|
60
+ | `200` | [`MarkNotificationsReadResponse`](../models/MarkNotificationsReadResponse.md) | application/json | What was marked |
61
+
62
+ ## Success response examples
63
+
64
+ ### 200
65
+
66
+ ```json
67
+ {
68
+ "already_read": 0,
69
+ "marked": 0,
70
+ "not_found": [
71
+ "string"
72
+ ],
73
+ "unread_count": 0
74
+ }
75
+ ```
76
+
77
+ ## Common errors
78
+
79
+ None declared in canonical OpenAPI.
80
+
81
+ ## Error examples
82
+
83
+ None declared in canonical OpenAPI.
84
+
85
+ ## NodeJS / TypeScript implementation
86
+
87
+ ```ts
88
+ import { HCSDK } from "@healthcloudai/hc-sdk";
89
+ ```
90
+
91
+ ```ts
92
+ const request = {
93
+ "all_unread": true,
94
+ "notification_ids": [
95
+ "string"
96
+ ]
97
+ };
98
+
99
+ const result = await patient.markNotificationsRead(request);
100
+ ```
101
+
102
+ ## cURL
103
+
104
+ ```bash
105
+ curl -X POST \
106
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
107
+ -H 'Content-Type: application/json' \
108
+ -d '{"all_unread":true,"notification_ids":["string"]}' \
109
+ 'https://dev-api-patient.health.cloud/patients/notifications/read'
110
+ ```
111
+
112
+ ## Notes
113
+
114
+ None.
115
+
116
+ ## Prepared Test Console scenario
117
+
118
+ No canonical scenario is currently associated.
119
+
120
+ ## Real response
121
+
122
+ 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.29.0",
3
+ "version": "3.30.1",
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",