@integraciones_doc24/sdk 1.12.4 → 1.12.6
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/baseSdk/external.js +2 -1
- package/lib/baseSdk/user.js +2 -0
- package/package.json +1 -1
package/lib/baseSdk/external.js
CHANGED
|
@@ -86,11 +86,12 @@ const getExternalMethods = (makeRequest) => {
|
|
|
86
86
|
return response.data;
|
|
87
87
|
};
|
|
88
88
|
const getExternalStudiesHistoryLink = async (patient) => {
|
|
89
|
+
var _a, _b;
|
|
89
90
|
const path = '/history-external-studies';
|
|
90
91
|
const response = await makeRequest('POST', path, {
|
|
91
92
|
patient: mapPatientData(patient),
|
|
92
93
|
});
|
|
93
|
-
return response.data.info.link;
|
|
94
|
+
return (_b = (_a = response.data.info) === null || _a === void 0 ? void 0 : _a.link) !== null && _b !== void 0 ? _b : null;
|
|
94
95
|
};
|
|
95
96
|
const getExternalAppointmentsLink = async (identificationValue, birthdate) => {
|
|
96
97
|
const path = `/external-appointments-link/${identificationValue}/${date_fns_1.format(birthdate, 'yyyy-MM-dd')}`;
|
package/lib/baseSdk/user.js
CHANGED
|
@@ -87,6 +87,8 @@ const getUserMethods = (makeRequest, url, credentials) => {
|
|
|
87
87
|
const path = `/info-coverage/${identificationValue}`;
|
|
88
88
|
const response = await makeRequest('GET', path);
|
|
89
89
|
const raw = response.data.info;
|
|
90
|
+
if (!raw)
|
|
91
|
+
return null;
|
|
90
92
|
const mappedCoverageInfo = {
|
|
91
93
|
financerId: raw.id_financiador,
|
|
92
94
|
defaultAffiliationId: raw.id_afiliacion_default,
|