@integraciones_doc24/sdk 1.16.14 → 1.16.15
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 +3 -0
- package/lib/schemas.d.ts +276 -0
- package/lib/schemas.js +48 -0
- package/lib/types.d.ts +2 -0
- package/lib/userSdk/videoVisit.d.ts +54 -0
- package/lib/userSdk/videoVisit.js +71 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -179,6 +179,9 @@ export type UserSdk = {
|
|
|
179
179
|
cancelVideoVisit: (vcToken: string) => Promise<void>;
|
|
180
180
|
getVideoVisit: (vcToken: string, patientId: number) => Promise<VideoVisit>;
|
|
181
181
|
getVideoVisitDetails: (vcId: number) => Promise<VideoVisitDetails>;
|
|
182
|
+
getCompleteVideoVisitDetails: (
|
|
183
|
+
vcId: number,
|
|
184
|
+
) => Promise<CompleteVideoVisitDetails>;
|
|
182
185
|
getVideoVisitLink: (
|
|
183
186
|
vcToken: string,
|
|
184
187
|
patientId: number,
|
package/lib/schemas.d.ts
CHANGED
|
@@ -860,6 +860,282 @@ export declare const doc24Schemas: {
|
|
|
860
860
|
url: string;
|
|
861
861
|
}[];
|
|
862
862
|
}>;
|
|
863
|
+
completeVideoVisitDetails: import("zod").ZodObject<{
|
|
864
|
+
id: import("zod").ZodNumber;
|
|
865
|
+
status: import("zod").ZodString;
|
|
866
|
+
paymentStatus: import("zod").ZodString;
|
|
867
|
+
professional: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
868
|
+
id: import("zod").ZodNumber;
|
|
869
|
+
fullName: import("zod").ZodString;
|
|
870
|
+
specialtyId: import("zod").ZodNumber;
|
|
871
|
+
specialty: import("zod").ZodString;
|
|
872
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
873
|
+
id: number;
|
|
874
|
+
fullName: string;
|
|
875
|
+
specialtyId: number;
|
|
876
|
+
specialty: string;
|
|
877
|
+
}, {
|
|
878
|
+
id: number;
|
|
879
|
+
fullName: string;
|
|
880
|
+
specialtyId: number;
|
|
881
|
+
specialty: string;
|
|
882
|
+
}>>;
|
|
883
|
+
finishDate: import("zod").ZodNullable<import("zod").ZodDate>;
|
|
884
|
+
retries: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
885
|
+
language: import("zod").ZodString;
|
|
886
|
+
report: import("zod").ZodObject<{
|
|
887
|
+
motive: import("zod").ZodNullable<import("zod").ZodString>;
|
|
888
|
+
actualDesease: import("zod").ZodNullable<import("zod").ZodString>;
|
|
889
|
+
indications: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
890
|
+
alertSigns: import("zod").ZodNullable<import("zod").ZodString>;
|
|
891
|
+
extendedMotive: import("zod").ZodNullable<import("zod").ZodString>;
|
|
892
|
+
diagnose: import("zod").ZodArray<import("zod").ZodObject<{
|
|
893
|
+
description: import("zod").ZodString;
|
|
894
|
+
code: import("zod").ZodString;
|
|
895
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
896
|
+
code: string;
|
|
897
|
+
description: string;
|
|
898
|
+
}, {
|
|
899
|
+
code: string;
|
|
900
|
+
description: string;
|
|
901
|
+
}>, "many">;
|
|
902
|
+
medication: import("zod").ZodArray<import("zod").ZodObject<{
|
|
903
|
+
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
904
|
+
quantity: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
905
|
+
dose: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
906
|
+
farmalinkId: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
907
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
908
|
+
description?: string | null | undefined;
|
|
909
|
+
quantity?: number | null | undefined;
|
|
910
|
+
dose?: string | null | undefined;
|
|
911
|
+
farmalinkId?: number | null | undefined;
|
|
912
|
+
}, {
|
|
913
|
+
description?: string | null | undefined;
|
|
914
|
+
quantity?: number | null | undefined;
|
|
915
|
+
dose?: string | null | undefined;
|
|
916
|
+
farmalinkId?: number | null | undefined;
|
|
917
|
+
}>, "many">;
|
|
918
|
+
prescription: import("zod").ZodObject<{
|
|
919
|
+
link: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
920
|
+
codigo: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
921
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
922
|
+
link?: string | null | undefined;
|
|
923
|
+
codigo?: number | null | undefined;
|
|
924
|
+
}, {
|
|
925
|
+
link?: string | null | undefined;
|
|
926
|
+
codigo?: number | null | undefined;
|
|
927
|
+
}>;
|
|
928
|
+
inPersonRequired: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
929
|
+
referral: import("zod").ZodObject<{
|
|
930
|
+
status: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
931
|
+
specialtyId: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
932
|
+
inPersonRequired: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
933
|
+
comments: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
934
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
935
|
+
specialtyId?: number | null | undefined;
|
|
936
|
+
status?: string | null | undefined;
|
|
937
|
+
inPersonRequired?: string | null | undefined;
|
|
938
|
+
comments?: string | null | undefined;
|
|
939
|
+
}, {
|
|
940
|
+
specialtyId?: number | null | undefined;
|
|
941
|
+
status?: string | null | undefined;
|
|
942
|
+
inPersonRequired?: string | null | undefined;
|
|
943
|
+
comments?: string | null | undefined;
|
|
944
|
+
}>;
|
|
945
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
946
|
+
indications?: string | null | undefined;
|
|
947
|
+
inPersonRequired?: string | null | undefined;
|
|
948
|
+
motive: string | null;
|
|
949
|
+
actualDesease: string | null;
|
|
950
|
+
alertSigns: string | null;
|
|
951
|
+
extendedMotive: string | null;
|
|
952
|
+
diagnose: {
|
|
953
|
+
code: string;
|
|
954
|
+
description: string;
|
|
955
|
+
}[];
|
|
956
|
+
medication: {
|
|
957
|
+
description?: string | null | undefined;
|
|
958
|
+
quantity?: number | null | undefined;
|
|
959
|
+
dose?: string | null | undefined;
|
|
960
|
+
farmalinkId?: number | null | undefined;
|
|
961
|
+
}[];
|
|
962
|
+
prescription: {
|
|
963
|
+
link?: string | null | undefined;
|
|
964
|
+
codigo?: number | null | undefined;
|
|
965
|
+
};
|
|
966
|
+
referral: {
|
|
967
|
+
specialtyId?: number | null | undefined;
|
|
968
|
+
status?: string | null | undefined;
|
|
969
|
+
inPersonRequired?: string | null | undefined;
|
|
970
|
+
comments?: string | null | undefined;
|
|
971
|
+
};
|
|
972
|
+
}, {
|
|
973
|
+
indications?: string | null | undefined;
|
|
974
|
+
inPersonRequired?: string | null | undefined;
|
|
975
|
+
motive: string | null;
|
|
976
|
+
actualDesease: string | null;
|
|
977
|
+
alertSigns: string | null;
|
|
978
|
+
extendedMotive: string | null;
|
|
979
|
+
diagnose: {
|
|
980
|
+
code: string;
|
|
981
|
+
description: string;
|
|
982
|
+
}[];
|
|
983
|
+
medication: {
|
|
984
|
+
description?: string | null | undefined;
|
|
985
|
+
quantity?: number | null | undefined;
|
|
986
|
+
dose?: string | null | undefined;
|
|
987
|
+
farmalinkId?: number | null | undefined;
|
|
988
|
+
}[];
|
|
989
|
+
prescription: {
|
|
990
|
+
link?: string | null | undefined;
|
|
991
|
+
codigo?: number | null | undefined;
|
|
992
|
+
};
|
|
993
|
+
referral: {
|
|
994
|
+
specialtyId?: number | null | undefined;
|
|
995
|
+
status?: string | null | undefined;
|
|
996
|
+
inPersonRequired?: string | null | undefined;
|
|
997
|
+
comments?: string | null | undefined;
|
|
998
|
+
};
|
|
999
|
+
}>;
|
|
1000
|
+
pdf: import("zod").ZodObject<{
|
|
1001
|
+
atention: import("zod").ZodAny;
|
|
1002
|
+
labs: import("zod").ZodAny;
|
|
1003
|
+
otherExams: import("zod").ZodAny;
|
|
1004
|
+
images: import("zod").ZodAny;
|
|
1005
|
+
medication: import("zod").ZodArray<import("zod").ZodAny, "many">;
|
|
1006
|
+
certificate: import("zod").ZodArray<import("zod").ZodAny, "many">;
|
|
1007
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
1008
|
+
atention?: any;
|
|
1009
|
+
labs?: any;
|
|
1010
|
+
otherExams?: any;
|
|
1011
|
+
images?: any;
|
|
1012
|
+
medication: any[];
|
|
1013
|
+
certificate: any[];
|
|
1014
|
+
}, {
|
|
1015
|
+
atention?: any;
|
|
1016
|
+
labs?: any;
|
|
1017
|
+
otherExams?: any;
|
|
1018
|
+
images?: any;
|
|
1019
|
+
medication: any[];
|
|
1020
|
+
certificate: any[];
|
|
1021
|
+
}>;
|
|
1022
|
+
files: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1023
|
+
name: import("zod").ZodString;
|
|
1024
|
+
url: import("zod").ZodString;
|
|
1025
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
1026
|
+
name: string;
|
|
1027
|
+
url: string;
|
|
1028
|
+
}, {
|
|
1029
|
+
name: string;
|
|
1030
|
+
url: string;
|
|
1031
|
+
}>, "many">;
|
|
1032
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
1033
|
+
professional?: {
|
|
1034
|
+
id: number;
|
|
1035
|
+
fullName: string;
|
|
1036
|
+
specialtyId: number;
|
|
1037
|
+
specialty: string;
|
|
1038
|
+
} | undefined;
|
|
1039
|
+
retries?: number | null | undefined;
|
|
1040
|
+
id: number;
|
|
1041
|
+
language: string;
|
|
1042
|
+
status: string;
|
|
1043
|
+
paymentStatus: string;
|
|
1044
|
+
finishDate: Date | null;
|
|
1045
|
+
report: {
|
|
1046
|
+
indications?: string | null | undefined;
|
|
1047
|
+
inPersonRequired?: string | null | undefined;
|
|
1048
|
+
motive: string | null;
|
|
1049
|
+
actualDesease: string | null;
|
|
1050
|
+
alertSigns: string | null;
|
|
1051
|
+
extendedMotive: string | null;
|
|
1052
|
+
diagnose: {
|
|
1053
|
+
code: string;
|
|
1054
|
+
description: string;
|
|
1055
|
+
}[];
|
|
1056
|
+
medication: {
|
|
1057
|
+
description?: string | null | undefined;
|
|
1058
|
+
quantity?: number | null | undefined;
|
|
1059
|
+
dose?: string | null | undefined;
|
|
1060
|
+
farmalinkId?: number | null | undefined;
|
|
1061
|
+
}[];
|
|
1062
|
+
prescription: {
|
|
1063
|
+
link?: string | null | undefined;
|
|
1064
|
+
codigo?: number | null | undefined;
|
|
1065
|
+
};
|
|
1066
|
+
referral: {
|
|
1067
|
+
specialtyId?: number | null | undefined;
|
|
1068
|
+
status?: string | null | undefined;
|
|
1069
|
+
inPersonRequired?: string | null | undefined;
|
|
1070
|
+
comments?: string | null | undefined;
|
|
1071
|
+
};
|
|
1072
|
+
};
|
|
1073
|
+
pdf: {
|
|
1074
|
+
atention?: any;
|
|
1075
|
+
labs?: any;
|
|
1076
|
+
otherExams?: any;
|
|
1077
|
+
images?: any;
|
|
1078
|
+
medication: any[];
|
|
1079
|
+
certificate: any[];
|
|
1080
|
+
};
|
|
1081
|
+
files: {
|
|
1082
|
+
name: string;
|
|
1083
|
+
url: string;
|
|
1084
|
+
}[];
|
|
1085
|
+
}, {
|
|
1086
|
+
professional?: {
|
|
1087
|
+
id: number;
|
|
1088
|
+
fullName: string;
|
|
1089
|
+
specialtyId: number;
|
|
1090
|
+
specialty: string;
|
|
1091
|
+
} | undefined;
|
|
1092
|
+
retries?: number | null | undefined;
|
|
1093
|
+
id: number;
|
|
1094
|
+
language: string;
|
|
1095
|
+
status: string;
|
|
1096
|
+
paymentStatus: string;
|
|
1097
|
+
finishDate: Date | null;
|
|
1098
|
+
report: {
|
|
1099
|
+
indications?: string | null | undefined;
|
|
1100
|
+
inPersonRequired?: string | null | undefined;
|
|
1101
|
+
motive: string | null;
|
|
1102
|
+
actualDesease: string | null;
|
|
1103
|
+
alertSigns: string | null;
|
|
1104
|
+
extendedMotive: string | null;
|
|
1105
|
+
diagnose: {
|
|
1106
|
+
code: string;
|
|
1107
|
+
description: string;
|
|
1108
|
+
}[];
|
|
1109
|
+
medication: {
|
|
1110
|
+
description?: string | null | undefined;
|
|
1111
|
+
quantity?: number | null | undefined;
|
|
1112
|
+
dose?: string | null | undefined;
|
|
1113
|
+
farmalinkId?: number | null | undefined;
|
|
1114
|
+
}[];
|
|
1115
|
+
prescription: {
|
|
1116
|
+
link?: string | null | undefined;
|
|
1117
|
+
codigo?: number | null | undefined;
|
|
1118
|
+
};
|
|
1119
|
+
referral: {
|
|
1120
|
+
specialtyId?: number | null | undefined;
|
|
1121
|
+
status?: string | null | undefined;
|
|
1122
|
+
inPersonRequired?: string | null | undefined;
|
|
1123
|
+
comments?: string | null | undefined;
|
|
1124
|
+
};
|
|
1125
|
+
};
|
|
1126
|
+
pdf: {
|
|
1127
|
+
atention?: any;
|
|
1128
|
+
labs?: any;
|
|
1129
|
+
otherExams?: any;
|
|
1130
|
+
images?: any;
|
|
1131
|
+
medication: any[];
|
|
1132
|
+
certificate: any[];
|
|
1133
|
+
};
|
|
1134
|
+
files: {
|
|
1135
|
+
name: string;
|
|
1136
|
+
url: string;
|
|
1137
|
+
}[];
|
|
1138
|
+
}>;
|
|
863
1139
|
activeVideoVisitData: import("zod").ZodObject<{
|
|
864
1140
|
consultationId: import("zod").ZodNumber;
|
|
865
1141
|
patientId: import("zod").ZodNumber;
|
package/lib/schemas.js
CHANGED
|
@@ -401,6 +401,54 @@ exports.doc24Schemas = {
|
|
|
401
401
|
}),
|
|
402
402
|
files: zod_1.array(zod_1.object({ name: zod_1.string(), url: zod_1.string().url() })),
|
|
403
403
|
}),
|
|
404
|
+
completeVideoVisitDetails: zod_1.object({
|
|
405
|
+
id: zod_1.number(),
|
|
406
|
+
status: zod_1.string(),
|
|
407
|
+
paymentStatus: zod_1.string(),
|
|
408
|
+
professional: zod_1.object({
|
|
409
|
+
id: zod_1.number(),
|
|
410
|
+
fullName: zod_1.string(),
|
|
411
|
+
specialtyId: zod_1.number(),
|
|
412
|
+
specialty: zod_1.string(),
|
|
413
|
+
}).optional(),
|
|
414
|
+
finishDate: zod_1.date().nullable(),
|
|
415
|
+
retries: zod_1.number().nullish(),
|
|
416
|
+
language: zod_1.string(),
|
|
417
|
+
report: zod_1.object({
|
|
418
|
+
motive: zod_1.string().nullable(),
|
|
419
|
+
actualDesease: zod_1.string().nullable(),
|
|
420
|
+
indications: zod_1.string().nullish(),
|
|
421
|
+
alertSigns: zod_1.string().nullable(),
|
|
422
|
+
extendedMotive: zod_1.string().nullable(),
|
|
423
|
+
diagnose: zod_1.array(zod_1.object({ description: zod_1.string(), code: zod_1.string() })),
|
|
424
|
+
medication: zod_1.array(zod_1.object({
|
|
425
|
+
description: zod_1.string().nullish(),
|
|
426
|
+
quantity: zod_1.number().nullish(),
|
|
427
|
+
dose: zod_1.string().nullish(),
|
|
428
|
+
farmalinkId: zod_1.number().nullish(),
|
|
429
|
+
})),
|
|
430
|
+
prescription: zod_1.object({
|
|
431
|
+
link: zod_1.string().nullish(),
|
|
432
|
+
codigo: zod_1.number().nullish(),
|
|
433
|
+
}),
|
|
434
|
+
inPersonRequired: zod_1.string().nullish(),
|
|
435
|
+
referral: zod_1.object({
|
|
436
|
+
status: zod_1.string().nullish(),
|
|
437
|
+
specialtyId: zod_1.number().nullish(),
|
|
438
|
+
inPersonRequired: zod_1.string().nullish(),
|
|
439
|
+
comments: zod_1.string().nullish(),
|
|
440
|
+
}),
|
|
441
|
+
}),
|
|
442
|
+
pdf: zod_1.object({
|
|
443
|
+
atention: zod_1.any(),
|
|
444
|
+
labs: zod_1.any(),
|
|
445
|
+
otherExams: zod_1.any(),
|
|
446
|
+
images: zod_1.any(),
|
|
447
|
+
medication: zod_1.array(zod_1.any()),
|
|
448
|
+
certificate: zod_1.array(zod_1.any()),
|
|
449
|
+
}),
|
|
450
|
+
files: zod_1.array(zod_1.object({ name: zod_1.string(), url: zod_1.string().url() })),
|
|
451
|
+
}),
|
|
404
452
|
activeVideoVisitData: zod_1.object({
|
|
405
453
|
consultationId: zod_1.number(),
|
|
406
454
|
patientId: zod_1.number(),
|
package/lib/types.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare namespace Doc24 {
|
|
|
14
14
|
type VideoVisit = TypeOf<typeof doc24Schemas.videoVisit>;
|
|
15
15
|
type HistoricalVideoVisit = TypeOf<typeof doc24Schemas.historicalVideoVisit>;
|
|
16
16
|
type VideoVisitDetails = TypeOf<typeof doc24Schemas.videoVisitDetails>;
|
|
17
|
+
type CompleteVideoVisitDetails = TypeOf<typeof doc24Schemas.completeVideoVisitDetails>;
|
|
17
18
|
type ActiveVideoVisitData = TypeOf<typeof doc24Schemas.activeVideoVisitData>;
|
|
18
19
|
type SpecialtyMode = TypeOf<typeof doc24Schemas.specialtyMode>;
|
|
19
20
|
type Professional = TypeOf<typeof doc24Schemas.professional>;
|
|
@@ -82,6 +83,7 @@ export declare namespace Doc24 {
|
|
|
82
83
|
cancelVideoVisit: (vcToken: string) => Promise<void>;
|
|
83
84
|
getVideoVisit: (vcToken: string, patientId: number) => Promise<VideoVisit>;
|
|
84
85
|
getVideoVisitDetails: (vcId: number) => Promise<VideoVisitDetails>;
|
|
86
|
+
getCompleteVideoVisitDetails: (vcId: number) => Promise<CompleteVideoVisitDetails>;
|
|
85
87
|
getVideoVisitLink: (vcToken: string, patientId: number) => Promise<string | null>;
|
|
86
88
|
getPatientVideoVisitHistory: (patientId: number) => Promise<HistoricalVideoVisit[]>;
|
|
87
89
|
getActiveVideoVisits: () => Promise<ActiveVideoVisitData[]>;
|
|
@@ -112,4 +112,58 @@ export declare const getVideoVisitMethods: (makeRequest: RequestMaker) => {
|
|
|
112
112
|
vcToken: string;
|
|
113
113
|
consultationId: number;
|
|
114
114
|
}[]>;
|
|
115
|
+
getCompleteVideoVisitDetails: (vcId: number) => Promise<{
|
|
116
|
+
professional?: {
|
|
117
|
+
id: number;
|
|
118
|
+
fullName: string;
|
|
119
|
+
specialtyId: number;
|
|
120
|
+
specialty: string;
|
|
121
|
+
} | undefined;
|
|
122
|
+
retries?: number | null | undefined;
|
|
123
|
+
id: number;
|
|
124
|
+
language: string;
|
|
125
|
+
status: string;
|
|
126
|
+
paymentStatus: string;
|
|
127
|
+
finishDate: Date | null;
|
|
128
|
+
report: {
|
|
129
|
+
indications?: string | null | undefined;
|
|
130
|
+
inPersonRequired?: string | null | undefined;
|
|
131
|
+
motive: string | null;
|
|
132
|
+
actualDesease: string | null;
|
|
133
|
+
alertSigns: string | null;
|
|
134
|
+
extendedMotive: string | null;
|
|
135
|
+
diagnose: {
|
|
136
|
+
code: string;
|
|
137
|
+
description: string;
|
|
138
|
+
}[];
|
|
139
|
+
medication: {
|
|
140
|
+
description?: string | null | undefined;
|
|
141
|
+
quantity?: number | null | undefined;
|
|
142
|
+
dose?: string | null | undefined;
|
|
143
|
+
farmalinkId?: number | null | undefined;
|
|
144
|
+
}[];
|
|
145
|
+
prescription: {
|
|
146
|
+
link?: string | null | undefined;
|
|
147
|
+
codigo?: number | null | undefined;
|
|
148
|
+
};
|
|
149
|
+
referral: {
|
|
150
|
+
specialtyId?: number | null | undefined;
|
|
151
|
+
status?: string | null | undefined;
|
|
152
|
+
inPersonRequired?: string | null | undefined;
|
|
153
|
+
comments?: string | null | undefined;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
pdf: {
|
|
157
|
+
atention?: any;
|
|
158
|
+
labs?: any;
|
|
159
|
+
otherExams?: any;
|
|
160
|
+
images?: any;
|
|
161
|
+
medication: any[];
|
|
162
|
+
certificate: any[];
|
|
163
|
+
};
|
|
164
|
+
files: {
|
|
165
|
+
name: string;
|
|
166
|
+
url: string;
|
|
167
|
+
}[];
|
|
168
|
+
}>;
|
|
115
169
|
};
|
|
@@ -113,6 +113,76 @@ const getVideoVisitMethods = (makeRequest) => {
|
|
|
113
113
|
const response = await makeRequest('GET', path);
|
|
114
114
|
return response.data.link;
|
|
115
115
|
});
|
|
116
|
+
const getCompleteVideoVisitDetails = validation_1.validateFunction(zod_1.tuple([zod_1.number()]), schemas_1.doc24Schemas.completeVideoVisitDetails, async (vcId) => {
|
|
117
|
+
const path = `/consultation/${vcId}`;
|
|
118
|
+
const response = await makeRequest('GET', path);
|
|
119
|
+
return {
|
|
120
|
+
id: response.data.id_consulta,
|
|
121
|
+
status: response.data.estado,
|
|
122
|
+
paymentStatus: response.data.estado_pago,
|
|
123
|
+
professional: response.data.id_profesional
|
|
124
|
+
? {
|
|
125
|
+
id: response.data.id_profesional,
|
|
126
|
+
fullName: response.data.profesional,
|
|
127
|
+
specialtyId: response.data.id_especialidad,
|
|
128
|
+
specialty: response.data.especialidad,
|
|
129
|
+
}
|
|
130
|
+
: undefined,
|
|
131
|
+
finishDate: response.data.fecha_fin && utils_1.parseDateTime(response.data.fecha_fin),
|
|
132
|
+
retries: response.data.intentos_conexion,
|
|
133
|
+
language: response.data.tag_idioma,
|
|
134
|
+
report: {
|
|
135
|
+
motive: response.data.motivo,
|
|
136
|
+
actualDesease: response.data.enfermedad_actual,
|
|
137
|
+
indications: response.data.conducta_terapeutica,
|
|
138
|
+
alertSigns: response.data.signos_alerta,
|
|
139
|
+
extendedMotive: response.data.motivo_extendido_consulta,
|
|
140
|
+
diagnose: response.data.diagnostico.map((d) => ({
|
|
141
|
+
description: d.diagnostico,
|
|
142
|
+
code: d.codificacion,
|
|
143
|
+
})),
|
|
144
|
+
medication: response.data.medicacion.map((m) => ({
|
|
145
|
+
description: m.detalle_producto,
|
|
146
|
+
quantity: m.cantidad,
|
|
147
|
+
dose: m.dosificacion,
|
|
148
|
+
farmalinkId: m.id_prescripcion_farmalink,
|
|
149
|
+
})),
|
|
150
|
+
prescription: {
|
|
151
|
+
link: response.data.link_receta,
|
|
152
|
+
codigo: response.data.codigo_verificacion_receta,
|
|
153
|
+
},
|
|
154
|
+
inPersonRequired: response.data.presencial_requerida,
|
|
155
|
+
referral: {
|
|
156
|
+
status: response.data.derivada,
|
|
157
|
+
specialtyId: response.data.derivada_id_especialidad,
|
|
158
|
+
inPersonRequired: response.data.derivada_presencial_obligatoria,
|
|
159
|
+
comments: response.data.derivada_comentarios,
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
pdf: {
|
|
163
|
+
atention: response.data.pdf_atencion
|
|
164
|
+
? response.data.pdf_atencion
|
|
165
|
+
: undefined,
|
|
166
|
+
medication: response.data.pdf_medicacion,
|
|
167
|
+
images: response.data.pdf_imagenes
|
|
168
|
+
? response.data.pdf_imagenes
|
|
169
|
+
: undefined,
|
|
170
|
+
otherExams: response.data.pdf_otras
|
|
171
|
+
? response.data.pdf_otras
|
|
172
|
+
: undefined,
|
|
173
|
+
labs: response.data.pdf_laboratorios
|
|
174
|
+
? response.data.pdf_laboratorios
|
|
175
|
+
: undefined,
|
|
176
|
+
certificate: response.data.pdf_certificado
|
|
177
|
+
? response.data.pdf_certificado
|
|
178
|
+
: undefined,
|
|
179
|
+
},
|
|
180
|
+
files: response.data.files_atencion.map((f) => ({
|
|
181
|
+
name: f.nombre_file,
|
|
182
|
+
url: f.file,
|
|
183
|
+
})),
|
|
184
|
+
};
|
|
185
|
+
});
|
|
116
186
|
return {
|
|
117
187
|
scheduleVideoVisit,
|
|
118
188
|
cancelVideoVisit,
|
|
@@ -121,6 +191,7 @@ const getVideoVisitMethods = (makeRequest) => {
|
|
|
121
191
|
getVideoVisitDetails,
|
|
122
192
|
getVideoVisitLink,
|
|
123
193
|
getActiveVideoVisits,
|
|
194
|
+
getCompleteVideoVisitDetails,
|
|
124
195
|
};
|
|
125
196
|
};
|
|
126
197
|
exports.getVideoVisitMethods = getVideoVisitMethods;
|