@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.
Files changed (39) hide show
  1. package/dist/index.cjs +42 -2
  2. package/dist/index.d.cts +1394 -236
  3. package/dist/index.d.ts +1394 -236
  4. package/dist/index.js +40 -2
  5. package/docs/configuration.md +1 -0
  6. package/docs/docs-manifest.json +6 -3
  7. package/docs/models/AddInsuranceRequest.md +2 -0
  8. package/docs/models/AddInsuranceResponse.md +2 -0
  9. package/docs/models/CheckEncounterResponse.md +36 -0
  10. package/docs/models/CheckInEncounterResponse.md +51 -0
  11. package/docs/models/CreateRapidTestRequest.md +3 -0
  12. package/docs/models/{RapidTest.md → CreateRapidTestResponse.md} +8 -4
  13. package/docs/models/GetAppointmentTelehealthLinkResponse.md +17 -0
  14. package/docs/models/GetPreferredPharmacyResponse.md +2 -2
  15. package/docs/models/GetScanUploadUrlRequest.md +1 -0
  16. package/docs/models/SearchDocumentSummariesCypherRequest.md +4 -6
  17. package/docs/models/SearchDocumentSummariesRequest.md +7 -7
  18. package/docs/models/SearchHealthPlansCypherRequest.md +4 -6
  19. package/docs/models/SearchHealthPlansRequest.md +8 -8
  20. package/docs/models/SearchMedicalConceptsCypherRequest.md +6 -6
  21. package/docs/models/SearchMedicalConceptsRequest.md +14 -19
  22. package/docs/models/SearchProvidersCypherRequest.md +4 -6
  23. package/docs/models/SearchProvidersRequest.md +8 -8
  24. package/docs/models/VectorSearchDocumentsRequest.md +11 -11
  25. package/docs/models/index.md +13 -10
  26. package/docs/operations/appointments.getTelehealthLink.md +4 -2
  27. package/docs/operations/diagnostics.createRapidTest.md +49 -37
  28. package/docs/operations/diagnostics.getScanUploadUrl.md +3 -1
  29. package/docs/operations/diagnostics.lookupTestByGs1.md +7 -1
  30. package/docs/operations/graph.searchDocumentSummaries.md +9 -0
  31. package/docs/operations/graph.searchHealthPlans.md +9 -0
  32. package/docs/operations/graph.searchMedicalConcepts.md +26 -17
  33. package/docs/operations/graph.searchProviders.md +9 -0
  34. package/docs/operations/graph.vectorSearchDocuments.md +3 -3
  35. package/docs/operations/patient.addInsurance.md +15 -9
  36. package/docs/operations/patient.checkEncounter.md +93 -7
  37. package/docs/operations/patient.checkInEncounter.md +68 -2
  38. package/docs/operations/patient.getPreferredPharmacy.md +13 -1
  39. package/package.json +5 -4
@@ -46,8 +46,8 @@ Request model: [`CheckEncounterRequest`](../models/CheckEncounterRequest.md)
46
46
 
47
47
  ```json
48
48
  {
49
- "notes": "string",
50
- "patient_id": "string"
49
+ "notes": "Synthetic visit note",
50
+ "patient_id": "patient-example-001"
51
51
  }
52
52
  ```
53
53
 
@@ -55,14 +55,100 @@ Request model: [`CheckEncounterRequest`](../models/CheckEncounterRequest.md)
55
55
 
56
56
  | Status | Shape | Content type | Description |
57
57
  |---|---|---|---|
58
- | `200` | `object` | application/json | Current or newly created encounter, with Athena walk-in status |
58
+ | `200` | [`CheckEncounterResponse`](../models/CheckEncounterResponse.md) | application/json | Current or newly created encounter, with Athena walk-in status |
59
59
 
60
60
  ## Success response examples
61
61
 
62
62
  ### 200
63
63
 
