@healthcloudai/hc-sdk 3.24.1 → 3.26.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.
Files changed (71) hide show
  1. package/dist/index.cjs +92 -3
  2. package/dist/index.d.cts +2788 -168
  3. package/dist/index.d.ts +2788 -168
  4. package/dist/index.js +92 -3
  5. package/docs/clients/ProviderClient.md +13 -2
  6. package/docs/docs-manifest.json +39 -3
  7. package/docs/examples/index.md +13 -2
  8. package/docs/index.md +13 -2
  9. package/docs/models/CheckInEncounterResponse.md +2 -0
  10. package/docs/models/ClaimEncounterResponse.md +20 -0
  11. package/docs/models/CommunicationConsent.md +24 -0
  12. package/docs/models/Dependent.md +21 -0
  13. package/docs/models/DependentRelationship.md +15 -0
  14. package/docs/models/DiagnosisInput.md +20 -0
  15. package/docs/models/EncounterMedicationInput.md +29 -0
  16. package/docs/models/EncounterMedicationsResponse.md +19 -0
  17. package/docs/models/GetEncounterResponse.md +2 -0
  18. package/docs/models/Icd10Code.md +18 -0
  19. package/docs/models/Icd10SearchResponse.md +19 -0
  20. package/docs/models/LabCatalogItem.md +24 -0
  21. package/docs/models/LabCatalogResponse.md +18 -0
  22. package/docs/models/LabOrder.md +1 -0
  23. package/docs/models/ProviderDriversLicenseSummary.md +19 -0
  24. package/docs/models/ProviderEncounterQueueResponse.md +19 -0
  25. package/docs/models/ProviderEncounterRecord.md +2 -0
  26. package/docs/models/ProviderPatientInsuranceResponse.md +19 -0
  27. package/docs/models/ProviderPatientProfile.md +42 -0
  28. package/docs/models/ProviderPatientProfileResponse.md +21 -0
  29. package/docs/models/ProviderQueueEncounter.md +28 -0
  30. package/docs/models/ProviderQueuePatient.md +21 -0
  31. package/docs/models/SignEncounterResponse.md +18 -0
  32. package/docs/models/TelehealthRequest.md +22 -0
  33. package/docs/models/TelehealthRequestInput.md +17 -0
  34. package/docs/models/TelehealthRequestResponse.md +19 -0
  35. package/docs/models/UpdateEncounterDiagnosesRequest.md +17 -0
  36. package/docs/models/UpdateEncounterDiagnosesResponse.md +17 -0
  37. package/docs/models/UpdateEncounterMedicationsRequest.md +17 -0
  38. package/docs/models/fieldagent.Encounter.md +2 -0
  39. package/docs/models/index.md +25 -0
  40. package/docs/models/patient.Encounter.md +2 -0
  41. package/docs/models/provider.Encounter.md +2 -0
  42. package/docs/operations/fieldagent.listEncounters.md +2 -0
  43. package/docs/operations/patient.checkEncounter.md +64 -64
  44. package/docs/operations/patient.checkInEncounter.md +2 -0
  45. package/docs/operations/patient.createEncounter.md +2 -0
  46. package/docs/operations/patient.getCheckinCheckin.md +2 -0
  47. package/docs/operations/patient.getCurrentCareSessionCareSessionsCurrent.md +2 -0
  48. package/docs/operations/patient.getEncounter.md +2 -0
  49. package/docs/operations/patient.getLatestEncounter.md +2 -0
  50. package/docs/operations/patient.getPatientSidebarPatientSidebar.md +2 -0
  51. package/docs/operations/patient.listEncounters.md +2 -0
  52. package/docs/operations/provider.claimEncounter.md +235 -0
  53. package/docs/operations/provider.getEncounter.md +12 -1
  54. package/docs/operations/provider.getEncounterQueue.md +148 -0
  55. package/docs/operations/provider.getLabOrder.md +21 -25
  56. package/docs/operations/provider.getPatientInsurance.md +134 -0
  57. package/docs/operations/provider.getPatientProfile.md +188 -0
  58. package/docs/operations/provider.getPatientRecord.md +11 -0
  59. package/docs/operations/provider.listEncounterMedications.md +142 -0
  60. package/docs/operations/provider.listEncounters.md +24 -3
  61. package/docs/operations/provider.listLabCatalog.md +215 -0
  62. package/docs/operations/provider.listLabOrders.md +24 -27
  63. package/docs/operations/provider.placeLabOrder.md +26 -28
  64. package/docs/operations/provider.requestTelehealthVisit.md +124 -0
  65. package/docs/operations/provider.searchIcd10.md +128 -0
  66. package/docs/operations/provider.signEncounter.md +233 -0
  67. package/docs/operations/provider.updateEncounterClinicalNote.md +20 -0
  68. package/docs/operations/provider.updateEncounterDiagnoses.md +267 -0
  69. package/docs/operations/provider.updateEncounterMedications.md +186 -0
  70. package/docs/operations/provider.updateEncounterStatus.md +20 -0
  71. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -3820,11 +3820,52 @@ var ProviderClient = class extends BaseServiceClient {
3820
3820
  connect() {
3821
3821
  return this.connectService();
3822
3822
  }
3823
- /** List encounters in the authenticated provider's tenant. */
3823
+ /**
3824
+ * List the caller's OWN encounters (never tenant-wide). Pass `open: true` for the provider's task list: encounters that
3825
+ * are not finished, cancelled or entered in error.
3826
+ */
3824
3827
  listEncounters(filters) {
3825
3828
  return this.send("GET", "/encounters", { query: filters });
3826
3829
  }
3827
- /** Get one encounter with its patient demographic summary. */
3830
+ /**
3831
+ * The queue (GET /encounters/queue): the newest 10 encounters in the tenant that no provider has taken, newest created
3832
+ * first, each with a minimal patient summary. Use the item's `fhir_id` with claimEncounter.
3833
+ */
3834
+ getEncounterQueue() {
3835
+ return this.send("GET", "/encounters/queue", {});
3836
+ }
3837
+ /**
3838
+ * Take an encounter from the queue (POST /encounters/{id}/claim): assigns the caller, starts it (in-progress), adds the
3839
+ * patient to the caller's patient list and notifies the patient. Repeating the call as the same provider changes nothing
3840
+ * (`claimed: false`). Rejects with a 409 when another provider took it first, 403 when the caller's role or account may not
3841
+ * work the queue, and 404 when the encounter does not exist.
3842
+ */
3843
+ claimEncounter(encounterId) {
3844
+ return this.send("POST", "/encounters/{encounter_id}/claim", { pathParams: { encounter_id: encounterId } });
3845
+ }
3846
+ /**
3847
+ * Replace an encounter's diagnoses (PUT /encounters/{id}/diagnoses): add, change or remove. Codes come from
3848
+ * searchIcd10; codes left out of the list are removed, and the display text always comes from the ICD-10 data. Only the
3849
+ * assigned provider (403 otherwise), and not once the encounter is signed (409).
3850
+ */
3851
+ updateEncounterDiagnoses(encounterId, request) {
3852
+ return this.send("PUT", "/encounters/{encounter_id}/diagnoses", {
3853
+ pathParams: { encounter_id: encounterId },
3854
+ body: request
3855
+ });
3856
+ }
3857
+ /**
3858
+ * Sign and complete an encounter (POST /encounters/{id}/sign): finished, end time, signer and time recorded, patient
3859
+ * notified. The encounter is then locked (409 on later edits). Only the assigned provider.
3860
+ */
3861
+ signEncounter(encounterId) {
3862
+ return this.send("POST", "/encounters/{encounter_id}/sign", { pathParams: { encounter_id: encounterId } });
3863
+ }
3864
+ /** Search the ICD-10-CM codes accepted on encounters (GET /icd10). `q` is a code prefix or description words. */
3865
+ searchIcd10(filters) {
3866
+ return this.send("GET", "/icd10", { query: filters });
3867
+ }
3868
+ /** Get one of the caller's own encounters with its patient demographic summary (404 until the caller holds it). */
3828
3869
  getEncounter(encounterId) {
3829
3870
  return this.send("GET", "/encounters/{encounter_id}", { pathParams: { encounter_id: encounterId } });
3830
3871
  }
@@ -3875,7 +3916,10 @@ var ProviderClient = class extends BaseServiceClient {
3875
3916
  placeLabOrder(patientId, request) {
3876
3917
  return this.send("POST", "/patients/{patient_id}/lab-orders", { pathParams: { patient_id: patientId }, body: request });
3877
3918
  }
3878
- /** List a patient's lab orders (GET /patients/{patient_id}/lab-orders), optionally by `status` (submitting, accepted or rejected). */
3919
+ /**
3920
+ * List a patient's lab orders (GET /patients/{patient_id}/lab-orders), optionally by `status` (submitting, accepted or
3921
+ * rejected) and by `encounter_id` (only the orders placed from that encounter).
3922
+ */
3879
3923
  listLabOrders(patientId, filters) {
3880
3924
  return this.send("GET", "/patients/{patient_id}/lab-orders", { pathParams: { patient_id: patientId }, query: filters });
3881
3925
  }
@@ -3887,6 +3931,51 @@ var ProviderClient = class extends BaseServiceClient {
3887
3931
  getLabOrderRequisition(patientId, orderId) {
3888
3932
  return this.send("GET", "/patients/{patient_id}/lab-orders/{order_id}/requisition", { pathParams: { patient_id: patientId, order_id: orderId } });
3889
3933
  }
3934
+ /**
3935
+ * A patient's full profile (GET /patients/{patient_id}/profile): demographics, identifiers, contact details, addresses,
3936
+ * emergency contacts, preferred pharmacy, communication consent, dependents and flags. A driver's license number comes
3937
+ * back as its last four characters. 404 for a patient who is not on the caller's care team and has no encounter with them.
3938
+ */
3939
+ getPatientProfile(patientId) {
3940
+ return this.send("GET", "/patients/{patient_id}/profile", { pathParams: { patient_id: patientId } });
3941
+ }
3942
+ /** A patient's insurance coverages, primary first (GET /patients/{patient_id}/insurance). Same scope as getPatientProfile. */
3943
+ getPatientInsurance(patientId) {
3944
+ return this.send("GET", "/patients/{patient_id}/insurance", { pathParams: { patient_id: patientId } });
3945
+ }
3946
+ /** The medications recorded on an encounter the caller holds (GET /encounters/{id}/medications). */
3947
+ listEncounterMedications(encounterId) {
3948
+ return this.send("GET", "/encounters/{encounter_id}/medications", { pathParams: { encounter_id: encounterId } });
3949
+ }
3950
+ /**
3951
+ * Replace an encounter's medications (PUT /encounters/{id}/medications): add, change or remove up to 25 at once.
3952
+ * Medications left out are removed (kept for audit). Records the plan in the chart; it does not e-prescribe. Only the
3953
+ * assigned provider (403 otherwise), and not once the encounter is signed (409).
3954
+ */
3955
+ updateEncounterMedications(encounterId, request) {
3956
+ return this.send("PUT", "/encounters/{encounter_id}/medications", {
3957
+ pathParams: { encounter_id: encounterId },
3958
+ body: request
3959
+ });
3960
+ }
3961
+ /**
3962
+ * The tests and panels a provider can order (GET /lab-orders/catalog), optionally filtered by `kind` (test or panel)
3963
+ * and `q` (name contains). Use an item's `catalog_item_id` in placeLabOrder.
3964
+ */
3965
+ listLabCatalog(filters) {
3966
+ return this.send("GET", "/lab-orders/catalog", { query: filters });
3967
+ }
3968
+ /**
3969
+ * Ask the patient to schedule a telehealth appointment (POST /encounters/{id}/telehealth-request). Records a proposed
3970
+ * telehealth appointment and sends the patient a generic notice. At most one request per encounter per hour: a repeat
3971
+ * returns the existing request with `created: false`. Only the assigned provider (403), and not once signed (409).
3972
+ */
3973
+ requestTelehealthVisit(encounterId, request) {
3974
+ return this.send("POST", "/encounters/{encounter_id}/telehealth-request", {
3975
+ pathParams: { encounter_id: encounterId },
3976
+ body: request != null ? request : {}
3977
+ });
3978
+ }
3890
3979
  /** Get a patient's consolidated health record (provider tenant scope). */
3891
3980
  getPatientRecord(patientId) {
3892
3981
  return this.send("GET", "/patients/{patient_id}/record", { pathParams: { patient_id: patientId } });