@medipass/utils 11.71.1-feature-abn-validators.2 → 11.73.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [11.73.0](https://github.com/medipass/web-medicules/compare/@medipass/utils@11.72.0...@medipass/utils@11.73.0) (2022-11-04)
7
+
8
+
9
+ ### Features
10
+
11
+ * **web-sdk, utils:** abr resource and abn validators ([#704](https://github.com/medipass/web-medicules/issues/704)) ([531b969](https://github.com/medipass/web-medicules/commit/531b969))
12
+
13
+
14
+
15
+
16
+
17
+ # [11.72.0](https://github.com/medipass/web-medicules/compare/@medipass/utils@11.71.0...@medipass/utils@11.72.0) (2022-10-30)
18
+
19
+
20
+ ### Features
21
+
22
+ * healthpoint enhancements ([#702](https://github.com/medipass/web-medicules/issues/702)) ([4fdaf73](https://github.com/medipass/web-medicules/commit/4fdaf73))
23
+
24
+
25
+
26
+
27
+
6
28
  # [11.71.0](https://github.com/medipass/web-medicules/compare/@medipass/utils@11.70.0...@medipass/utils@11.71.0) (2022-10-23)
7
29
 
8
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medipass/utils",
3
- "version": "11.71.1-feature-abn-validators.2",
3
+ "version": "11.73.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -51,5 +51,5 @@
51
51
  "rimraf": "^2.6.2",
52
52
  "typescript": "4.8.4"
53
53
  },
54
- "gitHead": "b16c45ca45114d58aa4331800cfb659f151d2c19"
54
+ "gitHead": "beae09bac477dfe4b64e1818cdebce9823044fb0"
55
55
  }
package/service-items.js CHANGED
@@ -7,6 +7,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
7
7
  var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty'));
8
8
  var _get = _interopDefault(require('lodash/get'));
9
9
  var _isEmpty = _interopDefault(require('lodash/isEmpty'));
10
+ var _difference = _interopDefault(require('lodash/difference'));
10
11
 
11
12
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
12
13
 
@@ -164,7 +165,30 @@ function mapItemsToClaimItems(transaction) {
164
165
  isNonClaimable: isNonClaimable
165
166
  });
166
167
  });
167
- return newItems;
168
+ var claimItemIds = claimItems.map(function (claimItem) {
169
+ return claimItem.claimItemId;
170
+ });
171
+ var newItemIds = newItems.map(function (newItem) {
172
+ return newItem.claimItemId;
173
+ });
174
+ var extraItemIds = _difference(claimItemIds, newItemIds) || [];
175
+ var extraItems = extraItemIds.map(function (extraItemId) {
176
+ var claimItem = claimItems.find(function (claimItem) {
177
+ return claimItem.claimItemId === extraItemId;
178
+ });
179
+ var item = items.find(function (item) {
180
+ return item.itemId === claimItem.itemId;
181
+ });
182
+ return _objectSpread({}, item, {}, claimItem, {
183
+ displayName: _get(claimItem, 'displayName'),
184
+ itemCode: _get(claimItem, 'icare.itemCode') || _get(claimItem, 'itemCode'),
185
+ description: undefined,
186
+ notes: undefined,
187
+ serviceDateString: (item == null ? void 0 : item.serviceDateString) || item.serviceDate,
188
+ isExtraItem: true
189
+ });
190
+ });
191
+ return [].concat(newItems, extraItems);
168
192
  }
169
193
  var calculateAmounts = function calculateAmounts(grossAmount, isTaxable) {
170
194
  var feeAmount = grossAmount;