@pegasimed.com/shared-tools 1.0.15 → 1.0.17
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/constants/index.d.ts +7 -0
- package/dist/constants/model-variables/index.d.ts +3 -4
- package/dist/constants/model-variables/index.js +3 -4
- package/dist/constants/model-variables/index.js.map +1 -1
- package/dist/constants/model-variables/kafka-models/appointment.d.ts +118 -0
- package/dist/constants/model-variables/kafka-models/appointment.js +189 -0
- package/dist/constants/model-variables/kafka-models/appointment.js.map +1 -0
- package/dist/constants/model-variables/kafka-models/appointmentRequest.d.ts +126 -0
- package/dist/constants/model-variables/kafka-models/appointmentRequest.js +199 -0
- package/dist/constants/model-variables/kafka-models/appointmentRequest.js.map +1 -0
- package/dist/constants/model-variables/kafka-models/carePlan.d.ts +90 -0
- package/dist/constants/model-variables/kafka-models/carePlan.js +138 -0
- package/dist/constants/model-variables/kafka-models/carePlan.js.map +1 -0
- package/dist/constants/model-variables/kafka-models/carePlanType.d.ts +66 -0
- package/dist/constants/model-variables/kafka-models/carePlanType.js +102 -0
- package/dist/constants/model-variables/kafka-models/carePlanType.js.map +1 -0
- package/dist/constants/model-variables/kafka-models/index.d.ts +11 -0
- package/dist/constants/model-variables/kafka-models/index.js +28 -0
- package/dist/constants/model-variables/kafka-models/index.js.map +1 -0
- package/dist/constants/model-variables/kafka-models/location.d.ts +90 -0
- package/dist/constants/model-variables/kafka-models/location.js +138 -0
- package/dist/constants/model-variables/kafka-models/location.js.map +1 -0
- package/dist/constants/model-variables/kafka-models/locationLog.d.ts +38 -0
- package/dist/constants/model-variables/kafka-models/locationLog.js +60 -0
- package/dist/constants/model-variables/kafka-models/locationLog.js.map +1 -0
- package/dist/constants/model-variables/kafka-models/reception.d.ts +50 -0
- package/dist/constants/model-variables/kafka-models/reception.js +78 -0
- package/dist/constants/model-variables/kafka-models/reception.js.map +1 -0
- package/dist/constants/model-variables/kafka-models/scheduleProfile.d.ts +50 -0
- package/dist/constants/model-variables/kafka-models/scheduleProfile.js +78 -0
- package/dist/constants/model-variables/kafka-models/scheduleProfile.js.map +1 -0
- package/dist/constants/model-variables/kafka-models/scheduledProcedure.d.ts +70 -0
- package/dist/constants/model-variables/kafka-models/scheduledProcedure.js +108 -0
- package/dist/constants/model-variables/kafka-models/scheduledProcedure.js.map +1 -0
- package/dist/constants/model-variables/kafka-models/shift.d.ts +30 -0
- package/dist/constants/model-variables/kafka-models/shift.js +48 -0
- package/dist/constants/model-variables/kafka-models/shift.js.map +1 -0
- package/dist/constants/model-variables/kafka-models/stage.d.ts +26 -0
- package/dist/constants/model-variables/kafka-models/stage.js +42 -0
- package/dist/constants/model-variables/kafka-models/stage.js.map +1 -0
- package/dist/constants/model-variables/models/index.d.ts +1 -0
- package/dist/constants/model-variables/models/index.js +18 -0
- package/dist/constants/model-variables/models/index.js.map +1 -0
- package/dist/constants/model-variables/models/patientCampaign.d.ts +82 -0
- package/dist/constants/model-variables/models/patientCampaign.js +137 -0
- package/dist/constants/model-variables/models/patientCampaign.js.map +1 -0
- package/dist/constants/model-variables/special-models/carePlanActivity.d.ts +170 -0
- package/dist/constants/model-variables/special-models/carePlanActivity.js +266 -0
- package/dist/constants/model-variables/special-models/carePlanActivity.js.map +1 -0
- package/dist/constants/model-variables/special-models/carePlanEvent.d.ts +42 -0
- package/dist/constants/model-variables/special-models/carePlanEvent.js +68 -0
- package/dist/constants/model-variables/special-models/carePlanEvent.js.map +1 -0
- package/dist/constants/model-variables/special-models/index.d.ts +2 -0
- package/dist/constants/model-variables/special-models/index.js +19 -0
- package/dist/constants/model-variables/special-models/index.js.map +1 -0
- package/dist/custom-variable-resolvers/executeFormula.d.ts +3 -2
- package/dist/custom-variable-resolvers/executeFormula.js +2 -2
- package/dist/custom-variable-resolvers/executeFormula.js.map +1 -1
- package/dist/custom-variable-resolvers/executeInputVariable.d.ts +2 -0
- package/dist/custom-variable-resolvers/executeInputVariable.js +47 -0
- package/dist/custom-variable-resolvers/executeInputVariable.js.map +1 -0
- package/dist/custom-variable-resolvers/executeVariablesCondition.d.ts +8 -2
- package/dist/custom-variable-resolvers/executeVariablesCondition.js +49 -21
- package/dist/custom-variable-resolvers/executeVariablesCondition.js.map +1 -1
- package/dist/custom-variable-resolvers/replaceAllVariables.d.ts +3 -2
- package/dist/custom-variable-resolvers/replaceAllVariables.js +6 -6
- package/dist/custom-variable-resolvers/replaceAllVariables.js.map +1 -1
- package/dist/utils/documents/core/emailValidate.d.ts +1 -0
- package/dist/utils/documents/core/emailValidate.js +8 -0
- package/dist/utils/documents/core/emailValidate.js.map +1 -0
- package/dist/utils/documents/core/getBirthCountry.d.ts +1 -0
- package/dist/utils/documents/core/getBirthCountry.js +14 -0
- package/dist/utils/documents/core/getBirthCountry.js.map +1 -0
- package/dist/utils/documents/core/getBodySite.d.ts +4 -0
- package/dist/utils/documents/core/getBodySite.js +28 -0
- package/dist/utils/documents/core/getBodySite.js.map +1 -0
- package/dist/utils/documents/core/getCodeData.d.ts +5 -0
- package/dist/utils/documents/core/getCodeData.js +15 -0
- package/dist/utils/documents/core/getCodeData.js.map +1 -0
- package/dist/utils/documents/core/getCodeableConceptTranslate.d.ts +1 -0
- package/dist/utils/documents/core/getCodeableConceptTranslate.js +12 -0
- package/dist/utils/documents/core/getCodeableConceptTranslate.js.map +1 -0
- package/dist/utils/documents/core/getCommunicationType.d.ts +1 -0
- package/dist/utils/documents/core/getCommunicationType.js +16 -0
- package/dist/utils/documents/core/getCommunicationType.js.map +1 -0
- package/dist/utils/documents/core/getContactData.d.ts +1 -0
- package/dist/utils/documents/core/getContactData.js +96 -0
- package/dist/utils/documents/core/getContactData.js.map +1 -0
- package/dist/utils/documents/core/getContactInformation.d.ts +1 -0
- package/dist/utils/documents/core/getContactInformation.js +17 -0
- package/dist/utils/documents/core/getContactInformation.js.map +1 -0
- package/dist/utils/documents/core/getDeceasedCountry.d.ts +1 -0
- package/dist/utils/documents/core/getDeceasedCountry.js +14 -0
- package/dist/utils/documents/core/getDeceasedCountry.js.map +1 -0
- package/dist/utils/documents/core/getExtensionCodeableConcept.d.ts +1 -0
- package/dist/utils/documents/core/getExtensionCodeableConcept.js +17 -0
- package/dist/utils/documents/core/getExtensionCodeableConcept.js.map +1 -0
- package/dist/utils/documents/core/getIdentifier.d.ts +1 -0
- package/dist/utils/documents/core/getIdentifier.js +12 -0
- package/dist/utils/documents/core/getIdentifier.js.map +1 -0
- package/dist/utils/documents/core/getIdentifierType.d.ts +1 -0
- package/dist/utils/documents/core/getIdentifierType.js +20 -0
- package/dist/utils/documents/core/getIdentifierType.js.map +1 -0
- package/dist/utils/documents/core/getNames.d.ts +3 -0
- package/dist/utils/documents/core/getNames.js +37 -0
- package/dist/utils/documents/core/getNames.js.map +1 -0
- package/dist/utils/documents/core/getPriority.d.ts +8 -0
- package/dist/utils/documents/core/getPriority.js +24 -0
- package/dist/utils/documents/core/getPriority.js.map +1 -0
- package/dist/utils/documents/core/getSpecimenType.d.ts +22 -0
- package/dist/utils/documents/core/getSpecimenType.js +49 -0
- package/dist/utils/documents/core/getSpecimenType.js.map +1 -0
- package/dist/utils/documents/core/getTelecomValue.d.ts +1 -0
- package/dist/utils/documents/core/getTelecomValue.js +17 -0
- package/dist/utils/documents/core/getTelecomValue.js.map +1 -0
- package/dist/utils/documents/core/index.d.ts +18 -0
- package/dist/utils/documents/core/index.js +35 -0
- package/dist/utils/documents/core/index.js.map +1 -0
- package/dist/utils/documents/core/normalizeData.d.ts +1 -0
- package/dist/utils/documents/core/normalizeData.js +15 -0
- package/dist/utils/documents/core/normalizeData.js.map +1 -0
- package/dist/utils/documents/core/telephoneValidate.d.ts +1 -0
- package/dist/utils/documents/core/telephoneValidate.js +9 -0
- package/dist/utils/documents/core/telephoneValidate.js.map +1 -0
- package/dist/utils/documents/index.d.ts +1 -0
- package/dist/utils/documents/index.js +18 -0
- package/dist/utils/documents/index.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +2 -1
- package/dist/constants/model-variables/appointment.d.ts +0 -37
- package/dist/constants/model-variables/appointment.js +0 -41
- package/dist/constants/model-variables/appointment.js.map +0 -1
- package/dist/constants/model-variables/appointmentRequest.d.ts +0 -35
- package/dist/constants/model-variables/appointmentRequest.js +0 -39
- package/dist/constants/model-variables/appointmentRequest.js.map +0 -1
- package/dist/constants/model-variables/location.d.ts +0 -26
- package/dist/constants/model-variables/location.js +0 -30
- package/dist/constants/model-variables/location.js.map +0 -1
- package/dist/constants/model-variables/scheduledProcedure.d.ts +0 -21
- package/dist/constants/model-variables/scheduledProcedure.js +0 -25
- package/dist/constants/model-variables/scheduledProcedure.js.map +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLastNames = exports.getFirstNames = exports.getFullName = void 0;
|
|
4
|
+
const getFullName = (data, use) => {
|
|
5
|
+
var _a;
|
|
6
|
+
if (Array.isArray(data === null || data === void 0 ? void 0 : data.name) && ((_a = data === null || data === void 0 ? void 0 : data.name) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
7
|
+
return data.name
|
|
8
|
+
.filter((item) => item.use === `${use}`)
|
|
9
|
+
.map((item) => { var _a; return `${((_a = item === null || item === void 0 ? void 0 : item.prefix) === null || _a === void 0 ? void 0 : _a.length) ? (item === null || item === void 0 ? void 0 : item.prefix[0]) || '' : ''} ${(item === null || item === void 0 ? void 0 : item.text) || ''} ${(item === null || item === void 0 ? void 0 : item.family) || ''}`.trim(); })
|
|
10
|
+
.join('');
|
|
11
|
+
}
|
|
12
|
+
return typeof (data === null || data === void 0 ? void 0 : data.name) === 'string' ? data === null || data === void 0 ? void 0 : data.name : '';
|
|
13
|
+
};
|
|
14
|
+
exports.getFullName = getFullName;
|
|
15
|
+
const getFirstNames = (data, use) => {
|
|
16
|
+
var _a;
|
|
17
|
+
if (Array.isArray(data === null || data === void 0 ? void 0 : data.name) && ((_a = data === null || data === void 0 ? void 0 : data.name) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
18
|
+
return data.name
|
|
19
|
+
.filter((item) => item.use === `${use}`)
|
|
20
|
+
.map((item) => { var _a; return ((_a = item === null || item === void 0 ? void 0 : item.text) === null || _a === void 0 ? void 0 : _a.trim()) || ''; })
|
|
21
|
+
.join('');
|
|
22
|
+
}
|
|
23
|
+
return typeof (data === null || data === void 0 ? void 0 : data.name) === 'string' ? data === null || data === void 0 ? void 0 : data.name : '';
|
|
24
|
+
};
|
|
25
|
+
exports.getFirstNames = getFirstNames;
|
|
26
|
+
const getLastNames = (data, use) => {
|
|
27
|
+
var _a;
|
|
28
|
+
if (Array.isArray(data === null || data === void 0 ? void 0 : data.name) && ((_a = data === null || data === void 0 ? void 0 : data.name) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
29
|
+
return data.name
|
|
30
|
+
.filter((item) => item.use === `${use}`)
|
|
31
|
+
.map((item) => { var _a; return ((_a = item === null || item === void 0 ? void 0 : item.family) === null || _a === void 0 ? void 0 : _a.trim()) || ''; })
|
|
32
|
+
.join('');
|
|
33
|
+
}
|
|
34
|
+
return typeof (data === null || data === void 0 ? void 0 : data.name) === 'string' ? data === null || data === void 0 ? void 0 : data.name : '';
|
|
35
|
+
};
|
|
36
|
+
exports.getLastNames = getLastNames;
|
|
37
|
+
//# sourceMappingURL=getNames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNames.js","sourceRoot":"","sources":["../../../../src/utils/documents/core/getNames.ts"],"names":[],"mappings":";;;AAAO,MAAM,WAAW,GAAG,CAAC,IAAS,EAAE,GAAQ,EAAE,EAAE;;IACjD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,CAAC,KAAI,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,MAAM,CAAA,EAAE,CAAC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
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPriority = void 0;
|
|
4
|
+
const getPriority = (doc) => {
|
|
5
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
6
|
+
if (doc === null || doc === void 0 ? void 0 : doc.priority)
|
|
7
|
+
return null;
|
|
8
|
+
const code = ((_a = doc === null || doc === void 0 ? void 0 : doc.code) === null || _a === void 0 ? void 0 : _a.length) ? ((_b = doc.code[0]) === null || _b === void 0 ? void 0 : _b.code) || null : null;
|
|
9
|
+
const text = ((_c = doc === null || doc === void 0 ? void 0 : doc.code) === null || _c === void 0 ? void 0 : _c.length) ? ((_d = doc.code[0]) === null || _d === void 0 ? void 0 : _d.text) || null : null;
|
|
10
|
+
const system = ((_e = doc === null || doc === void 0 ? void 0 : doc.code) === null || _e === void 0 ? void 0 : _e.length) ? ((_f = doc.code[0]) === null || _f === void 0 ? void 0 : _f.system) || null : null;
|
|
11
|
+
const version = ((_g = doc === null || doc === void 0 ? void 0 : doc.code) === null || _g === void 0 ? void 0 : _g.length) ? ((_h = doc.code[0]) === null || _h === void 0 ? void 0 : _h.version) || null : null;
|
|
12
|
+
const colorCode = doc === null || doc === void 0 ? void 0 : doc.colorCode;
|
|
13
|
+
const value = doc === null || doc === void 0 ? void 0 : doc.value;
|
|
14
|
+
return {
|
|
15
|
+
code,
|
|
16
|
+
text,
|
|
17
|
+
system,
|
|
18
|
+
version,
|
|
19
|
+
colorCode,
|
|
20
|
+
value,
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
exports.getPriority = getPriority;
|
|
24
|
+
//# sourceMappingURL=getPriority.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPriority.js","sourceRoot":"","sources":["../../../../src/utils/documents/core/getPriority.ts"],"names":[],"mappings":";;;AAAO,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,EAAE;;IACtC,IAAI,GAAG,aAAH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
1
|
+
export declare const getSpecimenType: (doc: any, lang: any) => {
|
|
2
|
+
name: any;
|
|
3
|
+
sample: {
|
|
4
|
+
examType: {
|
|
5
|
+
text: any;
|
|
6
|
+
system: any;
|
|
7
|
+
version: any;
|
|
8
|
+
code: any;
|
|
9
|
+
name: any;
|
|
10
|
+
};
|
|
11
|
+
unitType: any;
|
|
12
|
+
unit: any;
|
|
13
|
+
name: any;
|
|
14
|
+
} | null;
|
|
15
|
+
category: {
|
|
16
|
+
text: any;
|
|
17
|
+
system: any;
|
|
18
|
+
version: any;
|
|
19
|
+
code: any;
|
|
20
|
+
name: any;
|
|
21
|
+
} | null;
|
|
22
|
+
} | null;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSpecimenType = void 0;
|
|
4
|
+
const getCodeableConceptTranslate_1 = require("./getCodeableConceptTranslate");
|
|
5
|
+
const getSpecimenType = (doc, lang) => {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
|
|
7
|
+
if (!(doc === null || doc === void 0 ? void 0 : doc.specimenType))
|
|
8
|
+
return null;
|
|
9
|
+
const specimenType = doc.specimenType;
|
|
10
|
+
const name = (specimenType === null || specimenType === void 0 ? void 0 : specimenType.name) || null;
|
|
11
|
+
const category = (specimenType === null || specimenType === void 0 ? void 0 : specimenType.category)
|
|
12
|
+
? {
|
|
13
|
+
text: ((_a = specimenType === null || specimenType === void 0 ? void 0 : specimenType.category) === null || _a === void 0 ? void 0 : _a.text) || null,
|
|
14
|
+
system: ((_c = (_b = specimenType === null || specimenType === void 0 ? void 0 : specimenType.category) === null || _b === void 0 ? void 0 : _b.coding) === null || _c === void 0 ? void 0 : _c.length) ? ((_e = (_d = specimenType === null || specimenType === void 0 ? void 0 : specimenType.category) === null || _d === void 0 ? void 0 : _d.coding[0]) === null || _e === void 0 ? void 0 : _e.system) || null : null,
|
|
15
|
+
version: ((_g = (_f = specimenType === null || specimenType === void 0 ? void 0 : specimenType.category) === null || _f === void 0 ? void 0 : _f.coding) === null || _g === void 0 ? void 0 : _g.length) ? ((_j = (_h = specimenType === null || specimenType === void 0 ? void 0 : specimenType.category) === null || _h === void 0 ? void 0 : _h.coding[0]) === null || _j === void 0 ? void 0 : _j.version) || null : null,
|
|
16
|
+
code: ((_l = (_k = specimenType === null || specimenType === void 0 ? void 0 : specimenType.category) === null || _k === void 0 ? void 0 : _k.coding) === null || _l === void 0 ? void 0 : _l.length) ? ((_o = (_m = specimenType === null || specimenType === void 0 ? void 0 : specimenType.category) === null || _m === void 0 ? void 0 : _m.coding[0]) === null || _o === void 0 ? void 0 : _o.code) || null : null,
|
|
17
|
+
name: (0, getCodeableConceptTranslate_1.getCodeableConceptTranslate)(specimenType.category, lang),
|
|
18
|
+
}
|
|
19
|
+
: null;
|
|
20
|
+
const sample = (specimenType === null || specimenType === void 0 ? void 0 : specimenType.sample)
|
|
21
|
+
? {
|
|
22
|
+
examType: {
|
|
23
|
+
text: ((_q = (_p = specimenType === null || specimenType === void 0 ? void 0 : specimenType.sample) === null || _p === void 0 ? void 0 : _p.examType) === null || _q === void 0 ? void 0 : _q.text) || null,
|
|
24
|
+
system: ((_t = (_s = (_r = specimenType === null || specimenType === void 0 ? void 0 : specimenType.sample) === null || _r === void 0 ? void 0 : _r.examType) === null || _s === void 0 ? void 0 : _s.coding) === null || _t === void 0 ? void 0 : _t.length)
|
|
25
|
+
? ((_w = (_v = (_u = specimenType === null || specimenType === void 0 ? void 0 : specimenType.sample) === null || _u === void 0 ? void 0 : _u.examType) === null || _v === void 0 ? void 0 : _v.coding[0]) === null || _w === void 0 ? void 0 : _w.system) || null
|
|
26
|
+
: null,
|
|
27
|
+
version: ((_z = (_y = (_x = specimenType === null || specimenType === void 0 ? void 0 : specimenType.sample) === null || _x === void 0 ? void 0 : _x.examType) === null || _y === void 0 ? void 0 : _y.coding) === null || _z === void 0 ? void 0 : _z.length)
|
|
28
|
+
? ((_2 = (_1 = (_0 = specimenType === null || specimenType === void 0 ? void 0 : specimenType.sample) === null || _0 === void 0 ? void 0 : _0.examType) === null || _1 === void 0 ? void 0 : _1.coding[0]) === null || _2 === void 0 ? void 0 : _2.version) || null
|
|
29
|
+
: null,
|
|
30
|
+
code: ((_5 = (_4 = (_3 = specimenType === null || specimenType === void 0 ? void 0 : specimenType.sample) === null || _3 === void 0 ? void 0 : _3.examType) === null || _4 === void 0 ? void 0 : _4.coding) === null || _5 === void 0 ? void 0 : _5.length)
|
|
31
|
+
? ((_8 = (_7 = (_6 = specimenType === null || specimenType === void 0 ? void 0 : specimenType.sample) === null || _6 === void 0 ? void 0 : _6.examType) === null || _7 === void 0 ? void 0 : _7.coding[0]) === null || _8 === void 0 ? void 0 : _8.code) || null
|
|
32
|
+
: null,
|
|
33
|
+
name: ((_9 = specimenType === null || specimenType === void 0 ? void 0 : specimenType.sample) === null || _9 === void 0 ? void 0 : _9.examType)
|
|
34
|
+
? (0, getCodeableConceptTranslate_1.getCodeableConceptTranslate)((_10 = specimenType === null || specimenType === void 0 ? void 0 : specimenType.sample) === null || _10 === void 0 ? void 0 : _10.examType, lang)
|
|
35
|
+
: null,
|
|
36
|
+
},
|
|
37
|
+
unitType: ((_11 = specimenType === null || specimenType === void 0 ? void 0 : specimenType.sample) === null || _11 === void 0 ? void 0 : _11.unitType) || null,
|
|
38
|
+
unit: ((_12 = specimenType === null || specimenType === void 0 ? void 0 : specimenType.sample) === null || _12 === void 0 ? void 0 : _12.unit) || null,
|
|
39
|
+
name: ((_13 = specimenType === null || specimenType === void 0 ? void 0 : specimenType.sample) === null || _13 === void 0 ? void 0 : _13.sample) || null,
|
|
40
|
+
}
|
|
41
|
+
: null;
|
|
42
|
+
return {
|
|
43
|
+
name,
|
|
44
|
+
sample,
|
|
45
|
+
category,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
exports.getSpecimenType = getSpecimenType;
|
|
49
|
+
//# sourceMappingURL=getSpecimenType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSpecimenType.js","sourceRoot":"","sources":["../../../../src/utils/documents/core/getSpecimenType.ts"],"names":[],"mappings":";;;AAAA,+EAA4E;AAErE,MAAM,eAAe,GAAG,CAAC,GAAQ,EAAE,IAAS,EAAE,EAAE;;IACrD,IAAI,CAAC,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,YAAY,CAAA;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IACtC,MAAM,IAAI,GAAG,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,KAAI,IAAI,CAAC;IACxC,MAAM,QAAQ,GAAG,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ;QACrC,CAAC,CAAC;YACE,IAAI,EAAE,CAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,0CAAE,IAAI,KAAI,IAAI;YAC1C,MAAM,EAAE,CAAA,MAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,0CAAE,MAAM,0CAAE,MAAM,EAAC,CAAC,CAAC,CAAA,MAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,0CAAE,MAAM,CAAC,CAAC,CAAC,0CAAE,MAAM,KAAI,IAAI,CAAC,CAAC,CAAC,IAAI;YACzG,OAAO,EAAE,CAAA,MAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,0CAAE,MAAM,0CAAE,MAAM,EAAC,CAAC,CAAC,CAAA,MAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,0CAAE,MAAM,CAAC,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Module", { value: true });
|
|
3
|
+
exports.getTelecomValue = void 0;
|
|
4
|
+
const getTelecomValue = (data, system, use) => {
|
|
5
|
+
var _a, _b, _c, _d, _e;
|
|
6
|
+
if ((data === null || data === void 0 ? void 0 : data.telecom) && ((_a = data === null || data === void 0 ? void 0 : data.telecom) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
7
|
+
if (use) {
|
|
8
|
+
return ((_c = (_b = data === null || data === void 0 ? void 0 : data.telecom) === null || _b === void 0 ? void 0 : _b.find((item) => (item === null || item === void 0 ? void 0 : item.system) === `${system}` && (item === null || item === void 0 ? void 0 : item.use) === `${use}`)) === null || _c === void 0 ? void 0 : _c.value) || '';
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return ((_e = (_d = data === null || data === void 0 ? void 0 : data.telecom) === null || _d === void 0 ? void 0 : _d.find((item) => (item === null || item === void 0 ? void 0 : item.system) === `${system}`)) === null || _e === void 0 ? void 0 : _e.value) || '';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return '';
|
|
15
|
+
};
|
|
16
|
+
exports.getTelecomValue = getTelecomValue;
|
|
17
|
+
//# sourceMappingURL=getTelecomValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTelecomValue.js","sourceRoot":"","sources":["../../../../src/utils/documents/core/getTelecomValue.ts"],"names":[],"mappings":";;;AAAO,MAAM,eAAe,GAAG,CAAC,IAAS,EAAE,MAAW,EAAE,GAAS,EAAE,EAAE;;IACnE,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,KAAI,CAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,0CAAE,MAAM,IAAG,CAAC,EAAE,CAAC;QAC/C,IAAI,GAAG,EAAE,CAAC;YACR,OAAO,CAAA,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,0CAAE,IAAI,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,MAAK,GAAG,MAAM,EAAE,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,MAAK,GAAG,GAAG,EAAE,CAAC,0CAAE,KAAK,KAAI,EAAE,CAAC;QACjH,CAAC;aAAM,CAAC;YACN,OAAO,CAAA,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,0CAAE,IAAI,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,MAAK,GAAG,MAAM,EAAE,CAAC,0CAAE,KAAK,KAAI,EAAE,CAAC;QACvF,CAAC;IACH,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAVW,QAAA,eAAe,mBAU1B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './emailValidate';
|
|
2
|
+
export * from './getBirthCountry';
|
|
3
|
+
export * from './getBodySite';
|
|
4
|
+
export * from './getCodeableConceptTranslate';
|
|
5
|
+
export * from './getCodeData';
|
|
6
|
+
export * from './getCommunicationType';
|
|
7
|
+
export * from './getContactData';
|
|
8
|
+
export * from './getContactInformation';
|
|
9
|
+
export * from './getDeceasedCountry';
|
|
10
|
+
export * from './getExtensionCodeableConcept';
|
|
11
|
+
export * from './getIdentifier';
|
|
12
|
+
export * from './getIdentifierType';
|
|
13
|
+
export * from './getNames';
|
|
14
|
+
export * from './getPriority';
|
|
15
|
+
export * from './getSpecimenType';
|
|
16
|
+
export * from './getTelecomValue';
|
|
17
|
+
export * from './normalizeData';
|
|
18
|
+
export * from './telephoneValidate';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./emailValidate"), exports);
|
|
18
|
+
__exportStar(require("./getBirthCountry"), exports);
|
|
19
|
+
__exportStar(require("./getBodySite"), exports);
|
|
20
|
+
__exportStar(require("./getCodeableConceptTranslate"), exports);
|
|
21
|
+
__exportStar(require("./getCodeData"), exports);
|
|
22
|
+
__exportStar(require("./getCommunicationType"), exports);
|
|
23
|
+
__exportStar(require("./getContactData"), exports);
|
|
24
|
+
__exportStar(require("./getContactInformation"), exports);
|
|
25
|
+
__exportStar(require("./getDeceasedCountry"), exports);
|
|
26
|
+
__exportStar(require("./getExtensionCodeableConcept"), exports);
|
|
27
|
+
__exportStar(require("./getIdentifier"), exports);
|
|
28
|
+
__exportStar(require("./getIdentifierType"), exports);
|
|
29
|
+
__exportStar(require("./getNames"), exports);
|
|
30
|
+
__exportStar(require("./getPriority"), exports);
|
|
31
|
+
__exportStar(require("./getSpecimenType"), exports);
|
|
32
|
+
__exportStar(require("./getTelecomValue"), exports);
|
|
33
|
+
__exportStar(require("./normalizeData"), exports);
|
|
34
|
+
__exportStar(require("./telephoneValidate"), exports);
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/documents/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,oDAAkC;AAClC,gDAA8B;AAC9B,gEAA8C;AAC9C,gDAA8B;AAC9B,yDAAuC;AACvC,mDAAiC;AACjC,0DAAwC;AACxC,uDAAqC;AACrC,gEAA8C;AAC9C,kDAAgC;AAChC,sDAAoC;AACpC,6CAA2B;AAC3B,gDAA8B;AAC9B,oDAAkC;AAClC,oDAAkC;AAClC,kDAAgC;AAChC,sDAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const normalizeData: (data: any) => any;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeData = void 0;
|
|
4
|
+
const normalizeData = (data) => {
|
|
5
|
+
if (data && typeof data === 'string') {
|
|
6
|
+
return data
|
|
7
|
+
.toLowerCase()
|
|
8
|
+
.trim()
|
|
9
|
+
.normalize('NFD')
|
|
10
|
+
.replace(/[\u0300-\u036F]/g, '');
|
|
11
|
+
}
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
exports.normalizeData = normalizeData;
|
|
15
|
+
//# sourceMappingURL=normalizeData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeData.js","sourceRoot":"","sources":["../../../../src/utils/documents/core/normalizeData.ts"],"names":[],"mappings":";;;AAAO,MAAM,aAAa,GAAG,CAAC,IAAS,EAAE,EAAE;IACzC,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QACrC,OAAO,IAAI;aACR,WAAW,EAAE;aACb,IAAI,EAAE;aACN,SAAS,CAAC,KAAK,CAAC;aAChB,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAVW,QAAA,aAAa,iBAUxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const telephoneValidate: (telephone: any) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.telephoneValidate = void 0;
|
|
4
|
+
const telephoneValidate = (telephone) => {
|
|
5
|
+
const newTelePhone = `+${telephone === null || telephone === void 0 ? void 0 : telephone.replace(/\D/g, '')}`;
|
|
6
|
+
return (newTelePhone === null || newTelePhone === void 0 ? void 0 : newTelePhone.length) >= 9 && (newTelePhone === null || newTelePhone === void 0 ? void 0 : newTelePhone.length) <= 14 ? newTelePhone : '';
|
|
7
|
+
};
|
|
8
|
+
exports.telephoneValidate = telephoneValidate;
|
|
9
|
+
//# sourceMappingURL=telephoneValidate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telephoneValidate.js","sourceRoot":"","sources":["../../../../src/utils/documents/core/telephoneValidate.ts"],"names":[],"mappings":";;;AAAO,MAAM,iBAAiB,GAAG,CAAC,SAAc,EAAE,EAAE;IAClD,MAAM,YAAY,GAAG,IAAI,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC;IAEzD,OAAO,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,KAAI,CAAC,IAAI,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,KAAI,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;AACrF,CAAC,CAAC;AAJW,QAAA,iBAAiB,qBAI5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './core';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./core"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/documents/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB"}
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./documents"), exports);
|
|
17
18
|
__exportStar(require("./functionOperations"), exports);
|
|
18
19
|
__exportStar(require("./getAllJsonKeyAndValues"), exports);
|
|
19
20
|
__exportStar(require("./newValueInstance"), exports);
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,2DAAyC;AACzC,qDAAmC;AACnC,iEAA+C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,uDAAqC;AACrC,2DAAyC;AACzC,qDAAmC;AACnC,iEAA+C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pegasimed.com/shared-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "Pegasi shared tools",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"type-check": "^0.4.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
+
"@pegasimed.com/testing-tools": "^1.0.23",
|
|
42
43
|
"@types/mocha": "^10.0.9",
|
|
43
44
|
"@types/node": "^22.9.0",
|
|
44
45
|
"@types/type-check": "^0.3.31",
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export declare const APPOINTMENT_ENUM: {
|
|
2
|
-
eventType: string;
|
|
3
|
-
scheduleProfile: string;
|
|
4
|
-
patient: string;
|
|
5
|
-
date: string;
|
|
6
|
-
startTime: string;
|
|
7
|
-
endTime: string;
|
|
8
|
-
procedureType: string;
|
|
9
|
-
user: string;
|
|
10
|
-
notificationWay: string;
|
|
11
|
-
consultationType: string;
|
|
12
|
-
status: {
|
|
13
|
-
statusType: string;
|
|
14
|
-
confirmationMethod: string;
|
|
15
|
-
reasonSuspended: string;
|
|
16
|
-
user: string;
|
|
17
|
-
date: string;
|
|
18
|
-
};
|
|
19
|
-
active: string;
|
|
20
|
-
overshift: string;
|
|
21
|
-
licenseKey: string;
|
|
22
|
-
supplier: string;
|
|
23
|
-
attenderType: string;
|
|
24
|
-
host: string;
|
|
25
|
-
details: {
|
|
26
|
-
title: string;
|
|
27
|
-
description: string;
|
|
28
|
-
};
|
|
29
|
-
medicalBoard: {
|
|
30
|
-
participants: string;
|
|
31
|
-
patients: string;
|
|
32
|
-
};
|
|
33
|
-
externalId: string;
|
|
34
|
-
externalIdTwo: string;
|
|
35
|
-
physicalLocation: string;
|
|
36
|
-
virtualLocation: string;
|
|
37
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.APPOINTMENT_ENUM = void 0;
|
|
4
|
-
exports.APPOINTMENT_ENUM = {
|
|
5
|
-
eventType: 'Tipo de evento',
|
|
6
|
-
scheduleProfile: 'Id del perfil de horario',
|
|
7
|
-
patient: 'Información del paciente',
|
|
8
|
-
date: 'Fecha de la cita',
|
|
9
|
-
startTime: 'Hora de inicio',
|
|
10
|
-
endTime: 'Hora de fin',
|
|
11
|
-
procedureType: 'Tipo de procedimiento',
|
|
12
|
-
user: 'Usuario',
|
|
13
|
-
notificationWay: 'Forma de notificación',
|
|
14
|
-
consultationType: 'Tipo de consulta',
|
|
15
|
-
status: {
|
|
16
|
-
statusType: 'Estado de la cita',
|
|
17
|
-
confirmationMethod: 'Método de confirmación',
|
|
18
|
-
reasonSuspended: 'Motivo de suspensión',
|
|
19
|
-
user: 'Usuario que cambió el estado',
|
|
20
|
-
date: 'Fecha de cambio de estado',
|
|
21
|
-
},
|
|
22
|
-
active: 'Modelo activo',
|
|
23
|
-
overshift: 'Sobreturno activo',
|
|
24
|
-
licenseKey: 'Clave de licencia',
|
|
25
|
-
supplier: 'Información del proveedor',
|
|
26
|
-
attenderType: 'Tipo de asistente',
|
|
27
|
-
host: 'Información del anfitrión',
|
|
28
|
-
details: {
|
|
29
|
-
title: 'Título del detalle',
|
|
30
|
-
description: 'Descripción del detalle',
|
|
31
|
-
},
|
|
32
|
-
medicalBoard: {
|
|
33
|
-
participants: 'Participantes del consejo médico',
|
|
34
|
-
patients: 'Pacientes del consejo médico',
|
|
35
|
-
},
|
|
36
|
-
externalId: 'Id externo',
|
|
37
|
-
externalIdTwo: 'Id externo 2',
|
|
38
|
-
physicalLocation: 'Ubicación física',
|
|
39
|
-
virtualLocation: 'Ubicación virtual',
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=appointment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appointment.js","sourceRoot":"","sources":["../../../src/constants/model-variables/appointment.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,SAAS,EAAE,gBAAgB;IAC3B,eAAe,EAAE,0BAA0B;IAC3C,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,kBAAkB;IACxB,SAAS,EAAE,gBAAgB;IAC3B,OAAO,EAAE,aAAa;IACtB,aAAa,EAAE,uBAAuB;IACtC,IAAI,EAAE,SAAS;IACf,eAAe,EAAE,uBAAuB;IACxC,gBAAgB,EAAE,kBAAkB;IACpC,MAAM,EAAE;QACN,UAAU,EAAE,mBAAmB;QAC/B,kBAAkB,EAAE,wBAAwB;QAC5C,eAAe,EAAE,sBAAsB;QACvC,IAAI,EAAE,8BAA8B;QACpC,IAAI,EAAE,2BAA2B;KAClC;IACD,MAAM,EAAE,eAAe;IACvB,SAAS,EAAE,mBAAmB;IAC9B,UAAU,EAAE,mBAAmB;IAC/B,QAAQ,EAAE,2BAA2B;IACrC,YAAY,EAAE,mBAAmB;IACjC,IAAI,EAAE,2BAA2B;IACjC,OAAO,EAAE;QACP,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE,yBAAyB;KACvC;IACD,YAAY,EAAE;QACZ,YAAY,EAAE,kCAAkC;QAChD,QAAQ,EAAE,8BAA8B;KACzC;IACD,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,cAAc;IAC7B,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,mBAAmB;CACrC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export declare const APPOINTMENT_REQUEST_ENUM: {
|
|
2
|
-
scheduleProfile: string;
|
|
3
|
-
date: string;
|
|
4
|
-
startTime: string;
|
|
5
|
-
endTime: string;
|
|
6
|
-
isPatient: string;
|
|
7
|
-
patient: string;
|
|
8
|
-
supplier: string;
|
|
9
|
-
procedureType: string;
|
|
10
|
-
active: string;
|
|
11
|
-
notificationWay: string;
|
|
12
|
-
consultationType: string;
|
|
13
|
-
licenseKey: string;
|
|
14
|
-
status: {
|
|
15
|
-
statusType: string;
|
|
16
|
-
confirmationMethod: string;
|
|
17
|
-
reasonSuspended: string;
|
|
18
|
-
user: string;
|
|
19
|
-
date: string;
|
|
20
|
-
comments: string;
|
|
21
|
-
cancelationReason: string;
|
|
22
|
-
};
|
|
23
|
-
requestType: string;
|
|
24
|
-
requestSource: string;
|
|
25
|
-
patientCoverageCondition: string;
|
|
26
|
-
referredBy: string;
|
|
27
|
-
referringOrganization: string;
|
|
28
|
-
referralReason: string;
|
|
29
|
-
referredSpecialty: string;
|
|
30
|
-
provisionalDiagnosis: string;
|
|
31
|
-
encounter: string;
|
|
32
|
-
priority: string;
|
|
33
|
-
notes: string;
|
|
34
|
-
user: string;
|
|
35
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.APPOINTMENT_REQUEST_ENUM = void 0;
|
|
4
|
-
exports.APPOINTMENT_REQUEST_ENUM = {
|
|
5
|
-
scheduleProfile: 'Id del perfil de horario',
|
|
6
|
-
date: 'Fecha de la solicitud de cita',
|
|
7
|
-
startTime: 'Hora de inicio',
|
|
8
|
-
endTime: 'Hora de fin',
|
|
9
|
-
isPatient: 'Es paciente',
|
|
10
|
-
patient: 'Información del paciente',
|
|
11
|
-
supplier: 'Información del proveedor',
|
|
12
|
-
procedureType: 'Tipo de procedimiento',
|
|
13
|
-
active: 'Modelo activo',
|
|
14
|
-
notificationWay: 'Forma de notificación',
|
|
15
|
-
consultationType: 'Tipo de consulta',
|
|
16
|
-
licenseKey: 'Clave de licencia',
|
|
17
|
-
status: {
|
|
18
|
-
statusType: 'Estado de la solicitud',
|
|
19
|
-
confirmationMethod: 'Método de confirmación',
|
|
20
|
-
reasonSuspended: 'Motivo de suspensión',
|
|
21
|
-
user: 'Usuario que cambió el estado',
|
|
22
|
-
date: 'Fecha de cambio de estado',
|
|
23
|
-
comments: 'Comentarios del estado',
|
|
24
|
-
cancelationReason: 'Motivo de cancelación',
|
|
25
|
-
},
|
|
26
|
-
requestType: 'Tipo de solicitud',
|
|
27
|
-
requestSource: 'Fuente de la solicitud',
|
|
28
|
-
patientCoverageCondition: 'Condición de cobertura del paciente',
|
|
29
|
-
referredBy: 'Referido por',
|
|
30
|
-
referringOrganization: 'Organización referente',
|
|
31
|
-
referralReason: 'Motivo de la referencia',
|
|
32
|
-
referredSpecialty: 'Especialidad referida',
|
|
33
|
-
provisionalDiagnosis: 'Diagnóstico provisional',
|
|
34
|
-
encounter: 'Información de la consulta',
|
|
35
|
-
priority: 'Prioridad',
|
|
36
|
-
notes: 'Notas',
|
|
37
|
-
user: 'Usuario',
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=appointmentRequest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appointmentRequest.js","sourceRoot":"","sources":["../../../src/constants/model-variables/appointmentRequest.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG;IACtC,eAAe,EAAE,0BAA0B;IAC3C,IAAI,EAAE,+BAA+B;IACrC,SAAS,EAAE,gBAAgB;IAC3B,OAAO,EAAE,aAAa;IACtB,SAAS,EAAE,aAAa;IACxB,OAAO,EAAE,0BAA0B;IACnC,QAAQ,EAAE,2BAA2B;IACrC,aAAa,EAAE,uBAAuB;IACtC,MAAM,EAAE,eAAe;IACvB,eAAe,EAAE,uBAAuB;IACxC,gBAAgB,EAAE,kBAAkB;IACpC,UAAU,EAAE,mBAAmB;IAC/B,MAAM,EAAE;QACN,UAAU,EAAE,wBAAwB;QACpC,kBAAkB,EAAE,wBAAwB;QAC5C,eAAe,EAAE,sBAAsB;QACvC,IAAI,EAAE,8BAA8B;QACpC,IAAI,EAAE,2BAA2B;QACjC,QAAQ,EAAE,wBAAwB;QAClC,iBAAiB,EAAE,uBAAuB;KAC3C;IACD,WAAW,EAAE,mBAAmB;IAChC,aAAa,EAAE,wBAAwB;IACvC,wBAAwB,EAAE,qCAAqC;IAC/D,UAAU,EAAE,cAAc;IAC1B,qBAAqB,EAAE,wBAAwB;IAC/C,cAAc,EAAE,yBAAyB;IACzC,iBAAiB,EAAE,uBAAuB;IAC1C,oBAAoB,EAAE,yBAAyB;IAC/C,SAAS,EAAE,4BAA4B;IACvC,QAAQ,EAAE,WAAW;IACrB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,SAAS;CAChB,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare const LOCATION_ENUM: {
|
|
2
|
-
managingOrganization: string;
|
|
3
|
-
partOf: string;
|
|
4
|
-
status: string;
|
|
5
|
-
operationalStatus: string;
|
|
6
|
-
name: string;
|
|
7
|
-
code: string;
|
|
8
|
-
alias: string;
|
|
9
|
-
mode: string;
|
|
10
|
-
locationType: string;
|
|
11
|
-
address: string;
|
|
12
|
-
telecom: string;
|
|
13
|
-
physicalType: string;
|
|
14
|
-
position: {
|
|
15
|
-
longitude: string;
|
|
16
|
-
latitude: string;
|
|
17
|
-
altitude: string;
|
|
18
|
-
};
|
|
19
|
-
description: string;
|
|
20
|
-
hoursOfOperation: string;
|
|
21
|
-
availabilityExceptions: string;
|
|
22
|
-
procedureCategory: string;
|
|
23
|
-
procedureType: string;
|
|
24
|
-
active: string;
|
|
25
|
-
licenseKey: string;
|
|
26
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LOCATION_ENUM = void 0;
|
|
4
|
-
exports.LOCATION_ENUM = {
|
|
5
|
-
managingOrganization: 'Id de la organización que administra la ubicación',
|
|
6
|
-
partOf: 'Id de la dependencia',
|
|
7
|
-
status: 'Estado de la ubicación',
|
|
8
|
-
operationalStatus: 'Estatus de la operación',
|
|
9
|
-
name: 'Nombre de la ubicación',
|
|
10
|
-
code: 'Código de la ubicación',
|
|
11
|
-
alias: 'Alias de la ubicación',
|
|
12
|
-
mode: 'Modo de la ubicación',
|
|
13
|
-
locationType: 'Tipo de ubicación',
|
|
14
|
-
address: 'Dirección de la ubicación',
|
|
15
|
-
telecom: 'Contacto de la ubicación',
|
|
16
|
-
physicalType: 'Tipo de ubicación física',
|
|
17
|
-
position: {
|
|
18
|
-
longitude: 'Longitud',
|
|
19
|
-
latitude: 'Latitud',
|
|
20
|
-
altitude: 'Altitud',
|
|
21
|
-
},
|
|
22
|
-
description: 'Descripción de la ubicación',
|
|
23
|
-
hoursOfOperation: 'Horarios de la operación',
|
|
24
|
-
availabilityExceptions: 'Excepciones de disponibilidad',
|
|
25
|
-
procedureCategory: 'Categoría de procedimientos',
|
|
26
|
-
procedureType: 'Tipos de procedimientos',
|
|
27
|
-
active: 'Modelo activo',
|
|
28
|
-
licenseKey: 'Clave de licencia',
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=location.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"location.js","sourceRoot":"","sources":["../../../src/constants/model-variables/location.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IAC3B,oBAAoB,EAAE,mDAAmD;IACzE,MAAM,EAAE,sBAAsB;IAC9B,MAAM,EAAE,wBAAwB;IAChC,iBAAiB,EAAE,yBAAyB;IAC5C,IAAI,EAAE,wBAAwB;IAC9B,IAAI,EAAE,wBAAwB;IAC9B,KAAK,EAAE,uBAAuB;IAC9B,IAAI,EAAE,sBAAsB;IAC5B,YAAY,EAAE,mBAAmB;IACjC,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,0BAA0B;IACnC,YAAY,EAAE,0BAA0B;IACxC,QAAQ,EAAE;QACR,SAAS,EAAE,UAAU;QACrB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB;IACD,WAAW,EAAE,6BAA6B;IAC1C,gBAAgB,EAAE,0BAA0B;IAC5C,sBAAsB,EAAE,+BAA+B;IACvD,iBAAiB,EAAE,6BAA6B;IAChD,aAAa,EAAE,yBAAyB;IACxC,MAAM,EAAE,eAAe;IACvB,UAAU,EAAE,mBAAmB;CAChC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare const SCHEDULED_PROCEDURE_ENUM: {
|
|
2
|
-
scheduleProfile: string;
|
|
3
|
-
date: string;
|
|
4
|
-
startTime: string;
|
|
5
|
-
endTime: string;
|
|
6
|
-
location: string;
|
|
7
|
-
patient: string;
|
|
8
|
-
practitioners: string;
|
|
9
|
-
procedureType: string;
|
|
10
|
-
status: {
|
|
11
|
-
statusType: string;
|
|
12
|
-
confirmationMethod: string;
|
|
13
|
-
reasonSuspended: string;
|
|
14
|
-
user: string;
|
|
15
|
-
date: string;
|
|
16
|
-
};
|
|
17
|
-
observations: string;
|
|
18
|
-
active: string;
|
|
19
|
-
licenseKey: string;
|
|
20
|
-
overshift: string;
|
|
21
|
-
};
|