@integraciones_doc24/sdk 1.15.0 → 1.15.2
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/lib/schemas.d.ts +3 -0
- package/lib/schemas.js +1 -0
- package/lib/userSdk/external.d.ts +2 -0
- package/lib/userSdk/external.js +2 -0
- package/package.json +1 -1
- package/lib/test.d.ts +0 -1
- package/lib/test.js +0 -37
package/lib/schemas.d.ts
CHANGED
|
@@ -1701,6 +1701,7 @@ export declare const doc24Schemas: {
|
|
|
1701
1701
|
}>;
|
|
1702
1702
|
externalAppointment: import("zod").ZodObject<{
|
|
1703
1703
|
id: import("zod").ZodNumber;
|
|
1704
|
+
patientIdentification: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1704
1705
|
patientName: import("zod").ZodString;
|
|
1705
1706
|
birthdate: import("zod").ZodDate;
|
|
1706
1707
|
appointment: import("zod").ZodString;
|
|
@@ -1710,6 +1711,7 @@ export declare const doc24Schemas: {
|
|
|
1710
1711
|
specialty: import("zod").ZodString;
|
|
1711
1712
|
modality: import("zod").ZodString;
|
|
1712
1713
|
}, "strip", import("zod").ZodTypeAny, {
|
|
1714
|
+
patientIdentification?: string | undefined;
|
|
1713
1715
|
date: Date;
|
|
1714
1716
|
birthdate: Date;
|
|
1715
1717
|
appointment: string;
|
|
@@ -1720,6 +1722,7 @@ export declare const doc24Schemas: {
|
|
|
1720
1722
|
professionalName: string;
|
|
1721
1723
|
modality: string;
|
|
1722
1724
|
}, {
|
|
1725
|
+
patientIdentification?: string | undefined;
|
|
1723
1726
|
date: Date;
|
|
1724
1727
|
birthdate: Date;
|
|
1725
1728
|
appointment: string;
|
package/lib/schemas.js
CHANGED
|
@@ -288,6 +288,7 @@ const externalPatient = zod_1.object({
|
|
|
288
288
|
});
|
|
289
289
|
const externalAppointment = zod_1.object({
|
|
290
290
|
id: zod_1.number(),
|
|
291
|
+
patientIdentification: zod_1.string().optional(),
|
|
291
292
|
patientName: zod_1.string(),
|
|
292
293
|
birthdate: zod_1.date(),
|
|
293
294
|
appointment: zod_1.string(),
|
|
@@ -8,6 +8,7 @@ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
|
8
8
|
}) => Promise<string | null>;
|
|
9
9
|
getExternalAppointmentsLink: (identificationValue: string, birthdate: Date) => Promise<string | null>;
|
|
10
10
|
getExternalAppointments: () => Promise<{
|
|
11
|
+
patientIdentification?: string | undefined;
|
|
11
12
|
date: Date;
|
|
12
13
|
birthdate: Date;
|
|
13
14
|
appointment: string;
|
|
@@ -19,6 +20,7 @@ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
|
19
20
|
modality: string;
|
|
20
21
|
}[]>;
|
|
21
22
|
cancelExternalAppointment: (appointmentId: {
|
|
23
|
+
patientIdentification?: string | undefined;
|
|
22
24
|
date: Date;
|
|
23
25
|
birthdate: Date;
|
|
24
26
|
appointment: string;
|
package/lib/userSdk/external.js
CHANGED
|
@@ -25,6 +25,7 @@ const getExternalMethods = (makeRequest) => {
|
|
|
25
25
|
const response = await makeRequest('GET', path);
|
|
26
26
|
return response.data.appointments.map((a) => ({
|
|
27
27
|
id: a.appointment_id,
|
|
28
|
+
patientIdentification: a.patient_id,
|
|
28
29
|
patientName: a.patient_name,
|
|
29
30
|
birthdate: utils_1.parseDate(a.birthdate),
|
|
30
31
|
appointment: a.appointment,
|
|
@@ -39,6 +40,7 @@ const getExternalMethods = (makeRequest) => {
|
|
|
39
40
|
const path = `/cancel-external-appointment`;
|
|
40
41
|
await makeRequest('POST', path, {
|
|
41
42
|
appointment_id: appointment.id,
|
|
43
|
+
patient_id: appointment.patientIdentification,
|
|
42
44
|
patient_name: appointment.patientName,
|
|
43
45
|
birthdate: date_fns_1.format(appointment.birthdate, 'yyyy-MM-dd'),
|
|
44
46
|
appointment: appointment.appointment,
|
package/package.json
CHANGED
package/lib/test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const test: () => Promise<void>;
|
package/lib/test.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.test = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
|
-
const test = async () => {
|
|
6
|
-
const baseSdk = await _1.doc24Sdk({
|
|
7
|
-
url: 'https://tapi.doc24.com.ar/ws/sdk',
|
|
8
|
-
credentials: {
|
|
9
|
-
// iss: 'Diagnostica',
|
|
10
|
-
// key: 'gS2J78V0Zw8XiZJPGC9RS8TlECgqM2TmVtOzNAZbqputgmtc',
|
|
11
|
-
iss: 'wehealthy',
|
|
12
|
-
key: '33Ypv5jQ1VTr1KcOImdBhPnoRDqmPlYR3JWbrlUim9U=',
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
const userSdk = await baseSdk.getUserInstance(14735);
|
|
16
|
-
const spe = await userSdk.getSpecialties('instant', 'ES');
|
|
17
|
-
console.log(spe);
|
|
18
|
-
// const userSdk = await baseSdk.getUserInstance(20892);
|
|
19
|
-
// const res = await userSdk.updatePatient(
|
|
20
|
-
// {
|
|
21
|
-
// identificationType: 'nn',
|
|
22
|
-
// identificationValue: 'jhYuPe9wu8WmSUroB4tLq8',
|
|
23
|
-
// },
|
|
24
|
-
// {
|
|
25
|
-
// firstName: 'Test',
|
|
26
|
-
// lastName: 'Emergency',
|
|
27
|
-
// identificationType: 'dni',
|
|
28
|
-
// identificationValue: '37972512',
|
|
29
|
-
// countryId: 'AR',
|
|
30
|
-
// birthdate: new Date(),
|
|
31
|
-
// gender: 'm',
|
|
32
|
-
// },
|
|
33
|
-
// );
|
|
34
|
-
// console.log(res);
|
|
35
|
-
};
|
|
36
|
-
exports.test = test;
|
|
37
|
-
exports.test();
|