@healthcloudai/hc-sdk 3.11.0 → 3.12.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
@@ -539,7 +539,14 @@ var DiagnosticsClient = class extends BaseServiceClient {
539
539
  * POST /patients/{patient_id}/diagnostics/rapid-tests
540
540
  */
541
541
  createRapidTest(patientId, request) {
542
- const body = "type" in request && "result" in request ? CreateRapidTestRequestToJSON(request) : request;
542
+ const body = { ...request };
543
+ for (const field of ["performed_date", "performed_datetime"]) {
544
+ const value = body[field];
545
+ if (value instanceof Date) {
546
+ const encoded = CreateRapidTestRequestToJSON({ [field]: value });
547
+ body[field] = encoded[field];
548
+ }
549
+ }
543
550
  return this.send("POST", "/patients/{patient_id}/diagnostics/rapid-tests", {
544
551
  pathParams: { patient_id: patientId },
545
552
  body
@@ -2096,6 +2103,20 @@ function AddPatientIntakeResponseFromJSONTyped(json, ignoreDiscriminator) {
2096
2103
  };
2097
2104
  }
2098
2105
 
2106
+ // src/models/openapi-generated/patient/models/GetDefaultProviderResponse.ts
2107
+ function GetDefaultProviderResponseFromJSON(json) {
2108
+ return GetDefaultProviderResponseFromJSONTyped(json, false);
2109
+ }
2110
+ function GetDefaultProviderResponseFromJSONTyped(json, ignoreDiscriminator) {
2111
+ if (json == null) {
2112
+ return json;
2113
+ }
2114
+ return {
2115
+ "name": json["name"],
2116
+ "npi": json["npi"]
2117
+ };
2118
+ }
2119
+
2099
2120
  // src/clients/PatientClient.ts
2100
2121
  var PatientClient = class extends BaseServiceClient {
2101
2122
  /** Add one agent-collected intake section and return actionable validation errors. */
@@ -2188,6 +2209,11 @@ var PatientClient = class extends BaseServiceClient {
2188
2209
  getDashboard() {
2189
2210
  return this.send("GET", "/patients/dashboard", {});
2190
2211
  }
2212
+ /** GET /patients/defaultprovider — return the authenticated patient's tenant default provider. */
2213
+ async getDefaultProvider() {
2214
+ const response = await this.send("GET", "/patients/defaultprovider", {});
2215
+ return GetDefaultProviderResponseFromJSON(response);
2216
+ }
2191
2217
  getAgentConfiguration() {
2192
2218
  return this.send("GET", "/agentconfiguration", {});
2193
2219
  }
@@ -39,6 +39,7 @@
39
39
  - [`getCheckin`](../operations/patient.getCheckinCheckin.md) — Get current check-in state
40
40
  - [`getCommunicationConsent`](../operations/patient.getCommunicationConsent.md) — Get SMS/phone contact-preference consent
41
41
  - [`getCurrentCareSession`](../operations/patient.getCurrentCareSessionCareSessionsCurrent.md) — Get the current care session
42
+ - [`getDefaultProvider`](../operations/patient.getDefaultProvider.md) — Get the tenant default provider
42
43
  - [`getEncounter`](../operations/patient.getEncounter.md) — Get an encounter
43
44
  - [`listPatientInsurances`](../operations/patient.getInsurance.md) — List insurance coverage
44
45
  - [`getLatestEncounter`](../operations/patient.getLatestEncounter.md) — Get the patient's latest open encounter
@@ -1,5 +1,5 @@
1
1
  {
2
- "docsDataContentDigest": "sha256:6e7792f233e63fa5217b47b397dab0b95e12f5f5bef8f4b9b2e62e2da274b0da",
2
+ "docsDataContentDigest": "sha256:a39543e176259eadae94ef36878d74b241d69422dfda5f111dd02cedbf2b3862",
3
3
  "generatedFiles": [
4
4
  "authentication.md",
5
5
  "clients/AmsClient.md",
@@ -331,6 +331,7 @@
331
331
  "models/AthenaRetrieveAvailableAppointmentSlotsRequest.md",
332
332
  "models/AthenaReviewOfSystems.md",
333
333
  "models/AthenaSearchAllergensRequest.md",
334
+ "models/AthenaSearchAllergensResponse.md",
334
335
  "models/AthenaSearchClinicalProvidersRequest.md",
335
336
  "models/AthenaSearchMedicationsRequest.md",
336
337
  "models/AthenaSearchMedicationsResponse.md",
@@ -588,6 +589,7 @@
588
589
  "models/GetAppointmentTelehealthLinkResponse.md",
589
590
  "models/GetCheckinCheckinResponse.md",
590
591
  "models/GetCurrentCareSessionCareSessionsCurrentResponse.md",
592
+ "models/GetDefaultProviderResponse.md",
591
593
  "models/GetDiagnosticAnalyteResponse.md",
592
594
  "models/GetDiagnosticSpecialtiesResponse.md",
593
595
  "models/GetDiagnosticTestRelationshipsResponse.md",
@@ -3010,6 +3012,7 @@
3010
3012
  "operations/patient.getCheckinCheckin.md",
3011
3013
  "operations/patient.getCommunicationConsent.md",
3012
3014
  "operations/patient.getCurrentCareSessionCareSessionsCurrent.md",
3015
+ "operations/patient.getDefaultProvider.md",
3013
3016
  "operations/patient.getEncounter.md",
3014
3017
  "operations/patient.getInsurance.md",
3015
3018
  "operations/patient.getLatestEncounter.md",
@@ -3109,7 +3112,7 @@
3109
3112
  "operations/vitals.recordVitals.md"
3110
3113
  ],
3111
3114
  "language": "nodejs",
3112
- "modelCount": 2027,
3113
- "operationCount": 1025,
3115
+ "modelCount": 2029,
3116
+ "operationCount": 1026,
3114
3117
  "schemaVersion": 1
3115
3118
  }
@@ -930,6 +930,7 @@ Generated call examples use exact public surface signatures. Workflow examples r
930
930
  - [Get current check-in state](../operations/patient.getCheckinCheckin.md)
931
931
  - [Get SMS/phone contact-preference consent](../operations/patient.getCommunicationConsent.md)
932
932
  - [Get the current care session](../operations/patient.getCurrentCareSessionCareSessionsCurrent.md)
933
+ - [Get the tenant default provider](../operations/patient.getDefaultProvider.md)
933
934
  - [Get an encounter](../operations/patient.getEncounter.md)
934
935
  - [List insurance coverage](../operations/patient.getInsurance.md)
935
936
  - [Get the patient's latest open encounter](../operations/patient.getLatestEncounter.md)
package/docs/index.md CHANGED
@@ -938,6 +938,7 @@ This directory is generated from the shared structured docs data. Do not edit ge
938
938
  - [Get current check-in state](operations/patient.getCheckinCheckin.md) (`patient.getCheckinCheckin`)
939
939
  - [Get SMS/phone contact-preference consent](operations/patient.getCommunicationConsent.md) (`patient.getCommunicationConsent`)
940
940
  - [Get the current care session](operations/patient.getCurrentCareSessionCareSessionsCurrent.md) (`patient.getCurrentCareSessionCareSessionsCurrent`)
941
+ - [Get the tenant default provider](operations/patient.getDefaultProvider.md) (`patient.getDefaultProvider`)
941
942
  - [Get an encounter](operations/patient.getEncounter.md) (`patient.getEncounter`)
942
943
  - [List insurance coverage](operations/patient.getInsurance.md) (`patient.getInsurance`)
943
944
  - [Get the patient's latest open encounter](operations/patient.getLatestEncounter.md) (`patient.getLatestEncounter`)
@@ -0,0 +1,15 @@
1
+ # AthenaSearchAllergensResponse
2
+
3
+ Model ID: `AthenaSearchAllergensResponse`
4
+
5
+ No description.
6
+
7
+ Type: `array`
8
+
9
+ ## Fields
10
+
11
+ No fields.
12
+
13
+ ## Example
14
+
15
+ None declared in canonical OpenAPI.
@@ -0,0 +1,18 @@
1
+ # GetDefaultProviderResponse
2
+
3
+ Model ID: `GetDefaultProviderResponse`
4
+
5
+ Default provider configured for the authenticated patient's tenant.
6
+
7
+ Type: `object`
8
+
9
+ ## Fields
10
+
11
+ | Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
12
+ |---|---|---:|---|---|---|---:|---|
13
+ | `name` | `string` | Yes | | | | No | Provider's full name. |
14
+ | `npi` | `string` | Yes | | | | No | Provider's 10-digit US National Provider Identifier. |
15
+
16
+ ## Example
17
+
18
+ None declared in canonical OpenAPI.
@@ -282,6 +282,7 @@
282
282
  - [AthenaRetrieveAvailableAppointmentSlotsRequest](AthenaRetrieveAvailableAppointmentSlotsRequest.md)
283
283
  - [AthenaReviewOfSystems](AthenaReviewOfSystems.md)
284
284
  - [AthenaSearchAllergensRequest](AthenaSearchAllergensRequest.md)
285
+ - [AthenaSearchAllergensResponse](AthenaSearchAllergensResponse.md)
285
286
  - [AthenaSearchClinicalProvidersRequest](AthenaSearchClinicalProvidersRequest.md)
286
287
  - [AthenaSearchMedicationsRequest](AthenaSearchMedicationsRequest.md)
287
288
  - [AthenaSearchMedicationsResponse](AthenaSearchMedicationsResponse.md)
@@ -573,6 +574,7 @@
573
574
  - [GetAppointmentTelehealthLinkResponse](GetAppointmentTelehealthLinkResponse.md)
574
575
  - [GetCheckinCheckinResponse](GetCheckinCheckinResponse.md)
575
576
  - [GetCurrentCareSessionCareSessionsCurrentResponse](GetCurrentCareSessionCareSessionsCurrentResponse.md)
577
+ - [GetDefaultProviderResponse](GetDefaultProviderResponse.md)
576
578
  - [GetDiagnosticAnalyteResponse](GetDiagnosticAnalyteResponse.md)
577
579
  - [GetDiagnosticSpecialtiesResponse](GetDiagnosticSpecialtiesResponse.md)
578
580
  - [GetDiagnosticTestRelationshipsResponse](GetDiagnosticTestRelationshipsResponse.md)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Operation ID: `connectors.athenaListSocialHistoryQuestions`
4
4
 
5
- List social history questions (athenahealth)
5
+ List social history questions via athenahealth. Relays the vendor response unchanged.
6
6
 
7
7
  ## Public method
8
8
 
@@ -59,7 +59,7 @@ Request model: [`AthenaSearchAllergensRequest`](../models/AthenaSearchAllergensR
59
59
 
60
60
  | Status | Shape | Content type | Description |
61
61
  |---|---|---|---|
62
- | `200` | [`connectors.JsonValue`](../models/connectors.JsonValue.md) | application/json | Successful response |
62
+ | `200` | [`AthenaSearchAllergensResponse`](../models/AthenaSearchAllergensResponse.md) | application/json | Successful response |
63
63
 
64
64
  ## Success response examples
65
65
 
@@ -63,7 +63,7 @@ Request model: [`AthenaUpdateDriversLicenseRequest`](../models/AthenaUpdateDrive
63
63
 
64
64
  | Status | Shape | Content type | Description |
65
65
  |---|---|---|---|
66
- | `200` | [`connectors.JsonValue`](../models/connectors.JsonValue.md) | application/json | Successful response |
66
+ | `200` | [`AthenaOperationResult`](../models/AthenaOperationResult.md) | application/json | Successful response |
67
67
 
68
68
  ## Success response examples
69
69
 
@@ -71,7 +71,14 @@ Request model: [`AthenaUpdateDriversLicenseRequest`](../models/AthenaUpdateDrive
71
71
 
72
72
  ```json
73
73
  {
74
- "vendorField": "vendor-defined value"
74
+ "error": "example-error",
75
+ "ids": {
76
+ "vendorField": "vendor-defined value"
77
+ },
78
+ "raw": {
79
+ "vendorField": "vendor-defined value"
80
+ },
81
+ "success": true
75
82
  }
76
83
  ```
77
84
 
@@ -87,7 +87,7 @@ None declared in canonical OpenAPI.
87
87
  | `400` | [`diagnostics.ErrorResponse`](../models/diagnostics.ErrorResponse.md) | application/json | The gs1 query parameter was missing or could not be parsed as a GS1 barcode |
88
88
  | `401` | [`diagnostics.ErrorResponse`](../models/diagnostics.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
89
89
  | `403` | [`diagnostics.ErrorResponse`](../models/diagnostics.ErrorResponse.md) | application/json | A PATIENT-pool caller attempted to access another patient's data |
90
- | `404` | [`diagnostics.ErrorResponse`](../models/diagnostics.ErrorResponse.md) | application/json | The GS1 barcode parsed cleanly but its GTIN has no configured test profile |
90
+ | `404` | [`diagnostics.ErrorResponse`](../models/diagnostics.ErrorResponse.md) | application/json | The PATIENT-pool caller's own FHIR Patient record could not be resolved |
91
91
  | `500` | [`diagnostics.ErrorResponse`](../models/diagnostics.ErrorResponse.md) | application/json | Internal server error |
92
92
 
93
93
  ## Error examples
@@ -73,7 +73,7 @@ None declared in canonical OpenAPI.
73
73
  | `400` | [`fieldagent.ErrorResponse`](../models/fieldagent.ErrorResponse.md) | application/json | No binary_id was supplied and none could be auto-resolved |
74
74
  | `401` | [`fieldagent.ErrorResponse`](../models/fieldagent.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
75
75
  | `403` | [`fieldagent.ErrorResponse`](../models/fieldagent.ErrorResponse.md) | application/json | The authenticated caller does not own this agent profile |
76
- | `404` | [`fieldagent.ErrorResponse`](../models/fieldagent.ErrorResponse.md) | application/json | No FHIR Binary exists for the resolved binary_id |
76
+ | `404` | [`fieldagent.ErrorResponse`](../models/fieldagent.ErrorResponse.md) | application/json | No agent profile exists for the given agent_id |
77
77
 
78
78
  ## Error examples
79
79
 
@@ -0,0 +1,117 @@
1
+ # Get the tenant default provider
2
+
3
+ Operation ID: `patient.getDefaultProvider`
4
+
5
+ Return the configured default provider's full name and 10-digit NPI for the authenticated patient's tenant. Requires a patient Bearer JWT; the tenant is derived from that token and cannot be supplied by the client. Returns 404 when the account has no default provider configured.
6
+
7
+ ## Public method
8
+
9
+ `getDefaultProvider`
10
+
11
+ Signature: `patient.getDefaultProvider()`
12
+
13
+ Return type: `Promise<GetDefaultProviderResponse>`
14
+
15
+ ## Authentication
16
+
17
+ Classification: **AUTHENTICATED**
18
+
19
+ Schemes: `bearerAuth`
20
+
21
+ ## Prerequisites
22
+
23
+ None documented.
24
+
25
+ ## HTTP
26
+
27
+ `GET /patients/defaultprovider`
28
+
29
+ ## Path parameters
30
+
31
+ None.
32
+
33
+ ## Query parameters
34
+
35
+ None.
36
+
37
+ ## Body parameters
38
+
39
+ None.
40
+
41
+ Request model: None.
42
+
43
+ ## Request example
44
+
45
+ None declared in canonical OpenAPI.
46
+
47
+ ## Success responses
48
+
49
+ | Status | Shape | Content type | Description |
50
+ |---|---|---|---|
51
+ | `200` | [`GetDefaultProviderResponse`](../models/GetDefaultProviderResponse.md) | application/json | Default provider configured for the authenticated patient's tenant |
52
+
53
+ ## Success response examples
54
+
55
+ ### 200
56
+
57
+ ```json
58
+ {
59
+ "name": "Murdoc Khaleghi",
60
+ "npi": "1942427778"
61
+ }
62
+ ```
63
+
64
+ ## Common errors
65
+
66
+ | Status | Shape | Content type | Description |
67
+ |---|---|---|---|
68
+ | `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing, invalid, expired, or non-patient Bearer JWT |
69
+ | `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The authenticated patient has no FHIR Patient record |
70
+
71
+ ## Error examples
72
+
73
+ ### 401 — Missing or invalid access token
74
+
75
+ ```json
76
+ {
77
+ "error": "Authorization required"
78
+ }
79
+ ```
80
+
81
+ ### 404 — Patient not found
82
+
83
+ ```json
84
+ {
85
+ "error": "Patient not found"
86
+ }
87
+ ```
88
+
89
+ ## NodeJS / TypeScript implementation
90
+
91
+ ```ts
92
+ import { HCSDK } from "@healthcloudai/hc-sdk";
93
+ ```
94
+
95
+ ```ts
96
+ const result = await patient.getDefaultProvider();
97
+ ```
98
+
99
+ ## cURL
100
+
101
+ ```bash
102
+ curl -X GET \
103
+ -H 'Authorization: Bearer <ACCESS_TOKEN>' \
104
+ 'https://dev-api-patient.health.cloud/patients/defaultprovider'
105
+ ```
106
+
107
+ ## Notes
108
+
109
+ None.
110
+
111
+ ## Prepared Test Console scenario
112
+
113
+ No canonical scenario is currently associated.
114
+
115
+ ## Real response
116
+
117
+ No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
@@ -69,7 +69,7 @@ None declared in canonical OpenAPI.
69
69
  | Status | Shape | Content type | Description |
70
70
  |---|---|---|---|
71
71
  | `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Provider Bearer authentication is required |
72
- | `404` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Patient not found in this tenant |
72
+ | `404` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | No patient exists for the id in the caller's tenant |
73
73
 
74
74
  ## Error examples
75
75
 
@@ -14,7 +14,7 @@ Return type: `Promise<ProviderRefreshTokenResponse>`
14
14
 
15
15
  ## Authentication
16
16
 
17
- Classification: **UNSPECIFIED**
17
+ Classification: **PUBLIC**
18
18
 
19
19
  ## Prerequisites
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@healthcloudai/hc-sdk",
3
- "version": "3.11.0",
3
+ "version": "3.12.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",
@@ -69,5 +69,13 @@
69
69
  },
70
70
  "overrides": {
71
71
  "source-map-js": "^1.2.2"
72
+ },
73
+ "bugs": {
74
+ "url": "https://github.com/healthcloudservices/healthcloud-services/issues"
75
+ },
76
+ "repository": {
77
+ "type": "git",
78
+ "url": "git+https://github.com/healthcloudservices/healthcloud-services.git",
79
+ "directory": "packages/npm"
72
80
  }
73
81
  }