@healthcloudai/hc-sdk 2.7.0 → 2.9.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 +70 -0
- package/dist/index.d.cts +168 -2
- package/dist/index.d.ts +168 -2
- package/dist/index.js +70 -0
- package/docs/clients/PatientClient.md +3 -0
- package/docs/docs-manifest.json +11 -6
- package/docs/examples/index.md +3 -0
- package/docs/index.md +3 -0
- package/docs/models/AddInsuranceRequest.md +1 -0
- package/docs/models/AddInsuranceResponse.md +2 -0
- package/docs/models/Appointment.md +1 -0
- package/docs/models/AthenaAppointment.md +1 -0
- package/docs/models/BookAppointmentRequest.md +1 -0
- package/docs/models/CheckEncounterRequest.md +17 -0
- package/docs/models/CheckInEncounterRequest.md +17 -0
- package/docs/models/GS1LookupResponse.md +3 -2
- package/docs/models/GetEncounterResponse.md +3 -0
- package/docs/models/GetLatestEncounterResponse.md +17 -0
- package/docs/models/GetPatientResponse.md +2 -0
- package/docs/models/GetScanUploadUrlRequest.md +3 -2
- package/docs/models/GetTestResultResponse.md +20 -0
- package/docs/models/PatientDemographics.md +2 -0
- package/docs/models/ScanUploadResponse.md +4 -4
- package/docs/models/SetPreferredPharmacyResponse.md +20 -0
- package/docs/models/Slot.md +1 -0
- package/docs/models/fieldagent.Encounter.md +3 -0
- package/docs/models/index.md +5 -3
- package/docs/models/patient.Encounter.md +3 -0
- package/docs/models/patient.LoginResponse.md +1 -0
- package/docs/operations/appointments.book.md +18 -15
- package/docs/operations/appointments.cancel.md +12 -11
- package/docs/operations/appointments.createSlot.md +44 -9
- package/docs/operations/appointments.listPatientAppointments.md +13 -12
- package/docs/operations/appointments.listSlots.md +9 -8
- package/docs/operations/appointments.reschedule.md +11 -10
- package/docs/operations/connectors.athenaBookAppointment.md +1 -0
- package/docs/operations/connectors.athenaCreateInsurancePackage.md +1 -1
- package/docs/operations/connectors.athenaGetAppointmentDetails.md +1 -0
- package/docs/operations/connectors.athenaGetBookedAppointments.md +1 -0
- package/docs/operations/connectors.athenaGetEncounter.md +1 -0
- package/docs/operations/connectors.athenaListAppointments.md +1 -0
- package/docs/operations/connectors.athenaListPatientAppointments.md +1 -0
- package/docs/operations/diagnostics.getScanUploadUrl.md +7 -5
- package/docs/operations/diagnostics.getTestResult.md +5 -23
- package/docs/operations/diagnostics.lookupTestByGs1.md +12 -6
- package/docs/operations/fieldagent.listEncounters.md +42 -39
- package/docs/operations/fieldagent.listPatients.md +60 -95
- package/docs/operations/patient.addInsurance.md +14 -10
- package/docs/operations/patient.checkEncounter.md +110 -0
- package/docs/operations/patient.checkInEncounter.md +114 -0
- package/docs/operations/patient.createEncounter.md +40 -37
- package/docs/operations/patient.createQuestionnaireResponse.md +1 -1
- package/docs/operations/patient.getCheckinCheckin.md +41 -38
- package/docs/operations/patient.getCurrentCareSessionCareSessionsCurrent.md +43 -40
- package/docs/operations/patient.getEncounter.md +40 -37
- package/docs/operations/patient.getLatestEncounter.md +162 -0
- package/docs/operations/patient.getPatient.md +57 -92
- package/docs/operations/patient.getPatientSidebarPatientSidebar.md +97 -129
- package/docs/operations/patient.listEncounters.md +41 -38
- package/docs/operations/patient.login.md +8 -7
- package/docs/operations/patient.setPreferredPharmacy.md +3 -4
- package/docs/operations/patient.updatePhone.md +42 -1
- package/docs/operations/person.updatePhone.md +42 -1
- package/docs/operations/provider.updatePhone.md +42 -1
- package/package.json +1 -1
- package/docs/models/OrganizationResource.md +0 -19
- package/docs/models/PanelResult.md +0 -24
- package/docs/models/SingleTestResultResponse.md +0 -28
package/dist/index.cjs
CHANGED
|
@@ -325,6 +325,14 @@ var AppointmentsClient = class extends BaseServiceClient {
|
|
|
325
325
|
/**
|
|
326
326
|
* Book an appointment for a specific slot.
|
|
327
327
|
* POST /appointments/book
|
|
328
|
+
*
|
|
329
|
+
* On an Athena-integrated tenant the booking is made in Athena only — no
|
|
330
|
+
* local FHIR Appointment is written — and `athena_appointment_id` is
|
|
331
|
+
* **required**: take it from the `athena_appointment_id` of the chosen
|
|
332
|
+
* {@link listSlots} result, or the request is rejected. `slot_id` is still
|
|
333
|
+
* required by the generic pre-check; for Athena slots the same numeric id
|
|
334
|
+
* serves as both, since Athena reuses one id for a slot before and after
|
|
335
|
+
* booking.
|
|
328
336
|
*/
|
|
329
337
|
book(request) {
|
|
330
338
|
return this.send("POST", "/appointments/book", {
|
|
@@ -1344,11 +1352,73 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
1344
1352
|
pathParams: { id: encounterId }
|
|
1345
1353
|
});
|
|
1346
1354
|
}
|
|
1355
|
+
/**
|
|
1356
|
+
* Open (or resume) the patient's visit right now — "the patient is here."
|
|
1357
|
+
*
|
|
1358
|
+
* Finds or creates their current open FHIR Encounter. On an Athena-integrated
|
|
1359
|
+
* tenant this additionally books a walk-in appointment for the current
|
|
1360
|
+
* moment, attaches the tenant's default self-pay insurance package, and
|
|
1361
|
+
* checks the patient in — all server-side, so no appointment id is needed.
|
|
1362
|
+
* Use {@link checkInEncounter} instead when you already hold one.
|
|
1363
|
+
*
|
|
1364
|
+
* Resolves with HTTP 200 even when the Athena leg failed: inspect
|
|
1365
|
+
* `athena_encounter_status` (and `athena_insurance_status`) rather than
|
|
1366
|
+
* treating a resolved promise as success. The endpoint retries the
|
|
1367
|
+
* book+check-in pair once on its own, because Athena legitimately rejects a
|
|
1368
|
+
* walk-in whose minute falls outside the provider's schedule template.
|
|
1369
|
+
*
|
|
1370
|
+
* Idempotent: an encounter already linked to Athena is returned as-is and is
|
|
1371
|
+
* never re-booked or re-checked-in.
|
|
1372
|
+
*/
|
|
1373
|
+
checkEncounter(request) {
|
|
1374
|
+
return this.send("POST", "/encounters/check", {
|
|
1375
|
+
body: request
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1378
|
+
/**
|
|
1379
|
+
* Check the patient in against an appointment you already have (for example a
|
|
1380
|
+
* future slot booked earlier through `AppointmentsClient.bookAppointment`),
|
|
1381
|
+
* and link the resulting Athena encounter onto the FHIR Encounter.
|
|
1382
|
+
*
|
|
1383
|
+
* Does not create or book an appointment, and does not attach insurance —
|
|
1384
|
+
* use {@link checkEncounter} for the walk-in-now flow.
|
|
1385
|
+
*/
|
|
1386
|
+
checkInEncounter(encounterId, request) {
|
|
1387
|
+
return this.send("POST", "/encounters/{id}/check-in", {
|
|
1388
|
+
pathParams: { id: encounterId },
|
|
1389
|
+
body: request
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
/**
|
|
1393
|
+
* Get the patient's latest still-open encounter, or `{ encounter: null }`
|
|
1394
|
+
* when none is open.
|
|
1395
|
+
*
|
|
1396
|
+
* On an Athena-integrated tenant Athena is authoritative: its encounter list
|
|
1397
|
+
* is read directly and matched back onto the local FHIR Encounter by
|
|
1398
|
+
* `athena_encounter_id`. A tenant-level read failure is surfaced as an error
|
|
1399
|
+
* rather than an empty result, so `{ encounter: null }` genuinely means "no
|
|
1400
|
+
* open encounter".
|
|
1401
|
+
*/
|
|
1402
|
+
getLatestEncounter(patientId) {
|
|
1403
|
+
return this.send("GET", "/patients/{patient_id}/encounters/latest", {
|
|
1404
|
+
pathParams: { patient_id: patientId }
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1347
1407
|
createQuestionnaire(request) {
|
|
1348
1408
|
return this.send("POST", "/questionnaires", {
|
|
1349
1409
|
body: request
|
|
1350
1410
|
});
|
|
1351
1411
|
}
|
|
1412
|
+
/**
|
|
1413
|
+
* Create a FHIR QuestionnaireResponse, and on an Athena-integrated tenant also
|
|
1414
|
+
* append it as a note on the patient's open Athena encounter.
|
|
1415
|
+
*
|
|
1416
|
+
* The FHIR write always happens; the Athena note is additive and non-fatal, so
|
|
1417
|
+
* its outcome is reported on `athena_questionnaire_status` rather than
|
|
1418
|
+
* rejecting the call. `skipped_no_athena_encounter` means no Athena encounter
|
|
1419
|
+
* is open yet — notes attach to one, which only exists after check-in
|
|
1420
|
+
* ({@link checkEncounter}).
|
|
1421
|
+
*/
|
|
1352
1422
|
createQuestionnaireResponse(questionnaireId, request) {
|
|
1353
1423
|
return this.send("POST", "/questionnaires/{id}/responses", {
|
|
1354
1424
|
pathParams: { id: questionnaireId },
|