@openhealth/oht-custom-parser-lib 0.2.54 → 0.2.55
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.
|
@@ -4,17 +4,35 @@ exports.getGreaterThanPatterns = getGreaterThanPatterns;
|
|
|
4
4
|
exports.getLowerThanPatterns = getLowerThanPatterns;
|
|
5
5
|
// utils/patterns.ts
|
|
6
6
|
function getGreaterThanPatterns() {
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
7
|
+
// Check >= pattern first to avoid partial matches with >
|
|
8
|
+
const pattern1 = />=\s*([\d,]+)/;
|
|
9
|
+
// Then check > patterns
|
|
10
|
+
const pattern2 = /superior\s+a\s+([\d,]+)/;
|
|
11
|
+
const pattern3 = />\s?([\d,]+)/;
|
|
12
|
+
const pattern4 = /maior\s+que\s+([\d,]+)/;
|
|
13
|
+
const pattern5 = /mais\s+que\s+([\d,]+)/;
|
|
14
|
+
return [
|
|
15
|
+
pattern1,
|
|
16
|
+
pattern2,
|
|
17
|
+
pattern3,
|
|
18
|
+
pattern4,
|
|
19
|
+
pattern5
|
|
20
|
+
];
|
|
12
21
|
}
|
|
13
22
|
function getLowerThanPatterns() {
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
23
|
+
// Check <= pattern first to avoid partial matches with <
|
|
24
|
+
const pattern1 = /<=\s*([\d,.]+)/;
|
|
25
|
+
// Then check < patterns
|
|
26
|
+
const pattern2 = /inferior\s+a\s+([\d,]+)/;
|
|
27
|
+
const pattern3 = /<\s*([\d,.]+)/;
|
|
28
|
+
const pattern4 = /menor\s+que\s+([\d,]+)/;
|
|
29
|
+
const pattern5 = /menos\s+que\s+([\d,]+)/;
|
|
30
|
+
return [
|
|
31
|
+
pattern1,
|
|
32
|
+
pattern2,
|
|
33
|
+
pattern3,
|
|
34
|
+
pattern4,
|
|
35
|
+
pattern5
|
|
36
|
+
];
|
|
19
37
|
}
|
|
20
38
|
//# sourceMappingURL=regexUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regexUtils.js","sourceRoot":"","sources":["../../util-ts/regexUtils.ts"],"names":[],"mappings":";;AACA,
|
|
1
|
+
{"version":3,"file":"regexUtils.js","sourceRoot":"","sources":["../../util-ts/regexUtils.ts"],"names":[],"mappings":";;AACA,wDAiBC;AAED,oDAiBC;AArCD,oBAAoB;AACpB,SAAgB,sBAAsB;IAClC,yDAAyD;IACzD,MAAM,QAAQ,GAAG,eAAe,CAAC;IAEjC,wBAAwB;IACxB,MAAM,QAAQ,GAAG,yBAAyB,CAAC;IAC3C,MAAM,QAAQ,GAAG,cAAc,CAAC;IAChC,MAAM,QAAQ,GAAG,wBAAwB,CAAC;IAC1C,MAAM,QAAQ,GAAG,uBAAuB,CAAC;IAEzC,OAAO;QACH,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,QAAQ;KACX,CAAC;AACN,CAAC;AAED,SAAgB,oBAAoB;IAChC,yDAAyD;IACzD,MAAM,QAAQ,GAAG,gBAAgB,CAAC;IAElC,wBAAwB;IACxB,MAAM,QAAQ,GAAG,yBAAyB,CAAC;IAC3C,MAAM,QAAQ,GAAG,eAAe,CAAC;IACjC,MAAM,QAAQ,GAAG,wBAAwB,CAAC;IAC1C,MAAM,QAAQ,GAAG,wBAAwB,CAAC;IAE1C,OAAO;QACH,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,QAAQ;KACX,CAAC;AACN,CAAC"}
|