64
64
  ```json
65
- {}
65
+ {
66
+ "athena_appointment_id": "athena-appointment-example-001",
67
+ "athena_encounter_error": null,
68
+ "athena_encounter_id": "athena-encounter-example-001",
69
+ "athena_encounter_status": "linked",
70
+ "athena_insurance_error": null,
71
+ "athena_insurance_status": "linked",
72
+ "athena_patient_id": "athena-patient-example-001",
73
+ "created": true,
74
+ "encounter": {
75
+ "appointment_id": "appointment-example-001",
76
+ "athena_appointment_id": null,
77
+ "athena_encounter_id": null,
78
+ "created_by": "self",
79
+ "created_date": "2026-08-10T23:36:57Z",
80
+ "diagnoses": [
81
+ {
82
+ "condition_display": "Acute upper respiratory infection",
83
+ "condition_id": "condition-example-001",
84
+ "rank": 1,
85
+ "use_code": "AD"
86
+ }
87
+ ],
88
+ "encounter_class": "AMB",
89
+ "encounter_id": "167dd34e-1833-4260-a8b1-ea0b38229a1b",
90
+ "fhir_id": "6e0d484f-4f8b-4025-b6ef-abedf69f0f91",
91
+ "hospitalization": {
92
+ "admit_source_code": "physician-referral",
93
+ "destination_id": "location-example-002",
94
+ "discharge_disposition": "home",
95
+ "origin_id": "location-example-001",
96
+ "pre_admission_id": "encounter-example-prior",
97
+ "re_admission_code": "N"
98
+ },
99
+ "length_minutes": 30,
100
+ "locations": [
101
+ {
102
+ "location_display": "Example Clinic, Room 101",
103
+ "location_id": "location-example-001",
104
+ "period_end": "2026-08-10T10:30:00Z",
105
+ "period_start": "2026-08-10T10:00:00Z",
106
+ "status": "completed"
107
+ }
108
+ ],
109
+ "notes": null,
110
+ "openloop_appointment_id": null,
111
+ "openloop_encounter_id": null,
112
+ "participants": [
113
+ {
114
+ "participant_type": "ATND",
115
+ "period_end": "2026-08-10T10:30:00Z",
116
+ "period_start": "2026-08-10T10:00:00Z",
117
+ "practitioner_display": "Dr. Alex Smith",
118
+ "practitioner_id": "provider-example-001"
119
+ }
120
+ ],
121
+ "patient_id": "patient-example-001",
122
+ "period_end": "2026-08-10T10:30:00Z",
123
+ "period_start": "2026-08-10T10:00:00Z",
124
+ "priority_code": "R",
125
+ "priority_display": "Routine",
126
+ "reason_code": "386661006",
127
+ "reason_display": "Fever",
128
+ "service_provider_display": "Example Health Clinic",
129
+ "service_provider_id": "organization-example-001",
130
+ "service_type_code": "124",
131
+ "service_type_display": "General practice",
132
+ "status": "finished",
133
+ "steadymd_consult_guid": null,
134
+ "steadymd_episode_guid": null,
135
+ "type_code": "99213",
136
+ "type_display": "Office outpatient visit"
137
+ },
138
+ "notes_athena_sections": {
139
+ "status": "linked"
140
+ },
141
+ "notes_fhir_error": null,
142
+ "notes_fhir_status": "linked",
143
+ "openloop_appointment_id": null,
144
+ "openloop_encounter_error": null,
145
+ "openloop_encounter_id": null,
146
+ "openloop_encounter_status": "skipped_no_openloop",
147
+ "steadymd_consult_guid": null,
148
+ "steadymd_encounter_error": null,
149
+ "steadymd_encounter_status": "skipped_no_steadymd",
150
+ "steadymd_episode_guid": null
151
+ }
66
152
  ```
67
153
 
68
154
  ## Common errors
@@ -82,8 +168,8 @@ import type { CheckEncounterRequest } from "@healthcloudai/hc-sdk";
82
168
 
83
169
  ```ts
84
170
  const request = {
85
- "notes": "string",
86
- "patient_id": "string"
171
+ "notes": "Synthetic visit note",
172
+ "patient_id": "patient-example-001"
87
173
  };
88
174
 
89
175
  const result = await patient.checkEncounter(request);
@@ -95,7 +181,7 @@ const result = await patient.checkEncounter(request);
95
181
  curl -X POST \
96
182
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
97
183
  -H 'Content-Type: application/json' \
98
- -d '{"notes":"string","patient_id":"string"}' \
184
+ -d '{"notes":"Synthetic visit note","patient_id":"patient-example-001"}' \
99
185
  'https://dev-api-patient.health.cloud/encounters/check'
100
186
  ```
101
187
 
@@ -56,14 +56,80 @@ Request model: [`CheckInEncounterRequest`](../models/CheckInEncounterRequest.md)
56
56
 
57
57
  | Status | Shape | Content type | Description |
58
58
  |---|---|---|---|
59
- | `200` | `object` | application/json | Encounter checked in and linked to the EHR encounter, plus athena_patient_id |
59
+ | `200` | [`CheckInEncounterResponse`](../models/CheckInEncounterResponse.md) | application/json | Encounter checked in and linked to the EHR encounter, plus athena_patient_id |
60
60
 
