@healthcloudai/hc-sdk 0.10.0 → 2.0.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/README.md +76 -32
- package/dist/index.cjs +127 -125
- package/dist/index.d.cts +102 -52
- package/dist/index.d.ts +102 -52
- package/dist/index.js +127 -125
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -609,40 +609,69 @@ 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
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
636
|
+
/**
|
|
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.
|
|
642
|
+
*
|
|
643
|
+
* @returns The complete flags dictionary; `{}` if the patient has no flags set.
|
|
644
|
+
*/
|
|
645
|
+
getFlags() {
|
|
646
|
+
return this.send("GET", "/patients/flags", {});
|
|
640
647
|
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
648
|
+
/**
|
|
649
|
+
* Partially update the authenticated patient's boolean flags dictionary.
|
|
650
|
+
* PATCH /patients/flags
|
|
651
|
+
*
|
|
652
|
+
* This is a merge, not a replace: only the flag names present in `request`
|
|
653
|
+
* are changed, every other existing flag is left unchanged. Setting the
|
|
654
|
+
* same value again is idempotent. Returns the complete flags dictionary
|
|
655
|
+
* after the merge.
|
|
656
|
+
*
|
|
657
|
+
* Self-service: the patient is resolved from the caller's Bearer token —
|
|
658
|
+
* there is no patient id parameter.
|
|
659
|
+
*
|
|
660
|
+
* @param request - One or more `{ flagName: boolean }` entries to merge in
|
|
661
|
+
*/
|
|
662
|
+
updateFlags(request) {
|
|
663
|
+
return this.send("PATCH", "/patients/flags", {
|
|
664
|
+
body: request
|
|
644
665
|
});
|
|
645
666
|
}
|
|
667
|
+
/** GET /patients — self-service; returns the authenticated patient's own FHIR Patient record. */
|
|
668
|
+
getProfile() {
|
|
669
|
+
return this.send("GET", "/patients", {});
|
|
670
|
+
}
|
|
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", {});
|
|
674
|
+
}
|
|
646
675
|
getAgentConfiguration() {
|
|
647
676
|
return this.send("GET", "/agentconfiguration", {});
|
|
648
677
|
}
|
|
@@ -663,68 +692,55 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
663
692
|
body: request
|
|
664
693
|
});
|
|
665
694
|
}
|
|
666
|
-
uploadPhoto(
|
|
667
|
-
return this.send("POST", "/patients/
|
|
668
|
-
pathParams: { id: fhirPatientId },
|
|
695
|
+
uploadPhoto(request) {
|
|
696
|
+
return this.send("POST", "/patients/photo", {
|
|
669
697
|
body: request
|
|
670
698
|
});
|
|
671
699
|
}
|
|
672
700
|
/**
|
|
673
|
-
* Get
|
|
674
|
-
* 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=...
|
|
675
703
|
*
|
|
676
|
-
* @param fhirPatientId - The FHIR Patient ID
|
|
677
704
|
* @param query - Optional query parameters; if omitted, fetches the stored/default photo
|
|
678
705
|
*/
|
|
679
|
-
getPhoto(
|
|
680
|
-
return this.send("GET", "/patients/
|
|
681
|
-
pathParams: { id: fhirPatientId },
|
|
706
|
+
getPhoto(query) {
|
|
707
|
+
return this.send("GET", "/patients/photo", {
|
|
682
708
|
query
|
|
683
709
|
});
|
|
684
710
|
}
|
|
685
|
-
getPhotoUploadUrl(
|
|
686
|
-
return this.send("GET", "/patients/
|
|
687
|
-
pathParams: { id: fhirPatientId }
|
|
688
|
-
});
|
|
711
|
+
getPhotoUploadUrl() {
|
|
712
|
+
return this.send("GET", "/patients/photo/upload-url", {});
|
|
689
713
|
}
|
|
690
|
-
compareFaceMatch(
|
|
691
|
-
return this.send("POST", "/patients/
|
|
692
|
-
pathParams: { id: fhirPatientId },
|
|
714
|
+
compareFaceMatch(request) {
|
|
715
|
+
return this.send("POST", "/patients/face-match", {
|
|
693
716
|
body: request
|
|
694
717
|
});
|
|
695
718
|
}
|
|
696
|
-
scanIdentityDocument(
|
|
697
|
-
return this.send("POST", "/patients/
|
|
698
|
-
pathParams: { id: fhirPatientId },
|
|
719
|
+
scanIdentityDocument(request) {
|
|
720
|
+
return this.send("POST", "/patients/identity-document", {
|
|
699
721
|
body: request
|
|
700
722
|
});
|
|
701
723
|
}
|
|
702
|
-
updateDemographics(
|
|
703
|
-
return this.send("PUT", "/patients/
|
|
704
|
-
pathParams: { id: fhirPatientId },
|
|
724
|
+
updateDemographics(request) {
|
|
725
|
+
return this.send("PUT", "/patients/demographics", {
|
|
705
726
|
body: request
|
|
706
727
|
});
|
|
707
728
|
}
|
|
708
|
-
createInsurance(
|
|
709
|
-
return this.send("POST", "/patients/
|
|
710
|
-
pathParams: { id: fhirPatientId },
|
|
729
|
+
createInsurance(request) {
|
|
730
|
+
return this.send("POST", "/patients/insurance", {
|
|
711
731
|
body: request
|
|
712
732
|
});
|
|
713
733
|
}
|
|
714
|
-
listPatientInsurances(
|
|
715
|
-
return this.send("GET", "/patients/
|
|
716
|
-
pathParams: { id: fhirPatientId }
|
|
717
|
-
});
|
|
734
|
+
listPatientInsurances() {
|
|
735
|
+
return this.send("GET", "/patients/insurance", {});
|
|
718
736
|
}
|
|
719
|
-
importHealthRecord(
|
|
720
|
-
return this.send("POST", "/patients/
|
|
721
|
-
pathParams: { id: fhirPatientId },
|
|
737
|
+
importHealthRecord(payload) {
|
|
738
|
+
return this.send("POST", "/patients/health-record/import", {
|
|
722
739
|
body: payload
|
|
723
740
|
});
|
|
724
741
|
}
|
|
725
|
-
importCCDA(
|
|
726
|
-
return this.send("POST", "/patients/
|
|
727
|
-
pathParams: { id: fhirPatientId },
|
|
742
|
+
importCCDA(content) {
|
|
743
|
+
return this.send("POST", "/patients/health-record/import", {
|
|
728
744
|
body: {
|
|
729
745
|
resourceType: "Binary",
|
|
730
746
|
contentType: "text/xml",
|
|
@@ -732,104 +748,90 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
732
748
|
}
|
|
733
749
|
});
|
|
734
750
|
}
|
|
735
|
-
importVitals(
|
|
736
|
-
return this.send("POST", "/patients/
|
|
737
|
-
pathParams: { id: fhirPatientId },
|
|
751
|
+
importVitals(source, payload) {
|
|
752
|
+
return this.send("POST", "/patients/vitals/import", {
|
|
738
753
|
body: { source, payload }
|
|
739
754
|
});
|
|
740
755
|
}
|
|
741
|
-
importActivity(
|
|
742
|
-
return this.send("POST", "/patients/
|
|
743
|
-
pathParams: { id: fhirPatientId },
|
|
756
|
+
importActivity(source, payload) {
|
|
757
|
+
return this.send("POST", "/patients/activity/import", {
|
|
744
758
|
body: { source, payload }
|
|
745
759
|
});
|
|
746
760
|
}
|
|
747
|
-
listActivity(
|
|
748
|
-
return this.send("GET", "/patients/
|
|
749
|
-
pathParams: { id: fhirPatientId },
|
|
761
|
+
listActivity(type) {
|
|
762
|
+
return this.send("GET", "/patients/activity", {
|
|
750
763
|
query: type ? { type } : void 0
|
|
751
764
|
});
|
|
752
765
|
}
|
|
753
|
-
deleteActivity(
|
|
754
|
-
return this.send("DELETE", "/patients/
|
|
755
|
-
pathParams: {
|
|
766
|
+
deleteActivity(activityId) {
|
|
767
|
+
return this.send("DELETE", "/patients/activity/{activity_id}", {
|
|
768
|
+
pathParams: { activity_id: activityId }
|
|
756
769
|
});
|
|
757
770
|
}
|
|
758
|
-
getPreferredPharmacy(
|
|
759
|
-
return this.send("GET", "/patients/
|
|
760
|
-
pathParams: { id: fhirPatientId }
|
|
761
|
-
});
|
|
771
|
+
getPreferredPharmacy() {
|
|
772
|
+
return this.send("GET", "/patients/preferred-pharmacy", {});
|
|
762
773
|
}
|
|
763
|
-
setPreferredPharmacy(
|
|
764
|
-
return this.send("PUT", "/patients/
|
|
765
|
-
pathParams: { id: fhirPatientId },
|
|
774
|
+
setPreferredPharmacy(data) {
|
|
775
|
+
return this.send("PUT", "/patients/preferred-pharmacy", {
|
|
766
776
|
body: data
|
|
767
777
|
});
|
|
768
778
|
}
|
|
769
|
-
listDependents(
|
|
770
|
-
return this.send("GET", "/patients/
|
|
771
|
-
pathParams: { id: fhirPatientId }
|
|
772
|
-
});
|
|
779
|
+
listDependents() {
|
|
780
|
+
return this.send("GET", "/patients/dependents", {});
|
|
773
781
|
}
|
|
774
|
-
saveDependent(
|
|
782
|
+
saveDependent(data, dependentId) {
|
|
775
783
|
if (dependentId) {
|
|
776
|
-
return this.send("PUT", "/patients/
|
|
777
|
-
pathParams: {
|
|
784
|
+
return this.send("PUT", "/patients/dependents/{dependent_id}", {
|
|
785
|
+
pathParams: { dependent_id: dependentId },
|
|
778
786
|
body: data
|
|
779
787
|
});
|
|
780
788
|
}
|
|
781
|
-
return this.send("POST", "/patients/
|
|
782
|
-
pathParams: { id: fhirPatientId },
|
|
789
|
+
return this.send("POST", "/patients/dependents", {
|
|
783
790
|
body: data
|
|
784
791
|
});
|
|
785
792
|
}
|
|
786
|
-
deleteDependent(
|
|
787
|
-
return this.send("DELETE", "/patients/
|
|
788
|
-
pathParams: {
|
|
793
|
+
deleteDependent(dependentId) {
|
|
794
|
+
return this.send("DELETE", "/patients/dependents/{dependent_id}", {
|
|
795
|
+
pathParams: { dependent_id: dependentId }
|
|
789
796
|
});
|
|
790
797
|
}
|
|
791
|
-
listNotifications(
|
|
792
|
-
return this.send("GET", "/patients/
|
|
793
|
-
pathParams: { id: fhirPatientId }
|
|
794
|
-
});
|
|
798
|
+
listNotifications() {
|
|
799
|
+
return this.send("GET", "/patients/notifications", {});
|
|
795
800
|
}
|
|
796
|
-
saveNotification(
|
|
801
|
+
saveNotification(data, notificationId) {
|
|
797
802
|
if (notificationId) {
|
|
798
|
-
return this.send("PUT", "/patients/
|
|
799
|
-
pathParams: {
|
|
803
|
+
return this.send("PUT", "/patients/notifications/{notification_id}", {
|
|
804
|
+
pathParams: { notification_id: notificationId },
|
|
800
805
|
body: data
|
|
801
806
|
});
|
|
802
807
|
}
|
|
803
|
-
return this.send("POST", "/patients/
|
|
804
|
-
pathParams: { id: fhirPatientId },
|
|
808
|
+
return this.send("POST", "/patients/notifications", {
|
|
805
809
|
body: data
|
|
806
810
|
});
|
|
807
811
|
}
|
|
808
|
-
deleteNotification(
|
|
809
|
-
return this.send("DELETE", "/patients/
|
|
810
|
-
pathParams: {
|
|
812
|
+
deleteNotification(notificationId) {
|
|
813
|
+
return this.send("DELETE", "/patients/notifications/{notification_id}", {
|
|
814
|
+
pathParams: { notification_id: notificationId }
|
|
811
815
|
});
|
|
812
816
|
}
|
|
813
|
-
createMedication(
|
|
814
|
-
return this.send("POST", "/patients/
|
|
815
|
-
pathParams: { id: fhirPatientId },
|
|
817
|
+
createMedication(request) {
|
|
818
|
+
return this.send("POST", "/patients/medications", {
|
|
816
819
|
body: request
|
|
817
820
|
});
|
|
818
821
|
}
|
|
819
|
-
listMedications(
|
|
820
|
-
return this.send("GET", "/patients/
|
|
821
|
-
pathParams: { id: fhirPatientId },
|
|
822
|
+
listMedications(query) {
|
|
823
|
+
return this.send("GET", "/patients/medications", {
|
|
822
824
|
query
|
|
823
825
|
});
|
|
824
826
|
}
|
|
825
|
-
getMedication(
|
|
826
|
-
return this.send("GET", "/patients/
|
|
827
|
-
pathParams: {
|
|
827
|
+
getMedication(medicationId) {
|
|
828
|
+
return this.send("GET", "/patients/medications/{med_id}", {
|
|
829
|
+
pathParams: { med_id: medicationId }
|
|
828
830
|
});
|
|
829
831
|
}
|
|
830
|
-
updateMedicationStatus(
|
|
831
|
-
return this.send("PUT", "/patients/
|
|
832
|
-
pathParams: {
|
|
832
|
+
updateMedicationStatus(medicationId, request) {
|
|
833
|
+
return this.send("PUT", "/patients/medications/{med_id}", {
|
|
834
|
+
pathParams: { med_id: medicationId },
|
|
833
835
|
body: request
|
|
834
836
|
});
|
|
835
837
|
}
|
|
@@ -4321,22 +4323,22 @@ var HCSDK_OPERATION_SUMMARY = [
|
|
|
4321
4323
|
{ service: "auth", method: "POST", path: "/auth/register", sdkMethod: "auth.register", summary: "Register patient" },
|
|
4322
4324
|
{ service: "auth", method: "POST", path: "/auth/login", sdkMethod: "auth.login", summary: "Login" },
|
|
4323
4325
|
{ service: "auth", method: "POST", path: "/auth/verify-email", sdkMethod: "auth.verifyEmail", summary: "Verify email OTP" },
|
|
4324
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4325
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4326
|
-
{ service: "patient", method: "PUT", path: "/patients/
|
|
4327
|
-
{ service: "patient", method: "PUT", path: "/patients/
|
|
4328
|
-
{ service: "patient", method: "GET", path: "/patients
|
|
4329
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4330
|
-
{ service: "patient", method: "GET", path: "/patients/
|
|
4331
|
-
{ service: "patient", method: "GET", path: "/patients/
|
|
4332
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4333
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4334
|
-
{ service: "patient", method: "PUT", path: "/patients/
|
|
4335
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4336
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4337
|
-
{ service: "patient", method: "GET", path: "/patients/
|
|
4338
|
-
{ service: "patient", method: "GET", path: "/patients/
|
|
4339
|
-
{ service: "patient", method: "PUT", path: "/patients/
|
|
4326
|
+
{ service: "patient", method: "POST", path: "/patients/phone", sdkMethod: "patient.updatePhone", summary: "Update phone + send SMS OTP" },
|
|
4327
|
+
{ service: "patient", method: "POST", path: "/patients/verify-sms", sdkMethod: "patient.verifySms", summary: "Verify SMS OTP" },
|
|
4328
|
+
{ service: "patient", method: "PUT", path: "/patients/address", sdkMethod: "patient.updateAddress", summary: "Update address" },
|
|
4329
|
+
{ service: "patient", method: "PUT", path: "/patients/race", sdkMethod: "patient.updateRace", summary: "Update race" },
|
|
4330
|
+
{ service: "patient", method: "GET", path: "/patients", sdkMethod: "patient.getProfile", summary: "Get patient" },
|
|
4331
|
+
{ service: "patient", method: "POST", path: "/patients/photo", sdkMethod: "patient.uploadPhoto", summary: "Upload photo" },
|
|
4332
|
+
{ service: "patient", method: "GET", path: "/patients/photo", sdkMethod: "patient.getPhoto", summary: "Get photo" },
|
|
4333
|
+
{ service: "patient", method: "GET", path: "/patients/photo/upload-url", sdkMethod: "patient.getPhotoUploadUrl", summary: "Get presigned upload URL" },
|
|
4334
|
+
{ service: "patient", method: "POST", path: "/patients/face-match", sdkMethod: "patient.compareFaceMatch", summary: "Compare selfie to stored photo (Rekognition)" },
|
|
4335
|
+
{ service: "patient", method: "POST", path: "/patients/identity-document", sdkMethod: "patient.scanIdentityDocument", summary: "OCR identity document (Textract AnalyzeID)" },
|
|
4336
|
+
{ service: "patient", method: "PUT", path: "/patients/demographics", sdkMethod: "patient.updateDemographics", summary: "Update demographics (DOB, nationality, etc.)" },
|
|
4337
|
+
{ service: "patient", method: "POST", path: "/patients/insurance", sdkMethod: "patient.createInsurance", summary: "Create insurance coverage" },
|
|
4338
|
+
{ service: "patient", method: "POST", path: "/patients/medications", sdkMethod: "patient.createMedication", summary: "Create medication order" },
|
|
4339
|
+
{ service: "patient", method: "GET", path: "/patients/medications", sdkMethod: "patient.listMedications", summary: "List medications" },
|
|
4340
|
+
{ service: "patient", method: "GET", path: "/patients/medications/{med_id}", sdkMethod: "patient.getMedication", summary: "Get medication" },
|
|
4341
|
+
{ service: "patient", method: "PUT", path: "/patients/medications/{med_id}", sdkMethod: "patient.updateMedicationStatus", summary: "Update medication status" },
|
|
4340
4342
|
{ service: "patient", method: "GET", path: "/locations/nearest", sdkMethod: "patient.listNearestLocations", summary: "Nearest clinics/providers" },
|
|
4341
4343
|
{ service: "patient", method: "POST", path: "/encounters", sdkMethod: "patient.createEncounter", summary: "Create encounter" },
|
|
4342
4344
|
{ service: "patient", method: "GET", path: "/encounters", sdkMethod: "patient.listEncounters", summary: "List encounters" },
|
package/package.json
CHANGED