@medipass/utils 11.68.1-fix-package-release.0 → 11.68.3

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.
Files changed (96) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/billable-items-01050ba2.js +27 -0
  3. package/blah.js +2 -0
  4. package/build-validation-schema.js +1282 -0
  5. package/businesses-e3a20604.js +53 -0
  6. package/chart.js +45 -0
  7. package/claim-payment-status-formatted.js +12 -0
  8. package/claim-payment-status-icons.js +10 -0
  9. package/claim-payment-status-text-classes.js +10 -0
  10. package/constants.js +460 -0
  11. package/countries.js +1011 -0
  12. package/datetime.js +36 -0
  13. package/document-types-formatted.js +13 -0
  14. package/document-types-icons.js +10 -0
  15. package/document-types-text-classes.js +10 -0
  16. package/documents/workflow-state-formatted-text-classes.js +12 -0
  17. package/documents/workflow-state-formatted.js +15 -0
  18. package/documents/workflow-state-icons.js +10 -0
  19. package/form-applications/assign-values-to-sections.js +29 -0
  20. package/forms-f06ca97e.js +51 -0
  21. package/funders.js +122 -0
  22. package/get-env.js +196 -0
  23. package/get-select-options.js +65 -0
  24. package/get-staff-type-display-name.js +12 -0
  25. package/google-addresses.js +127 -0
  26. package/health-fund-accounts-3cd8650f.js +20 -0
  27. package/health-fund-settings-43327826.js +22 -0
  28. package/health-funds-300facef.js +194 -0
  29. package/i18n/index.js +59 -0
  30. package/i18n/translations.js +36 -0
  31. package/index.js +56 -0
  32. package/intercom.js +101 -0
  33. package/members-cb4f73a9.js +53 -0
  34. package/modalities-b360d521.js +19 -0
  35. package/normalise-abn.js +22 -0
  36. package/package.json +2 -2
  37. package/parse-health-fund-card-fields.js +12 -0
  38. package/patients-2083dd9c.js +46 -0
  39. package/payment-methods-4fa2d01f.js +26 -0
  40. package/payment-options.js +52 -0
  41. package/practices-3e703f22.js +87 -0
  42. package/products-bd313cb4.js +83 -0
  43. package/products.js +31 -0
  44. package/professional-categories-e2e5284b.js +19 -0
  45. package/redux-actions.js +161 -0
  46. package/redux-reducer.js +112 -0
  47. package/sanitise-url.js +17 -0
  48. package/scroll.js +9 -0
  49. package/sensitive-keys.js +9 -0
  50. package/sentry.js +112 -0
  51. package/service-items.js +230 -0
  52. package/services-2e25cdac.js +127 -0
  53. package/specialties-7640b7e3.js +20 -0
  54. package/staff-990794cd.js +161 -0
  55. package/status-icons.js +10 -0
  56. package/status-text-classes.js +10 -0
  57. package/subscriptions-45c1321a.js +160 -0
  58. package/test-framework/fixtures/accounts.js +34 -0
  59. package/test-framework/fixtures/billable-items.js +9 -0
  60. package/test-framework/fixtures/businesses.js +9 -0
  61. package/test-framework/fixtures/documents.js +121 -0
  62. package/test-framework/fixtures/form-application-templates.js +74 -0
  63. package/test-framework/fixtures/form-applications.js +39 -0
  64. package/test-framework/fixtures/forms.js +9 -0
  65. package/test-framework/fixtures/health-fund-accounts.js +9 -0
  66. package/test-framework/fixtures/health-fund-settings.js +9 -0
  67. package/test-framework/fixtures/health-funds.js +10 -0
  68. package/test-framework/fixtures/index.js +45 -0
  69. package/test-framework/fixtures/members.js +9 -0
  70. package/test-framework/fixtures/message-mappings.js +61 -0
  71. package/test-framework/fixtures/modalities.js +9 -0
  72. package/test-framework/fixtures/patients.js +9 -0
  73. package/test-framework/fixtures/payment-methods.js +9 -0
  74. package/test-framework/fixtures/practices.js +11 -0
  75. package/test-framework/fixtures/products.js +10 -0
  76. package/test-framework/fixtures/professional-categories.js +9 -0
  77. package/test-framework/fixtures/services.js +11 -0
  78. package/test-framework/fixtures/specialties.js +9 -0
  79. package/test-framework/fixtures/staff.js +12 -0
  80. package/test-framework/fixtures/subscriptions.js +13 -0
  81. package/test-framework/fixtures/transaction-reports.js +206 -0
  82. package/test-framework/fixtures/transactions.js +22 -0
  83. package/test-framework/fixtures/workflow-exceptions.js +32 -0
  84. package/test-framework/react.js +38 -0
  85. package/transaction-details-by-funder.js +81 -0
  86. package/transaction-status-formatted.js +13 -0
  87. package/transaction-status-helpers.js +77 -0
  88. package/transaction-status-icons.js +10 -0
  89. package/transaction-status-text-classes.js +10 -0
  90. package/transaction-status.js +42 -0
  91. package/transactions-6e5fd92d.js +1883 -0
  92. package/validate-form.js +388 -0
  93. package/validate.js +37 -0
  94. package/webpack-config.js +27 -0
  95. package/workflow-state-formatted-text-classes.js +12 -0
  96. package/workflow-state-formatted.js +13 -0
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
+
7
+ var escape = _interopDefault(require('escape-html'));
8
+
9
+ function sanitiseUrl(url) {
10
+ var escapedUrl = escape(url);
11
+ return {
12
+ hasChanged: url !== escapedUrl,
13
+ url: escapedUrl
14
+ };
15
+ }
16
+
17
+ exports.default = sanitiseUrl;
package/scroll.js ADDED
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var scroll = (function (options) {
6
+ return document.getElementById('main-content') && document.getElementById('main-content').scroll && document.getElementById('main-content').scroll(options);
7
+ });
8
+
9
+ exports.default = scroll;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var VERY_SENSITIVE_KEYS = ['password', 'mobile', 'mobileE164', 'dob', 'dobString', 'address', 'providerNumber', 'passcode', 'lnglat', 'membershipNumber', 'landline', 'fax'];
6
+ var SENSITIVE_KEYS = [].concat(VERY_SENSITIVE_KEYS, ['firstName', 'lastName', 'username', 'token', 'otkCode', 'email', 'Authorization']);
7
+
8
+ exports.VERY_SENSITIVE_KEYS = VERY_SENSITIVE_KEYS;
9
+ exports.default = SENSITIVE_KEYS;
package/sentry.js ADDED
@@ -0,0 +1,112 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
+
7
+ var _get = _interopDefault(require('lodash/get'));
8
+ var Sentry = require('@sentry/browser');
9
+ var createSentryMiddleware = _interopDefault(require('redux-sentry-middleware'));
10
+ var masked = _interopDefault(require('masked'));
11
+ var _set = _interopDefault(require('lodash/set'));
12
+ var sensitiveKeys = require('./sensitive-keys.js');
13
+
14
+ var ERROR_CODES = {
15
+ INVALID_AUTHENTICATION: 10007
16
+ };
17
+ var ERROR_MESSAGES = {
18
+ NETWORK_ERROR: 'Network Error'
19
+ };
20
+ var STATUS_CODES = {
21
+ UNAUTHORIZED: 401,
22
+ SERVER_ERROR: 500
23
+ };
24
+
25
+ var _ignore = function _ignore(error) {
26
+ return process.env.NODE_ENV === 'test' || error.message === ERROR_MESSAGES.NETWORK_ERROR || _get(error, 'data.statusCode') === STATUS_CODES.UNAUTHORIZED || _get(error, 'data.statusCode') >= STATUS_CODES.SERVER_ERROR || _get(error, 'data.errorCode') === ERROR_CODES.INVALID_AUTHENTICATION;
27
+ };
28
+
29
+ var clearUserContext = function clearUserContext() {
30
+ return Sentry.setUser();
31
+ };
32
+ var createReduxMiddleware = function createReduxMiddleware() {
33
+ return createSentryMiddleware(Sentry, {
34
+ actionTransformer: function actionTransformer(action) {
35
+ return masked(action, sensitiveKeys.default);
36
+ },
37
+ stateTransformer: function stateTransformer(state) {
38
+ return masked(state, sensitiveKeys.default);
39
+ }
40
+ });
41
+ };
42
+ var logError = function logError(_error, _temp) {
43
+ var _ref = _temp === void 0 ? {} : _temp,
44
+ name = _ref.name,
45
+ data = _ref.data;
46
+
47
+ var error = _error;
48
+
49
+ if (error instanceof Error) {
50
+ var _error2, _error2$config;
51
+
52
+ var errorHeaders = (_error2 = error) == null ? void 0 : (_error2$config = _error2.config) == null ? void 0 : _error2$config.headers;
53
+ var maskedErrorHeaders = masked(errorHeaders, ['Authorization']);
54
+ error = _set(error, 'config.headers', maskedErrorHeaders);
55
+
56
+ try {
57
+ var _error3, _error3$config;
58
+
59
+ var errorData = (_error3 = error) == null ? void 0 : (_error3$config = _error3.config) == null ? void 0 : _error3$config.data;
60
+ var maskedErrorData = masked(JSON.parse(errorData), sensitiveKeys.default);
61
+ error = _set(error, 'config.data', JSON.stringify(maskedErrorData));
62
+ } catch (err) {}
63
+ }
64
+
65
+ if (_ignore(error)) {
66
+ return null;
67
+ }
68
+
69
+ Sentry.withScope(function (scope) {
70
+ scope.setExtra('error', error);
71
+ scope.setExtra('data', masked(data, sensitiveKeys.default));
72
+
73
+ var message = _get(error, 'data.message', error.message);
74
+
75
+ var sentryError = error instanceof Error ? error : new Error(message);
76
+
77
+ if (name) {
78
+ sentryError.name = name || message;
79
+ }
80
+
81
+ Sentry.captureException(sentryError);
82
+ });
83
+ console.error(error);
84
+ };
85
+ var setup = function setup(_ref2) {
86
+ var environment = _ref2.environment,
87
+ url = _ref2.url,
88
+ version = _ref2.version;
89
+
90
+ if (window.location.hostname !== 'localhost') {
91
+ Sentry.init({
92
+ dsn: url,
93
+ environment: environment,
94
+ release: version
95
+ });
96
+ }
97
+ };
98
+ var setUserContext = function setUserContext(user) {
99
+ return Sentry.setUser(masked(user, sensitiveKeys.default));
100
+ };
101
+ var setTag = function setTag(key, value) {
102
+ return Sentry.setTag(key, value);
103
+ };
104
+ var sentry = {};
105
+
106
+ exports.clearUserContext = clearUserContext;
107
+ exports.createReduxMiddleware = createReduxMiddleware;
108
+ exports.default = sentry;
109
+ exports.logError = logError;
110
+ exports.setTag = setTag;
111
+ exports.setUserContext = setUserContext;
112
+ exports.setup = setup;
@@ -0,0 +1,230 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
+
7
+ require('./constants.js');
8
+ var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty'));
9
+ var _get = _interopDefault(require('lodash/get'));
10
+ var _isEmpty = _interopDefault(require('lodash/isEmpty'));
11
+ var funders = require('./funders.js');
12
+
13
+ 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; }
14
+
15
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16
+ function round(value, step) {
17
+ var inv = 1.0 / step;
18
+ return Math.round(value * inv) / inv;
19
+ }
20
+ var calculateTotalAmount = function calculateTotalAmount(serviceItems, opts) {
21
+ if (opts === void 0) {
22
+ opts = {};
23
+ }
24
+
25
+ if (_isEmpty(serviceItems)) {
26
+ return 0;
27
+ }
28
+
29
+ var total = serviceItems.reduce(function (total, item) {
30
+ var includeQuantity = _get(opts, 'includeQuantity');
31
+
32
+ if (funders.isIcare(_get(opts, 'funder.code')) && _get(item, 'unit') === 'minutes') {
33
+ includeQuantity = false;
34
+ }
35
+
36
+ var prices = calculateAmounts({
37
+ isTaxable: Boolean(opts.includeGST && item.isTaxable),
38
+ initialGrossAmount: item != null && item.grossAmount ? parseFloat((item == null ? void 0 : item.grossAmount) || 0) : parseFloat((item == null ? void 0 : item.feeAmount) || 0),
39
+ quantity: includeQuantity ? item.quantity : 1
40
+ });
41
+ var itemTotal = undefined;
42
+
43
+ if (opts.isSubTotal) {
44
+ itemTotal = prices == null ? void 0 : prices.feeAmount;
45
+ } else {
46
+ itemTotal = prices == null ? void 0 : prices.grossAmount;
47
+ }
48
+
49
+ if (opts.includeDiscount && item.discountAmount) {
50
+ var discountAmount = parseFloat(_get(item, 'discountAmount', '0'));
51
+ itemTotal -= discountAmount;
52
+ }
53
+
54
+ return total + itemTotal;
55
+ }, 0);
56
+ return total;
57
+ };
58
+ var calculateTotalDiscountAmount = function calculateTotalDiscountAmount(serviceItems) {
59
+ return serviceItems.reduce(function (total, item) {
60
+ return total + parseFloat(_get(item, 'discountAmount', '0'));
61
+ }, 0);
62
+ };
63
+ var calculateTotalGSTAmount = function calculateTotalGSTAmount(serviceItems, opts) {
64
+ if (opts === void 0) {
65
+ opts = {};
66
+ }
67
+
68
+ return serviceItems.reduce(function (total, item) {
69
+ var includeQuantity = _get(opts, 'includeQuantity');
70
+
71
+ if (funders.isIcare(_get(opts, 'funder.code')) && _get(item, 'unit') === 'minutes') {
72
+ includeQuantity = false;
73
+ }
74
+
75
+ var prices = calculateAmounts({
76
+ isTaxable: item.isTaxable,
77
+ initialGrossAmount: parseFloat((item == null ? void 0 : item.grossAmount) || 0),
78
+ quantity: includeQuantity ? item.quantity : 1
79
+ });
80
+ var gstAmount = prices == null ? void 0 : prices.taxAmount;
81
+ return total + gstAmount;
82
+ }, 0);
83
+ };
84
+ var applyDiscountToServiceItems = function applyDiscountToServiceItems(serviceItems, _ref) {
85
+ var discount = _ref.discount,
86
+ discountType = _ref.discountType;
87
+
88
+ if (serviceItems && discount) {
89
+ var totalAmount = calculateTotalAmount(serviceItems);
90
+ var percentage = parseFloat(discount) / totalAmount;
91
+
92
+ if (discountType === 'percentage') {
93
+ percentage = parseFloat(discount) / 100;
94
+ } // $FlowFixMe
95
+
96
+
97
+ return serviceItems.map(function (serviceItem) {
98
+ return _objectSpread({}, serviceItem, {
99
+ discountAmount: (serviceItem.feeAmount * percentage).toFixed(2)
100
+ });
101
+ });
102
+ }
103
+
104
+ return serviceItems;
105
+ };
106
+ var getEarliestServiceDate = function getEarliestServiceDate(serviceItems, dateKey) {
107
+ if (dateKey === void 0) {
108
+ dateKey = 'serviceDateString';
109
+ }
110
+
111
+ return serviceItems.reduce(function (currentEarliestDate, serviceItem) {
112
+ if (!currentEarliestDate) {
113
+ return serviceItem[dateKey];
114
+ }
115
+
116
+ if (Date.parse(serviceItem[dateKey]) < Date.parse(currentEarliestDate)) {
117
+ return serviceItem[dateKey];
118
+ }
119
+
120
+ return currentEarliestDate;
121
+ }, '');
122
+ };
123
+ var getChargeAmount = function getChargeAmount(serviceItems) {
124
+ return calculateTotalAmount(serviceItems, {
125
+ includeDiscount: true
126
+ }).toFixed(2);
127
+ };
128
+ var getDiscountAmount = function getDiscountAmount(discountType, currentServiceItems, currentDiscountValue) {
129
+ return discountType === 'price' ? parseFloat(currentDiscountValue).toFixed(2) : (calculateTotalAmount(currentServiceItems, {
130
+ includeDiscount: false
131
+ }) * (parseFloat(currentDiscountValue) / 100)).toFixed(2);
132
+ };
133
+ var getTotalAmount = function getTotalAmount(serviceItems) {
134
+ return calculateTotalAmount(serviceItems, {
135
+ includeDiscount: false
136
+ }).toFixed(2);
137
+ };
138
+ var getItemValue = function getItemValue(item, opts) {
139
+ var _ref2 = opts || {},
140
+ _ref2$useBenefitAsPri = _ref2.useBenefitAsPrice,
141
+ useBenefitAsPrice = _ref2$useBenefitAsPri === void 0 ? false : _ref2$useBenefitAsPri;
142
+
143
+ var benefit = _get(item, 'benefit', 0);
144
+
145
+ var benefitAmount = (benefit / 100).toFixed(2);
146
+
147
+ var price = _get(item, 'price');
148
+
149
+ var feeAmount = (price / 100).toFixed(2);
150
+ var option = {
151
+ label: item.displayName,
152
+ value: item
153
+ };
154
+ return _objectSpread({
155
+ service: option,
156
+ quantity: 1
157
+ }, item, {
158
+ benefitAmount: benefitAmount,
159
+ hasSeenPatientToday: 'no'
160
+ }, price ? {
161
+ feeAmount: feeAmount
162
+ } : {
163
+ feeAmount: undefined
164
+ }, {}, useBenefitAsPrice && benefit > 0 ? {
165
+ feeAmount: benefitAmount
166
+ } : {});
167
+ };
168
+ function mapItemsToClaimItems(transaction) {
169
+ var claimItems = _get(transaction, 'claims[0].claimItems', []);
170
+
171
+ var items = _get(transaction, 'items', []);
172
+
173
+ if (items.length === 0) {
174
+ return claimItems;
175
+ }
176
+
177
+ var newItems = items.map(function (item) {
178
+ var claimItem = claimItems.find(function (claimItem) {
179
+ return claimItem.itemId === item.itemId;
180
+ }) || {};
181
+
182
+ var isNonClaimable = _isEmpty(claimItem);
183
+
184
+ return _objectSpread({}, item, {}, claimItem, {
185
+ displayName: _get(item, 'displayName') || _get(claimItem, 'displayName'),
186
+ itemCode: _get(claimItem, 'icare.itemCode') || _get(claimItem, 'itemCode'),
187
+ description: _get(item, 'customDescription') || _get(item, 'description') || _get(claimItem, 'icare.description') || _get(claimItem, 'description'),
188
+ notes: _get(item, 'description'),
189
+ serviceDateString: (item == null ? void 0 : item.serviceDateString) || item.serviceDate,
190
+ isNonClaimable: isNonClaimable
191
+ });
192
+ });
193
+ return newItems;
194
+ }
195
+ var calculateAmounts = function calculateAmounts(_ref3) {
196
+ var isTaxable = _ref3.isTaxable,
197
+ initialGrossAmount = _ref3.initialGrossAmount;
198
+ var grossAmount = parseFloat(initialGrossAmount || 0);
199
+ var feeAmount = parseFloat(initialGrossAmount || 0);
200
+ var taxAmount = 0;
201
+
202
+ if (!isTaxable) {
203
+ return {
204
+ taxAmount: taxAmount,
205
+ feeAmount: feeAmount,
206
+ grossAmount: grossAmount
207
+ };
208
+ }
209
+
210
+ feeAmount = feeAmount - feeAmount / 11;
211
+ taxAmount = parseFloat((feeAmount * 1.1).toFixed(6)) - feeAmount;
212
+ return {
213
+ taxAmount: taxAmount,
214
+ feeAmount: feeAmount,
215
+ grossAmount: grossAmount
216
+ };
217
+ };
218
+
219
+ exports.applyDiscountToServiceItems = applyDiscountToServiceItems;
220
+ exports.calculateAmounts = calculateAmounts;
221
+ exports.calculateTotalAmount = calculateTotalAmount;
222
+ exports.calculateTotalDiscountAmount = calculateTotalDiscountAmount;
223
+ exports.calculateTotalGSTAmount = calculateTotalGSTAmount;
224
+ exports.getChargeAmount = getChargeAmount;
225
+ exports.getDiscountAmount = getDiscountAmount;
226
+ exports.getEarliestServiceDate = getEarliestServiceDate;
227
+ exports.getItemValue = getItemValue;
228
+ exports.getTotalAmount = getTotalAmount;
229
+ exports.mapItemsToClaimItems = mapItemsToClaimItems;
230
+ exports.round = round;
@@ -0,0 +1,127 @@
1
+ 'use strict';
2
+
3
+ var defaultService = {
4
+ _id: 'serviceDefaultId',
5
+ organisationId: 'organisationDefaultId',
6
+ businessId: 'businessDefaultId',
7
+ displayName: 'mockDisplayName',
8
+ fullName: 'mockFullName',
9
+ description: 'mockDescription',
10
+ duration: 60,
11
+ currencyCode: 'AUD',
12
+ modalityId: 'modalityDefaultId',
13
+ claimItems: [{
14
+ _id: 'claimItemDefaultId',
15
+ modalityId: 'modalityDefaultId',
16
+ itemCode: 'mockItemCode',
17
+ fullName: 'mockClaimItemFullName',
18
+ displayName: 'mockClaimItemDisplayName',
19
+ clinicalCodeSettings: {
20
+ enabled: true,
21
+ displayName: 'mockDisplayName'
22
+ },
23
+ price: 4000
24
+ }],
25
+ searchWords: ['mockdisplayname', 'mockfullname', 'mockitemcode', 'mockclaimitemfullname', 'mockclaimitemdisplayname'],
26
+ isPublic: true,
27
+ status: 'ACTIVE',
28
+ refId: 'serviceDefaultMockRefId',
29
+ refSource: 'serviceDefaultMockRefSource',
30
+ created: new Date('2015-01-01T00:00:00'),
31
+ modified: new Date('2015-01-02T00:00:00Z')
32
+ };
33
+ var serviceWithMultipleClaimItems = {
34
+ _id: 'serviceWithMultipleClaimItemsDefaultId',
35
+ organisationId: 'organisationDefaultId',
36
+ businessId: 'businessDefaultId',
37
+ displayName: 'mockDisplayName',
38
+ fullName: 'mockFullName',
39
+ description: 'mockDescription',
40
+ duration: 60,
41
+ currencyCode: 'AUD',
42
+ modalityId: 'modalityDefaultId',
43
+ claimItems: [{
44
+ _id: 'claimItemDefaultId',
45
+ modalityId: 'modalityDefaultId',
46
+ itemCode: 'mockItemCode',
47
+ fullName: 'mockClaimItemFullName',
48
+ displayName: 'mockClaimItemDisplayName',
49
+ clinicalCodeSettings: {
50
+ enabled: true,
51
+ displayName: 'mockDisplayName'
52
+ },
53
+ price: 1000
54
+ }, {
55
+ _id: 'claimItem2DefaultId',
56
+ modalityId: 'modalityDefaultId',
57
+ itemCode: 'mockItemCode2',
58
+ fullName: 'mockClaimItemFullName2',
59
+ displayName: 'mockClaimItemDisplayName2',
60
+ clinicalCodeSettings: {
61
+ enabled: true,
62
+ displayName: 'mockDisplayName'
63
+ },
64
+ healthFundOverrides: [{
65
+ healthFundId: 'healthFundDefaultId',
66
+ price: 3000
67
+ }],
68
+ price: 4000
69
+ }, {
70
+ _id: 'claimItem3DefaultId',
71
+ modalityId: 'modalityDefaultId',
72
+ itemCode: 'mockItemCode3',
73
+ fullName: 'mockClaimItemFullName3',
74
+ displayName: 'mockClaimItemDisplayName3',
75
+ clinicalCodeSettings: {
76
+ enabled: true,
77
+ displayName: 'mockDisplayName'
78
+ },
79
+ healthFundOverrides: [{
80
+ healthFundId: 'healthFundDefaultId',
81
+ price: 4000
82
+ }],
83
+ price: 2000
84
+ }],
85
+ searchWords: ['mockdisplayname', 'mockfullname', 'mockitemcode', 'mockclaimitemfullname', 'mockclaimitemdisplayname', 'mockitemcode2', 'mockclaimitemfullname2', 'mockclaimitemdisplayname2'],
86
+ status: 'ACTIVE',
87
+ isPublic: true,
88
+ refId: 'serviceWithMultipleClaimItemsDefaultMockRefId',
89
+ refSource: 'serviceWithMultipleClaimItemsDefaultMockRefSource',
90
+ created: new Date('2015-01-01T00:00:00'),
91
+ modified: new Date('2015-01-02T00:00:00Z')
92
+ };
93
+ var defaultServiceItems = [{
94
+ _id: 'claimItemDefaultId',
95
+ modalityId: 'modalityDefaultId',
96
+ itemCode: 'mockItemCode',
97
+ fullName: 'mockClaimItemFullName',
98
+ displayName: 'mockClaimItemDisplayName',
99
+ feeAmount: 1000
100
+ }, {
101
+ _id: 'claimItem2DefaultId',
102
+ modalityId: 'modalityDefaultId',
103
+ itemCode: 'mockItemCode2',
104
+ fullName: 'mockClaimItemFullName2',
105
+ displayName: 'mockClaimItemDisplayName2',
106
+ feeAmount: 4000,
107
+ discountAmount: 1000
108
+ }, {
109
+ _id: 'claimItem3DefaultId',
110
+ modalityId: 'modalityDefaultId',
111
+ itemCode: 'mockItemCode3',
112
+ fullName: 'mockClaimItemFullName3',
113
+ displayName: 'mockClaimItemDisplayName3',
114
+ feeAmount: 2000
115
+ }];
116
+
117
+ var services = /*#__PURE__*/Object.freeze({
118
+ __proto__: null,
119
+ defaultService: defaultService,
120
+ serviceWithMultipleClaimItems: serviceWithMultipleClaimItems,
121
+ defaultServiceItems: defaultServiceItems
122
+ });
123
+
124
+ exports.defaultService = defaultService;
125
+ exports.defaultServiceItems = defaultServiceItems;
126
+ exports.serviceWithMultipleClaimItems = serviceWithMultipleClaimItems;
127
+ exports.services = services;
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var defaultSpecialty = {
4
+ _id: 'specialtyDefaultId',
5
+ professionalCategoryId: 'professionalCategoryDefaultId',
6
+ fullName: 'Chiropractor',
7
+ displayName: 'mockDisplayName',
8
+ description: 'mockDescription',
9
+ searchWords: ['chiropractor', 'mockdisplayname'],
10
+ created: new Date('2015-01-01T00:00:00Z'),
11
+ modified: new Date('2015-01-02T00:00:00Z')
12
+ };
13
+
14
+ var specialties = /*#__PURE__*/Object.freeze({
15
+ __proto__: null,
16
+ defaultSpecialty: defaultSpecialty
17
+ });
18
+
19
+ exports.defaultSpecialty = defaultSpecialty;
20
+ exports.specialties = specialties;
@@ -0,0 +1,161 @@
1
+ 'use strict';
2
+
3
+ var defaultPractitioner = {
4
+ _id: 'staffPractitionerDefaultId',
5
+ organisationId: 'organisationDefaultId',
6
+ staffType: 'practitioner',
7
+ hasAccount: true,
8
+ businessId: 'businessDefaultId',
9
+ serviceIds: ['serviceDefaultId'],
10
+ providerSet: [{
11
+ practiceId: 'practiceDefaultId',
12
+ providerNumber: 'provider1',
13
+ modalityId: 'modalityDefaultId',
14
+ merchantId: 'staffcustommerchant1',
15
+ status: 'ACTIVE'
16
+ }],
17
+ practiceIds: ['practiceDefaultId'],
18
+ merchantId: 'staffmerchant1',
19
+ abn: 'mockAbn1',
20
+ description: 'This is a description.\nIt can span many lines.',
21
+ title: 'Dr',
22
+ firstName: 'Bruce',
23
+ lastName: 'Banner',
24
+ dob: new Date('2015-01-01T00:00:00'),
25
+ dobString: '2015-01-01',
26
+ mobile: '0451666888',
27
+ mobileE164: '+61451666888',
28
+ landline: '+6195553333',
29
+ email: 'brucepractice1@localz.co',
30
+ profilePictureUrl: 'https://mockUrl/mockPath',
31
+ searchWords: ['bruce', 'banner', 'bruce banner', 'banner bruce', '0451666888', '+61451666888', 'brucepractice1@localz.co', 'provider1'],
32
+ status: 'ACTIVE',
33
+ refId: 'mockRefId',
34
+ refSource: 'mockRefSource',
35
+ created: new Date('2015-01-01T00:00:00'),
36
+ modified: new Date('2015-01-02T00:00:00Z')
37
+ };
38
+ var defaultPractitioner2 = {
39
+ _id: 'staffPractitioner2DefaultId',
40
+ organisationId: 'organisationDefaultId',
41
+ staffType: 'practitioner',
42
+ hasAccount: true,
43
+ businessId: 'businessDefaultId',
44
+ serviceIds: ['serviceDefaultId'],
45
+ providerSet: [{
46
+ practiceId: 'practiceDefaultId',
47
+ providerNumber: 'provider2',
48
+ modalityId: 'modalityDefaultId',
49
+ status: 'ACTIVE'
50
+ }],
51
+ practiceIds: ['practiceDefaultId'],
52
+ merchantId: 'staffmerchant1',
53
+ abn: 'mockAbn1',
54
+ description: 'This is a description.\nIt can span many lines.',
55
+ title: 'Dr',
56
+ firstName: 'Bruce2',
57
+ lastName: 'Banner2',
58
+ dob: new Date('2015-01-01T00:00:00'),
59
+ dobString: '2015-01-01',
60
+ mobile: '0451666888',
61
+ mobileE164: '+61451666888',
62
+ landline: '+6195553333',
63
+ email: 'brucepractice2@localz.co',
64
+ profilePictureUrl: 'mockUrl',
65
+ searchWords: ['bruce2', 'banner2', 'bruce2 banner2', 'banner2 bruce2', '0451666888', '+61451666888', 'brucepractice2@localz.co', 'provider2'],
66
+ status: 'ACTIVE',
67
+ refId: 'mockRef2Id',
68
+ refSource: 'mockRef2Source',
69
+ created: new Date('2015-01-01T00:00:00'),
70
+ modified: new Date('2015-01-02T00:00:00Z')
71
+ };
72
+ var practitionerWithPendingProviderSet = {
73
+ _id: 'staffPractitionerDefaultId',
74
+ organisationId: 'organisationDefaultId',
75
+ staffType: 'practitioner',
76
+ hasAccount: true,
77
+ businessId: 'businessDefaultId',
78
+ serviceIds: ['serviceDefaultId'],
79
+ providerSet: [{
80
+ practiceId: 'practiceDefaultId',
81
+ providerNumber: 'provider1',
82
+ modalityId: 'modalityDefaultId',
83
+ merchantId: 'staffcustommerchant1',
84
+ status: 'PENDING'
85
+ }],
86
+ practiceIds: ['practiceDefaultId'],
87
+ merchantId: 'staffmerchant1',
88
+ abn: 'mockAbn1',
89
+ description: 'This is a description.\nIt can span many lines.',
90
+ title: 'Dr',
91
+ firstName: 'Bruce',
92
+ lastName: 'Banner',
93
+ dob: new Date('2015-01-01T00:00:00'),
94
+ dobString: '2015-01-01',
95
+ mobile: '0451666888',
96
+ mobileE164: '+61451666888',
97
+ landline: '+6195553333',
98
+ email: 'brucepractice1@localz.co',
99
+ profilePictureUrl: 'https://mockUrl/mockPath',
100
+ searchWords: ['bruce', 'banner', 'bruce banner', 'banner bruce', '0451666888', '+61451666888', 'brucepractice1@localz.co', 'provider1'],
101
+ status: 'ACTIVE',
102
+ refId: 'mockRefId',
103
+ refSource: 'mockRefSource',
104
+ created: new Date('2015-01-01T00:00:00'),
105
+ modified: new Date('2015-01-02T00:00:00Z')
106
+ };
107
+ var practitionerWithActivePendingProviderSet = {
108
+ _id: 'staffPractitionerDefaultId',
109
+ organisationId: 'organisationDefaultId',
110
+ staffType: 'practitioner',
111
+ hasAccount: true,
112
+ businessId: 'businessDefaultId',
113
+ serviceIds: ['serviceDefaultId'],
114
+ providerSet: [{
115
+ practiceId: 'practiceDefaultId',
116
+ providerNumber: 'provider1',
117
+ modalityId: 'modalityDefaultId',
118
+ merchantId: 'staffcustommerchant1',
119
+ status: 'ACTIVE'
120
+ }, {
121
+ practiceId: 'practiceDefaultId',
122
+ providerNumber: 'provider1',
123
+ modalityId: 'modalityDefaultId',
124
+ merchantId: 'staffcustommerchant1',
125
+ status: 'PENDING'
126
+ }],
127
+ practiceIds: ['practiceDefaultId'],
128
+ merchantId: 'staffmerchant1',
129
+ abn: 'mockAbn1',
130
+ description: 'This is a description.\nIt can span many lines.',
131
+ title: 'Dr',
132
+ firstName: 'Bruce',
133
+ lastName: 'Banner',
134
+ dob: new Date('2015-01-01T00:00:00'),
135
+ dobString: '2015-01-01',
136
+ mobile: '0451666888',
137
+ mobileE164: '+61451666888',
138
+ landline: '+6195553333',
139
+ email: 'brucepractice1@localz.co',
140
+ profilePictureUrl: 'https://mockUrl/mockPath',
141
+ searchWords: ['bruce', 'banner', 'bruce banner', 'banner bruce', '0451666888', '+61451666888', 'brucepractice1@localz.co', 'provider1'],
142
+ status: 'ACTIVE',
143
+ refId: 'mockRefId',
144
+ refSource: 'mockRefSource',
145
+ created: new Date('2015-01-01T00:00:00'),
146
+ modified: new Date('2015-01-02T00:00:00Z')
147
+ };
148
+
149
+ var staff = /*#__PURE__*/Object.freeze({
150
+ __proto__: null,
151
+ defaultPractitioner: defaultPractitioner,
152
+ defaultPractitioner2: defaultPractitioner2,
153
+ practitionerWithPendingProviderSet: practitionerWithPendingProviderSet,
154
+ practitionerWithActivePendingProviderSet: practitionerWithActivePendingProviderSet
155
+ });
156
+
157
+ exports.defaultPractitioner = defaultPractitioner;
158
+ exports.defaultPractitioner2 = defaultPractitioner2;
159
+ exports.practitionerWithActivePendingProviderSet = practitionerWithActivePendingProviderSet;
160
+ exports.practitionerWithPendingProviderSet = practitionerWithPendingProviderSet;
161
+ exports.staff = staff;