61
61
  ## Success response examples
62
62
 
63
63
  ### 200
64
64
 
65
65
  ```json
66
- {}
66
+ {
67
+ "appointment_id": "string",
68
+ "athena_appointment_id": "string",
69
+ "athena_encounter_id": "string",
70
+ "athena_patient_id": "string",
71
+ "created_by": "self",
72
+ "created_date": "2026-01-01T09:00:00Z",
73
+ "diagnoses": [
74
+ {
75
+ "condition_display": "string",
76
+ "condition_id": "string",
77
+ "rank": 1,
78
+ "use_code": "CC"
79
+ }
80
+ ],
81
+ "encounter_class": "AMB",
82
+ "encounter_id": "00000000-0000-0000-0000-000000000000",
83
+ "fhir_id": "string",
84
+ "hospitalization": {
85
+ "admit_source_code": "string",
86
+ "destination_id": "string",
87
+ "discharge_disposition": "home",
88
+ "origin_id": "string",
89
+ "pre_admission_id": "string",
90
+ "re_admission_code": "string"
91
+ },
92
+ "length_minutes": 0,
93
+ "locations": [
94
+ {
95
+ "location_display": "string",
96
+ "location_id": "string",
97
+ "period_end": "2026-01-01T09:00:00Z",
98
+ "period_start": "2026-01-01T09:00:00Z",
99
+ "status": "active"
100
+ }
101
+ ],
102
+ "notes": "string",
103
+ "openloop_appointment_id": "string",
104
+ "openloop_encounter_id": "string",
105
+ "openloop_encounter_status": "linked",
106
+ "openloop_patient_id": "string",
107
+ "participants": [
108
+ {
109
+ "participant_type": "PPRF",
110
+ "period_end": "2026-01-01T09:00:00Z",
111
+ "period_start": "2026-01-01T09:00:00Z",
112
+ "practitioner_display": "string",
113
+ "practitioner_id": "string"
114
+ }
115
+ ],
116
+ "patient_id": "string",
117
+ "period_end": "2026-01-01T09:00:00Z",
118
+ "period_start": "2026-01-01T09:00:00Z",
119
+ "priority_code": "string",
120
+ "priority_display": "string",
121
+ "reason_code": "string",
122
+ "reason_display": "string",
123
+ "service_provider_display": "string",
124
+ "service_provider_id": "string",
125
+ "service_type_code": "string",
126
+ "service_type_display": "string",
127
+ "status": "planned",
128
+ "steadymd_consult_guid": "string",
129
+ "steadymd_episode_guid": "string",
130
+ "type_code": "string",
131
+ "type_display": "string"
132
+ }
67
133
  ```
68
134
 
69
135
  ## Common errors
@@ -56,7 +56,19 @@ None declared in canonical OpenAPI.
56
56
 
57
57
  ```json
58
58
  {
59
- "preferred_pharmacy": null
59
+ "active": true,
60
+ "address": [
61
+ {}
62
+ ],
63
+ "id": "string",
64
+ "identifier": [
65
+ {}
66
+ ],
67
+ "name": "string",
68
+ "resourceType": "Organization",
69
+ "telecom": [
70
+ {}
71
+ ]
60
72
  }
61
73
  ```
62
74
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@healthcloudai/hc-sdk",
3
- "version": "3.4.0",
3
+ "version": "3.5.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",
@@ -34,7 +34,7 @@
34
34
  "scripts": {
35
35
  "build": "tsup src/index.ts --format esm,cjs --dts --clean",
36
36
  "dev": "tsup src/index.ts --watch",
37
- "lint": "eslint src --ext .ts",
37
+ "lint": "eslint src",
38
38
  "typecheck": "tsc --noEmit",
39
39
  "test": "vitest run",
40
40
  "test:watch": "vitest",
@@ -53,15 +53,16 @@
53
53
  }
54
54
  },
55
55
  "devDependencies": {
56
+ "@eslint/js": "^10.0.1",
56
57
  "@types/node": "^24.0.0",
57
58
  "@typescript-eslint/eslint-plugin": "^8.70.0",
58
59
  "@typescript-eslint/parser": "^8.70.0",
59
- "eslint": "^8.57.1",
60
+ "eslint": "^10.11.0",
60
61
  "playwright": "^1.63.0",
61
62
  "tsup": "^8.0.0",
62
63
  "tsx": "^4.23.13",
63
64
  "typescript": "^5.3.0",
64
- "vitest": "^5.0.0"
65
+ "vitest": "^5.0.1"
65
66
  },
66
67
  "engines": {
67
68
  "node": ">=18"