@healthcloudai/hc-sdk 0.11.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 +59 -35
- package/dist/index.cjs +111 -139
- package/dist/index.d.cts +75 -59
- package/dist/index.d.ts +75 -59
- package/dist/index.js +111 -139
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -681,69 +681,68 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
681
681
|
connect() {
|
|
682
682
|
return this.connectService();
|
|
683
683
|
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
684
|
+
/** POST /patients/phone — self-service; the patient is resolved from the caller's Bearer token. */
|
|
685
|
+
updatePhone(request) {
|
|
686
|
+
return this.send("POST", "/patients/phone", {
|
|
687
687
|
body: request
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
690
|
+
/** POST /patients/verify-sms — self-service; the patient is resolved from the caller's Bearer token. */
|
|
691
|
+
verifySms(request) {
|
|
692
|
+
return this.send("POST", "/patients/verify-sms", {
|
|
693
693
|
body: request
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
696
|
+
/** PUT /patients/address — self-service; the patient is resolved from the caller's Bearer token. */
|
|
697
|
+
updateAddress(request) {
|
|
698
|
+
return this.send("PUT", "/patients/address", {
|
|
699
699
|
body: request
|
|
700
700
|
});
|
|
701
701
|
}
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
702
|
+
/** PUT /patients/race — self-service; the patient is resolved from the caller's Bearer token. */
|
|
703
|
+
updateRace(request) {
|
|
704
|
+
return this.send("PUT", "/patients/race", {
|
|
705
705
|
body: request
|
|
706
706
|
});
|
|
707
707
|
}
|
|
708
708
|
/**
|
|
709
|
-
* Get
|
|
710
|
-
* GET /patients/
|
|
709
|
+
* Get the authenticated patient's complete boolean flags dictionary, e.g. `{ imported_vitals: true }`.
|
|
710
|
+
* GET /patients/flags
|
|
711
|
+
*
|
|
712
|
+
* Self-service: the patient is resolved from the caller's Bearer token —
|
|
713
|
+
* there is no patient id parameter.
|
|
711
714
|
*
|
|
712
|
-
* @param fhirPatientId - The FHIR Patient ID
|
|
713
715
|
* @returns The complete flags dictionary; `{}` if the patient has no flags set.
|
|
714
716
|
*/
|
|
715
|
-
getFlags(
|
|
716
|
-
return this.send("GET", "/patients/
|
|
717
|
-
pathParams: { id: fhirPatientId }
|
|
718
|
-
});
|
|
717
|
+
getFlags() {
|
|
718
|
+
return this.send("GET", "/patients/flags", {});
|
|
719
719
|
}
|
|
720
720
|
/**
|
|
721
|
-
* Partially update
|
|
722
|
-
* PATCH /patients/
|
|
721
|
+
* Partially update the authenticated patient's boolean flags dictionary.
|
|
722
|
+
* PATCH /patients/flags
|
|
723
723
|
*
|
|
724
724
|
* This is a merge, not a replace: only the flag names present in `request`
|
|
725
725
|
* are changed, every other existing flag is left unchanged. Setting the
|
|
726
726
|
* same value again is idempotent. Returns the complete flags dictionary
|
|
727
727
|
* after the merge.
|
|
728
728
|
*
|
|
729
|
-
*
|
|
729
|
+
* Self-service: the patient is resolved from the caller's Bearer token —
|
|
730
|
+
* there is no patient id parameter.
|
|
731
|
+
*
|
|
730
732
|
* @param request - One or more `{ flagName: boolean }` entries to merge in
|
|
731
733
|
*/
|
|
732
|
-
updateFlags(
|
|
733
|
-
return this.send("PATCH", "/patients/
|
|
734
|
-
pathParams: { id: fhirPatientId },
|
|
734
|
+
updateFlags(request) {
|
|
735
|
+
return this.send("PATCH", "/patients/flags", {
|
|
735
736
|
body: request
|
|
736
737
|
});
|
|
737
738
|
}
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
});
|
|
739
|
+
/** GET /patients — self-service; returns the authenticated patient's own FHIR Patient record. */
|
|
740
|
+
getProfile() {
|
|
741
|
+
return this.send("GET", "/patients", {});
|
|
742
742
|
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
});
|
|
743
|
+
/** GET /patients/dashboard — self-service; the patient is resolved from the caller's Bearer token. */
|
|
744
|
+
getDashboard() {
|
|
745
|
+
return this.send("GET", "/patients/dashboard", {});
|
|
747
746
|
}
|
|
748
747
|
getAgentConfiguration() {
|
|
749
748
|
return this.send("GET", "/agentconfiguration", {});
|
|
@@ -765,68 +764,55 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
765
764
|
body: request
|
|
766
765
|
});
|
|
767
766
|
}
|
|
768
|
-
uploadPhoto(
|
|
769
|
-
return this.send("POST", "/patients/
|
|
770
|
-
pathParams: { id: fhirPatientId },
|
|
767
|
+
uploadPhoto(request) {
|
|
768
|
+
return this.send("POST", "/patients/photo", {
|
|
771
769
|
body: request
|
|
772
770
|
});
|
|
773
771
|
}
|
|
774
772
|
/**
|
|
775
|
-
* Get
|
|
776
|
-
* GET /patients/
|
|
773
|
+
* Get the authenticated patient's photo by binary_id, or the stored photo if binary_id is omitted.
|
|
774
|
+
* GET /patients/photo?binary_id=...
|
|
777
775
|
*
|
|
778
|
-
* @param fhirPatientId - The FHIR Patient ID
|
|
779
776
|
* @param query - Optional query parameters; if omitted, fetches the stored/default photo
|
|
780
777
|
*/
|
|
781
|
-
getPhoto(
|
|
782
|
-
return this.send("GET", "/patients/
|
|
783
|
-
pathParams: { id: fhirPatientId },
|
|
778
|
+
getPhoto(query) {
|
|
779
|
+
return this.send("GET", "/patients/photo", {
|
|
784
780
|
query
|
|
785
781
|
});
|
|
786
782
|
}
|
|
787
|
-
getPhotoUploadUrl(
|
|
788
|
-
return this.send("GET", "/patients/
|
|
789
|
-
pathParams: { id: fhirPatientId }
|
|
790
|
-
});
|
|
783
|
+
getPhotoUploadUrl() {
|
|
784
|
+
return this.send("GET", "/patients/photo/upload-url", {});
|
|
791
785
|
}
|
|
792
|
-
compareFaceMatch(
|
|
793
|
-
return this.send("POST", "/patients/
|
|
794
|
-
pathParams: { id: fhirPatientId },
|
|
786
|
+
compareFaceMatch(request) {
|
|
787
|
+
return this.send("POST", "/patients/face-match", {
|
|
795
788
|
body: request
|
|
796
789
|
});
|
|
797
790
|
}
|
|
798
|
-
scanIdentityDocument(
|
|
799
|
-
return this.send("POST", "/patients/
|
|
800
|
-
pathParams: { id: fhirPatientId },
|
|
791
|
+
scanIdentityDocument(request) {
|
|
792
|
+
return this.send("POST", "/patients/identity-document", {
|
|
801
793
|
body: request
|
|
802
794
|
});
|
|
803
795
|
}
|
|
804
|
-
updateDemographics(
|
|
805
|
-
return this.send("PUT", "/patients/
|
|
806
|
-
pathParams: { id: fhirPatientId },
|
|
796
|
+
updateDemographics(request) {
|
|
797
|
+
return this.send("PUT", "/patients/demographics", {
|
|
807
798
|
body: request
|
|
808
799
|
});
|
|
809
800
|
}
|
|
810
|
-
createInsurance(
|
|
811
|
-
return this.send("POST", "/patients/
|
|
812
|
-
pathParams: { id: fhirPatientId },
|
|
801
|
+
createInsurance(request) {
|
|
802
|
+
return this.send("POST", "/patients/insurance", {
|
|
813
803
|
body: request
|
|
814
804
|
});
|
|
815
805
|
}
|
|
816
|
-
listPatientInsurances(
|
|
817
|
-
return this.send("GET", "/patients/
|
|
818
|
-
pathParams: { id: fhirPatientId }
|
|
819
|
-
});
|
|
806
|
+
listPatientInsurances() {
|
|
807
|
+
return this.send("GET", "/patients/insurance", {});
|
|
820
808
|
}
|
|
821
|
-
importHealthRecord(
|
|
822
|
-
return this.send("POST", "/patients/
|
|
823
|
-
pathParams: { id: fhirPatientId },
|
|
809
|
+
importHealthRecord(payload) {
|
|
810
|
+
return this.send("POST", "/patients/health-record/import", {
|
|
824
811
|
body: payload
|
|
825
812
|
});
|
|
826
813
|
}
|
|
827
|
-
importCCDA(
|
|
828
|
-
return this.send("POST", "/patients/
|
|
829
|
-
pathParams: { id: fhirPatientId },
|
|
814
|
+
importCCDA(content) {
|
|
815
|
+
return this.send("POST", "/patients/health-record/import", {
|
|
830
816
|
body: {
|
|
831
817
|
resourceType: "Binary",
|
|
832
818
|
contentType: "text/xml",
|
|
@@ -834,104 +820,90 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
834
820
|
}
|
|
835
821
|
});
|
|
836
822
|
}
|
|
837
|
-
importVitals(
|
|
838
|
-
return this.send("POST", "/patients/
|
|
839
|
-
pathParams: { id: fhirPatientId },
|
|
823
|
+
importVitals(source, payload) {
|
|
824
|
+
return this.send("POST", "/patients/vitals/import", {
|
|
840
825
|
body: { source, payload }
|
|
841
826
|
});
|
|
842
827
|
}
|
|
843
|
-
importActivity(
|
|
844
|
-
return this.send("POST", "/patients/
|
|
845
|
-
pathParams: { id: fhirPatientId },
|
|
828
|
+
importActivity(source, payload) {
|
|
829
|
+
return this.send("POST", "/patients/activity/import", {
|
|
846
830
|
body: { source, payload }
|
|
847
831
|
});
|
|
848
832
|
}
|
|
849
|
-
listActivity(
|
|
850
|
-
return this.send("GET", "/patients/
|
|
851
|
-
pathParams: { id: fhirPatientId },
|
|
833
|
+
listActivity(type) {
|
|
834
|
+
return this.send("GET", "/patients/activity", {
|
|
852
835
|
query: type ? { type } : void 0
|
|
853
836
|
});
|
|
854
837
|
}
|
|
855
|
-
deleteActivity(
|
|
856
|
-
return this.send("DELETE", "/patients/
|
|
857
|
-
pathParams: {
|
|
838
|
+
deleteActivity(activityId) {
|
|
839
|
+
return this.send("DELETE", "/patients/activity/{activity_id}", {
|
|
840
|
+
pathParams: { activity_id: activityId }
|
|
858
841
|
});
|
|
859
842
|
}
|
|
860
|
-
getPreferredPharmacy(
|
|
861
|
-
return this.send("GET", "/patients/
|
|
862
|
-
pathParams: { id: fhirPatientId }
|
|
863
|
-
});
|
|
843
|
+
getPreferredPharmacy() {
|
|
844
|
+
return this.send("GET", "/patients/preferred-pharmacy", {});
|
|
864
845
|
}
|
|
865
|
-
setPreferredPharmacy(
|
|
866
|
-
return this.send("PUT", "/patients/
|
|
867
|
-
pathParams: { id: fhirPatientId },
|
|
846
|
+
setPreferredPharmacy(data) {
|
|
847
|
+
return this.send("PUT", "/patients/preferred-pharmacy", {
|
|
868
848
|
body: data
|
|
869
849
|
});
|
|
870
850
|
}
|
|
871
|
-
listDependents(
|
|
872
|
-
return this.send("GET", "/patients/
|
|
873
|
-
pathParams: { id: fhirPatientId }
|
|
874
|
-
});
|
|
851
|
+
listDependents() {
|
|
852
|
+
return this.send("GET", "/patients/dependents", {});
|
|
875
853
|
}
|
|
876
|
-
saveDependent(
|
|
854
|
+
saveDependent(data, dependentId) {
|
|
877
855
|
if (dependentId) {
|
|
878
|
-
return this.send("PUT", "/patients/
|
|
879
|
-
pathParams: {
|
|
856
|
+
return this.send("PUT", "/patients/dependents/{dependent_id}", {
|
|
857
|
+
pathParams: { dependent_id: dependentId },
|
|
880
858
|
body: data
|
|
881
859
|
});
|
|
882
860
|
}
|
|
883
|
-
return this.send("POST", "/patients/
|
|
884
|
-
pathParams: { id: fhirPatientId },
|
|
861
|
+
return this.send("POST", "/patients/dependents", {
|
|
885
862
|
body: data
|
|
886
863
|
});
|
|
887
864
|
}
|
|
888
|
-
deleteDependent(
|
|
889
|
-
return this.send("DELETE", "/patients/
|
|
890
|
-
pathParams: {
|
|
865
|
+
deleteDependent(dependentId) {
|
|
866
|
+
return this.send("DELETE", "/patients/dependents/{dependent_id}", {
|
|
867
|
+
pathParams: { dependent_id: dependentId }
|
|
891
868
|
});
|
|
892
869
|
}
|
|
893
|
-
listNotifications(
|
|
894
|
-
return this.send("GET", "/patients/
|
|
895
|
-
pathParams: { id: fhirPatientId }
|
|
896
|
-
});
|
|
870
|
+
listNotifications() {
|
|
871
|
+
return this.send("GET", "/patients/notifications", {});
|
|
897
872
|
}
|
|
898
|
-
saveNotification(
|
|
873
|
+
saveNotification(data, notificationId) {
|
|
899
874
|
if (notificationId) {
|
|
900
|
-
return this.send("PUT", "/patients/
|
|
901
|
-
pathParams: {
|
|
875
|
+
return this.send("PUT", "/patients/notifications/{notification_id}", {
|
|
876
|
+
pathParams: { notification_id: notificationId },
|
|
902
877
|
body: data
|
|
903
878
|
});
|
|
904
879
|
}
|
|
905
|
-
return this.send("POST", "/patients/
|
|
906
|
-
pathParams: { id: fhirPatientId },
|
|
880
|
+
return this.send("POST", "/patients/notifications", {
|
|
907
881
|
body: data
|
|
908
882
|
});
|
|
909
883
|
}
|
|
910
|
-
deleteNotification(
|
|
911
|
-
return this.send("DELETE", "/patients/
|
|
912
|
-
pathParams: {
|
|
884
|
+
deleteNotification(notificationId) {
|
|
885
|
+
return this.send("DELETE", "/patients/notifications/{notification_id}", {
|
|
886
|
+
pathParams: { notification_id: notificationId }
|
|
913
887
|
});
|
|
914
888
|
}
|
|
915
|
-
createMedication(
|
|
916
|
-
return this.send("POST", "/patients/
|
|
917
|
-
pathParams: { id: fhirPatientId },
|
|
889
|
+
createMedication(request) {
|
|
890
|
+
return this.send("POST", "/patients/medications", {
|
|
918
891
|
body: request
|
|
919
892
|
});
|
|
920
893
|
}
|
|
921
|
-
listMedications(
|
|
922
|
-
return this.send("GET", "/patients/
|
|
923
|
-
pathParams: { id: fhirPatientId },
|
|
894
|
+
listMedications(query) {
|
|
895
|
+
return this.send("GET", "/patients/medications", {
|
|
924
896
|
query
|
|
925
897
|
});
|
|
926
898
|
}
|
|
927
|
-
getMedication(
|
|
928
|
-
return this.send("GET", "/patients/
|
|
929
|
-
pathParams: {
|
|
899
|
+
getMedication(medicationId) {
|
|
900
|
+
return this.send("GET", "/patients/medications/{med_id}", {
|
|
901
|
+
pathParams: { med_id: medicationId }
|
|
930
902
|
});
|
|
931
903
|
}
|
|
932
|
-
updateMedicationStatus(
|
|
933
|
-
return this.send("PUT", "/patients/
|
|
934
|
-
pathParams: {
|
|
904
|
+
updateMedicationStatus(medicationId, request) {
|
|
905
|
+
return this.send("PUT", "/patients/medications/{med_id}", {
|
|
906
|
+
pathParams: { med_id: medicationId },
|
|
935
907
|
body: request
|
|
936
908
|
});
|
|
937
909
|
}
|
|
@@ -4423,22 +4395,22 @@ var HCSDK_OPERATION_SUMMARY = [
|
|
|
4423
4395
|
{ service: "auth", method: "POST", path: "/auth/register", sdkMethod: "auth.register", summary: "Register patient" },
|
|
4424
4396
|
{ service: "auth", method: "POST", path: "/auth/login", sdkMethod: "auth.login", summary: "Login" },
|
|
4425
4397
|
{ service: "auth", method: "POST", path: "/auth/verify-email", sdkMethod: "auth.verifyEmail", summary: "Verify email OTP" },
|
|
4426
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4427
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4428
|
-
{ service: "patient", method: "PUT", path: "/patients/
|
|
4429
|
-
{ service: "patient", method: "PUT", path: "/patients/
|
|
4430
|
-
{ service: "patient", method: "GET", path: "/patients
|
|
4431
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4432
|
-
{ service: "patient", method: "GET", path: "/patients/
|
|
4433
|
-
{ service: "patient", method: "GET", path: "/patients/
|
|
4434
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4435
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4436
|
-
{ service: "patient", method: "PUT", path: "/patients/
|
|
4437
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4438
|
-
{ service: "patient", method: "POST", path: "/patients/
|
|
4439
|
-
{ service: "patient", method: "GET", path: "/patients/
|
|
4440
|
-
{ service: "patient", method: "GET", path: "/patients/
|
|
4441
|
-
{ service: "patient", method: "PUT", path: "/patients/
|
|
4398
|
+
{ service: "patient", method: "POST", path: "/patients/phone", sdkMethod: "patient.updatePhone", summary: "Update phone + send SMS OTP" },
|
|
4399
|
+
{ service: "patient", method: "POST", path: "/patients/verify-sms", sdkMethod: "patient.verifySms", summary: "Verify SMS OTP" },
|
|
4400
|
+
{ service: "patient", method: "PUT", path: "/patients/address", sdkMethod: "patient.updateAddress", summary: "Update address" },
|
|
4401
|
+
{ service: "patient", method: "PUT", path: "/patients/race", sdkMethod: "patient.updateRace", summary: "Update race" },
|
|
4402
|
+
{ service: "patient", method: "GET", path: "/patients", sdkMethod: "patient.getProfile", summary: "Get patient" },
|
|
4403
|
+
{ service: "patient", method: "POST", path: "/patients/photo", sdkMethod: "patient.uploadPhoto", summary: "Upload photo" },
|
|
4404
|
+
{ service: "patient", method: "GET", path: "/patients/photo", sdkMethod: "patient.getPhoto", summary: "Get photo" },
|
|
4405
|
+
{ service: "patient", method: "GET", path: "/patients/photo/upload-url", sdkMethod: "patient.getPhotoUploadUrl", summary: "Get presigned upload URL" },
|
|
4406
|
+
{ service: "patient", method: "POST", path: "/patients/face-match", sdkMethod: "patient.compareFaceMatch", summary: "Compare selfie to stored photo (Rekognition)" },
|
|
4407
|
+
{ service: "patient", method: "POST", path: "/patients/identity-document", sdkMethod: "patient.scanIdentityDocument", summary: "OCR identity document (Textract AnalyzeID)" },
|
|
4408
|
+
{ service: "patient", method: "PUT", path: "/patients/demographics", sdkMethod: "patient.updateDemographics", summary: "Update demographics (DOB, nationality, etc.)" },
|
|
4409
|
+
{ service: "patient", method: "POST", path: "/patients/insurance", sdkMethod: "patient.createInsurance", summary: "Create insurance coverage" },
|
|
4410
|
+
{ service: "patient", method: "POST", path: "/patients/medications", sdkMethod: "patient.createMedication", summary: "Create medication order" },
|
|
4411
|
+
{ service: "patient", method: "GET", path: "/patients/medications", sdkMethod: "patient.listMedications", summary: "List medications" },
|
|
4412
|
+
{ service: "patient", method: "GET", path: "/patients/medications/{med_id}", sdkMethod: "patient.getMedication", summary: "Get medication" },
|
|
4413
|
+
{ service: "patient", method: "PUT", path: "/patients/medications/{med_id}", sdkMethod: "patient.updateMedicationStatus", summary: "Update medication status" },
|
|
4442
4414
|
{ service: "patient", method: "GET", path: "/locations/nearest", sdkMethod: "patient.listNearestLocations", summary: "Nearest clinics/providers" },
|
|
4443
4415
|
{ service: "patient", method: "POST", path: "/encounters", sdkMethod: "patient.createEncounter", summary: "Create encounter" },
|
|
4444
4416
|
{ service: "patient", method: "GET", path: "/encounters", sdkMethod: "patient.listEncounters", summary: "List encounters" },
|