@healthcloudai/hc-sdk 3.32.0 → 3.34.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 +102 -3
- package/dist/index.d.cts +392 -6
- package/dist/index.d.ts +392 -6
- package/dist/index.js +101 -3
- package/docs/clients/ProviderClient.md +1 -0
- package/docs/docs-manifest.json +5 -3
- package/docs/examples/index.md +1 -0
- package/docs/index.md +1 -0
- package/docs/models/EnsureAppointmentEncounterResponse.md +20 -0
- package/docs/models/index.md +1 -0
- package/docs/operations/provider.ensureAppointmentEncounter.md +150 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var SERVICES = [
|
|
|
15
15
|
"connectors",
|
|
16
16
|
"person",
|
|
17
17
|
"graph",
|
|
18
|
+
"analytics",
|
|
18
19
|
"ams"
|
|
19
20
|
];
|
|
20
21
|
function isServiceName(value) {
|
|
@@ -3893,9 +3894,10 @@ var ProviderClient = class extends BaseServiceClient {
|
|
|
3893
3894
|
return this.send("GET", "/encounters", { query: filters });
|
|
3894
3895
|
}
|
|
3895
3896
|
/**
|
|
3896
|
-
* The queue (GET /encounters/queue): the newest 10 encounters in the tenant that no provider has taken, newest
|
|
3897
|
-
* first, each with a minimal patient summary and `reported_symptoms
|
|
3898
|
-
*
|
|
3897
|
+
* The queue (GET /encounters/queue): the newest 10 encounters in the tenant that no provider has taken, newest
|
|
3898
|
+
* created first, each with a minimal patient summary and `reported_symptoms`: the explicitly labelled Symptoms block
|
|
3899
|
+
* from the patient's notes (intake and unlabelled narrative excluded), cut to at most 300 characters with an
|
|
3900
|
+
* ellipsis when longer, or null when there is none. Use the item's `fhir_id` with claimEncounter.
|
|
3899
3901
|
*/
|
|
3900
3902
|
getEncounterQueue() {
|
|
3901
3903
|
return this.send("GET", "/encounters/queue", {});
|
|
@@ -3909,6 +3911,15 @@ var ProviderClient = class extends BaseServiceClient {
|
|
|
3909
3911
|
claimEncounter(encounterId) {
|
|
3910
3912
|
return this.send("POST", "/encounters/{encounter_id}/claim", { pathParams: { encounter_id: encounterId } });
|
|
3911
3913
|
}
|
|
3914
|
+
/**
|
|
3915
|
+
* Get or open the encounter for a video visit (POST /appointments/{id}/encounter). Returns the caller's open encounter
|
|
3916
|
+
* for the patient, else the appointment's own encounter (any status; a finished one is read-only), else creates a virtual
|
|
3917
|
+
* in-progress encounter linked to the appointment. `created` says which. The patient is not notified and no linked EHR is
|
|
3918
|
+
* written. Rejects with 403 when the appointment is not the caller's, 404 when it does not exist, 400 for an invalid id.
|
|
3919
|
+
*/
|
|
3920
|
+
ensureAppointmentEncounter(appointmentId) {
|
|
3921
|
+
return this.send("POST", "/appointments/{appointment_id}/encounter", { pathParams: { appointment_id: appointmentId } });
|
|
3922
|
+
}
|
|
3912
3923
|
/**
|
|
3913
3924
|
* Replace an encounter's diagnoses (PUT /encounters/{id}/diagnoses): add, change or remove. Codes come from
|
|
3914
3925
|
* searchIcd10; codes left out of the list are removed, and the display text always comes from the ICD-10 data. Only the
|
|
@@ -4471,6 +4482,91 @@ var GraphClient = class extends BaseServiceClient {
|
|
|
4471
4482
|
}
|
|
4472
4483
|
};
|
|
4473
4484
|
|
|
4485
|
+
// src/clients/AnalyticsClient.ts
|
|
4486
|
+
var toQuery = (query) => query;
|
|
4487
|
+
var AnalyticsClient = class extends BaseServiceClient {
|
|
4488
|
+
constructor(http) {
|
|
4489
|
+
super(http, "analytics");
|
|
4490
|
+
}
|
|
4491
|
+
// ─── Payers ──────────────────────────────────────────────────────────
|
|
4492
|
+
listPayers(query) {
|
|
4493
|
+
return this.send("GET", "/analytics/payers", { query: toQuery(query) });
|
|
4494
|
+
}
|
|
4495
|
+
getPayer(payerId) {
|
|
4496
|
+
return this.send("GET", "/analytics/payers/{payer_id}", { pathParams: { payer_id: payerId } });
|
|
4497
|
+
}
|
|
4498
|
+
listPayerPlans(payerId, query) {
|
|
4499
|
+
return this.send("GET", "/analytics/payers/{payer_id}/plans", {
|
|
4500
|
+
pathParams: { payer_id: payerId },
|
|
4501
|
+
query: toQuery(query)
|
|
4502
|
+
});
|
|
4503
|
+
}
|
|
4504
|
+
listPayerNetworks(payerId, query) {
|
|
4505
|
+
return this.send("GET", "/analytics/payers/{payer_id}/networks", {
|
|
4506
|
+
pathParams: { payer_id: payerId },
|
|
4507
|
+
query: toQuery(query)
|
|
4508
|
+
});
|
|
4509
|
+
}
|
|
4510
|
+
listPayerProviders(payerId, query) {
|
|
4511
|
+
return this.send("GET", "/analytics/payers/{payer_id}/providers", {
|
|
4512
|
+
pathParams: { payer_id: payerId },
|
|
4513
|
+
query: toQuery(query)
|
|
4514
|
+
});
|
|
4515
|
+
}
|
|
4516
|
+
// ─── Plans ───────────────────────────────────────────────────────────
|
|
4517
|
+
listPlans(query) {
|
|
4518
|
+
return this.send("GET", "/analytics/plans", { query: toQuery(query) });
|
|
4519
|
+
}
|
|
4520
|
+
/** `planId` is the graph id (`<state>:<year>:<plan_id>`); its colons are URL-encoded for you. */
|
|
4521
|
+
getPlan(planId) {
|
|
4522
|
+
return this.send("GET", "/analytics/plans/{plan_id}", { pathParams: { plan_id: planId } });
|
|
4523
|
+
}
|
|
4524
|
+
// ─── Providers ───────────────────────────────────────────────────────
|
|
4525
|
+
listProviders(query) {
|
|
4526
|
+
return this.send("GET", "/analytics/providers", { query: toQuery(query) });
|
|
4527
|
+
}
|
|
4528
|
+
getProvider(npi) {
|
|
4529
|
+
return this.send("GET", "/analytics/providers/{npi}", { pathParams: { npi } });
|
|
4530
|
+
}
|
|
4531
|
+
// ─── Networks and states ─────────────────────────────────────────────
|
|
4532
|
+
listNetworks(query) {
|
|
4533
|
+
return this.send("GET", "/analytics/networks", { query: toQuery(query) });
|
|
4534
|
+
}
|
|
4535
|
+
listStates(query) {
|
|
4536
|
+
return this.send("GET", "/analytics/states", { query: toQuery(query) });
|
|
4537
|
+
}
|
|
4538
|
+
// ─── Medical concepts ────────────────────────────────────────────────
|
|
4539
|
+
listMedicalConcepts(query) {
|
|
4540
|
+
return this.send("GET", "/analytics/medical-concepts", { query: toQuery(query) });
|
|
4541
|
+
}
|
|
4542
|
+
listMedicalConceptVocabularies(query) {
|
|
4543
|
+
return this.send("GET", "/analytics/medical-concepts/vocabularies", { query: toQuery(query) });
|
|
4544
|
+
}
|
|
4545
|
+
getMedicalConcept(conceptId) {
|
|
4546
|
+
return this.send("GET", "/analytics/medical-concepts/{concept_id}", {
|
|
4547
|
+
pathParams: { concept_id: conceptId }
|
|
4548
|
+
});
|
|
4549
|
+
}
|
|
4550
|
+
listMedicalConceptRelationships(conceptId, query) {
|
|
4551
|
+
return this.send("GET", "/analytics/medical-concepts/{concept_id}/relationships", {
|
|
4552
|
+
pathParams: { concept_id: conceptId },
|
|
4553
|
+
query: toQuery(query)
|
|
4554
|
+
});
|
|
4555
|
+
}
|
|
4556
|
+
listMedicalConceptAncestors(conceptId, query) {
|
|
4557
|
+
return this.send("GET", "/analytics/medical-concepts/{concept_id}/ancestors", {
|
|
4558
|
+
pathParams: { concept_id: conceptId },
|
|
4559
|
+
query: toQuery(query)
|
|
4560
|
+
});
|
|
4561
|
+
}
|
|
4562
|
+
listMedicalConceptDescendants(conceptId, query) {
|
|
4563
|
+
return this.send("GET", "/analytics/medical-concepts/{concept_id}/descendants", {
|
|
4564
|
+
pathParams: { concept_id: conceptId },
|
|
4565
|
+
query: toQuery(query)
|
|
4566
|
+
});
|
|
4567
|
+
}
|
|
4568
|
+
};
|
|
4569
|
+
|
|
4474
4570
|
// src/clients/connectors/ConnectorFactory.ts
|
|
4475
4571
|
function assertConfigObject(connectorName, config) {
|
|
4476
4572
|
if (typeof config !== "object" || config === null || Array.isArray(config)) {
|
|
@@ -7476,6 +7572,7 @@ var HCSDK = class {
|
|
|
7476
7572
|
);
|
|
7477
7573
|
this.mcp = new MCPClient(this.http);
|
|
7478
7574
|
this.graph = new GraphClient(this.http);
|
|
7575
|
+
this.analytics = new AnalyticsClient(this.http);
|
|
7479
7576
|
this.connectors = new ConnectorsNamespace(this.http);
|
|
7480
7577
|
}
|
|
7481
7578
|
setAccessToken(token) {
|
|
@@ -7575,6 +7672,7 @@ var HCSDK_SWAGGER_OPERATION_COUNTS = {
|
|
|
7575
7672
|
};
|
|
7576
7673
|
export {
|
|
7577
7674
|
AmsClient,
|
|
7675
|
+
AnalyticsClient,
|
|
7578
7676
|
AnthropicClient,
|
|
7579
7677
|
AppleAuthClient,
|
|
7580
7678
|
AthenaHealthClient,
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
- [`createPracticeInvite`](../operations/provider.createPracticeInvite.md) — Invite a patient to the practice
|
|
10
10
|
- [`createPractitionerLocation`](../operations/provider.createPractitionerLocation.md) — Add a practice location
|
|
11
11
|
- [`deletePractitionerLocation`](../operations/provider.deletePractitionerLocation.md) — Remove a practice location
|
|
12
|
+
- [`ensureAppointmentEncounter`](../operations/provider.ensureAppointmentEncounter.md) — Get or open the encounter for an appointment's video visit
|
|
12
13
|
- [`getAppointment`](../operations/provider.getAppointment.md) — Get one appointment with patient demographics
|
|
13
14
|
- [`getEncounter`](../operations/provider.getEncounter.md) — Get one of the caller's encounters with patient demographics
|
|
14
15
|
- [`getEncounterCarePlan`](../operations/provider.getEncounterCarePlan.md) — Get an encounter's care plan
|
package/docs/docs-manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"docsDataContentDigest": "sha256:
|
|
2
|
+
"docsDataContentDigest": "sha256:c520f32221cccf017ce5e58b66657f04c075786abfa135ce1dda689fe45b2d20",
|
|
3
3
|
"generatedFiles": [
|
|
4
4
|
"authentication.md",
|
|
5
5
|
"clients/AmsClient.md",
|
|
@@ -611,6 +611,7 @@
|
|
|
611
611
|
"models/EncounterOperationResponse.md",
|
|
612
612
|
"models/EncounterSections.md",
|
|
613
613
|
"models/EncounterStatus.md",
|
|
614
|
+
"models/EnsureAppointmentEncounterResponse.md",
|
|
614
615
|
"models/Ethnicity.md",
|
|
615
616
|
"models/ExerciseFrequency.md",
|
|
616
617
|
"models/FaceMatchRequest.md",
|
|
@@ -3321,6 +3322,7 @@
|
|
|
3321
3322
|
"operations/provider.createPracticeInvite.md",
|
|
3322
3323
|
"operations/provider.createPractitionerLocation.md",
|
|
3323
3324
|
"operations/provider.deletePractitionerLocation.md",
|
|
3325
|
+
"operations/provider.ensureAppointmentEncounter.md",
|
|
3324
3326
|
"operations/provider.getAppointment.md",
|
|
3325
3327
|
"operations/provider.getEncounter.md",
|
|
3326
3328
|
"operations/provider.getEncounterCarePlan.md",
|
|
@@ -3384,7 +3386,7 @@
|
|
|
3384
3386
|
"operations/vitals.recordVitals.md"
|
|
3385
3387
|
],
|
|
3386
3388
|
"language": "nodejs",
|
|
3387
|
-
"modelCount":
|
|
3388
|
-
"operationCount":
|
|
3389
|
+
"modelCount": 2232,
|
|
3390
|
+
"operationCount": 1097,
|
|
3389
3391
|
"schemaVersion": 1
|
|
3390
3392
|
}
|
package/docs/examples/index.md
CHANGED
|
@@ -1037,6 +1037,7 @@ Generated call examples use exact public surface signatures. Workflow examples r
|
|
|
1037
1037
|
- [Invite a patient to the practice](../operations/provider.createPracticeInvite.md)
|
|
1038
1038
|
- [Add a practice location](../operations/provider.createPractitionerLocation.md)
|
|
1039
1039
|
- [Remove a practice location](../operations/provider.deletePractitionerLocation.md)
|
|
1040
|
+
- [Get or open the encounter for an appointment's video visit](../operations/provider.ensureAppointmentEncounter.md)
|
|
1040
1041
|
- [Get one appointment with patient demographics](../operations/provider.getAppointment.md)
|
|
1041
1042
|
- [Get one of the caller's encounters with patient demographics](../operations/provider.getEncounter.md)
|
|
1042
1043
|
- [Get an encounter's care plan](../operations/provider.getEncounterCarePlan.md)
|
package/docs/index.md
CHANGED
|
@@ -1045,6 +1045,7 @@ This directory is generated from the shared structured docs data. Do not edit ge
|
|
|
1045
1045
|
- [Invite a patient to the practice](operations/provider.createPracticeInvite.md) (`provider.createPracticeInvite`)
|
|
1046
1046
|
- [Add a practice location](operations/provider.createPractitionerLocation.md) (`provider.createPractitionerLocation`)
|
|
1047
1047
|
- [Remove a practice location](operations/provider.deletePractitionerLocation.md) (`provider.deletePractitionerLocation`)
|
|
1048
|
+
- [Get or open the encounter for an appointment's video visit](operations/provider.ensureAppointmentEncounter.md) (`provider.ensureAppointmentEncounter`)
|
|
1048
1049
|
- [Get one appointment with patient demographics](operations/provider.getAppointment.md) (`provider.getAppointment`)
|
|
1049
1050
|
- [Get one of the caller's encounters with patient demographics](operations/provider.getEncounter.md) (`provider.getEncounter`)
|
|
1050
1051
|
- [Get an encounter's care plan](operations/provider.getEncounterCarePlan.md) (`provider.getEncounterCarePlan`)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# EnsureAppointmentEncounterResponse
|
|
2
|
+
|
|
3
|
+
Model ID: `EnsureAppointmentEncounterResponse`
|
|
4
|
+
|
|
5
|
+
The encounter that belongs to a video visit on an appointment.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `created` | `boolean` | Yes | | | | No | True when this call created the encounter; false when it already existed. |
|
|
14
|
+
| `encounter_id` | `string` | Yes | | | | No | FHIR id of the encounter to open under the video call. |
|
|
15
|
+
| `patient_id` | `string` | Yes | | | | No | FHIR Patient id of the encounter's subject. |
|
|
16
|
+
| `status` | `string` | Yes | | | | No | Encounter status: planned, arrived, triaged, in-progress, onleave, finished, cancelled, entered-in-error or unknown. A finished (signed) encounter is read-only. |
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
None declared in canonical OpenAPI.
|
package/docs/models/index.md
CHANGED
|
@@ -589,6 +589,7 @@
|
|
|
589
589
|
- [EncounterOperationResponse](EncounterOperationResponse.md)
|
|
590
590
|
- [EncounterSections](EncounterSections.md)
|
|
591
591
|
- [EncounterStatus](EncounterStatus.md)
|
|
592
|
+
- [EnsureAppointmentEncounterResponse](EnsureAppointmentEncounterResponse.md)
|
|
592
593
|
- [Ethnicity](Ethnicity.md)
|
|
593
594
|
- [ExerciseFrequency](ExerciseFrequency.md)
|
|
594
595
|
- [FaceMatchRequest](FaceMatchRequest.md)
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Get or open the encounter for an appointment's video visit
|
|
2
|
+
|
|
3
|
+
Operation ID: `provider.ensureAppointmentEncounter`
|
|
4
|
+
|
|
5
|
+
Returns the encounter to open under the video call for this appointment, creating it when there is none. Idempotent: the caller's open encounter for the patient is returned first, then the appointment's own encounter (`enc-appt-<appointment id>`, in any status; a signed one is read-only), and only then a new virtual (VR) encounter is created in-progress with the caller as primary performer, linked to the appointment. `created` says which. Allowed when the appointment is booked with the caller or its patient is on the caller's patient list (403 otherwise). The patient is not notified and no linked EHR is written.
|
|
6
|
+
|
|
7
|
+
## Public method
|
|
8
|
+
|
|
9
|
+
`ensureAppointmentEncounter`
|
|
10
|
+
|
|
11
|
+
Signature: `provider.ensureAppointmentEncounter(appointmentId)`
|
|
12
|
+
|
|
13
|
+
Return type: `Promise<EnsureAppointmentEncounterResponse>`
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Classification: **AUTHENTICATED**
|
|
18
|
+
|
|
19
|
+
Schemes: `bearerAuth`
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
None documented.
|
|
24
|
+
|
|
25
|
+
## HTTP
|
|
26
|
+
|
|
27
|
+
`POST /appointments/{appointment_id}/encounter`
|
|
28
|
+
|
|
29
|
+
## Path parameters
|
|
30
|
+
|
|
31
|
+
| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
32
|
+
|---|---|---:|---|---|---|---:|---|
|
|
33
|
+
| `appointment_id` | `string` | Yes | | | | No | |
|
|
34
|
+
|
|
35
|
+
## Query parameters
|
|
36
|
+
|
|
37
|
+
None.
|
|
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` | [`EnsureAppointmentEncounterResponse`](../models/EnsureAppointmentEncounterResponse.md) | application/json | The appointment's encounter (existing or just created; see `created`) |
|
|
54
|
+
|
|
55
|
+
## Success response examples
|
|
56
|
+
|
|
57
|
+
### 200
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"created": true,
|
|
62
|
+
"encounter_id": "string",
|
|
63
|
+
"patient_id": "string",
|
|
64
|
+
"status": "string"
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Common errors
|
|
69
|
+
|
|
70
|
+
| Status | Shape | Content type | Description |
|
|
71
|
+
|---|---|---|---|
|
|
72
|
+
| `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Invalid appointment id |
|
|
73
|
+
| `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Provider authorization required |
|
|
74
|
+
| `403` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Role cannot work patients, or the appointment is not the caller's |
|
|
75
|
+
| `404` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Appointment not found |
|
|
76
|
+
| `409` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The encounter changed while being opened; retry |
|
|
77
|
+
|
|
78
|
+
## Error examples
|
|
79
|
+
|
|
80
|
+
### 400
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"error": "string"
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 401
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"error": "string"
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 403
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"error": "string"
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 404
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"error": "string"
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 409
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"error": "string"
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## NodeJS / TypeScript implementation
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
import { HCSDK } from "@healthcloudai/hc-sdk";
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
const appointmentId = "<APPOINTMENT_ID>";
|
|
128
|
+
|
|
129
|
+
const result = await provider.ensureAppointmentEncounter(appointmentId);
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## cURL
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
curl -X POST \
|
|
136
|
+
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
|
|
137
|
+
'https://dev-api-provider.health.cloud/appointments/%3CAPPOINTMENT_ID%3E/encounter'
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Notes
|
|
141
|
+
|
|
142
|
+
None.
|
|
143
|
+
|
|
144
|
+
## Prepared Test Console scenario
|
|
145
|
+
|
|
146
|
+
No canonical scenario is currently associated.
|
|
147
|
+
|
|
148
|
+
## Real response
|
|
149
|
+
|
|
150
|
+
No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
|
package/package.json
CHANGED