@healthcloudai/hc-sdk 3.4.0 → 3.5.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.cjs +42 -2
- package/dist/index.d.cts +1394 -236
- package/dist/index.d.ts +1394 -236
- package/dist/index.js +40 -2
- package/docs/configuration.md +1 -0
- package/docs/docs-manifest.json +6 -3
- package/docs/models/AddInsuranceRequest.md +2 -0
- package/docs/models/AddInsuranceResponse.md +2 -0
- package/docs/models/CheckEncounterResponse.md +36 -0
- package/docs/models/CheckInEncounterResponse.md +51 -0
- package/docs/models/CreateRapidTestRequest.md +3 -0
- package/docs/models/{RapidTest.md → CreateRapidTestResponse.md} +8 -4
- package/docs/models/GetAppointmentTelehealthLinkResponse.md +17 -0
- package/docs/models/GetPreferredPharmacyResponse.md +2 -2
- package/docs/models/GetScanUploadUrlRequest.md +1 -0
- package/docs/models/SearchDocumentSummariesCypherRequest.md +4 -6
- package/docs/models/SearchDocumentSummariesRequest.md +7 -7
- package/docs/models/SearchHealthPlansCypherRequest.md +4 -6
- package/docs/models/SearchHealthPlansRequest.md +8 -8
- package/docs/models/SearchMedicalConceptsCypherRequest.md +6 -6
- package/docs/models/SearchMedicalConceptsRequest.md +14 -19
- package/docs/models/SearchProvidersCypherRequest.md +4 -6
- package/docs/models/SearchProvidersRequest.md +8 -8
- package/docs/models/VectorSearchDocumentsRequest.md +11 -11
- package/docs/models/index.md +13 -10
- package/docs/operations/appointments.getTelehealthLink.md +4 -2
- package/docs/operations/diagnostics.createRapidTest.md +49 -37
- package/docs/operations/diagnostics.getScanUploadUrl.md +3 -1
- package/docs/operations/diagnostics.lookupTestByGs1.md +7 -1
- package/docs/operations/graph.searchDocumentSummaries.md +9 -0
- package/docs/operations/graph.searchHealthPlans.md +9 -0
- package/docs/operations/graph.searchMedicalConcepts.md +26 -17
- package/docs/operations/graph.searchProviders.md +9 -0
- package/docs/operations/graph.vectorSearchDocuments.md +3 -3
- package/docs/operations/patient.addInsurance.md +15 -9
- package/docs/operations/patient.checkEncounter.md +93 -7
- package/docs/operations/patient.checkInEncounter.md +68 -2
- package/docs/operations/patient.getPreferredPharmacy.md +13 -1
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/config/SDKConfig.ts
|
|
2
|
+
var DEFAULT_TIMEOUT_MS = 3e4;
|
|
2
3
|
var SERVICES = [
|
|
3
4
|
"patient",
|
|
4
5
|
"vitals",
|
|
@@ -27,6 +28,11 @@ function resolveBaseUrl(environment, service) {
|
|
|
27
28
|
const prefix = environment === "prod" ? "" : `${environment}-`;
|
|
28
29
|
return `https://${prefix}api-${service}.health.cloud`;
|
|
29
30
|
}
|
|
31
|
+
function assertTimeout(timeout, label = "timeout") {
|
|
32
|
+
if (typeof timeout !== "number" || !Number.isFinite(timeout) || timeout <= 0) {
|
|
33
|
+
throw new Error(`Invalid HealthCloud SDK ${label}: expected a positive number of milliseconds, got ${String(timeout)}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
30
36
|
function assertEnvironment(environment) {
|
|
31
37
|
if (environment !== "dev" && environment !== "uat" && environment !== "prod") {
|
|
32
38
|
throw new Error(`Unsupported HealthCloud environment: "${environment}"`);
|
|
@@ -59,23 +65,46 @@ var HttpClient = class {
|
|
|
59
65
|
this.state = state;
|
|
60
66
|
}
|
|
61
67
|
async request(service, method, path, options = {}) {
|
|
68
|
+
var _a, _b;
|
|
62
69
|
const url = this.buildUrl(service, path, options);
|
|
63
70
|
const headers = this.buildHeaders(options);
|
|
64
71
|
const init = { method, headers };
|
|
65
72
|
if (method !== "GET" && method !== "DELETE" && options.body !== void 0) {
|
|
66
73
|
init.body = this.serializeBody(options.body, headers);
|
|
67
74
|
}
|
|
75
|
+
const timeoutMs = (_b = (_a = options.timeoutMs) != null ? _a : this.state.timeout) != null ? _b : DEFAULT_TIMEOUT_MS;
|
|
76
|
+
assertTimeout(timeoutMs, options.timeoutMs !== void 0 ? "timeoutMs" : "timeout");
|
|
77
|
+
let didTimeout = false;
|
|
78
|
+
const controller = new AbortController();
|
|
79
|
+
init.signal = controller.signal;
|
|
80
|
+
const timer = setTimeout(() => {
|
|
81
|
+
didTimeout = true;
|
|
82
|
+
controller.abort();
|
|
83
|
+
}, timeoutMs);
|
|
68
84
|
let response;
|
|
85
|
+
let payload;
|
|
69
86
|
try {
|
|
70
87
|
response = await fetch(url, init);
|
|
88
|
+
payload = await this.parseResponse(response);
|
|
71
89
|
} catch (error) {
|
|
90
|
+
if (didTimeout) {
|
|
91
|
+
throw new SDKError({
|
|
92
|
+
message: `Request timed out after ${timeoutMs}ms: ${method} ${path}`,
|
|
93
|
+
statusCode: 0,
|
|
94
|
+
cause: error
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
if (error instanceof SDKError) {
|
|
98
|
+
throw error;
|
|
99
|
+
}
|
|
72
100
|
throw new SDKError({
|
|
73
101
|
message: error instanceof Error ? error.message : "Network request failed.",
|
|
74
102
|
statusCode: 0,
|
|
75
103
|
cause: error
|
|
76
104
|
});
|
|
105
|
+
} finally {
|
|
106
|
+
clearTimeout(timer);
|
|
77
107
|
}
|
|
78
|
-
const payload = await this.parseResponse(response);
|
|
79
108
|
if (!response.ok) {
|
|
80
109
|
throw new SDKError({
|
|
81
110
|
message: this.resolveErrorMessage(response, payload),
|
|
@@ -424,7 +453,9 @@ function CreateRapidTestRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
424
453
|
}
|
|
425
454
|
return {
|
|
426
455
|
"administered_date": value["administered_date"],
|
|
456
|
+
"athena_encounter_id": value["athena_encounter_id"],
|
|
427
457
|
"device_name": value["device_name"],
|
|
458
|
+
"encounter_id": value["encounter_id"],
|
|
428
459
|
"lot_number": value["lot_number"],
|
|
429
460
|
"notes": value["notes"],
|
|
430
461
|
"performed_date": value["performed_date"] == null ? value["performed_date"] : value["performed_date"].toISOString().substring(0, 10),
|
|
@@ -432,6 +463,7 @@ function CreateRapidTestRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
432
463
|
"quantitative_unit": value["quantitative_unit"],
|
|
433
464
|
"quantitative_value": value["quantitative_value"],
|
|
434
465
|
"result": RapidTestResultToJSON(value["result"]),
|
|
466
|
+
"scan_storage_key": value["scan_storage_key"],
|
|
435
467
|
"specimen_type": SpecimenTypeToJSON(value["specimen_type"]),
|
|
436
468
|
"type": RapidTestTypeToJSON(value["type"])
|
|
437
469
|
};
|
|
@@ -447,6 +479,7 @@ function GetScanUploadUrlRequestToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
447
479
|
}
|
|
448
480
|
return {
|
|
449
481
|
"content_type": value["content_type"],
|
|
482
|
+
"encounter_id": value["encounter_id"],
|
|
450
483
|
"filename": value["filename"],
|
|
451
484
|
"gtin": value["gtin"],
|
|
452
485
|
"test_id": value["test_id"]
|
|
@@ -5927,12 +5960,15 @@ var ConnectorsNamespace = class {
|
|
|
5927
5960
|
// src/HCSDK.ts
|
|
5928
5961
|
var HCSDK = class {
|
|
5929
5962
|
constructor(config) {
|
|
5963
|
+
var _a, _b;
|
|
5930
5964
|
assertEnvironment(config.environment);
|
|
5965
|
+
assertTimeout((_a = config.timeout) != null ? _a : DEFAULT_TIMEOUT_MS);
|
|
5931
5966
|
this.state = {
|
|
5932
5967
|
environment: config.environment,
|
|
5933
5968
|
tenantId: config.tenantId,
|
|
5934
5969
|
accessToken: config.accessToken,
|
|
5935
|
-
baseUrlOverrides: config.baseUrlOverrides
|
|
5970
|
+
baseUrlOverrides: config.baseUrlOverrides,
|
|
5971
|
+
timeout: (_b = config.timeout) != null ? _b : DEFAULT_TIMEOUT_MS
|
|
5936
5972
|
};
|
|
5937
5973
|
this.http = new HttpClient(this.state);
|
|
5938
5974
|
this.auth = new AuthClient(
|
|
@@ -6067,6 +6103,7 @@ export {
|
|
|
6067
6103
|
ConnectorFactory,
|
|
6068
6104
|
ConnectorsNamespace,
|
|
6069
6105
|
ConnectureClient,
|
|
6106
|
+
DEFAULT_TIMEOUT_MS,
|
|
6070
6107
|
ElevenLabsClient,
|
|
6071
6108
|
FedExClient,
|
|
6072
6109
|
GoogleAIClient,
|
|
@@ -6100,6 +6137,7 @@ export {
|
|
|
6100
6137
|
ZocdocClient,
|
|
6101
6138
|
ZusClient,
|
|
6102
6139
|
assertEnvironment,
|
|
6140
|
+
assertTimeout,
|
|
6103
6141
|
isJsonRpcError,
|
|
6104
6142
|
isServiceName,
|
|
6105
6143
|
resolveBaseUrl,
|
package/docs/configuration.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
- `tenantId`: Tenant used by tenant-aware authentication operations.
|
|
5
5
|
- `accessToken`: Optional bearer token for authenticated APIs.
|
|
6
6
|
- `baseUrlOverrides`: Optional per-service override intended for controlled development and testing.
|
|
7
|
+
- `timeout`: Optional request timeout in milliseconds. Defaults to 30000; timed-out requests are aborted and reject with SDKError.
|
|
7
8
|
|
|
8
9
|
## Initialization
|
|
9
10
|
|
package/docs/docs-manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"docsDataContentDigest": "sha256:
|
|
2
|
+
"docsDataContentDigest": "sha256:547f5a9241cb9a3cae9aecf0ac72726080b17ceb75a4f091a23c2856f257020a",
|
|
3
3
|
"generatedFiles": [
|
|
4
4
|
"authentication.md",
|
|
5
5
|
"clients/AmsClient.md",
|
|
@@ -438,7 +438,9 @@
|
|
|
438
438
|
"models/ChatMessageRecord.md",
|
|
439
439
|
"models/CheckEligibilityRequest.md",
|
|
440
440
|
"models/CheckEncounterRequest.md",
|
|
441
|
+
"models/CheckEncounterResponse.md",
|
|
441
442
|
"models/CheckInEncounterRequest.md",
|
|
443
|
+
"models/CheckInEncounterResponse.md",
|
|
442
444
|
"models/CmsGetCountyFipsRequest.md",
|
|
443
445
|
"models/CmsSearchHealthPlansRequest.md",
|
|
444
446
|
"models/CmsSearchHealthPlansResponse.md",
|
|
@@ -495,6 +497,7 @@
|
|
|
495
497
|
"models/CreateQuestionnaireResponseRequest.md",
|
|
496
498
|
"models/CreateQuestionnaireResponseResponse.md",
|
|
497
499
|
"models/CreateRapidTestRequest.md",
|
|
500
|
+
"models/CreateRapidTestResponse.md",
|
|
498
501
|
"models/CreateSlotRequest.md",
|
|
499
502
|
"models/CreateSummaryResponse.md",
|
|
500
503
|
"models/CypherQueryResponse.md",
|
|
@@ -577,6 +580,7 @@
|
|
|
577
580
|
"models/GetAgentAgentResponse.md",
|
|
578
581
|
"models/GetAgentConfigurationAgentconfigurationResponse.md",
|
|
579
582
|
"models/GetAgentPhotoResponse.md",
|
|
583
|
+
"models/GetAppointmentTelehealthLinkResponse.md",
|
|
580
584
|
"models/GetCheckinCheckinResponse.md",
|
|
581
585
|
"models/GetCurrentCareSessionCareSessionsCurrentResponse.md",
|
|
582
586
|
"models/GetDiagnosticAnalyteResponse.md",
|
|
@@ -1420,7 +1424,6 @@
|
|
|
1420
1424
|
"models/QuestionnaireResponse.md",
|
|
1421
1425
|
"models/QuestionnaireResponseStatus.md",
|
|
1422
1426
|
"models/Race.md",
|
|
1423
|
-
"models/RapidTest.md",
|
|
1424
1427
|
"models/RapidTestResult.md",
|
|
1425
1428
|
"models/RapidTestType.md",
|
|
1426
1429
|
"models/ReactionSeverity.md",
|
|
@@ -3058,7 +3061,7 @@
|
|
|
3058
3061
|
"operations/vitals.recordVitals.md"
|
|
3059
3062
|
],
|
|
3060
3063
|
"language": "nodejs",
|
|
3061
|
-
"modelCount":
|
|
3064
|
+
"modelCount": 1991,
|
|
3062
3065
|
"operationCount": 1013,
|
|
3063
3066
|
"schemaVersion": 1
|
|
3064
3067
|
}
|
|
@@ -11,11 +11,13 @@ Type: `object`
|
|
|
11
11
|
|
|
12
12
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
13
13
|
|---|---|---:|---|---|---|---:|---|
|
|
14
|
+
| `image` | `string|null` | No | | | | Yes | Optional base64-encoded insurance card image (JPEG or PNG), uploaded in the same request as the Coverage it belongs to. Always saved as a FHIR DocumentReference. Mirrored to Athena only when this request's vendor match+submit above actually linked the insurance into Athena — never attached to some other, pre-existing Athena insurance record when this submit failed or was skipped. |
|
|
14
15
|
| `member_id` | `string` | Yes | | | | No | Subscriber's member/policy ID with the payer. |
|
|
15
16
|
| `payer_id` | `string|null` | No | | | | Yes | NAIC or payer identifier. |
|
|
16
17
|
| `payer_name` | `string` | Yes | | | | No | Display name of the insurance payer/carrier. |
|
|
17
18
|
| `priority` | [`InsurancePriority`](./InsurancePriority.md) | No | | | | No | Coordination-of-benefits order. Defaults to `primary` when omitted. |
|
|
18
19
|
| `relationship` | [`SubscriberRelationship`](./SubscriberRelationship.md) | No | | | | No | Patient's relationship to the subscriber. Defaults to `self` when omitted. |
|
|
20
|
+
| `state` | `string|null` | No | | | | Yes | Optional two-letter state hint used when matching the insurance plan with a vendor. |
|
|
19
21
|
|
|
20
22
|
## Example
|
|
21
23
|
|
|
@@ -11,9 +11,11 @@ Type: `object`
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
13
|
| `athena_best_match` | `object|null` | No | | | | Yes | The Athena insurance package the AI match service picked and submitted, for transparency. null when no package matched or Athena did not run. |
|
|
14
|
+
| `athena_insurance_card_status` | `string|null` | No | | | | Yes | Outcome of mirroring the insurance card image to Athena, when `image` was supplied. 'linked' means the image was attached to the Athena insurance record this same request just created. 'skipped_insurance_not_linked' means the Athena submit above did not succeed (no vendor, no match, or failed), so the image was deliberately not sent to Athena. null when no image was sent. |
|
|
14
15
|
| `athena_insurance_error` | `string|null` | No | | | | Yes | Human-readable reason the Athena mirror failed, when athena_insurance_status is 'failed'. |
|
|
15
16
|
| `athena_insurance_status` | `string|null` | No | | | | Yes | 'linked' if the insurance was also mirrored into Athena, 'failed' otherwise, null if this tenant has no Athena integration configured. |
|
|
16
17
|
| `coverages_created` | `integer` | Yes | | | | No | Number of FHIR Coverage resources created by this request. |
|
|
18
|
+
| `fhir_document_reference_id` | `string|null` | No | | | | Yes | FHIR DocumentReference id the insurance card image was saved as, when `image` was supplied on the request. null when no image was sent. |
|
|
17
19
|
| `fhir_patient_id` | `string|null` | Yes | | | | Yes | Deprecated alias of `patient_id`, kept for one release as a compatibility grace window. |
|
|
18
20
|
| `openloop_best_match` | `object|null` | No | | | | Yes | The Healthie insurance plan the AI match service picked and submitted, for transparency. null when no plan matched or OpenLoop did not run. |
|
|
19
21
|
| `openloop_insurance_error` | `string|null` | No | | | | Yes | Human-readable reason the OpenLoop mirror failed, when openloop_insurance_status is 'failed'. |
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# CheckEncounterResponse
|
|
2
|
+
|
|
3
|
+
Model ID: `CheckEncounterResponse`
|
|
4
|
+
|
|
5
|
+
Result of resolving a patient's current walk-in encounter.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `athena_appointment_id` | `string|null` | No | | | | Yes | |
|
|
14
|
+
| `athena_encounter_error` | `string|null` | No | | | | Yes | |
|
|
15
|
+
| `athena_encounter_id` | `string|null` | No | | | | Yes | |
|
|
16
|
+
| `athena_encounter_status` | `string` | Yes | | | | No | |
|
|
17
|
+
| `athena_insurance_error` | `string|null` | No | | | | Yes | |
|
|
18
|
+
| `athena_insurance_status` | `string|null` | No | | | | Yes | |
|
|
19
|
+
| `athena_patient_id` | `string|null` | No | | | | Yes | |
|
|
20
|
+
| `created` | `boolean` | Yes | | | | No | |
|
|
21
|
+
| `encounter` | [`patient.Encounter`](./patient.Encounter.md) | Yes | | | | No | |
|
|
22
|
+
| `notes_athena_sections` | `object|null` | No | | | | Yes | |
|
|
23
|
+
| `notes_fhir_error` | `string|null` | No | | | | Yes | |
|
|
24
|
+
| `notes_fhir_status` | `string|null` | No | | | | Yes | |
|
|
25
|
+
| `openloop_appointment_id` | `string|null` | No | | | | Yes | |
|
|
26
|
+
| `openloop_encounter_error` | `string|null` | No | | | | Yes | |
|
|
27
|
+
| `openloop_encounter_id` | `string|null` | No | | | | Yes | |
|
|
28
|
+
| `openloop_encounter_status` | `string` | Yes | | | | No | |
|
|
29
|
+
| `steadymd_consult_guid` | `string|null` | No | | | | Yes | |
|
|
30
|
+
| `steadymd_encounter_error` | `string|null` | No | | | | Yes | |
|
|
31
|
+
| `steadymd_encounter_status` | `string` | Yes | | | | No | |
|
|
32
|
+
| `steadymd_episode_guid` | `string|null` | No | | | | Yes | |
|
|
33
|
+
|
|
34
|
+
## Example
|
|
35
|
+
|
|
36
|
+
None declared in canonical OpenAPI.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# CheckInEncounterResponse
|
|
2
|
+
|
|
3
|
+
Model ID: `CheckInEncounterResponse`
|
|
4
|
+
|
|
5
|
+
Checked-in encounter with metadata for the tenant's active EHR.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `appointment_id` | `string|null` | No | | | | Yes | FHIR Appointment id this encounter fulfills, when linked. |
|
|
14
|
+
| `athena_appointment_id` | `string|null` | No | | | | Yes | Athena Health appointment id this encounter was checked in from, when checked in via Athena. Vendor id — unlike appointment_id it is NOT a FHIR reference. |
|
|
15
|
+
| `athena_encounter_id` | `string|null` | No | | | | Yes | Athena Health encounter id this encounter is linked to, when checked in via Athena. |
|
|
16
|
+
| `athena_patient_id` | `string|null` | No | | | | Yes | Athena patient id used for check-in, for Athena-integrated tenants. |
|
|
17
|
+
| `created_by` | `string` | No | | | `"self"` | No | Person FHIR resource ID of the creating field agent, or 'self' |
|
|
18
|
+
| `created_date` | `string|null` | No | | | | Yes | UTC datetime when the encounter was created |
|
|
19
|
+
| `diagnoses` | array of [`patient.EncounterDiagnosis`](./patient.EncounterDiagnosis.md) | No | | | | No | Diagnoses recorded for this encounter, ranked by rank. |
|
|
20
|
+
| `encounter_class` | [`EncounterClass`](./EncounterClass.md) | No | | | `"AMB"` | No | Encounter class: AMB (ambulatory), EMER (emergency), FLD (field), HH (home health), ACUTE, NONAC, OBSENC, PRENC, SS, or VR (virtual). |
|
|
21
|
+
| `encounter_id` | `string` | No | uuid | | | No | HealthCloud encounter identifier (UUID). |
|
|
22
|
+
| `fhir_id` | `string|null` | No | | | | Yes | FHIR Encounter resource id, when stored. |
|
|
23
|
+
| `hospitalization` | [`patient.EncounterHospitalization`](./patient.EncounterHospitalization.md) | No | | | | Yes | Hospitalization details (admit source, discharge disposition, etc.), for inpatient encounters. |
|
|
24
|
+
| `length_minutes` | `integer|null` | No | | | | Yes | Duration of the encounter in minutes, when known. |
|
|
25
|
+
| `locations` | array of [`patient.EncounterLocation`](./patient.EncounterLocation.md) | No | | | | No | Locations where the encounter takes place, with status and period. |
|
|
26
|
+
| `notes` | `string|null` | No | | | | Yes | Free-text encounter notes, e.g. synced from an external EHR's assessment/SOAP note. |
|
|
27
|
+
| `openloop_appointment_id` | `string|null` | No | | | | Yes | OpenLoop (Healthie) appointment id this encounter was checked in from, when checked in via OpenLoop. Vendor id — unlike appointment_id it is NOT a FHIR reference. |
|
|
28
|
+
| `openloop_encounter_id` | `string|null` | No | | | | Yes | OpenLoop (Healthie) Patient Encounter id this encounter is linked to, when checked in via OpenLoop. |
|
|
29
|
+
| `openloop_encounter_status` | `string|null` | No | | | | Yes | `linked` when the OpenLoop appointment and encounter were linked successfully. |
|
|
30
|
+
| `openloop_patient_id` | `string|null` | No | | | | Yes | OpenLoop patient id used for check-in, for OpenLoop-integrated tenants. |
|
|
31
|
+
| `participants` | array of [`patient.EncounterParticipant`](./patient.EncounterParticipant.md) | No | | | | No | Practitioners participating in the encounter, with their roles. |
|
|
32
|
+
| `patient_id` | `string` | Yes | | | | No | FHIR Patient id who is the subject of the encounter. |
|
|
33
|
+
| `period_end` | `string|null` | No | | | | Yes | When the encounter ended, when recorded. |
|
|
34
|
+
| `period_start` | `string|null` | No | | | | Yes | When the encounter started, when recorded. |
|
|
35
|
+
| `priority_code` | `string|null` | No | | | | Yes | Code for the encounter priority (e.g. routine, urgent, emergent), when coded. |
|
|
36
|
+
| `priority_display` | `string|null` | No | | | | Yes | Display text for the encounter priority, when available. |
|
|
37
|
+
| `reason_code` | `string|null` | No | | | | Yes | SNOMED CT code for the reason for the encounter, when coded. |
|
|
38
|
+
| `reason_display` | `string|null` | No | | | | Yes | Display text for the reason for the encounter, when available. |
|
|
39
|
+
| `service_provider_display` | `string|null` | No | | | | Yes | Display name of the service provider organization, when available. |
|
|
40
|
+
| `service_provider_id` | `string|null` | No | | | | Yes | FHIR Organization id of the service provider, when linked. |
|
|
41
|
+
| `service_type_code` | `string|null` | No | | | | Yes | SNOMED CT code for the service type, when coded. |
|
|
42
|
+
| `service_type_display` | `string|null` | No | | | | Yes | Display text for the service type, when available. |
|
|
43
|
+
| `status` | [`EncounterStatus`](./EncounterStatus.md) | No | | | `"planned"` | No | Encounter status: planned, arrived, triaged, in-progress, onleave, finished, cancelled, entered-in-error, or unknown. |
|
|
44
|
+
| `steadymd_consult_guid` | `string|null` | No | | | | Yes | SteadyMD consult guid this encounter was checked in from, when checked in via SteadyMD. Vendor id — unlike appointment_id it is NOT a FHIR reference. |
|
|
45
|
+
| `steadymd_episode_guid` | `string|null` | No | | | | Yes | SteadyMD episode guid this encounter is linked to, when checked in via SteadyMD. |
|
|
46
|
+
| `type_code` | `string|null` | No | | | | Yes | SNOMED CT code for the encounter type (e.g. office visit, follow-up), when coded. |
|
|
47
|
+
| `type_display` | `string|null` | No | | | | Yes | Display text for the encounter type, when available. |
|
|
48
|
+
|
|
49
|
+
## Example
|
|
50
|
+
|
|
51
|
+
None declared in canonical OpenAPI.
|
|
@@ -11,7 +11,9 @@ Type: `object`
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
13
|
| `administered_date` | `string` | No | | | | No | ISO date or date-time; accepted as an alias for performed_date/performed_datetime (hc/apis/diagnostics/src/app.py::create_rapid_test). |
|
|
14
|
+
| `athena_encounter_id` | `string` | No | | | | No | Athena encounter id to mirror this result onto directly, optional. Overrides the encounter_id -> FHIR Encounter lookup when the caller already knows it. |
|
|
14
15
|
| `device_name` | `string` | No | | | | No | CLIA-waived device make/model, optional. |
|
|
16
|
+
| `encounter_id` | `string` | No | | | | No | FHIR Encounter id this test is associated with, optional. When the tenant has Athena and the patient is linked, this is used to resolve athena_encounter_id (from the Encounter's Athena extension) for the best-effort Athena mirror. Required for the Athena mirror to run unless athena_encounter_id is supplied directly. |
|
|
15
17
|
| `lot_number` | `string` | No | | | | No | Test kit lot number, optional. |
|
|
16
18
|
| `notes` | `string` | No | | | | No | Free-text notes, optional. |
|
|
17
19
|
| `performed_date` | `string` | No | date | | | No | ISO 8601 date the test was performed, optional. |
|
|
@@ -19,6 +21,7 @@ Type: `object`
|
|
|
19
21
|
| `quantitative_unit` | `string` | No | | | | No | Unit of measure for quantitative_value, optional. |
|
|
20
22
|
| `quantitative_value` | `number` | No | | | | No | Numeric result value, for tests that report a quantitative reading. Requires quantitative_unit. |
|
|
21
23
|
| `result` | [`RapidTestResult`](./RapidTestResult.md) | No | | | | No | The qualitative result, optional. |
|
|
24
|
+
| `scan_storage_key` | `string` | No | | | | No | SAFE CDX S3 object key of the captured test-strip image (from diagnostics.getScanUploadUrl), optional. When present and the Athena mirror runs, the image is attached to the Athena lab result document; when absent, the Athena mirror still runs but without an image attachment. |
|
|
22
25
|
| `specimen_type` | [`SpecimenType`](./SpecimenType.md) | No | | | | No | Type of specimen the test was run on. Defaults to nasopharyngeal_swab if omitted. |
|
|
23
26
|
| `type` | [`RapidTestType`](./RapidTestType.md) | No | | | | No | Which rapid test kit was used. Defaults to 'other' if omitted. |
|
|
24
27
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CreateRapidTestResponse
|
|
2
2
|
|
|
3
|
-
Model ID: `
|
|
3
|
+
Model ID: `CreateRapidTestResponse`
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
Response for POST /patients/{patient_id}/diagnostics/rapid-tests.
|
|
6
|
+
Extends RapidTest with the best-effort Athena mirror outcome.
|
|
7
7
|
|
|
8
8
|
Type: `object`
|
|
9
9
|
|
|
@@ -11,7 +11,11 @@ Type: `object`
|
|
|
11
11
|
|
|
12
12
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
13
13
|
|---|---|---:|---|---|---|---:|---|
|
|
14
|
+
| `athena_error` | `string|null` | No | | | | Yes | Reason the Athena mirror failed, only present when athena_status is 'failed'. |
|
|
15
|
+
| `athena_order_id` | `string|null` | No | | | | Yes | The Athena lab order id the result document ties to, only present when athena_status is 'linked'. |
|
|
16
|
+
| `athena_status` | `string|null` | No | | | | Yes | Outcome of mirroring this result to Athena. `linked` means the diagnosis + lab order + lab result document (with image, when scan_storage_key was supplied) were created in Athena. `skipped_no_athena` means the tenant is not Athena-integrated; `skipped_unlinked` means the patient has no athena_patient_id; `skipped_no_encounter` means neither encounter_id nor athena_encounter_id was supplied; `skipped_no_athena_encounter` means the given FHIR Encounter has no linked Athena encounter id. Absent entirely when the request supplied neither encounter_id nor athena_encounter_id. |
|
|
14
17
|
| `collected_by` | `string|null` | No | | | | Yes | Name of the person who collected the specimen, optional. |
|
|
18
|
+
| `derived_from` | `array|null` | No | | | | Yes | FHIR resource IDs this observation is derived from, e.g. ['Media/{id}'] for the captured test-kit image. Per FHIR R4 Observation.derivedFrom. |
|
|
15
19
|
| `device_name` | `string|null` | No | | | | Yes | CLIA-waived device make/model |
|
|
16
20
|
| `encounter_id` | `string|null` | No | | | | Yes | FHIR Encounter ID this test is associated with, optional. |
|
|
17
21
|
| `fhir_id` | `string|null` | No | | | | Yes | FHIR Observation resource ID; set once the record has been persisted. |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# GetAppointmentTelehealthLinkResponse
|
|
2
|
+
|
|
3
|
+
Model ID: `GetAppointmentTelehealthLinkResponse`
|
|
4
|
+
|
|
5
|
+
Join link persisted in the Athena appointment's notes.
|
|
6
|
+
|
|
7
|
+
Type: `object`
|
|
8
|
+
|
|
9
|
+
## Fields
|
|
10
|
+
|
|
11
|
+
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
|
+
|---|---|---:|---|---|---|---:|---|
|
|
13
|
+
| `telehealth_link` | `string` | Yes | | | | No | HealthCloud provider-app URL for this appointment's video visit. |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
None declared in canonical OpenAPI.
|
|
@@ -11,6 +11,7 @@ Type: `object`
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
13
|
| `content_type` | `string` | No | | | `"image/jpeg"` | No | MIME type of the scan image. Defaults to image/jpeg. |
|
|
14
|
+
| `encounter_id` | `string|null` | No | | | | Yes | FHIR Encounter id this scan is associated with, optional. Stored on the pending Observation so the async SAFE CDX result ingestion can mirror the finished result to Athena (when the tenant/patient are Athena-linked) once CVML processing completes. |
|
|
14
15
|
| `filename` | `string` | No | | | `"scan.jpg"` | No | Filename of the uploaded scan. Defaults to scan.jpg. |
|
|
15
16
|
| `gtin` | `string|null` | No | | | | Yes | GTIN of the test kit. Optional for the compatibility upload endpoint; the combined GS1 lookup flow supplies it automatically. |
|
|
16
17
|
| `test_id` | `string` | Yes | uuid | | | No | Health Cloud correlation UUID for the diagnostic scan. |
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SearchDocumentSummariesCypherRequest
|
|
2
2
|
|
|
3
3
|
Model ID: `SearchDocumentSummariesCypherRequest`
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
No description.
|
|
6
6
|
|
|
7
7
|
Type: `object`
|
|
8
8
|
|
|
@@ -10,10 +10,8 @@ Type: `object`
|
|
|
10
10
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
|
-
| `limit` | `integer` | No | | | `
|
|
14
|
-
| `
|
|
15
|
-
| `query` | `string` | Yes | | | | No | Raw Cypher query text to execute against the graph. |
|
|
16
|
-
| `rag` | `boolean` | No | | | `false` | No | When true, runs retrieval-augmented generation via Anthropic |
|
|
13
|
+
| `limit` | `integer` | No | | | `20` | No | |
|
|
14
|
+
| `query` | `string` | Yes | | | | No | Natural-language document graph question |
|
|
17
15
|
|
|
18
16
|
## Example
|
|
19
17
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SearchDocumentSummariesRequest
|
|
2
2
|
|
|
3
3
|
Model ID: `SearchDocumentSummariesRequest`
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
No description.
|
|
6
6
|
|
|
7
7
|
Type: `object`
|
|
8
8
|
|
|
@@ -10,11 +10,11 @@ Type: `object`
|
|
|
10
10
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
|
-
| `doc_type` | `string
|
|
14
|
-
| `limit` | `integer` | No | | | `20` | No |
|
|
15
|
-
| `offset` | `integer` | No | | | `0` | No |
|
|
16
|
-
| `phrase` | `string
|
|
17
|
-
| `rag` | `boolean` | No | | | `false` | No |
|
|
13
|
+
| `doc_type` | `string` | No | | | | No | Document type filter (e.g. policy, procedure, guideline) |
|
|
14
|
+
| `limit` | `integer` | No | | | `20` | No | |
|
|
15
|
+
| `offset` | `integer` | No | | | `0` | No | |
|
|
16
|
+
| `phrase` | `string` | No | | | | No | Search phrase |
|
|
17
|
+
| `rag` | `boolean` | No | | | `false` | No | |
|
|
18
18
|
|
|
19
19
|
## Example
|
|
20
20
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SearchHealthPlansCypherRequest
|
|
2
2
|
|
|
3
3
|
Model ID: `SearchHealthPlansCypherRequest`
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
No description.
|
|
6
6
|
|
|
7
7
|
Type: `object`
|
|
8
8
|
|
|
@@ -10,10 +10,8 @@ Type: `object`
|
|
|
10
10
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
|
-
| `limit` | `integer` | No | | | `
|
|
14
|
-
| `
|
|
15
|
-
| `query` | `string` | Yes | | | | No | Raw Cypher query text to execute against the graph. |
|
|
16
|
-
| `rag` | `boolean` | No | | | `false` | No | When true, runs retrieval-augmented generation via Anthropic |
|
|
13
|
+
| `limit` | `integer` | No | | | `20` | No | |
|
|
14
|
+
| `query` | `string` | Yes | | | | No | Natural-language health-plan graph question |
|
|
17
15
|
|
|
18
16
|
## Example
|
|
19
17
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SearchHealthPlansRequest
|
|
2
2
|
|
|
3
3
|
Model ID: `SearchHealthPlansRequest`
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
No description.
|
|
6
6
|
|
|
7
7
|
Type: `object`
|
|
8
8
|
|
|
@@ -10,12 +10,12 @@ Type: `object`
|
|
|
10
10
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
|
-
| `limit` | `integer` | No | | | `20` | No |
|
|
14
|
-
| `network_id` | `string
|
|
15
|
-
| `offset` | `integer` | No | | | `0` | No |
|
|
16
|
-
| `phrase` | `string
|
|
17
|
-
| `rag` | `boolean` | No | | | `false` | No |
|
|
18
|
-
| `state_code` | `string
|
|
13
|
+
| `limit` | `integer` | No | | | `20` | No | |
|
|
14
|
+
| `network_id` | `string` | No | | | | No | Network or plan ID |
|
|
15
|
+
| `offset` | `integer` | No | | | `0` | No | |
|
|
16
|
+
| `phrase` | `string` | No | | | | No | Search phrase (plan name, payer, coverage type) |
|
|
17
|
+
| `rag` | `boolean` | No | | | `false` | No | |
|
|
18
|
+
| `state_code` | `string` | No | | | | No | US state abbreviation |
|
|
19
19
|
|
|
20
20
|
## Example
|
|
21
21
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SearchMedicalConceptsCypherRequest
|
|
2
2
|
|
|
3
3
|
Model ID: `SearchMedicalConceptsCypherRequest`
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
No description.
|
|
6
6
|
|
|
7
7
|
Type: `object`
|
|
8
8
|
|
|
@@ -10,10 +10,10 @@ Type: `object`
|
|
|
10
10
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
|
-
| `limit` | `integer` | No | | | `50` | No |
|
|
14
|
-
| `params` | `object` | No | | | | No |
|
|
15
|
-
| `query` | `string` | Yes | | | | No |
|
|
16
|
-
| `rag` | `boolean` | No | | | `false` | No |
|
|
13
|
+
| `limit` | `integer` | No | | | `50` | No | |
|
|
14
|
+
| `params` | `object` | No | | | | No | Optional Cypher query parameters |
|
|
15
|
+
| `query` | `string` | Yes | | | | No | Cypher query |
|
|
16
|
+
| `rag` | `boolean` | No | | | `false` | No | |
|
|
17
17
|
|
|
18
18
|
## Example
|
|
19
19
|
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SearchMedicalConceptsRequest
|
|
2
2
|
|
|
3
3
|
Model ID: `SearchMedicalConceptsRequest`
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Facets mirror the Algolia `attributesForFaceting` of the `medical_concepts`
|
|
8
|
-
index (vocabulary, semantic_tag, tty, top_category, active, module_id, plus
|
|
9
|
-
filter-only code/sctid). `id` is not an Algolia facet — filter by
|
|
10
|
-
code/sctid/vocabulary instead.
|
|
5
|
+
No description.
|
|
11
6
|
|
|
12
7
|
Type: `object`
|
|
13
8
|
|
|
@@ -15,18 +10,18 @@ Type: `object`
|
|
|
15
10
|
|
|
16
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
17
12
|
|---|---|---:|---|---|---|---:|---|
|
|
18
|
-
| `active` | `boolean
|
|
19
|
-
| `code` | `string
|
|
20
|
-
| `limit` | `integer` | No | | | `20` | No |
|
|
21
|
-
| `module_id` | `string
|
|
22
|
-
| `offset` | `integer` | No | | | `0` | No |
|
|
23
|
-
| `phrase` | `string
|
|
24
|
-
| `rag` | `boolean` | No | | | `false` | No |
|
|
25
|
-
| `sctid` | `string
|
|
26
|
-
| `semantic_tag` | `string
|
|
27
|
-
| `top_category` | `string
|
|
28
|
-
| `tty` | `string
|
|
29
|
-
| `vocabulary` | `string
|
|
13
|
+
| `active` | `boolean` | No | | | | No | |
|
|
14
|
+
| `code` | `string` | No | | | | No | |
|
|
15
|
+
| `limit` | `integer` | No | | | `20` | No | |
|
|
16
|
+
| `module_id` | `string` | No | | | | No | |
|
|
17
|
+
| `offset` | `integer` | No | | | `0` | No | |
|
|
18
|
+
| `phrase` | `string` | No | | | | No | Free-text query across preferred terms, FSNs, and synonyms |
|
|
19
|
+
| `rag` | `boolean` | No | | | `false` | No | |
|
|
20
|
+
| `sctid` | `string` | No | | | | No | |
|
|
21
|
+
| `semantic_tag` | `string` | No | | | | No | |
|
|
22
|
+
| `top_category` | `string` | No | | | | No | |
|
|
23
|
+
| `tty` | `string` | No | | | | No | |
|
|
24
|
+
| `vocabulary` | `string` | No | | SNOMED, RXNORM, MESH | | No | |
|
|
30
25
|
|
|
31
26
|
## Example
|
|
32
27
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SearchProvidersCypherRequest
|
|
2
2
|
|
|
3
3
|
Model ID: `SearchProvidersCypherRequest`
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
No description.
|
|
6
6
|
|
|
7
7
|
Type: `object`
|
|
8
8
|
|
|
@@ -10,10 +10,8 @@ Type: `object`
|
|
|
10
10
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
|
-
| `limit` | `integer` | No | | | `
|
|
14
|
-
| `
|
|
15
|
-
| `query` | `string` | Yes | | | | No | Raw Cypher query text to execute against the graph. |
|
|
16
|
-
| `rag` | `boolean` | No | | | `false` | No | When true, runs retrieval-augmented generation via Anthropic |
|
|
13
|
+
| `limit` | `integer` | No | | | `20` | No | |
|
|
14
|
+
| `query` | `string` | Yes | | | | No | Natural-language provider graph question |
|
|
17
15
|
|
|
18
16
|
## Example
|
|
19
17
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SearchProvidersRequest
|
|
2
2
|
|
|
3
3
|
Model ID: `SearchProvidersRequest`
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
No description.
|
|
6
6
|
|
|
7
7
|
Type: `object`
|
|
8
8
|
|
|
@@ -10,12 +10,12 @@ Type: `object`
|
|
|
10
10
|
|
|
11
11
|
| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|
|
12
12
|
|---|---|---:|---|---|---|---:|---|
|
|
13
|
-
| `limit` | `integer` | No | | | `20` | No |
|
|
14
|
-
| `offset` | `integer` | No | | | `0` | No |
|
|
15
|
-
| `phrase` | `string
|
|
16
|
-
| `rag` | `boolean` | No | | | `false` | No |
|
|
17
|
-
| `specialty_code` | `string
|
|
18
|
-
| `state_code` | `string
|
|
13
|
+
| `limit` | `integer` | No | | | `20` | No | |
|
|
14
|
+
| `offset` | `integer` | No | | | `0` | No | |
|
|
15
|
+
| `phrase` | `string` | No | | | | No | Search phrase (provider name, specialty, condition) |
|
|
16
|
+
| `rag` | `boolean` | No | | | `false` | No | Enable RAG-augmented semantic search |
|
|
17
|
+
| `specialty_code` | `string` | No | | | | No | Taxonomy or specialty code |
|
|
18
|
+
| `state_code` | `string` | No | | | | No | US state abbreviation (e.g. CA, NY) |
|
|
19
19
|
|
|
20
20
|
## Example
|
|
21
21
|
|