@pegasimed.com/shared-tools 1.0.16 → 1.0.18
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 +8 -0
- package/dist/constants/model-variables/index.d.ts +1 -0
- package/dist/constants/model-variables/index.js +1 -0
- package/dist/constants/model-variables/index.js.map +1 -1
- package/dist/constants/model-variables/kafka-models/appointment.d.ts +2 -37
- package/dist/constants/model-variables/kafka-models/appointment.js +214 -35
- package/dist/constants/model-variables/kafka-models/appointment.js.map +1 -1
- package/dist/constants/model-variables/kafka-models/appointmentRequest.d.ts +2 -35
- package/dist/constants/model-variables/kafka-models/appointmentRequest.js +226 -33
- package/dist/constants/model-variables/kafka-models/appointmentRequest.js.map +1 -1
- package/dist/constants/model-variables/kafka-models/carePlan.d.ts +2 -24
- package/dist/constants/model-variables/kafka-models/carePlan.js +154 -22
- package/dist/constants/model-variables/kafka-models/carePlan.js.map +1 -1
- package/dist/constants/model-variables/kafka-models/carePlanType.d.ts +2 -18
- package/dist/constants/model-variables/kafka-models/carePlanType.js +112 -16
- package/dist/constants/model-variables/kafka-models/carePlanType.js.map +1 -1
- package/dist/constants/model-variables/kafka-models/location.d.ts +2 -26
- package/dist/constants/model-variables/kafka-models/location.js +160 -24
- package/dist/constants/model-variables/kafka-models/location.js.map +1 -1
- package/dist/constants/model-variables/kafka-models/locationLog.d.ts +2 -11
- package/dist/constants/model-variables/kafka-models/locationLog.js +63 -9
- package/dist/constants/model-variables/kafka-models/locationLog.js.map +1 -1
- package/dist/constants/model-variables/kafka-models/reception.d.ts +2 -14
- package/dist/constants/model-variables/kafka-models/reception.js +84 -12
- package/dist/constants/model-variables/kafka-models/reception.js.map +1 -1
- package/dist/constants/model-variables/kafka-models/scheduleProfile.d.ts +2 -18
- package/dist/constants/model-variables/kafka-models/scheduleProfile.js +89 -15
- package/dist/constants/model-variables/kafka-models/scheduleProfile.js.map +1 -1
- package/dist/constants/model-variables/kafka-models/scheduledProcedure.d.ts +2 -21
- package/dist/constants/model-variables/kafka-models/scheduledProcedure.js +126 -19
- package/dist/constants/model-variables/kafka-models/scheduledProcedure.js.map +1 -1
- package/dist/constants/model-variables/kafka-models/shift.d.ts +2 -9
- package/dist/constants/model-variables/kafka-models/shift.js +49 -7
- package/dist/constants/model-variables/kafka-models/shift.js.map +1 -1
- package/dist/constants/model-variables/kafka-models/stage.d.ts +2 -10
- package/dist/constants/model-variables/kafka-models/stage.js +43 -8
- package/dist/constants/model-variables/kafka-models/stage.js.map +1 -1
- 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 +2 -0
- package/dist/constants/model-variables/models/patientCampaign.js +158 -0
- package/dist/constants/model-variables/models/patientCampaign.js.map +1 -0
- package/dist/constants/model-variables/special-models/carePlanActivity.d.ts +2 -54
- package/dist/constants/model-variables/special-models/carePlanActivity.js +314 -52
- package/dist/constants/model-variables/special-models/carePlanActivity.js.map +1 -1
- package/dist/constants/model-variables/special-models/carePlanEvent.d.ts +2 -14
- package/dist/constants/model-variables/special-models/carePlanEvent.js +74 -12
- package/dist/constants/model-variables/special-models/carePlanEvent.js.map +1 -1
- package/dist/custom-variable-resolvers/executeFormula.d.ts +2 -1
- 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 +3 -2
- package/dist/custom-variable-resolvers/executeVariablesCondition.js +11 -11
- package/dist/custom-variable-resolvers/executeVariablesCondition.js.map +1 -1
- package/dist/custom-variable-resolvers/replaceAllVariables.d.ts +2 -1
- 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
|
@@ -0,0 +1,24 @@
|
|
|
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,GAAG,uBAAH,GAAG,CAAE,QAAQ;QAAE,OAAO,IAAI,CAAC;IAE/B,MAAM,IAAI,GAAG,CAAA,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,0CAAE,MAAM,EAAC,CAAC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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":"getSpec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AAM,0CAAE,QAAQ,0CAAE,MAAM,0CAAE,MAAM;oBAClD,CAAC,CAAC,CAAA,MAAA,MAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,0CAAE,QAAQ,0CAAE,MAAM,CAAC,CAAC,CAAC,0CAAE,IAAI,KAAI,IAAI;oBACzD,CAAC,CAAC,IAAI;gBACR,IAAI,EAAE,CAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,0CAAE,QAAQ;oBAClC,CAAC,CAAC,IAAA,yDAA2B,EAAC,OAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,4CAAE,QAAQ,EAAE,IAAI,CAAC;oBACnE,CAAC,CAAC,IAAI;aACT;YACD,QAAQ,EAAE,CAAA,OAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,4CAAE,QAAQ,KAAI,IAAI;YAChD,IAAI,EAAE,CAAA,OAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,4CAAE,IAAI,KAAI,IAAI;YACxC,IAAI,EAAE,CAAA,OAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,4CAAE,MAAM,KAAI,IAAI;SAC3C;QACH,CAAC,CAAC,IAAI,CAAC;IAET,OAAO;QACL,IAAI;QACJ,MAAM;QACN,QAAQ;KACT,CAAC;AACJ,CAAC,CAAC;AAzCW,QAAA,eAAe,mBAyC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getTelecomValue: (data: any, system: any, use?: any) => any;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { 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.18",
|
|
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",
|