@integraciones_doc24/sdk 0.35.1 → 1.1.1
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 +131 -83
- package/lib/baseSdk/diagnostica.d.ts +6 -6
- package/lib/baseSdk/index.js +1 -5
- package/lib/baseSdk/user.d.ts +51 -4
- package/lib/baseSdk/user.js +67 -25
- package/lib/index.d.ts +44 -16
- package/lib/schemas.d.ts +220 -30
- package/lib/schemas.js +33 -2
- package/lib/test.js +36 -1
- package/lib/types.d.ts +10 -2
- package/lib/userSdk/chat.d.ts +1 -1
- package/lib/userSdk/patients.d.ts +22 -2
- package/lib/userSdk/patients.js +34 -6
- package/lib/userSdk/videoVisit.d.ts +2 -2
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +3 -3
- package/package.json +2 -2
- package/lib/lib/baseSdk/diagnostica.d.ts +0 -11
- package/lib/lib/baseSdk/diagnostica.js +0 -79
- package/lib/lib/baseSdk/index.d.ts +0 -161
- package/lib/lib/baseSdk/index.js +0 -66
- package/lib/lib/baseSdk/user.d.ts +0 -41
- package/lib/lib/baseSdk/user.js +0 -130
- package/lib/lib/index.d.ts +0 -182
- package/lib/lib/index.js +0 -22
- package/lib/lib/lib/baseSdk/diagnostica.d.ts +0 -6
- package/lib/lib/lib/baseSdk/diagnostica.js +0 -79
- package/lib/lib/lib/baseSdk/index.d.ts +0 -51
- package/lib/lib/lib/baseSdk/index.js +0 -66
- package/lib/lib/lib/baseSdk/user.d.ts +0 -9
- package/lib/lib/lib/baseSdk/user.js +0 -130
- package/lib/lib/lib/index.d.ts +0 -168
- package/lib/lib/lib/index.js +0 -22
- package/lib/lib/lib/lib/baseSdk/diagnostica.d.ts +0 -6
- package/lib/lib/lib/lib/baseSdk/diagnostica.js +0 -79
- package/lib/lib/lib/lib/baseSdk/index.d.ts +0 -14
- package/lib/lib/lib/lib/baseSdk/index.js +0 -66
- package/lib/lib/lib/lib/baseSdk/user.d.ts +0 -9
- package/lib/lib/lib/lib/baseSdk/user.js +0 -130
- package/lib/lib/lib/lib/index.d.ts +0 -58
- package/lib/lib/lib/lib/index.js +0 -22
- package/lib/lib/lib/lib/request/index.d.ts +0 -2
- package/lib/lib/lib/lib/request/index.js +0 -26
- package/lib/lib/lib/lib/request/token.d.ts +0 -2
- package/lib/lib/lib/lib/request/token.js +0 -34
- package/lib/lib/lib/lib/request/validation.d.ts +0 -10
- package/lib/lib/lib/lib/request/validation.js +0 -28
- package/lib/lib/lib/lib/schemas.d.ts +0 -1334
- package/lib/lib/lib/lib/schemas.js +0 -325
- package/lib/lib/lib/lib/test.d.ts +0 -1
- package/lib/lib/lib/lib/test.js +0 -55
- package/lib/lib/lib/lib/types.d.ts +0 -1
- package/lib/lib/lib/lib/types.js +0 -2
- package/lib/lib/lib/lib/userSdk/chat.d.ts +0 -9
- package/lib/lib/lib/lib/userSdk/chat.js +0 -98
- package/lib/lib/lib/lib/userSdk/index.d.ts +0 -24
- package/lib/lib/lib/lib/userSdk/index.js +0 -27
- package/lib/lib/lib/lib/userSdk/patients.d.ts +0 -5
- package/lib/lib/lib/lib/userSdk/patients.js +0 -55
- package/lib/lib/lib/lib/userSdk/schedule.d.ts +0 -7
- package/lib/lib/lib/lib/userSdk/schedule.js +0 -76
- package/lib/lib/lib/lib/userSdk/specialties.d.ts +0 -4
- package/lib/lib/lib/lib/userSdk/specialties.js +0 -19
- package/lib/lib/lib/lib/userSdk/videoVisit.d.ts +0 -10
- package/lib/lib/lib/lib/userSdk/videoVisit.js +0 -147
- package/lib/lib/lib/lib/utils.d.ts +0 -4
- package/lib/lib/lib/lib/utils.js +0 -19
- package/lib/lib/lib/lib/webhook/index.d.ts +0 -8
- package/lib/lib/lib/lib/webhook/index.js +0 -55
- package/lib/lib/lib/lib/webhook/responses.d.ts +0 -36
- package/lib/lib/lib/lib/webhook/responses.js +0 -42
- package/lib/lib/lib/lib/webhook/token.d.ts +0 -2
- package/lib/lib/lib/lib/webhook/token.js +0 -23
- package/lib/lib/lib/request/index.d.ts +0 -2
- package/lib/lib/lib/request/index.js +0 -26
- package/lib/lib/lib/request/token.d.ts +0 -2
- package/lib/lib/lib/request/token.js +0 -34
- package/lib/lib/lib/request/validation.d.ts +0 -10
- package/lib/lib/lib/request/validation.js +0 -28
- package/lib/lib/lib/schemas.d.ts +0 -1334
- package/lib/lib/lib/schemas.js +0 -325
- package/lib/lib/lib/src/baseSdk/diagnostica.d.ts +0 -6
- package/lib/lib/lib/src/baseSdk/diagnostica.js +0 -79
- package/lib/lib/lib/src/baseSdk/index.d.ts +0 -51
- package/lib/lib/lib/src/baseSdk/index.js +0 -66
- package/lib/lib/lib/src/baseSdk/user.d.ts +0 -9
- package/lib/lib/lib/src/baseSdk/user.js +0 -130
- package/lib/lib/lib/src/index.d.ts +0 -169
- package/lib/lib/lib/src/index.js +0 -22
- package/lib/lib/lib/src/request/index.d.ts +0 -2
- package/lib/lib/lib/src/request/index.js +0 -26
- package/lib/lib/lib/src/request/token.d.ts +0 -2
- package/lib/lib/lib/src/request/token.js +0 -34
- package/lib/lib/lib/src/request/validation.d.ts +0 -10
- package/lib/lib/lib/src/request/validation.js +0 -28
- package/lib/lib/lib/src/schemas.d.ts +0 -1340
- package/lib/lib/lib/src/schemas.js +0 -325
- package/lib/lib/lib/src/types.d.ts +0 -1
- package/lib/lib/lib/src/types.js +0 -2
- package/lib/lib/lib/src/userSdk/chat.d.ts +0 -9
- package/lib/lib/lib/src/userSdk/chat.js +0 -98
- package/lib/lib/lib/src/userSdk/index.d.ts +0 -102
- package/lib/lib/lib/src/userSdk/index.js +0 -27
- package/lib/lib/lib/src/userSdk/patients.d.ts +0 -5
- package/lib/lib/lib/src/userSdk/patients.js +0 -55
- package/lib/lib/lib/src/userSdk/schedule.d.ts +0 -7
- package/lib/lib/lib/src/userSdk/schedule.js +0 -76
- package/lib/lib/lib/src/userSdk/specialties.d.ts +0 -4
- package/lib/lib/lib/src/userSdk/specialties.js +0 -19
- package/lib/lib/lib/src/userSdk/videoVisit.d.ts +0 -10
- package/lib/lib/lib/src/userSdk/videoVisit.js +0 -147
- package/lib/lib/lib/src/utils.d.ts +0 -4
- package/lib/lib/lib/src/utils.js +0 -19
- package/lib/lib/lib/src/webhook/index.d.ts +0 -8
- package/lib/lib/lib/src/webhook/index.js +0 -55
- package/lib/lib/lib/src/webhook/responses.d.ts +0 -36
- package/lib/lib/lib/src/webhook/responses.js +0 -42
- package/lib/lib/lib/src/webhook/token.d.ts +0 -2
- package/lib/lib/lib/src/webhook/token.js +0 -23
- package/lib/lib/lib/test.d.ts +0 -1
- package/lib/lib/lib/test.js +0 -55
- package/lib/lib/lib/types.d.ts +0 -1
- package/lib/lib/lib/types.js +0 -2
- package/lib/lib/lib/userSdk/chat.d.ts +0 -9
- package/lib/lib/lib/userSdk/chat.js +0 -98
- package/lib/lib/lib/userSdk/index.d.ts +0 -102
- package/lib/lib/lib/userSdk/index.js +0 -27
- package/lib/lib/lib/userSdk/patients.d.ts +0 -5
- package/lib/lib/lib/userSdk/patients.js +0 -55
- package/lib/lib/lib/userSdk/schedule.d.ts +0 -7
- package/lib/lib/lib/userSdk/schedule.js +0 -76
- package/lib/lib/lib/userSdk/specialties.d.ts +0 -4
- package/lib/lib/lib/userSdk/specialties.js +0 -19
- package/lib/lib/lib/userSdk/videoVisit.d.ts +0 -10
- package/lib/lib/lib/userSdk/videoVisit.js +0 -147
- package/lib/lib/lib/utils.d.ts +0 -4
- package/lib/lib/lib/utils.js +0 -19
- package/lib/lib/lib/webhook/index.d.ts +0 -8
- package/lib/lib/lib/webhook/index.js +0 -55
- package/lib/lib/lib/webhook/responses.d.ts +0 -36
- package/lib/lib/lib/webhook/responses.js +0 -42
- package/lib/lib/lib/webhook/token.d.ts +0 -2
- package/lib/lib/lib/webhook/token.js +0 -23
- package/lib/lib/request/index.d.ts +0 -2
- package/lib/lib/request/index.js +0 -26
- package/lib/lib/request/token.d.ts +0 -2
- package/lib/lib/request/token.js +0 -34
- package/lib/lib/request/validation.d.ts +0 -10
- package/lib/lib/request/validation.js +0 -28
- package/lib/lib/schemas.d.ts +0 -1334
- package/lib/lib/schemas.js +0 -325
- package/lib/lib/src/baseSdk/diagnostica.d.ts +0 -11
- package/lib/lib/src/baseSdk/diagnostica.js +0 -79
- package/lib/lib/src/baseSdk/index.d.ts +0 -162
- package/lib/lib/src/baseSdk/index.js +0 -66
- package/lib/lib/src/baseSdk/user.d.ts +0 -41
- package/lib/lib/src/baseSdk/user.js +0 -130
- package/lib/lib/src/index.d.ts +0 -183
- package/lib/lib/src/index.js +0 -22
- package/lib/lib/src/request/index.d.ts +0 -2
- package/lib/lib/src/request/index.js +0 -26
- package/lib/lib/src/request/token.d.ts +0 -2
- package/lib/lib/src/request/token.js +0 -34
- package/lib/lib/src/request/validation.d.ts +0 -10
- package/lib/lib/src/request/validation.js +0 -28
- package/lib/lib/src/schemas.d.ts +0 -1340
- package/lib/lib/src/schemas.js +0 -325
- package/lib/lib/src/types.d.ts +0 -1
- package/lib/lib/src/types.js +0 -2
- package/lib/lib/src/userSdk/chat.d.ts +0 -9
- package/lib/lib/src/userSdk/chat.js +0 -98
- package/lib/lib/src/userSdk/index.d.ts +0 -241
- package/lib/lib/src/userSdk/index.js +0 -27
- package/lib/lib/src/userSdk/patients.d.ts +0 -13
- package/lib/lib/src/userSdk/patients.js +0 -55
- package/lib/lib/src/userSdk/schedule.d.ts +0 -15
- package/lib/lib/src/userSdk/schedule.js +0 -76
- package/lib/lib/src/userSdk/specialties.d.ts +0 -4
- package/lib/lib/src/userSdk/specialties.js +0 -19
- package/lib/lib/src/userSdk/videoVisit.d.ts +0 -72
- package/lib/lib/src/userSdk/videoVisit.js +0 -147
- package/lib/lib/src/utils.d.ts +0 -4
- package/lib/lib/src/utils.js +0 -19
- package/lib/lib/src/webhook/index.d.ts +0 -8
- package/lib/lib/src/webhook/index.js +0 -55
- package/lib/lib/src/webhook/responses.d.ts +0 -36
- package/lib/lib/src/webhook/responses.js +0 -42
- package/lib/lib/src/webhook/token.d.ts +0 -2
- package/lib/lib/src/webhook/token.js +0 -23
- package/lib/lib/test.d.ts +0 -1
- package/lib/lib/test.js +0 -55
- package/lib/lib/types.d.ts +0 -1
- package/lib/lib/types.js +0 -2
- package/lib/lib/userSdk/chat.d.ts +0 -9
- package/lib/lib/userSdk/chat.js +0 -98
- package/lib/lib/userSdk/index.d.ts +0 -240
- package/lib/lib/userSdk/index.js +0 -27
- package/lib/lib/userSdk/patients.d.ts +0 -13
- package/lib/lib/userSdk/patients.js +0 -55
- package/lib/lib/userSdk/schedule.d.ts +0 -15
- package/lib/lib/userSdk/schedule.js +0 -76
- package/lib/lib/userSdk/specialties.d.ts +0 -4
- package/lib/lib/userSdk/specialties.js +0 -19
- package/lib/lib/userSdk/videoVisit.d.ts +0 -72
- package/lib/lib/userSdk/videoVisit.js +0 -147
- package/lib/lib/utils.d.ts +0 -4
- package/lib/lib/utils.js +0 -19
- package/lib/lib/webhook/index.d.ts +0 -8
- package/lib/lib/webhook/index.js +0 -55
- package/lib/lib/webhook/responses.d.ts +0 -36
- package/lib/lib/webhook/responses.js +0 -42
- package/lib/lib/webhook/token.d.ts +0 -2
- package/lib/lib/webhook/token.js +0 -23
- package/lib/src/baseSdk/diagnostica.d.ts +0 -54
- package/lib/src/baseSdk/diagnostica.js +0 -79
- package/lib/src/baseSdk/index.d.ts +0 -2
- package/lib/src/baseSdk/index.js +0 -66
- package/lib/src/baseSdk/user.d.ts +0 -89
- package/lib/src/baseSdk/user.js +0 -130
- package/lib/src/index.d.ts +0 -188
- package/lib/src/index.js +0 -22
- package/lib/src/request/index.d.ts +0 -3
- package/lib/src/request/index.js +0 -26
- package/lib/src/request/token.d.ts +0 -2
- package/lib/src/request/token.js +0 -34
- package/lib/src/request/validation.d.ts +0 -10
- package/lib/src/request/validation.js +0 -28
- package/lib/src/schemas.d.ts +0 -1311
- package/lib/src/schemas.js +0 -325
- package/lib/src/types.d.ts +0 -124
- package/lib/src/types.js +0 -2
- package/lib/src/userSdk/chat.d.ts +0 -57
- package/lib/src/userSdk/chat.js +0 -98
- package/lib/src/userSdk/index.d.ts +0 -2
- package/lib/src/userSdk/index.js +0 -27
- package/lib/src/userSdk/patients.d.ts +0 -33
- package/lib/src/userSdk/patients.js +0 -55
- package/lib/src/userSdk/schedule.d.ts +0 -44
- package/lib/src/userSdk/schedule.js +0 -76
- package/lib/src/userSdk/specialties.d.ts +0 -7
- package/lib/src/userSdk/specialties.js +0 -19
- package/lib/src/userSdk/videoVisit.d.ts +0 -111
- package/lib/src/userSdk/videoVisit.js +0 -147
- package/lib/src/utils.d.ts +0 -4
- package/lib/src/utils.js +0 -19
- package/lib/src/webhook/index.d.ts +0 -2
- package/lib/src/webhook/index.js +0 -55
- package/lib/src/webhook/responses.d.ts +0 -35
- package/lib/src/webhook/responses.js +0 -42
- package/lib/src/webhook/token.d.ts +0 -2
- package/lib/src/webhook/token.js +0 -23
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @integraciones_doc24/sdk
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Node.JS library for accessing doc24 api
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -9,48 +9,55 @@
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
|
-
import {doc24Sdk} from '@integraciones_doc24/sdk'
|
|
12
|
+
import {doc24Sdk} from '@integraciones_doc24/sdk';
|
|
13
13
|
|
|
14
|
-
const getBaseSdk = () =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
const getBaseSdk = () =>
|
|
15
|
+
doc24Sdk({
|
|
16
|
+
url: 'https://tapi.doc24.com.ar/ws/sdk',
|
|
17
|
+
credentials: {
|
|
18
|
+
iss: 'myissuer',
|
|
19
|
+
key: 'mysecret',
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const getSpecialities = async (user) => {
|
|
24
|
+
const baseSdk = await getBaseSdk();
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
const userSdk = await baseSdk.getUserInstance(user);
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
}
|
|
28
|
+
return await userSdk.getSpecialties('instant', 'ES');
|
|
29
|
+
};
|
|
29
30
|
|
|
30
31
|
const getRequestHandler = async () => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
32
|
+
const baseSdk = await getBaseSdk();
|
|
33
|
+
return baseSdk.getRequestHandler({
|
|
34
|
+
credentials: {
|
|
35
|
+
iss: 'doc24issuer',
|
|
36
|
+
key: 'doc24secret',
|
|
37
|
+
},
|
|
38
|
+
baseAddress: 'http://myaddress.com/route/to/webhook',
|
|
39
|
+
eventHandlers: {
|
|
40
|
+
onAppointmentStatusChange: ({id, status, changeDate}) => {
|
|
41
|
+
console.log({id, status, changeDate});
|
|
42
|
+
},
|
|
43
|
+
onConsultationStatusChange: ({
|
|
44
|
+
id,
|
|
45
|
+
invitationId,
|
|
46
|
+
status,
|
|
47
|
+
changeDate,
|
|
48
|
+
vcToken,
|
|
49
|
+
}) => {
|
|
50
|
+
console.log({id, invitationId, status, changeDate, vcToken});
|
|
51
|
+
},
|
|
52
|
+
onInvitationStatusChange: ({id, status, changeDate}) => {
|
|
53
|
+
console.log({id, status, changeDate});
|
|
54
|
+
},
|
|
55
|
+
onChatUpdate: ({id, status, patientId, professionalId, date}) => {
|
|
56
|
+
console.log({id, status, patientId, professionalId, date});
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
};
|
|
54
61
|
```
|
|
55
62
|
|
|
56
63
|
The library exports the function `doc24Sdk`. It takes one parameters of type `SdkParams`, and returns a `BaseSdk`.
|
|
@@ -58,69 +65,110 @@ It also returns an extra `getRequestHandler` function that takes a `RequestHandl
|
|
|
58
65
|
|
|
59
66
|
```ts
|
|
60
67
|
type SdkCredentials = {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
68
|
+
iss: string;
|
|
69
|
+
key: string;
|
|
70
|
+
};
|
|
64
71
|
type SdkParams = {
|
|
65
|
-
|
|
66
|
-
|
|
72
|
+
url: string;
|
|
73
|
+
credentials: SdkCredentials;
|
|
67
74
|
};
|
|
68
75
|
type BaseSdk = {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
declareUser: (params: DeclareUserParams) => Promise<any>;
|
|
77
|
+
getUserId: (user: User) => Promise<number>;
|
|
78
|
+
getUserInstance: (user: User | number) => Promise<UserSdk>;
|
|
79
|
+
getProfessional: (professionalId: number) => Promise<Professional>;
|
|
80
|
+
getAvailableScheduleClinics: () => Promise<AvailableScheduleClinics>;
|
|
81
|
+
enroll: (params: EnrollmentParams) => Promise<void>;
|
|
82
|
+
getConverageInfo: (identificationValue: string) => Promise<CoverageInfo>;
|
|
83
|
+
sendVerificationCode: (params: SendVerificationCodeParams) => Promise<void>;
|
|
84
|
+
getDiagnosticaHistory: (
|
|
85
|
+
patient: DiagnosticaPatientFilter,
|
|
86
|
+
from: Date,
|
|
87
|
+
to: Date,
|
|
88
|
+
) => Promise<DiagnosticaHistoryAppointment[]>;
|
|
89
|
+
getDiagnosticaDeepLink: (
|
|
90
|
+
kiosk: string,
|
|
91
|
+
user: DiagnosticaUser,
|
|
92
|
+
patient: DiagnosticaPatient,
|
|
93
|
+
) => Promise<DiagnosticaDeepLinkResponse>;
|
|
94
|
+
getDiagnosticaAccess: (
|
|
95
|
+
kiosk: string,
|
|
96
|
+
user: DiagnosticaUser,
|
|
97
|
+
patient: DiagnosticaPatient,
|
|
98
|
+
) => Promise<void>;
|
|
99
|
+
};
|
|
73
100
|
|
|
74
101
|
type RequestHandlerParams = {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
102
|
+
// Credentials that doc24 should use when singing the jwt
|
|
103
|
+
credentials: SdkCredentials;
|
|
104
|
+
eventHandlers: Webhook.Events;
|
|
105
|
+
// Address in which doc24 should send the requests
|
|
106
|
+
baseAddress: string;
|
|
107
|
+
};
|
|
81
108
|
```
|
|
82
109
|
|
|
83
110
|
`getRequestHandler` should be called only once, and takes care of managing the webhook that receives events from doc24.
|
|
84
111
|
|
|
85
112
|
### Express example
|
|
113
|
+
|
|
86
114
|
```ts
|
|
87
|
-
const handler = await getRequestHandler()
|
|
115
|
+
const handler = await getRequestHandler();
|
|
88
116
|
app.all('/doc24', async (req, res) => {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
117
|
+
const response = await handler({
|
|
118
|
+
headers: req.headers,
|
|
119
|
+
body: req.body,
|
|
120
|
+
query: req.query,
|
|
121
|
+
});
|
|
94
122
|
|
|
95
|
-
|
|
123
|
+
res.status(response.status.code).json(response.data);
|
|
96
124
|
});
|
|
97
125
|
```
|
|
98
126
|
|
|
99
127
|
### UserSdk
|
|
128
|
+
|
|
100
129
|
Most of the methods need a user specified, so `getUserInstance` returns an instance of `UserSdk` with them.
|
|
101
130
|
|
|
102
131
|
```ts
|
|
103
132
|
type UserSdk = {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
133
|
+
declarePatient: (
|
|
134
|
+
params: DeclarePatientParams,
|
|
135
|
+
) => Promise<DeclarePatientResponse>;
|
|
136
|
+
getPatientId: (patient: Patient) => Promise<number>;
|
|
137
|
+
getSpecialties: (
|
|
138
|
+
mode: SpecialtyMode,
|
|
139
|
+
language: string,
|
|
140
|
+
) => Promise<Specialty[]>;
|
|
141
|
+
getScheduleDates: (
|
|
142
|
+
patientId: number,
|
|
143
|
+
filter?: ScheduleAvailabilityFilter,
|
|
144
|
+
) => Promise<Date[]>;
|
|
145
|
+
getSchedule: (
|
|
146
|
+
patientId: number,
|
|
147
|
+
specialtyId: number,
|
|
148
|
+
filter?: ScheduleFilter,
|
|
149
|
+
) => Promise<AvailableAppointment[]>;
|
|
150
|
+
getAppointment: (appointmentId: number) => Promise<Appointment>;
|
|
151
|
+
getAppointmentByVcToken: (vcToken: string) => Promise<Appointment>;
|
|
152
|
+
scheduleVideoVisit: (params: ScheduleParameters) => Promise<string>;
|
|
153
|
+
cancelVideoVisit: (vcToken: string) => Promise<void>;
|
|
154
|
+
getVideoVisit: (vcToken: string, patientId: number) => Promise<VideoVisit>;
|
|
155
|
+
getVideoVisitDetails: (vcId: number) => Promise<VideoVisitDetails>;
|
|
156
|
+
getVideoVisitLink: (
|
|
157
|
+
vcToken: string,
|
|
158
|
+
patientId: number,
|
|
159
|
+
) => Promise<string | null>;
|
|
160
|
+
getPatientVideoVisitHistory: (patientId: number) => Promise<VideoVisit[]>;
|
|
161
|
+
getActiveVideoVisits: () => Promise<ActiveVideoVisitData[]>;
|
|
162
|
+
getAvailableChatrooms: (
|
|
163
|
+
patientId: number,
|
|
164
|
+
specialtyId: number,
|
|
165
|
+
filter: ChatroomAvailabilityFilter,
|
|
166
|
+
) => Promise<AvailableChatroom[]>;
|
|
167
|
+
createNewChat: (chatParameters: ChatParameters) => Promise<number>;
|
|
168
|
+
getPatientChats: (patientId: number) => Promise<ChatDetails[]>;
|
|
169
|
+
getChatPosts: (chatId: number) => Promise<ChatPost[]>;
|
|
170
|
+
cancelChat: (chatId: number) => Promise<void>;
|
|
171
|
+
sendChatMessage: (chatId: number, message: string) => Promise<number>;
|
|
172
|
+
userId: number;
|
|
173
|
+
};
|
|
174
|
+
```
|
|
@@ -11,22 +11,22 @@ export declare const getDiagnosticaMethods: (makeRequest: RequestMaker) => {
|
|
|
11
11
|
deepLink: string;
|
|
12
12
|
}[]>;
|
|
13
13
|
getDiagnosticaDeepLink: (kiosk: string, user: {
|
|
14
|
-
language: string;
|
|
15
14
|
firstName: string;
|
|
16
15
|
lastName: string;
|
|
17
|
-
birthday: Date;
|
|
18
16
|
identificationType: "dni";
|
|
19
17
|
identificationValue: string;
|
|
20
18
|
gender: "m" | "f";
|
|
21
19
|
phone: string;
|
|
22
20
|
email: string;
|
|
21
|
+
language: string;
|
|
22
|
+
birthday: Date;
|
|
23
23
|
}, patient: {
|
|
24
24
|
firstName: string;
|
|
25
25
|
lastName: string;
|
|
26
|
-
birthday: Date;
|
|
27
26
|
identificationType: "dni";
|
|
28
27
|
identificationValue: string;
|
|
29
28
|
gender: "m" | "f";
|
|
29
|
+
birthday: Date;
|
|
30
30
|
}) => Promise<{
|
|
31
31
|
forwardingRequired: true;
|
|
32
32
|
deepLink: string;
|
|
@@ -34,21 +34,21 @@ export declare const getDiagnosticaMethods: (makeRequest: RequestMaker) => {
|
|
|
34
34
|
forwardingRequired: false;
|
|
35
35
|
}>;
|
|
36
36
|
getDiagnosticaAccess: (kiosk: string, user: {
|
|
37
|
-
language: string;
|
|
38
37
|
firstName: string;
|
|
39
38
|
lastName: string;
|
|
40
|
-
birthday: Date;
|
|
41
39
|
identificationType: "dni";
|
|
42
40
|
identificationValue: string;
|
|
43
41
|
gender: "m" | "f";
|
|
44
42
|
phone: string;
|
|
45
43
|
email: string;
|
|
44
|
+
language: string;
|
|
45
|
+
birthday: Date;
|
|
46
46
|
}, patient: {
|
|
47
47
|
firstName: string;
|
|
48
48
|
lastName: string;
|
|
49
|
-
birthday: Date;
|
|
50
49
|
identificationType: "dni";
|
|
51
50
|
identificationValue: string;
|
|
52
51
|
gender: "m" | "f";
|
|
52
|
+
birthday: Date;
|
|
53
53
|
}) => Promise<void>;
|
|
54
54
|
};
|
package/lib/baseSdk/index.js
CHANGED
|
@@ -48,13 +48,9 @@ const getBaseSdk = async (url, credentials) => {
|
|
|
48
48
|
id: s.id_especialidad,
|
|
49
49
|
description: s.especialidad,
|
|
50
50
|
});
|
|
51
|
-
const mapSpecialityER = (s) => ({
|
|
52
|
-
id: s.specialty_id,
|
|
53
|
-
description: s.specialty,
|
|
54
|
-
});
|
|
55
51
|
const mapped = {
|
|
56
52
|
specialties: response.data.specialties.map(mapSpeciality),
|
|
57
|
-
specialtiesER: response.data.specialties_er.map(
|
|
53
|
+
specialtiesER: response.data.specialties_er.map(mapSpeciality),
|
|
58
54
|
professionals: response.data.professionals.map((p) => ({
|
|
59
55
|
id: p.id_profesional,
|
|
60
56
|
fullName: p.denominacion,
|
package/lib/baseSdk/user.d.ts
CHANGED
|
@@ -1,25 +1,72 @@
|
|
|
1
1
|
import { RequestMaker } from '../request';
|
|
2
2
|
import { Doc24 } from '../types';
|
|
3
3
|
export declare const getUserMethods: (makeRequest: RequestMaker, url: string, credentials: Doc24.SdkCredentials) => {
|
|
4
|
-
declareUser: (
|
|
4
|
+
declareUser: (params: {
|
|
5
|
+
code?: string | undefined;
|
|
6
|
+
channel?: "1" | "2" | undefined;
|
|
7
|
+
user: {
|
|
8
|
+
firstName: string;
|
|
9
|
+
lastName: string;
|
|
10
|
+
identificationType: "ndi" | "passport" | "credential";
|
|
11
|
+
identificationValue: string;
|
|
12
|
+
countryId: string;
|
|
13
|
+
birthdate: Date;
|
|
14
|
+
gender: "m" | "f";
|
|
15
|
+
phone: string;
|
|
16
|
+
email: string;
|
|
17
|
+
};
|
|
18
|
+
}) => Promise<{
|
|
19
|
+
patientId: number | null;
|
|
20
|
+
userInfo: {
|
|
21
|
+
phone: string;
|
|
22
|
+
email: string;
|
|
23
|
+
};
|
|
24
|
+
askCode: boolean;
|
|
25
|
+
userId: number;
|
|
26
|
+
}>;
|
|
27
|
+
getUserId: (user: {
|
|
5
28
|
firstName: string;
|
|
6
29
|
lastName: string;
|
|
7
30
|
identificationType: "ndi" | "passport" | "credential";
|
|
8
31
|
identificationValue: string;
|
|
32
|
+
countryId: string;
|
|
33
|
+
birthdate: Date;
|
|
9
34
|
gender: "m" | "f";
|
|
10
35
|
phone: string;
|
|
11
36
|
email: string;
|
|
37
|
+
}) => Promise<number>;
|
|
38
|
+
sendVerificationCode: (params: {
|
|
39
|
+
identificationType: "ndi" | "passport" | "credential";
|
|
40
|
+
identificationValue: string;
|
|
41
|
+
channel: "1" | "2";
|
|
42
|
+
}) => Promise<any>;
|
|
43
|
+
getUserInstance: (user: number | {
|
|
44
|
+
firstName: string;
|
|
45
|
+
lastName: string;
|
|
46
|
+
identificationType: "ndi" | "passport" | "credential";
|
|
47
|
+
identificationValue: string;
|
|
12
48
|
countryId: string;
|
|
13
49
|
birthdate: Date;
|
|
50
|
+
gender: "m" | "f";
|
|
51
|
+
phone: string;
|
|
52
|
+
email: string;
|
|
14
53
|
}) => Promise<any>;
|
|
15
|
-
|
|
16
|
-
|
|
54
|
+
enroll: (params: {
|
|
55
|
+
firstName: string;
|
|
56
|
+
lastName: string;
|
|
57
|
+
birthdate: Date;
|
|
58
|
+
gender: "m" | "f";
|
|
59
|
+
email: string;
|
|
60
|
+
startDate: Date;
|
|
61
|
+
identificationNumber: string;
|
|
62
|
+
plan: string;
|
|
63
|
+
}) => Promise<void>;
|
|
17
64
|
getConverageInfo: (identificationValue: string) => Promise<{
|
|
18
65
|
firstName: string | null;
|
|
19
66
|
lastName: string | null;
|
|
67
|
+
birthdate: Date;
|
|
20
68
|
gender: "m" | "f";
|
|
21
69
|
email: string | null;
|
|
22
|
-
birthdate: Date;
|
|
23
70
|
identificationNumber: string;
|
|
24
71
|
plan: string | null;
|
|
25
72
|
financerId: number | null;
|
package/lib/baseSdk/user.js
CHANGED
|
@@ -8,11 +8,39 @@ const schemas_1 = require("../schemas");
|
|
|
8
8
|
const userSdk_1 = require("../userSdk");
|
|
9
9
|
const utils_1 = require("../utils");
|
|
10
10
|
const getUserMethods = (makeRequest, url, credentials) => {
|
|
11
|
+
const declareUser = async ({ user, channel, code, }) => {
|
|
12
|
+
const path = '/user';
|
|
13
|
+
const mappedUser = {
|
|
14
|
+
lastname: user.lastName,
|
|
15
|
+
firstname: user.firstName,
|
|
16
|
+
identification_type: utils_1.getIdetificationTypeId(user.identificationType),
|
|
17
|
+
identification_value: user.identificationValue,
|
|
18
|
+
birthdate: date_fns_1.format(user.birthdate, 'yyyy-MM-dd'),
|
|
19
|
+
gender: user.gender.toUpperCase(),
|
|
20
|
+
phone: user.phone,
|
|
21
|
+
email: user.email,
|
|
22
|
+
country_id: user.countryId,
|
|
23
|
+
};
|
|
24
|
+
const parsedChannel = channel ? parseInt(channel) : channel;
|
|
25
|
+
const response = await makeRequest('POST', path, {
|
|
26
|
+
user_data: mappedUser,
|
|
27
|
+
channel: parsedChannel,
|
|
28
|
+
code,
|
|
29
|
+
});
|
|
30
|
+
const mappedResponse = {
|
|
31
|
+
userId: response.data.user_id,
|
|
32
|
+
patientId: response.data.patient_id,
|
|
33
|
+
userInfo: response.data.user_info,
|
|
34
|
+
askCode: response.data.ask_code,
|
|
35
|
+
};
|
|
36
|
+
return mappedResponse;
|
|
37
|
+
};
|
|
11
38
|
const getUserId = async (user) => {
|
|
39
|
+
const path = '/user';
|
|
12
40
|
const mappedUser = {
|
|
13
41
|
lastname: user.lastName,
|
|
14
42
|
firstname: user.firstName,
|
|
15
|
-
identification_type: utils_1.
|
|
43
|
+
identification_type: utils_1.getIdetificationTypeId(user.identificationType),
|
|
16
44
|
identification_value: user.identificationValue,
|
|
17
45
|
birthdate: date_fns_1.format(user.birthdate, 'yyyy-MM-dd'),
|
|
18
46
|
gender: user.gender.toUpperCase(),
|
|
@@ -20,12 +48,41 @@ const getUserMethods = (makeRequest, url, credentials) => {
|
|
|
20
48
|
email: user.email,
|
|
21
49
|
country_id: user.countryId,
|
|
22
50
|
};
|
|
23
|
-
const response = await makeRequest('POST',
|
|
51
|
+
const response = await makeRequest('POST', path, {
|
|
24
52
|
user_data: mappedUser,
|
|
25
53
|
});
|
|
26
54
|
return response.data.user_id;
|
|
27
55
|
};
|
|
28
|
-
const
|
|
56
|
+
const sendVerificationCode = async (params) => {
|
|
57
|
+
const path = '/send-verification-code';
|
|
58
|
+
const mappedParams = {
|
|
59
|
+
identification_type: utils_1.getIdetificationTypeId(params.identificationType),
|
|
60
|
+
identification_value: params.identificationValue,
|
|
61
|
+
channel: parseInt(params.channel),
|
|
62
|
+
};
|
|
63
|
+
await makeRequest('POST', path, mappedParams);
|
|
64
|
+
};
|
|
65
|
+
const getUserInstance = async (user) => {
|
|
66
|
+
const userId = typeof user === 'number' ? user : await getUserId(user);
|
|
67
|
+
return userSdk_1.userSdk(url, credentials, userId);
|
|
68
|
+
};
|
|
69
|
+
const enroll = async (params) => {
|
|
70
|
+
const path = `/enrollment`;
|
|
71
|
+
const mappedUser = {
|
|
72
|
+
firstname: params.firstName,
|
|
73
|
+
lastname: params.lastName,
|
|
74
|
+
gender: params.gender.toUpperCase(),
|
|
75
|
+
identification_number: params.identificationNumber,
|
|
76
|
+
birthdate: date_fns_1.format(params.birthdate, 'yyyy-MM-dd'),
|
|
77
|
+
email: params.email,
|
|
78
|
+
plan: params.plan,
|
|
79
|
+
start_date: date_fns_1.format(params.startDate, 'yyyy-MM-dd'),
|
|
80
|
+
};
|
|
81
|
+
await makeRequest('POST', path, {
|
|
82
|
+
user_data: mappedUser,
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
const getConverageInfo = async (identificationValue) => {
|
|
29
86
|
const path = `/info-coverage/${identificationValue}`;
|
|
30
87
|
const response = await makeRequest('GET', path);
|
|
31
88
|
const raw = response.data.info;
|
|
@@ -58,31 +115,16 @@ const getUserMethods = (makeRequest, url, credentials) => {
|
|
|
58
115
|
: null,
|
|
59
116
|
};
|
|
60
117
|
return mappedCoverageInfo;
|
|
61
|
-
}
|
|
118
|
+
};
|
|
62
119
|
return {
|
|
63
|
-
declareUser: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.
|
|
120
|
+
declareUser: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.declareUserParams]), schemas_1.doc24Schemas.declareUserResponse, declareUser),
|
|
121
|
+
getUserId: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.user]), zod_1.number(), getUserId),
|
|
122
|
+
sendVerificationCode: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.sendVerificationCodeParams]), zod_1.void(), sendVerificationCode),
|
|
64
123
|
getUserInstance: validation_1.validateFunction(zod_1.tuple([zod_1.union([schemas_1.doc24Schemas.user, zod_1.number()])]),
|
|
65
124
|
// TODO: validate?
|
|
66
|
-
zod_1.any(),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}),
|
|
70
|
-
enroll: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.enrollmentParams]), zod_1.void(), async (params) => {
|
|
71
|
-
const path = `/enrollment`;
|
|
72
|
-
await makeRequest('POST', path, {
|
|
73
|
-
user_data: {
|
|
74
|
-
firstname: params.firstName,
|
|
75
|
-
lastname: params.lastName,
|
|
76
|
-
gender: params.gender.toUpperCase(),
|
|
77
|
-
identification_number: params.identificationNumber,
|
|
78
|
-
birthdate: date_fns_1.format(params.birthdate, 'yyyy-MM-dd'),
|
|
79
|
-
email: params.email,
|
|
80
|
-
plan: params.plan,
|
|
81
|
-
start_date: date_fns_1.format(params.startDate, 'yyyy-MM-dd'),
|
|
82
|
-
},
|
|
83
|
-
});
|
|
84
|
-
}),
|
|
85
|
-
getConverageInfo,
|
|
125
|
+
zod_1.any(), getUserInstance),
|
|
126
|
+
enroll: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.enrollmentParams]), zod_1.void(), enroll),
|
|
127
|
+
getConverageInfo: validation_1.validateFunction(zod_1.tuple([zod_1.string()]), schemas_1.doc24Schemas.coverageInfo, getConverageInfo),
|
|
86
128
|
};
|
|
87
129
|
};
|
|
88
130
|
exports.getUserMethods = getUserMethods;
|
package/lib/index.d.ts
CHANGED
|
@@ -5,37 +5,60 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
5
5
|
eventHandlers: Doc24.Webhook.Events;
|
|
6
6
|
baseAddress: string;
|
|
7
7
|
}) => Promise<Doc24.Webhook.Handler>;
|
|
8
|
-
declareUser: (
|
|
8
|
+
declareUser: (params: {
|
|
9
|
+
code?: string | undefined;
|
|
10
|
+
channel?: "1" | "2" | undefined;
|
|
11
|
+
user: {
|
|
12
|
+
firstName: string;
|
|
13
|
+
lastName: string;
|
|
14
|
+
identificationType: "ndi" | "passport" | "credential";
|
|
15
|
+
identificationValue: string;
|
|
16
|
+
countryId: string;
|
|
17
|
+
birthdate: Date;
|
|
18
|
+
gender: "m" | "f";
|
|
19
|
+
phone: string;
|
|
20
|
+
email: string;
|
|
21
|
+
};
|
|
22
|
+
}) => Promise<{
|
|
23
|
+
patientId: number | null;
|
|
24
|
+
userInfo: {
|
|
25
|
+
phone: string;
|
|
26
|
+
email: string;
|
|
27
|
+
};
|
|
28
|
+
askCode: boolean;
|
|
29
|
+
userId: number;
|
|
30
|
+
}>;
|
|
31
|
+
getUserId: (user: {
|
|
9
32
|
firstName: string;
|
|
10
33
|
lastName: string;
|
|
11
34
|
identificationType: "ndi" | "passport" | "credential";
|
|
12
35
|
identificationValue: string;
|
|
36
|
+
countryId: string;
|
|
37
|
+
birthdate: Date;
|
|
13
38
|
gender: "m" | "f";
|
|
14
39
|
phone: string;
|
|
15
40
|
email: string;
|
|
16
|
-
countryId: string;
|
|
17
|
-
birthdate: Date;
|
|
18
41
|
}) => Promise<number>;
|
|
19
42
|
getUserInstance: (user: number | {
|
|
20
43
|
firstName: string;
|
|
21
44
|
lastName: string;
|
|
22
45
|
identificationType: "ndi" | "passport" | "credential";
|
|
23
46
|
identificationValue: string;
|
|
47
|
+
countryId: string;
|
|
48
|
+
birthdate: Date;
|
|
24
49
|
gender: "m" | "f";
|
|
25
50
|
phone: string;
|
|
26
51
|
email: string;
|
|
27
|
-
countryId: string;
|
|
28
|
-
birthdate: Date;
|
|
29
52
|
}) => Promise<Doc24.UserSdk>;
|
|
30
53
|
getProfessional: (professionalId: number) => Promise<{
|
|
31
|
-
id: number;
|
|
32
|
-
logoUrl: string;
|
|
33
54
|
firstName: string;
|
|
34
55
|
lastName: string;
|
|
56
|
+
birthdate: Date;
|
|
35
57
|
gender: "m" | "f";
|
|
36
58
|
phone: string | null;
|
|
37
59
|
email: string;
|
|
38
|
-
|
|
60
|
+
id: number;
|
|
61
|
+
logoUrl: string;
|
|
39
62
|
specialties: {
|
|
40
63
|
id: number;
|
|
41
64
|
description: string;
|
|
@@ -73,9 +96,9 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
73
96
|
enroll: (params: {
|
|
74
97
|
firstName: string;
|
|
75
98
|
lastName: string;
|
|
99
|
+
birthdate: Date;
|
|
76
100
|
gender: "m" | "f";
|
|
77
101
|
email: string;
|
|
78
|
-
birthdate: Date;
|
|
79
102
|
startDate: Date;
|
|
80
103
|
identificationNumber: string;
|
|
81
104
|
plan: string;
|
|
@@ -83,9 +106,9 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
83
106
|
getConverageInfo: (identificationValue: string) => Promise<{
|
|
84
107
|
firstName: string | null;
|
|
85
108
|
lastName: string | null;
|
|
109
|
+
birthdate: Date;
|
|
86
110
|
gender: "m" | "f";
|
|
87
111
|
email: string | null;
|
|
88
|
-
birthdate: Date;
|
|
89
112
|
identificationNumber: string;
|
|
90
113
|
plan: string | null;
|
|
91
114
|
financerId: number | null;
|
|
@@ -104,6 +127,11 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
104
127
|
authorizationCode: string | null;
|
|
105
128
|
authorizationCodeExpiration: Date | null;
|
|
106
129
|
} | null>;
|
|
130
|
+
sendVerificationCode: (params: {
|
|
131
|
+
identificationType: "ndi" | "passport" | "credential";
|
|
132
|
+
identificationValue: string;
|
|
133
|
+
channel: "1" | "2";
|
|
134
|
+
}) => Promise<any>;
|
|
107
135
|
getDiagnosticaHistory: (patient: {
|
|
108
136
|
identificationType: "ndi" | "passport" | "credential";
|
|
109
137
|
identificationValue: string;
|
|
@@ -115,22 +143,22 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
115
143
|
deepLink: string;
|
|
116
144
|
}[]>;
|
|
117
145
|
getDiagnosticaDeepLink: (kiosk: string, user: {
|
|
118
|
-
language: string;
|
|
119
146
|
firstName: string;
|
|
120
147
|
lastName: string;
|
|
121
|
-
birthday: Date;
|
|
122
148
|
identificationType: "dni";
|
|
123
149
|
identificationValue: string;
|
|
124
150
|
gender: "m" | "f";
|
|
125
151
|
phone: string;
|
|
126
152
|
email: string;
|
|
153
|
+
language: string;
|
|
154
|
+
birthday: Date;
|
|
127
155
|
}, patient: {
|
|
128
156
|
firstName: string;
|
|
129
157
|
lastName: string;
|
|
130
|
-
birthday: Date;
|
|
131
158
|
identificationType: "dni";
|
|
132
159
|
identificationValue: string;
|
|
133
160
|
gender: "m" | "f";
|
|
161
|
+
birthday: Date;
|
|
134
162
|
}) => Promise<{
|
|
135
163
|
forwardingRequired: true;
|
|
136
164
|
deepLink: string;
|
|
@@ -138,22 +166,22 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
138
166
|
forwardingRequired: false;
|
|
139
167
|
}>;
|
|
140
168
|
getDiagnosticaAccess: (kiosk: string, user: {
|
|
141
|
-
language: string;
|
|
142
169
|
firstName: string;
|
|
143
170
|
lastName: string;
|
|
144
|
-
birthday: Date;
|
|
145
171
|
identificationType: "dni";
|
|
146
172
|
identificationValue: string;
|
|
147
173
|
gender: "m" | "f";
|
|
148
174
|
phone: string;
|
|
149
175
|
email: string;
|
|
176
|
+
language: string;
|
|
177
|
+
birthday: Date;
|
|
150
178
|
}, patient: {
|
|
151
179
|
firstName: string;
|
|
152
180
|
lastName: string;
|
|
153
|
-
birthday: Date;
|
|
154
181
|
identificationType: "dni";
|
|
155
182
|
identificationValue: string;
|
|
156
183
|
gender: "m" | "f";
|
|
184
|
+
birthday: Date;
|
|
157
185
|
}) => Promise<void>;
|
|
158
186
|
}>;
|
|
159
187
|
export type { Doc24 } from './types';
|