@healthcloudai/hc-sdk 0.11.0 → 2.0.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/README.md +59 -35
- package/dist/index.cjs +148 -139
- package/dist/index.d.cts +168 -108
- package/dist/index.d.ts +168 -108
- package/dist/index.js +148 -139
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -609,69 +609,68 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
609
609
|
connect() {
|
|
610
610
|
return this.connectService();
|
|
611
611
|
}
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
612
|
+
/** POST /patients/phone — self-service; the patient is resolved from the caller's Bearer token. */
|
|
613
|
+
updatePhone(request) {
|
|
614
|
+
return this.send("POST", "/patients/phone", {
|
|
615
615
|
body: request
|
|
616
616
|
});
|
|
617
617
|
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
618
|
+
/** POST /patients/verify-sms — self-service; the patient is resolved from the caller's Bearer token. */
|
|
619
|
+
verifySms(request) {
|
|
620
|
+
return this.send("POST", "/patients/verify-sms", {
|
|
621
621
|
body: request
|
|
622
622
|
});
|
|
623
623
|
}
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
624
|
+
/** PUT /patients/address — self-service; the patient is resolved from the caller's Bearer token. */
|
|
625
|
+
updateAddress(request) {
|
|
626
|
+
return this.send("PUT", "/patients/address", {
|
|
627
627
|
body: request
|
|
628
628
|
});
|
|
629
629
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
630
|
+
/** PUT /patients/race — self-service; the patient is resolved from the caller's Bearer token. */
|
|
631
|
+
updateRace(request) {
|
|
632
|
+
return this.send("PUT", "/patients/race", {
|
|
633
633
|
body: request
|
|
634
634
|
});
|
|
635
635
|
}
|
|
636
636
|
/**
|
|
637
|
-
* Get
|
|
638
|
-
* GET /patients/
|
|
637
|
+
* Get the authenticated patient's complete boolean flags dictionary, e.g. `{ imported_vitals: true }`.
|
|
638
|
+
* GET /patients/flags
|
|
639
|
+
*
|
|
640
|
+
* Self-service: the patient is resolved from the caller's Bearer token —
|
|
641
|
+
* there is no patient id parameter.
|
|
639
642
|
*
|
|
640
|
-
* @param fhirPatientId - The FHIR Patient ID
|
|
641
643
|
* @returns The complete flags dictionary; `{}` if the patient has no flags set.
|
|
642
644
|
*/
|
|
643
|
-
getFlags(
|
|
644
|
-
return this.send("GET", "/patients/
|
|
645
|
-
pathParams: { id: fhirPatientId }
|
|
646
|
-
});
|
|
645
|
+
getFlags() {
|
|
646
|
+
return this.send("GET", "/patients/flags", {});
|
|
647
647
|
}
|
|
648
648
|
/**
|
|
649
|
-
* Partially update
|
|
650
|
-
* PATCH /patients/
|
|
649
|
+
* Partially update the authenticated patient's boolean flags dictionary.
|
|
650
|
+
* PATCH /patients/flags
|
|
651
651
|
*
|
|
652
652
|
* This is a merge, not a replace: only the flag names present in `request`
|
|
653
653
|
* are changed, every other existing flag is left unchanged. Setting the
|
|
654
654
|
* same value again is idempotent. Returns the complete flags dictionary
|
|
655
655
|
* after the merge.
|
|
656
656
|
*
|
|
657
|
-
*
|
|
657
|
+
* Self-service: the patient is resolved from the caller's Bearer token —
|
|
658
|
+
* there is no patient id parameter.
|
|
659
|
+
*
|
|
658
660
|
* @param request - One or more `{ flagName: boolean }` entries to merge in
|
|
659
661
|
*/
|
|
660
|
-
updateFlags(
|
|
661
|
-
return this.send("PATCH", "/patients/
|
|
662
|
-
pathParams: { id: fhirPatientId },
|
|
662
|
+
updateFlags(request) {
|
|
663
|
+
return this.send("PATCH", "/patients/flags", {
|
|
663
664
|
body: request
|
|
664
665
|
});
|
|
665
666
|
}
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
});
|
|
667
|
+
/** GET /patients — self-service; returns the authenticated patient's own FHIR Patient record. */
|
|
668
|
+
getProfile() {
|
|
669
|
+
return this.send("GET", "/patients", {});
|
|
670
670
|
}
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
});
|
|
671
|
+
/** GET /patients/dashboard — self-service; the patient is resolved from the caller's Bearer token. */
|
|
672
|
+
getDashboard() {
|
|
673
|
+
return this.send("GET", "/patients/dashboard", {});
|
|
675
674
|
}
|
|
676
675
|
getAgentConfiguration() {
|
|
677
676
|
return this.send("GET", "/agentconfiguration", {});
|
|
@@ -693,68 +692,55 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
693
692
|
body: request
|
|
694
693
|
});
|
|
695
694
|
}
|
|
696
|
-
uploadPhoto(
|
|
697
|
-
return this.send("POST", "/patients/
|
|
698
|
-
pathParams: { id: fhirPatientId },
|
|
695
|
+
uploadPhoto(request) {
|
|
696
|
+
return this.send("POST", "/patients/photo", {
|
|
699
697
|
body: request
|
|
700
698
|
});
|
|
701
699
|
}
|
|
702
700
|
/**
|
|
703
|
-
* Get
|
|
704
|
-
* GET /patients/
|
|
701
|
+
* Get the authenticated patient's photo by binary_id, or the stored photo if binary_id is omitted.
|
|
702
|
+
* GET /patients/photo?binary_id=...
|
|
705
703
|
*
|
|
706
|
-
* @param fhirPatientId - The FHIR Patient ID
|
|
707
704
|
* @param query - Optional query parameters; if omitted, fetches the stored/default photo
|
|
708
705
|
*/
|
|
709
|
-
getPhoto(
|
|
710
|
-
return this.send("GET", "/patients/
|
|
711
|
-
pathParams: { id: fhirPatientId },
|
|
706
|
+
getPhoto(query) {
|
|
707
|
+
return this.send("GET", "/patients/photo", {
|
|
712
708
|
query
|
|
713
709
|
});
|
|
714
710
|
}
|
|
715
|
-
getPhotoUploadUrl(
|
|
716
|
-
return this.send("GET", "/patients/
|
|
717
|
-
pathParams: { id: fhirPatientId }
|
|
718
|
-
});
|
|
711
|
+
getPhotoUploadUrl() {
|
|
712
|
+
return this.send("GET", "/patients/photo/upload-url", {});
|
|
719
713
|
}
|
|
720
|
-
compareFaceMatch(
|
|
721
|
-
return this.send("POST", "/patients/
|
|
722
|
-
pathParams: { id: fhirPatientId },
|
|
714
|
+
compareFaceMatch(request) {
|
|
715
|
+
return this.send("POST", "/patients/face-match", {
|
|
723
716
|
body: request
|
|
724
717
|
});
|
|
725
718
|
}
|
|
726
|
-
scanIdentityDocument(
|
|
727
|
-
return this.send("POST", "/patients/
|
|
728
|
-
pathParams: { id: fhirPatientId },
|
|
719
|
+
scanIdentityDocument(request) {
|
|
720
|
+
return this.send("POST", "/patients/identity-document", {
|
|
729
721
|
body: request
|
|
730
722
|
});
|
|
731
723
|
}
|
|
732
|
-
updateDemographics(
|
|
733
|
-
return this.send("PUT", "/patients/
|
|
734
|
-
pathParams: { id: fhirPatientId },
|
|
724
|
+
updateDemographics(request) {
|
|
725
|
+
return this.send("PUT", "/patients/demographics", {
|
|
735
726
|
body: request
|
|
736
727
|
});
|
|
737
728
|
}
|
|
738
|
-
createInsurance(
|
|
739
|
-
return this.send("POST", "/patients/
|
|
740
|
-
pathParams: { id: fhirPatientId },
|
|
729
|
+
createInsurance(request) {
|
|
730
|
+
return this.send("POST", "/patients/insurance", {
|
|
741
731
|
body: request
|
|
742
732
|
});
|
|
743
733
|
}
|
|
744
|
-
listPatientInsurances(
|
|
745
|
-
return this.send("GET", "/patients/
|
|
746
|
-
pathParams: { id: fhirPatientId }
|
|
747
|
-
});
|
|
734
|
+
listPatientInsurances() {
|
|
735
|
+
return this.send("GET", "/patients/insurance", {});
|
|
748
736
|
}
|
|
749
|
-
importHealthRecord(
|
|
750
|
-
return this.send("POST", "/patients/
|
|
751
|
-
pathParams: { id: fhirPatientId },
|
|
737
|
+
importHealthRecord(payload) {
|
|
738
|
+
return this.send("POST", "/patients/health-record/import", {
|
|
752
739
|
body: payload
|
|
753
740
|
});
|
|
754
741
|
}
|
|
755
|
-
importCCDA(
|
|
756
|
-
return this.send("POST", "/patients/
|
|
757
|
-
pathParams: { id: fhirPatientId },
|
|
742
|
+
importCCDA(content) {
|
|
743
|
+
return this.send("POST", "/patients/health-record/import", {
|
|
758
744
|
body: {
|
|
759
745
|
resourceType: "Binary",
|
|
760
746
|
contentType: "text/xml",
|
|
@@ -762,104 +748,90 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
762
748
|
}
|
|
763
749
|
});
|
|
764
750
|
}
|
|
765
|
-
importVitals(
|
|
766
|
-
return this.send("POST", "/patients/
|
|
767
|
-
pathParams: { id: fhirPatientId },
|
|
751
|
+
importVitals(source, payload) {
|
|
752
|
+
return this.send("POST", "/patients/vitals/import", {
|
|
768
753
|
body: { source, payload }
|
|
769
754
|
});
|
|
770
755
|
}
|
|
771
|
-
importActivity(
|
|
772
|
-
return this.send("POST", "/patients/
|
|
773
|
-
pathParams: { id: fhirPatientId },
|
|
756
|
+
importActivity(source, payload) {
|
|
757
|
+
return this.send("POST", "/patients/activity/import", {
|
|
774
758
|
body: { source, payload }
|
|
775
759
|
});
|
|
776
760
|
}
|
|
777
|
-
listActivity(
|
|
778
|
-
return this.send("GET", "/patients/
|
|
779
|
-
pathParams: { id: fhirPatientId },
|
|
761
|
+
listActivity(type) {
|
|
762
|
+
return this.send("GET", "/patients/activity", {
|
|
780
763
|
query: type ? { type } : void 0
|
|
781
764
|
});
|
|
782
765
|
}
|
|
783
|
-
deleteActivity(
|
|
784
|
-
return this.send("DELETE", "/patients/
|
|
785
|
-
pathParams: {
|
|
766
|
+
deleteActivity(activityId) {
|
|
767
|
+
return this.send("DELETE", "/patients/activity/{activity_id}", {
|
|
768
|
+
pathParams: { activity_id: activityId }
|
|
786
769
|
});
|
|
787
770
|
}
|
|
788
|
-
getPreferredPharmacy(
|
|
789
|
-
return this.send("GET", "/patients/
|
|
790
|
-
pathParams: { id: fhirPatientId }
|
|
791
|
-
});
|
|
771
|
+
getPreferredPharmacy() {
|
|
772
|
+
return this.send("GET", "/patients/preferred-pharmacy", {});
|
|
792
773
|
}
|
|
793
|
-
setPreferredPharmacy(
|
|
794
|
-
return this.send("PUT", "/patients/
|
|
795
|
-
pathParams: { id: fhirPatientId },
|
|
774
|
+
setPreferredPharmacy(data) {
|
|
775
|
+
return this.send("PUT", "/patients/preferred-pharmacy", {
|
|
796
776
|
body: data
|
|
797
777
|
});
|
|
798
778
|
}
|
|
799
|
-
listDependents(
|
|
800
|
-
return this.send("GET", "/patients/
|
|
801
|
-
pathParams: { id: fhirPatientId }
|
|
802
|
-
});
|
|
779
|
+
listDependents() {
|
|
780
|
+
return this.send("GET", "/patients/dependents", {});
|
|
803
781
|
}
|
|
804
|
-
saveDependent(
|
|
782
|
+
saveDependent(data, dependentId) {
|
|
805
783
|
if (dependentId) {
|
|
806
|
-
return this.send("PUT", "/patients/
|
|
807
|
-
pathParams: {
|
|
784
|
+
return this.send("PUT", "/patients/dependents/{dependent_id}", {
|
|
785
|
+
pathParams: { dependent_id: dependentId },
|
|
808
786
|
body: data
|
|
809
787
|
});
|
|
810
788
|
}
|
|
811
|
-
return this.send("POST", "/patients/
|
|
812
|
-
pathParams: { id: fhirPatientId },
|
|
789
|
+
return this.send("POST", "/patients/dependents", {
|
|
813
790
|
body: data
|
|
814
791
|
});
|
|
815
792
|
}
|
|
816
|
-
deleteDependent(
|
|
817
|
-
return this.send("DELETE", "/patients/
|
|
818
|
-
pathParams: {
|
|
793
|
+
deleteDependent(dependentId) {
|
|
794
|
+
return this.send("DELETE", "/patients/dependents/{dependent_id}", {
|
|
795
|
+
pathParams: { dependent_id: dependentId }
|
|
819
796
|
});
|
|
820
797
|
}
|
|
821
|
-
listNotifications(
|
|
822
|
-
return this.send("GET", "/patients/
|
|
823
|
-
pathParams: { id: fhirPatientId }
|
|
824
|
-
});
|
|
798
|
+
listNotifications() {
|
|
799
|
+
return this.send("GET", "/patients/notifications", {});
|
|
825
800
|
}
|
|
826
|
-
saveNotification(
|
|
801
|
+
saveNotification(data, notificationId) {
|
|
827
802
|
if (notificationId) {
|
|
828
|
-
return this.send("PUT", "/patients/
|
|
829
|
-
pathParams: {
|
|
803
|
+
return this.send("PUT", "/patients/notifications/{notification_id}", {
|
|
804
|
+
pathParams: { notification_id: notificationId },
|
|
830
805
|
body: data
|
|
831
806
|
});
|
|
832
807
|
}
|
|
833
|
-
return this.send("POST", "/patients/
|
|
834
|
-
pathParams: { id: fhirPatientId },
|
|
808
|
+
return this.send("POST", "/patients/notifications", {
|
|
835
809
|
body: data
|
|
836
810
|
});
|
|
837
811
|
}
|
|
838
|
-
deleteNotification(
|
|
839
|
-
return this.send("DELETE", "/patients/
|
|
840
|
-
pathParams: {
|
|
812
|
+
deleteNotification(notificationId) {
|
|
813
|
+
return this.send("DELETE", "/patients/notifications/{notification_id}", {
|
|
814
|
+
pathParams: { notification_id: notificationId }
|
|
841
815
|
});
|
|
842
816
|
}
|
|
843
|
-
createMedication(
|
|
844
|
-
return this.send("POST", "/patients/
|
|
845
|
-
pathParams: { id: fhirPatientId },
|
|
817
|
+
createMedication(request) {
|
|
818
|
+
return this.send("POST", "/patients/medications", {
|
|
846
819
|
body: request
|
|
847
820
|
});
|
|
848
821
|
}
|
|
849
|
-
listMedications(
|
|
850
|
-
return this.send("GET", "/patients/
|
|
851
|
-
pathParams: { id: fhirPatientId },
|
|
822
|
+
listMedications(query) {
|
|
823
|
+
return this.send("GET", "/patients/medications", {
|
|
852
824
|
query
|
|
853
825
|
});
|
|
854
826
|
}
|
|
855
|
-
getMedication(
|
|
856
|
-
return this.send("GET", "/patients/
|
|
857
|
-
pathParams: {
|
|
827
|
+
getMedication(medicationId) {
|
|
828
|
+
return this.send("GET", "/patients/medications/{med_id}", {
|
|
829
|
+
pathParams: { med_id: medicationId }
|
|
858
830
|
});
|
|
859
831
|
}
|
|
860
|
-
updateMedicationStatus(
|
|
861
|
-
return this.send("PUT", "/patients/
|
|
862
|
-
pathParams: {
|
|
832
|
+
updateMedicationStatus(medicationId, request) {
|
|
833
|
+
return this.send("PUT", "/patients/medications/{med_id}", {
|
|
834
|
+
pathParams: { med_id: medicationId },
|
|
863
835
|
body: request
|
|
864
836
|
});
|
|
865
837
|
}
|
|
@@ -1327,6 +1299,43 @@ var GraphClient = class extends BaseServiceClient {
|
|
|
1327
1299
|
pathParams: { doc_id: docId }
|
|
1328
1300
|
});
|
|
1329
1301
|
}
|
|
1302
|
+
// ─── Diagnostic Tests ────────────────────────────────────────────────
|
|
1303
|
+
searchDiagnosticTests(query) {
|
|
1304
|
+
return this.send("GET", "/diagnostic-tests/search", {
|
|
1305
|
+
query
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
listDiagnosticSpecialties() {
|
|
1309
|
+
return this.send("GET", "/diagnostic-tests/specialties");
|
|
1310
|
+
}
|
|
1311
|
+
getDiagnosticAnalyte(analyteId, query) {
|
|
1312
|
+
return this.send("GET", "/diagnostic-tests/analytes/{analyte_id}", {
|
|
1313
|
+
pathParams: { analyte_id: analyteId },
|
|
1314
|
+
query
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1317
|
+
getDiagnosticTestSystem(testSystemId, query) {
|
|
1318
|
+
return this.send("GET", "/diagnostic-tests/test-systems/{test_system_id}", {
|
|
1319
|
+
pathParams: { test_system_id: testSystemId },
|
|
1320
|
+
query
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
listDiagnosticTests(query) {
|
|
1324
|
+
return this.send("GET", "/diagnostic-tests", {
|
|
1325
|
+
query
|
|
1326
|
+
});
|
|
1327
|
+
}
|
|
1328
|
+
getDiagnosticTest(testId) {
|
|
1329
|
+
return this.send("GET", "/diagnostic-tests/{test_id}", {
|
|
1330
|
+
pathParams: { test_id: testId }
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
listDiagnosticTestRelationships(testId, query) {
|
|
1334
|
+
return this.send("GET", "/diagnostic-tests/{test_id}/relationships", {
|
|
1335
|
+
pathParams: { test_id: testId },
|
|
1336
|
+
query
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1330
1339
|
};
|
|
1331
1340
|
|
|
1332
1341
|
// src/clients/connectors/ConnectorFactory.ts
|
|
@@ -4351,22 +4360,22 @@ var HCSDK_OPERATION_SUMMARY = [
|
|
|
4351
4360
|
{ service: "auth", method: "POST", path: "/auth/register", sdkMethod: "auth.register", summary: "Register patient" },
|
|
4352
4361
|
{ service: "auth", method: "POST", path: "/auth/login", sdkMethod: "auth.login", summary: "Login" },
|
|
4353
4362
|
{ service: "auth", method: "POST", path: "/auth/verify-email", sdkMethod: "auth.verifyEmail", summary: "Verify email OTP" },
|
|
4354
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4355
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4356
|
-
{ service: "patient", method: "PUT", path: "/patients/
|
|
4357
|
-
{ service: "patient", method: "PUT", path: "/patients/
|
|
4358
|
-
{ service: "patient", method: "GET", path: "/patients
|
|
4359
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4360
|
-
{ service: "patient", method: "GET", path: "/patients/
|
|
4361
|
-
{ service: "patient", method: "GET", path: "/patients/
|
|
4362
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4363
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4364
|
-
{ service: "patient", method: "PUT", path: "/patients/
|
|
4365
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4366
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4367
|
-
{ service: "patient", method: "GET", path: "/patients/
|
|
4368
|
-
{ service: "patient", method: "GET", path: "/patients/
|
|
4369
|
-
{ service: "patient", method: "PUT", path: "/patients/
|
|
4363
|
+
{ service: "patient", method: "POST", path: "/patients/phone", sdkMethod: "patient.updatePhone", summary: "Update phone + send SMS OTP" },
|
|
4364
|
+
{ service: "patient", method: "POST", path: "/patients/verify-sms", sdkMethod: "patient.verifySms", summary: "Verify SMS OTP" },
|
|
4365
|
+
{ service: "patient", method: "PUT", path: "/patients/address", sdkMethod: "patient.updateAddress", summary: "Update address" },
|
|
4366
|
+
{ service: "patient", method: "PUT", path: "/patients/race", sdkMethod: "patient.updateRace", summary: "Update race" },
|
|
4367
|
+
{ service: "patient", method: "GET", path: "/patients", sdkMethod: "patient.getProfile", summary: "Get patient" },
|
|
4368
|
+
{ service: "patient", method: "POST", path: "/patients/photo", sdkMethod: "patient.uploadPhoto", summary: "Upload photo" },
|
|
4369
|
+
{ service: "patient", method: "GET", path: "/patients/photo", sdkMethod: "patient.getPhoto", summary: "Get photo" },
|
|
4370
|
+
{ service: "patient", method: "GET", path: "/patients/photo/upload-url", sdkMethod: "patient.getPhotoUploadUrl", summary: "Get presigned upload URL" },
|
|
4371
|
+
{ service: "patient", method: "POST", path: "/patients/face-match", sdkMethod: "patient.compareFaceMatch", summary: "Compare selfie to stored photo (Rekognition)" },
|
|
4372
|
+
{ service: "patient", method: "POST", path: "/patients/identity-document", sdkMethod: "patient.scanIdentityDocument", summary: "OCR identity document (Textract AnalyzeID)" },
|
|
4373
|
+
{ service: "patient", method: "PUT", path: "/patients/demographics", sdkMethod: "patient.updateDemographics", summary: "Update demographics (DOB, nationality, etc.)" },
|
|
4374
|
+
{ service: "patient", method: "POST", path: "/patients/insurance", sdkMethod: "patient.createInsurance", summary: "Create insurance coverage" },
|
|
4375
|
+
{ service: "patient", method: "POST", path: "/patients/medications", sdkMethod: "patient.createMedication", summary: "Create medication order" },
|
|
4376
|
+
{ service: "patient", method: "GET", path: "/patients/medications", sdkMethod: "patient.listMedications", summary: "List medications" },
|
|
4377
|
+
{ service: "patient", method: "GET", path: "/patients/medications/{med_id}", sdkMethod: "patient.getMedication", summary: "Get medication" },
|
|
4378
|
+
{ service: "patient", method: "PUT", path: "/patients/medications/{med_id}", sdkMethod: "patient.updateMedicationStatus", summary: "Update medication status" },
|
|
4370
4379
|
{ service: "patient", method: "GET", path: "/locations/nearest", sdkMethod: "patient.listNearestLocations", summary: "Nearest clinics/providers" },
|
|
4371
4380
|
{ service: "patient", method: "POST", path: "/encounters", sdkMethod: "patient.createEncounter", summary: "Create encounter" },
|
|
4372
4381
|
{ service: "patient", method: "GET", path: "/encounters", sdkMethod: "patient.listEncounters", summary: "List encounters" },
|
package/package.json
CHANGED