@healthcloudai/hc-sdk 0.8.2 → 0.8.5
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 +103 -54
- package/dist/index.d.cts +171 -40
- package/dist/index.d.ts +171 -40
- package/dist/index.js +103 -54
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -385,6 +385,18 @@ var AuthClient = class extends BaseServiceClient {
|
|
|
385
385
|
auth: false
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
|
+
async resetPassword(request) {
|
|
389
|
+
return this.send("POST", "/auth/reset-password", {
|
|
390
|
+
body: withTenantId(request, this.getTenantId()),
|
|
391
|
+
auth: false
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
async confirmPassword(request) {
|
|
395
|
+
return this.send("POST", "/auth/confirm-reset-password", {
|
|
396
|
+
body: withTenantId(request, this.getTenantId()),
|
|
397
|
+
auth: false
|
|
398
|
+
});
|
|
399
|
+
}
|
|
388
400
|
};
|
|
389
401
|
|
|
390
402
|
// src/clients/DiagnosticsClient.ts
|
|
@@ -482,6 +494,12 @@ var FieldAgentClient = class extends BaseServiceClient {
|
|
|
482
494
|
auth: false
|
|
483
495
|
});
|
|
484
496
|
}
|
|
497
|
+
confirmPassword(request) {
|
|
498
|
+
return this.send("POST", "/auth/confirm-reset-password", {
|
|
499
|
+
body: withTenantId(request, this.getTenantId()),
|
|
500
|
+
auth: false
|
|
501
|
+
});
|
|
502
|
+
}
|
|
485
503
|
async login(request) {
|
|
486
504
|
const response = await this.send("POST", "/auth/login", {
|
|
487
505
|
body: withTenantId(request, this.getTenantId()),
|
|
@@ -576,101 +594,101 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
576
594
|
connect() {
|
|
577
595
|
return this.connectService();
|
|
578
596
|
}
|
|
579
|
-
updatePhone(
|
|
597
|
+
updatePhone(fhirPatientId, request) {
|
|
580
598
|
return this.send("POST", "/patients/{id}/phone", {
|
|
581
|
-
pathParams: { id:
|
|
599
|
+
pathParams: { id: fhirPatientId },
|
|
582
600
|
body: request
|
|
583
601
|
});
|
|
584
602
|
}
|
|
585
|
-
verifySms(
|
|
603
|
+
verifySms(fhirPatientId, request) {
|
|
586
604
|
return this.send("POST", "/patients/{id}/verify-sms", {
|
|
587
|
-
pathParams: { id:
|
|
605
|
+
pathParams: { id: fhirPatientId },
|
|
588
606
|
body: request
|
|
589
607
|
});
|
|
590
608
|
}
|
|
591
|
-
updateAddress(
|
|
609
|
+
updateAddress(fhirPatientId, request) {
|
|
592
610
|
return this.send("PUT", "/patients/{id}/address", {
|
|
593
|
-
pathParams: { id:
|
|
611
|
+
pathParams: { id: fhirPatientId },
|
|
594
612
|
body: request
|
|
595
613
|
});
|
|
596
614
|
}
|
|
597
|
-
updateRace(
|
|
615
|
+
updateRace(fhirPatientId, request) {
|
|
598
616
|
return this.send("PUT", "/patients/{id}/race", {
|
|
599
|
-
pathParams: { id:
|
|
617
|
+
pathParams: { id: fhirPatientId },
|
|
600
618
|
body: request
|
|
601
619
|
});
|
|
602
620
|
}
|
|
603
|
-
getProfile(
|
|
621
|
+
getProfile(fhirPatientId) {
|
|
604
622
|
return this.send("GET", "/patients/{id}", {
|
|
605
|
-
pathParams: { id:
|
|
623
|
+
pathParams: { id: fhirPatientId }
|
|
606
624
|
});
|
|
607
625
|
}
|
|
608
|
-
getDashboard(
|
|
626
|
+
getDashboard(fhirPatientId) {
|
|
609
627
|
return this.send("GET", "/patients/{id}/dashboard", {
|
|
610
|
-
pathParams: { id:
|
|
628
|
+
pathParams: { id: fhirPatientId }
|
|
611
629
|
});
|
|
612
630
|
}
|
|
613
|
-
uploadPhoto(
|
|
631
|
+
uploadPhoto(fhirPatientId, request) {
|
|
614
632
|
return this.send("POST", "/patients/{id}/photo", {
|
|
615
|
-
pathParams: { id:
|
|
633
|
+
pathParams: { id: fhirPatientId },
|
|
616
634
|
body: request
|
|
617
635
|
});
|
|
618
636
|
}
|
|
619
|
-
getPhoto(
|
|
637
|
+
getPhoto(fhirPatientId, query) {
|
|
620
638
|
return this.send("GET", "/patients/{id}/photo", {
|
|
621
|
-
pathParams: { id:
|
|
639
|
+
pathParams: { id: fhirPatientId },
|
|
622
640
|
query
|
|
623
641
|
});
|
|
624
642
|
}
|
|
625
|
-
getPhotoUploadUrl(
|
|
643
|
+
getPhotoUploadUrl(fhirPatientId) {
|
|
626
644
|
return this.send("GET", "/patients/{id}/photo/upload-url", {
|
|
627
|
-
pathParams: { id:
|
|
645
|
+
pathParams: { id: fhirPatientId }
|
|
628
646
|
});
|
|
629
647
|
}
|
|
630
|
-
compareFaceMatch(
|
|
648
|
+
compareFaceMatch(fhirPatientId, request) {
|
|
631
649
|
return this.send("POST", "/patients/{id}/face-match", {
|
|
632
|
-
pathParams: { id:
|
|
650
|
+
pathParams: { id: fhirPatientId },
|
|
633
651
|
body: request
|
|
634
652
|
});
|
|
635
653
|
}
|
|
636
|
-
scanIdentityDocument(
|
|
654
|
+
scanIdentityDocument(fhirPatientId, request) {
|
|
637
655
|
return this.send("POST", "/patients/{id}/identity-document", {
|
|
638
|
-
pathParams: { id:
|
|
656
|
+
pathParams: { id: fhirPatientId },
|
|
639
657
|
body: request
|
|
640
658
|
});
|
|
641
659
|
}
|
|
642
|
-
updateDemographics(
|
|
660
|
+
updateDemographics(fhirPatientId, request) {
|
|
643
661
|
return this.send("PUT", "/patients/{id}/demographics", {
|
|
644
|
-
pathParams: { id:
|
|
662
|
+
pathParams: { id: fhirPatientId },
|
|
645
663
|
body: request
|
|
646
664
|
});
|
|
647
665
|
}
|
|
648
|
-
createInsurance(
|
|
666
|
+
createInsurance(fhirPatientId, request) {
|
|
649
667
|
return this.send("POST", "/patients/{id}/insurance", {
|
|
650
|
-
pathParams: { id:
|
|
668
|
+
pathParams: { id: fhirPatientId },
|
|
651
669
|
body: request
|
|
652
670
|
});
|
|
653
671
|
}
|
|
654
|
-
createMedication(
|
|
672
|
+
createMedication(fhirPatientId, request) {
|
|
655
673
|
return this.send("POST", "/patients/{id}/medications", {
|
|
656
|
-
pathParams: { id:
|
|
674
|
+
pathParams: { id: fhirPatientId },
|
|
657
675
|
body: request
|
|
658
676
|
});
|
|
659
677
|
}
|
|
660
|
-
listMedications(
|
|
678
|
+
listMedications(fhirPatientId, query) {
|
|
661
679
|
return this.send("GET", "/patients/{id}/medications", {
|
|
662
|
-
pathParams: { id:
|
|
680
|
+
pathParams: { id: fhirPatientId },
|
|
663
681
|
query
|
|
664
682
|
});
|
|
665
683
|
}
|
|
666
|
-
getMedication(
|
|
684
|
+
getMedication(fhirPatientId, medicationId) {
|
|
667
685
|
return this.send("GET", "/patients/{id}/medications/{med_id}", {
|
|
668
|
-
pathParams: { id:
|
|
686
|
+
pathParams: { id: fhirPatientId, med_id: medicationId }
|
|
669
687
|
});
|
|
670
688
|
}
|
|
671
|
-
updateMedicationStatus(
|
|
689
|
+
updateMedicationStatus(fhirPatientId, medicationId, request) {
|
|
672
690
|
return this.send("PUT", "/patients/{id}/medications/{med_id}", {
|
|
673
|
-
pathParams: { id:
|
|
691
|
+
pathParams: { id: fhirPatientId, med_id: medicationId },
|
|
674
692
|
body: request
|
|
675
693
|
});
|
|
676
694
|
}
|
|
@@ -850,23 +868,45 @@ var PersonClient = class extends BaseServiceClient {
|
|
|
850
868
|
auth: false
|
|
851
869
|
});
|
|
852
870
|
}
|
|
871
|
+
/**
|
|
872
|
+
* Confirm password reset with code.
|
|
873
|
+
* POST /auth/confirm-reset-password (public)
|
|
874
|
+
*/
|
|
875
|
+
confirmPassword(request) {
|
|
876
|
+
return this.send("POST", "/auth/confirm-reset-password", {
|
|
877
|
+
body: request,
|
|
878
|
+
auth: false
|
|
879
|
+
});
|
|
880
|
+
}
|
|
853
881
|
// ─── Person CRUD (authenticated) ─────────────────────────────────────
|
|
882
|
+
updatePhone(fhirPersonId, request) {
|
|
883
|
+
return this.send("POST", "/persons/{person_id}/phone", {
|
|
884
|
+
pathParams: { person_id: fhirPersonId },
|
|
885
|
+
body: request
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
verifySms(fhirPersonId, request) {
|
|
889
|
+
return this.send("POST", "/persons/{person_id}/verify-sms", {
|
|
890
|
+
pathParams: { person_id: fhirPersonId },
|
|
891
|
+
body: request
|
|
892
|
+
});
|
|
893
|
+
}
|
|
854
894
|
/**
|
|
855
895
|
* Get a person by ID.
|
|
856
896
|
* GET /persons/{person_id}
|
|
857
897
|
*/
|
|
858
|
-
get(
|
|
898
|
+
get(fhirPersonId) {
|
|
859
899
|
return this.send("GET", "/persons/{person_id}", {
|
|
860
|
-
pathParams: { person_id:
|
|
900
|
+
pathParams: { person_id: fhirPersonId }
|
|
861
901
|
});
|
|
862
902
|
}
|
|
863
903
|
/**
|
|
864
904
|
* Update a person's fields.
|
|
865
905
|
* PATCH /persons/{person_id}
|
|
866
906
|
*/
|
|
867
|
-
update(
|
|
907
|
+
update(fhirPersonId, request) {
|
|
868
908
|
return this.send("PATCH", "/persons/{person_id}", {
|
|
869
|
-
pathParams: { person_id:
|
|
909
|
+
pathParams: { person_id: fhirPersonId },
|
|
870
910
|
body: request
|
|
871
911
|
});
|
|
872
912
|
}
|
|
@@ -875,18 +915,18 @@ var PersonClient = class extends BaseServiceClient {
|
|
|
875
915
|
* Get a presigned upload URL for a person's photo.
|
|
876
916
|
* GET /persons/{person_id}/photo/upload-url
|
|
877
917
|
*/
|
|
878
|
-
getPhotoUploadUrl(
|
|
918
|
+
getPhotoUploadUrl(fhirPersonId) {
|
|
879
919
|
return this.send("GET", "/persons/{person_id}/photo/upload-url", {
|
|
880
|
-
pathParams: { person_id:
|
|
920
|
+
pathParams: { person_id: fhirPersonId }
|
|
881
921
|
});
|
|
882
922
|
}
|
|
883
923
|
/**
|
|
884
924
|
* Upload a person's photo (base64).
|
|
885
925
|
* POST /persons/{person_id}/photo
|
|
886
926
|
*/
|
|
887
|
-
uploadPhoto(
|
|
927
|
+
uploadPhoto(fhirPersonId, request) {
|
|
888
928
|
return this.send("POST", "/persons/{person_id}/photo", {
|
|
889
|
-
pathParams: { person_id:
|
|
929
|
+
pathParams: { person_id: fhirPersonId },
|
|
890
930
|
body: request
|
|
891
931
|
});
|
|
892
932
|
}
|
|
@@ -894,9 +934,9 @@ var PersonClient = class extends BaseServiceClient {
|
|
|
894
934
|
* Get a person's photo by binary_id.
|
|
895
935
|
* GET /persons/{person_id}/photo?binary_id=...
|
|
896
936
|
*/
|
|
897
|
-
getPhoto(
|
|
937
|
+
getPhoto(fhirPersonId, query) {
|
|
898
938
|
return this.send("GET", "/persons/{person_id}/photo", {
|
|
899
|
-
pathParams: { person_id:
|
|
939
|
+
pathParams: { person_id: fhirPersonId },
|
|
900
940
|
query
|
|
901
941
|
});
|
|
902
942
|
}
|
|
@@ -923,22 +963,31 @@ var ProviderClient = class extends BaseServiceClient {
|
|
|
923
963
|
resetPassword(request) {
|
|
924
964
|
return this.send("POST", "/auth/reset-password", { body: request, auth: false });
|
|
925
965
|
}
|
|
966
|
+
confirmPassword(request) {
|
|
967
|
+
return this.send("POST", "/auth/confirm-reset-password", { body: request, auth: false });
|
|
968
|
+
}
|
|
926
969
|
// ─── Practitioner CRUD ─────────────────────────────────────────────
|
|
927
|
-
|
|
928
|
-
return this.send("
|
|
970
|
+
updatePhone(fhirPractitionerId, request) {
|
|
971
|
+
return this.send("POST", "/practitioners/{practitioner_id}/phone", { pathParams: { practitioner_id: fhirPractitionerId }, body: request });
|
|
972
|
+
}
|
|
973
|
+
verifySms(fhirPractitionerId, request) {
|
|
974
|
+
return this.send("POST", "/practitioners/{practitioner_id}/verify-sms", { pathParams: { practitioner_id: fhirPractitionerId }, body: request });
|
|
975
|
+
}
|
|
976
|
+
get(fhirPractitionerId) {
|
|
977
|
+
return this.send("GET", "/practitioners/{practitioner_id}", { pathParams: { practitioner_id: fhirPractitionerId } });
|
|
929
978
|
}
|
|
930
|
-
update(
|
|
931
|
-
return this.send("PATCH", "/practitioners/{practitioner_id}", { pathParams: { practitioner_id:
|
|
979
|
+
update(fhirPractitionerId, request) {
|
|
980
|
+
return this.send("PATCH", "/practitioners/{practitioner_id}", { pathParams: { practitioner_id: fhirPractitionerId }, body: request });
|
|
932
981
|
}
|
|
933
982
|
// ─── Photo ─────────────────────────────────────────────────────────
|
|
934
|
-
getPhotoUploadUrl(
|
|
935
|
-
return this.send("GET", "/practitioners/{practitioner_id}/photo/upload-url", { pathParams: { practitioner_id:
|
|
983
|
+
getPhotoUploadUrl(fhirPractitionerId) {
|
|
984
|
+
return this.send("GET", "/practitioners/{practitioner_id}/photo/upload-url", { pathParams: { practitioner_id: fhirPractitionerId } });
|
|
936
985
|
}
|
|
937
|
-
uploadPhoto(
|
|
938
|
-
return this.send("POST", "/practitioners/{practitioner_id}/photo", { pathParams: { practitioner_id:
|
|
986
|
+
uploadPhoto(fhirPractitionerId, request) {
|
|
987
|
+
return this.send("POST", "/practitioners/{practitioner_id}/photo", { pathParams: { practitioner_id: fhirPractitionerId }, body: request });
|
|
939
988
|
}
|
|
940
|
-
getPhoto(
|
|
941
|
-
return this.send("GET", "/practitioners/{practitioner_id}/photo", { pathParams: { practitioner_id:
|
|
989
|
+
getPhoto(fhirPractitionerId, query) {
|
|
990
|
+
return this.send("GET", "/practitioners/{practitioner_id}/photo", { pathParams: { practitioner_id: fhirPractitionerId }, query });
|
|
942
991
|
}
|
|
943
992
|
};
|
|
944
993
|
|