@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
- const pattern1 = /superior\s+a\s+([\d,]+)/;
8
- const pattern2 = />\s?([\d,]+)/;
9
- const pattern3 = /maior\s+que\s+([\d,]+)/;
10
- const pattern4 = /mais\s+que\s+([\d,]+)/;
11
- return [pattern1, pattern2, pattern3, pattern4];
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
- const pattern1 = /inferior\s+a\s+([\d,]+)/;
15
- const pattern2 = /<\s*([\d,.]+)/;
16
- const pattern3 = /menor\s+que\s+([\d,]+)/;
17
- const pattern4 = /menos\s+que\s+([\d,]+)/;
18
- return [pattern1, pattern2, pattern3, pattern4];
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,wDAOC;AAED,oDAOC;AAjBD,oBAAoB;AACpB,SAAgB,sBAAsB;IAClC,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,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACpD,CAAC;AAED,SAAgB,oBAAoB;IAChC,MAAM,QAAQ,GAAG,yBAAyB,CAAC;IAC3C,MAAM,QAAQ,GAAG,eAAe,CAAA;IAChC,MAAM,QAAQ,GAAG,wBAAwB,CAAC;IAC1C,MAAM,QAAQ,GAAG,wBAAwB,CAAC;IAE1C,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACpD,CAAC"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openhealth/oht-custom-parser-lib",
3
- "version": "0.2.54",
3
+ "version": "0.2.55",
4
4
  "description": "Shared nodejs lib with with reusable functions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",