@medipass/utils 11.68.0 → 11.68.2

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 +22 -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 +204 -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,1883 @@
1
+ 'use strict';
2
+
3
+ var defaultTransaction = {
4
+ _id: 'transactionDefaultId',
5
+ abn: 'mockABN',
6
+ organisationId: 'organisationDefaultId',
7
+ businessId: 'businessDefaultId',
8
+ transactionId: '0000-0000-1234',
9
+ merchantId: 'mockMerchantId',
10
+ accountId: 'consumerAccountDefaultId',
11
+ transactionType: 'invoice',
12
+ serviceDateString: '2015-01-01',
13
+ currencyCode: 'AUD',
14
+ amountFee: 9000,
15
+ amountFeeString: '$90.00',
16
+ amountBalance: 8000,
17
+ amountBalanceString: '$80.00',
18
+ amountCharged: 8000,
19
+ amountChargedString: '$80.00',
20
+ amountBenefit: 5000,
21
+ amountBenefitString: '$50.00',
22
+ amountClaimsBenefit: 5000,
23
+ amountClaimsBenefitString: '$50.00',
24
+ amountGap: 3000,
25
+ amountGapString: '$30.00',
26
+ amountClaimsGap: 3000,
27
+ amountClaimsGapString: '$30.00',
28
+ amountOutOfPocket: 3000,
29
+ amountOutOfPocketString: '$30.00',
30
+ amountDiscount: 1000,
31
+ amountDiscountString: '$10.00',
32
+ claims: [{
33
+ claimDateString: '2015-01-01',
34
+ claimId: 'mockClaimId',
35
+ funder: {
36
+ _id: 'funderHICAPSId',
37
+ code: 'nab',
38
+ displayName: 'HICAPS',
39
+ logoUrl: 'http://s3/hicapslogo'
40
+ },
41
+ claimItems: [{
42
+ itemCode: 'mockItemCode',
43
+ fullName: 'mockFullName',
44
+ displayName: 'mockDisplayName',
45
+ description: 'mockItemDescription',
46
+ clinicalCode: '99',
47
+ amountFee: 9000,
48
+ amountFeeString: '$90.00',
49
+ amountCharged: 8000,
50
+ amountChargedString: '$80.00',
51
+ amountBenefit: 5000,
52
+ amountBenefitString: '$50.00',
53
+ amountDiscount: 1000,
54
+ amountDiscountString: '$10.00',
55
+ amountGap: 3000,
56
+ amountGapString: '$30.00',
57
+ status: 'accepted'
58
+ }, {
59
+ itemCode: 'mockItemCode2',
60
+ fullName: 'mockFullName2',
61
+ displayName: 'mockDisplayName2',
62
+ description: 'mockItemDescription2',
63
+ clinicalCode: '12',
64
+ amountFee: 2000,
65
+ amountFeeString: '$20.00',
66
+ amountCharged: 2000,
67
+ amountChargedString: '$20.00',
68
+ amountBenefit: 1000,
69
+ amountBenefitString: '$10.00',
70
+ amountGap: 1000,
71
+ amountGapString: '$10.00',
72
+ status: 'accepted'
73
+ }],
74
+ status: 'accepted'
75
+ }],
76
+ member: {
77
+ _id: 'memberDefaultId',
78
+ firstName: 'Peter',
79
+ lastName: 'Parker',
80
+ defaultHealthFundAccountCardRank: '01',
81
+ email: 'mockpatient@localz.co',
82
+ mobile: '0412345678',
83
+ mobileE164: '+61412345678'
84
+ },
85
+ service: {
86
+ _id: 'serviceDefaultId',
87
+ displayName: 'Specific consultation',
88
+ fullName: 'General consultation',
89
+ description: 'An old description'
90
+ },
91
+ practice: {
92
+ _id: 'practiceDefaultId',
93
+ displayName: 'Practice 1',
94
+ fullName: 'Practice 1',
95
+ address: '1 Main Street',
96
+ postcode: '3163',
97
+ city: 'Carnegie',
98
+ state: 'Victoria',
99
+ country: 'Australia',
100
+ countryCode: 'au',
101
+ tz: 'Australia/Brisbane',
102
+ lnglat: [145.057504, -37.888507],
103
+ abn: 'mockAbn',
104
+ logoUrl: 'mockLogoUrl',
105
+ refId: 'practice1RefId',
106
+ refSource: 'groupMockRefSource1'
107
+ },
108
+ staff: {
109
+ _id: 'staffPractitionerDefaultId',
110
+ staffType: 'practitioner',
111
+ title: 'Dr',
112
+ firstName: 'Bruce',
113
+ lastName: 'Banner',
114
+ profilePictureUrl: 'mockUrl',
115
+ refId: 'practitioner1RefId',
116
+ refSource: 'groupMockRefSource1'
117
+ },
118
+ patient: {
119
+ _id: 'patientDefaultId',
120
+ firstName: 'mockFirstName',
121
+ lastName: 'mockLastName',
122
+ email: 'mockpatient@localz.co',
123
+ mobile: '0412345678',
124
+ mobileE164: '+61412345678',
125
+ dobString: '1984-02-20',
126
+ refId: 'mockPatientRefId',
127
+ refSource: 'mockPatientRefSource'
128
+ },
129
+ modality: {
130
+ displayName: 'mockModality'
131
+ },
132
+ payments: [],
133
+ status: 'pending',
134
+ created: new Date('2015-01-01T00:00:00').toISOString(),
135
+ modified: new Date('2015-01-02T00:00:00Z').toISOString(),
136
+ workflowStateDate: new Date('2015-01-02T00:00:00Z').toISOString()
137
+ };
138
+ var transactionWithClaim = {
139
+ _id: 'transactionDefaultWithClaimId',
140
+ organisationId: 'organisationDefaultId',
141
+ businessId: 'businessDefaultId',
142
+ transactionId: '0000-0000-1235',
143
+ merchantId: 'mockMerchantId',
144
+ abn: 'mockAbn',
145
+ accountId: 'consumerAccountDefaultId',
146
+ transactionType: 'invoice',
147
+ serviceDateString: '2015-01-01',
148
+ currencyCode: 'AUD',
149
+ amountFee: 12095,
150
+ amountBalance: 6095,
151
+ amountCharged: 11095,
152
+ amountItemsFee: 12095,
153
+ amountItemsCharged: 11095,
154
+ amountItemsDiscount: 1000,
155
+ amountBenefit: 5000,
156
+ amountGap: 6095,
157
+ amountDiscount: 1000,
158
+ member: {
159
+ _id: 'memberDefaultId',
160
+ firstName: 'Peter',
161
+ lastName: 'Parker'
162
+ },
163
+ modality: {
164
+ _id: 'modalityDefaultId',
165
+ displayName: 'Default Chiropractic'
166
+ },
167
+ service: {
168
+ _id: 'serviceDefaultId',
169
+ displayName: 'Specific consultation',
170
+ fullName: 'General consultation',
171
+ description: 'An old description'
172
+ },
173
+ practice: {
174
+ _id: 'practiceDefaultId',
175
+ displayName: 'Practice 1',
176
+ fullName: 'Practice 1',
177
+ abn: 'mockAbn',
178
+ logoUrl: 'http://logopeople.blog.com/files/2012/12/Health-and-Happiness.png',
179
+ address: '1 Main Street',
180
+ postcode: '3163',
181
+ city: 'Carnegie',
182
+ state: 'Victoria',
183
+ country: 'Australia',
184
+ countryCode: 'au',
185
+ tz: 'Australia/Brisbane',
186
+ lnglat: [145.057504, -37.888507],
187
+ refId: 'practice1RefId',
188
+ refSource: 'groupMockRefSource1'
189
+ },
190
+ staff: {
191
+ _id: 'staffPractitionerDefaultId',
192
+ title: 'Dr',
193
+ firstName: 'Bruce',
194
+ lastName: 'Banner',
195
+ profilePictureUrl: 'mockUrl',
196
+ refId: 'practitioner1RefId',
197
+ refSource: 'groupMockRefSource1'
198
+ },
199
+ patient: {
200
+ _id: 'patientDefaultId',
201
+ firstName: 'mockFirstName',
202
+ lastName: 'mockLastName',
203
+ email: 'mockpatient@localz.co',
204
+ mobile: '0412345678',
205
+ mobileE164: '+61412345678',
206
+ dobString: '1984-02-20',
207
+ refId: 'mockPatientRefId',
208
+ refSource: 'mockPatientRefSource'
209
+ },
210
+ status: 'pending',
211
+ claims: [{
212
+ claimDateString: '2015-01-01',
213
+ claimId: 'mockClaimId',
214
+ funder: {
215
+ _id: 'funderHICAPSId',
216
+ code: 'nab',
217
+ displayName: 'HICAPS',
218
+ logoUrl: 'http://s3/hicapslogo'
219
+ },
220
+ claimType: 'claim',
221
+ claimItems: [{
222
+ itemCode: 'mockItemCode',
223
+ fullName: 'mockFullName',
224
+ displayName: 'mockDisplayName',
225
+ description: 'mockItemDescription',
226
+ clinicalCode: '99',
227
+ amountFee: 12095,
228
+ amountCharged: 11095,
229
+ amountBenefit: 5000,
230
+ amountGap: 6095,
231
+ amountDiscount: 1000,
232
+ status: 'accepted'
233
+ }],
234
+ providerNumber: 'PROVIDER1',
235
+ requested: new Date('2015-01-01T00:00:00').toISOString(),
236
+ responded: new Date('2015-01-01T00:00:03Z').toISOString(),
237
+ healthFundAccount: {
238
+ _id: 'healthFundAccountDefaultId',
239
+ lastFour: '6789',
240
+ cardRank: '01',
241
+ cardIssueNumber: '01',
242
+ healthFund: {
243
+ _id: 'healthFundDefaultId',
244
+ fullName: 'Be Healthy Pty Ltd',
245
+ displayName: 'B Healthy',
246
+ logoSmallUrl: 'http://s3/smallimage',
247
+ cardImageUrl: 'http://s3/cardimage'
248
+ }
249
+ },
250
+ status: 'accepted',
251
+ gateway: {
252
+ refId: 'mockGatewayRefId',
253
+ refSource: 'mockGatewaySource',
254
+ data: {
255
+ data: 'data'
256
+ },
257
+ dataVersion: '1.0.0'
258
+ }
259
+ }],
260
+ payments: [],
261
+ created: new Date('2015-01-01T00:00:00').toISOString(),
262
+ modified: new Date('2015-01-02T00:00:00Z').toISOString()
263
+ };
264
+ var transactionWithApprovedPayment = {
265
+ _id: 'transactionWithApprovedPaymentId',
266
+ abn: 'mockABN',
267
+ organisationId: 'organisationDefaultId',
268
+ businessId: 'businessDefaultId',
269
+ transactionId: '0000-0000-1234',
270
+ merchantId: 'mockMerchantId',
271
+ accountId: 'consumerAccountDefaultId',
272
+ transactionType: 'invoice',
273
+ serviceDateString: '2015-01-01',
274
+ currencyCode: 'AUD',
275
+ amountFee: 9000,
276
+ amountFeeString: '$90.00',
277
+ amountBalance: 0,
278
+ amountBalanceString: '$0.00',
279
+ amountCharged: 8000,
280
+ amountChargedString: '$80.00',
281
+ amountBenefit: 5000,
282
+ amountBenefitString: '$50.00',
283
+ amountClaimsBenefit: 5000,
284
+ amountClaimsBenefitString: '$50.00',
285
+ amountGap: 3000,
286
+ amountGapString: '$30.00',
287
+ amountClaimsGap: 3000,
288
+ amountClaimsGapString: '$30.00',
289
+ amountOutOfPocket: 3000,
290
+ amountOutOfPocketString: '$30.00',
291
+ amountDiscount: 1000,
292
+ amountDiscountString: '$10.00',
293
+ claims: [{
294
+ claimDateString: '2015-01-01',
295
+ claimId: 'mockClaimId',
296
+ funder: {
297
+ _id: 'funderHICAPSId',
298
+ code: 'nab',
299
+ displayName: 'HICAPS',
300
+ logoUrl: 'http://s3/hicapslogo'
301
+ },
302
+ claimItems: [{
303
+ itemCode: 'mockItemCode',
304
+ fullName: 'mockFullName',
305
+ displayName: 'mockDisplayName',
306
+ description: 'mockItemDescription',
307
+ clinicalCode: '99',
308
+ amountFee: 9000,
309
+ amountFeeString: '$90.00',
310
+ amountCharged: 8000,
311
+ amountChargedString: '$80.00',
312
+ amountBenefit: 5000,
313
+ amountBenefitString: '$50.00',
314
+ amountDiscount: 1000,
315
+ amountDiscountString: '$10.00',
316
+ amountGap: 3000,
317
+ amountGapString: '$30.00',
318
+ status: 'accepted'
319
+ }, {
320
+ itemCode: 'mockItemCode2',
321
+ fullName: 'mockFullName2',
322
+ displayName: 'mockDisplayName2',
323
+ description: 'mockItemDescription2',
324
+ clinicalCode: '12',
325
+ amountFee: 2000,
326
+ amountFeeString: '$20.00',
327
+ amountCharged: 2000,
328
+ amountChargedString: '$20.00',
329
+ amountBenefit: 1000,
330
+ amountBenefitString: '$10.00',
331
+ amountGap: 1000,
332
+ amountGapString: '$10.00',
333
+ status: 'accepted'
334
+ }],
335
+ status: 'accepted'
336
+ }],
337
+ member: {
338
+ _id: 'memberDefaultId',
339
+ firstName: 'Peter',
340
+ lastName: 'Parker',
341
+ defaultHealthFundAccountCardRank: '01',
342
+ email: 'mockpatient@localz.co',
343
+ mobile: '0412345678',
344
+ mobileE164: '+61412345678'
345
+ },
346
+ service: {
347
+ _id: 'serviceDefaultId',
348
+ displayName: 'Specific consultation',
349
+ fullName: 'General consultation',
350
+ description: 'An old description'
351
+ },
352
+ practice: {
353
+ _id: 'practiceDefaultId',
354
+ displayName: 'Practice 1',
355
+ fullName: 'Practice 1',
356
+ address: '1 Main Street',
357
+ postcode: '3163',
358
+ city: 'Carnegie',
359
+ state: 'Victoria',
360
+ country: 'Australia',
361
+ countryCode: 'au',
362
+ tz: 'Australia/Brisbane',
363
+ lnglat: [145.057504, -37.888507],
364
+ abn: 'mockAbn',
365
+ logoUrl: 'mockLogoUrl',
366
+ refId: 'practice1RefId',
367
+ refSource: 'groupMockRefSource1'
368
+ },
369
+ staff: {
370
+ _id: 'staffPractitionerDefaultId',
371
+ staffType: 'practitioner',
372
+ title: 'Dr',
373
+ firstName: 'Bruce',
374
+ lastName: 'Banner',
375
+ profilePictureUrl: 'mockUrl',
376
+ refId: 'practitioner1RefId',
377
+ refSource: 'groupMockRefSource1'
378
+ },
379
+ patient: {
380
+ _id: 'patientDefaultId',
381
+ firstName: 'mockFirstName',
382
+ lastName: 'mockLastName',
383
+ email: 'mockpatient@localz.co',
384
+ mobile: '0412345678',
385
+ mobileE164: '+61412345678',
386
+ dobString: '1984-02-20',
387
+ refId: 'mockPatientRefId',
388
+ refSource: 'mockPatientRefSource'
389
+ },
390
+ status: 'completed',
391
+ payments: [{
392
+ paymentDateString: '2015-01-01',
393
+ paymentId: '6790ac7c-24ac-4f98-8464-42f6d98a53ae',
394
+ amount: 1000,
395
+ requested: new Date('2015-01-01T00:00:00').toISOString(),
396
+ responded: new Date('2015-01-01T00:00:00').toISOString(),
397
+ paymentType: 'sale',
398
+ status: 'approved',
399
+ paymentMethod: {
400
+ _id: 'paymentMethodDefaultId',
401
+ source: 'braintree',
402
+ methodType: 'creditCard',
403
+ cardType: 'MasterCard',
404
+ lastFour: '8776'
405
+ }
406
+ }],
407
+ modality: {
408
+ displayName: 'mockModality'
409
+ },
410
+ created: new Date('2015-01-01T00:00:00').toISOString(),
411
+ modified: new Date('2015-01-02T00:00:00Z').toISOString(),
412
+ approvedByUsername: 'jake@medipass.io'
413
+ };
414
+ var transactionWithApprovedInPersonPayment = {
415
+ _id: 'transactionWithApprovedPaymentId',
416
+ abn: 'mockABN',
417
+ organisationId: 'organisationDefaultId',
418
+ businessId: 'businessDefaultId',
419
+ transactionId: '0000-0000-1234',
420
+ merchantId: 'mockMerchantId',
421
+ accountId: 'consumerAccountDefaultId',
422
+ transactionType: 'invoice',
423
+ serviceDateString: '2015-01-01',
424
+ currencyCode: 'AUD',
425
+ amountFee: 9000,
426
+ amountFeeString: '$90.00',
427
+ amountBalance: 0,
428
+ amountBalanceString: '$0.00',
429
+ amountCharged: 8000,
430
+ amountChargedString: '$80.00',
431
+ amountBenefit: 5000,
432
+ amountBenefitString: '$50.00',
433
+ amountClaimsBenefit: 5000,
434
+ amountClaimsBenefitString: '$50.00',
435
+ amountGap: 3000,
436
+ amountGapString: '$30.00',
437
+ amountClaimsGap: 3000,
438
+ amountClaimsGapString: '$30.00',
439
+ amountOutOfPocket: 3000,
440
+ amountOutOfPocketString: '$30.00',
441
+ amountDiscount: 1000,
442
+ amountDiscountString: '$10.00',
443
+ claims: [{
444
+ claimDateString: '2015-01-01',
445
+ claimId: 'mockClaimId',
446
+ funder: {
447
+ _id: 'funderHICAPSId',
448
+ code: 'nab',
449
+ displayName: 'HICAPS',
450
+ logoUrl: 'http://s3/hicapslogo'
451
+ },
452
+ claimItems: [{
453
+ itemCode: 'mockItemCode',
454
+ fullName: 'mockFullName',
455
+ displayName: 'mockDisplayName',
456
+ description: 'mockItemDescription',
457
+ clinicalCode: '99',
458
+ amountFee: 9000,
459
+ amountFeeString: '$90.00',
460
+ amountCharged: 8000,
461
+ amountChargedString: '$80.00',
462
+ amountBenefit: 5000,
463
+ amountBenefitString: '$50.00',
464
+ amountDiscount: 1000,
465
+ amountDiscountString: '$10.00',
466
+ amountGap: 3000,
467
+ amountGapString: '$30.00',
468
+ status: 'accepted'
469
+ }, {
470
+ itemCode: 'mockItemCode2',
471
+ fullName: 'mockFullName2',
472
+ displayName: 'mockDisplayName2',
473
+ description: 'mockItemDescription2',
474
+ clinicalCode: '12',
475
+ amountFee: 2000,
476
+ amountFeeString: '$20.00',
477
+ amountCharged: 2000,
478
+ amountChargedString: '$20.00',
479
+ amountBenefit: 1000,
480
+ amountBenefitString: '$10.00',
481
+ amountGap: 1000,
482
+ amountGapString: '$10.00',
483
+ status: 'accepted'
484
+ }],
485
+ status: 'accepted'
486
+ }],
487
+ member: {
488
+ _id: 'memberDefaultId',
489
+ firstName: 'Peter',
490
+ lastName: 'Parker',
491
+ defaultHealthFundAccountCardRank: '01',
492
+ email: 'mockpatient@localz.co',
493
+ mobile: '0412345678',
494
+ mobileE164: '+61412345678'
495
+ },
496
+ service: {
497
+ _id: 'serviceDefaultId',
498
+ displayName: 'Specific consultation',
499
+ fullName: 'General consultation',
500
+ description: 'An old description'
501
+ },
502
+ practice: {
503
+ _id: 'practiceDefaultId',
504
+ displayName: 'Practice 1',
505
+ fullName: 'Practice 1',
506
+ address: '1 Main Street',
507
+ postcode: '3163',
508
+ city: 'Carnegie',
509
+ state: 'Victoria',
510
+ country: 'Australia',
511
+ countryCode: 'au',
512
+ tz: 'Australia/Brisbane',
513
+ lnglat: [145.057504, -37.888507],
514
+ abn: 'mockAbn',
515
+ logoUrl: 'mockLogoUrl',
516
+ refId: 'practice1RefId',
517
+ refSource: 'groupMockRefSource1'
518
+ },
519
+ staff: {
520
+ _id: 'staffPractitionerDefaultId',
521
+ staffType: 'practitioner',
522
+ title: 'Dr',
523
+ firstName: 'Bruce',
524
+ lastName: 'Banner',
525
+ profilePictureUrl: 'mockUrl',
526
+ refId: 'practitioner1RefId',
527
+ refSource: 'groupMockRefSource1'
528
+ },
529
+ patient: {
530
+ _id: 'patientDefaultId',
531
+ firstName: 'mockFirstName',
532
+ lastName: 'mockLastName',
533
+ email: 'mockpatient@localz.co',
534
+ mobile: '0412345678',
535
+ mobileE164: '+61412345678',
536
+ dobString: '1984-02-20',
537
+ refId: 'mockPatientRefId',
538
+ refSource: 'mockPatientRefSource'
539
+ },
540
+ status: 'completed',
541
+ payments: [{
542
+ paymentDateString: '2015-01-01',
543
+ paymentId: '6790ac7c-24ac-4f98-8464-42f6d98a53ae',
544
+ amount: 1000,
545
+ requested: new Date('2015-01-01T00:00:00').toISOString(),
546
+ responded: new Date('2015-01-01T00:00:00').toISOString(),
547
+ paymentType: 'inperson',
548
+ status: 'approved'
549
+ }],
550
+ created: new Date('2015-01-01T00:00:00').toISOString(),
551
+ modified: new Date('2015-01-02T00:00:00Z').toISOString(),
552
+ approvedByUsername: 'jake@medipass.io'
553
+ };
554
+ var transactionWithRefundedPayment = {
555
+ _id: 'transactionWithRefundedPaymentId',
556
+ abn: 'mockABN',
557
+ organisationId: 'organisationDefaultId',
558
+ businessId: 'businessDefaultId',
559
+ transactionId: '0000-0000-1234',
560
+ merchantId: 'mockMerchantId',
561
+ accountId: 'consumerAccountDefaultId',
562
+ transactionType: 'invoice',
563
+ serviceDateString: '2015-01-01',
564
+ currencyCode: 'AUD',
565
+ amountFee: 9000,
566
+ amountFeeString: '$90.00',
567
+ amountBalance: 0,
568
+ amountBalanceString: '$0.00',
569
+ amountCharged: 8000,
570
+ amountChargedString: '$80.00',
571
+ amountBenefit: 5000,
572
+ amountBenefitString: '$50.00',
573
+ amountClaimsBenefit: 5000,
574
+ amountClaimsBenefitString: '$50.00',
575
+ amountGap: 3000,
576
+ amountGapString: '$30.00',
577
+ amountClaimsGap: 3000,
578
+ amountClaimsGapString: '$30.00',
579
+ amountOutOfPocket: 3000,
580
+ amountOutOfPocketString: '$30.00',
581
+ amountDiscount: 1000,
582
+ amountDiscountString: '$10.00',
583
+ claims: [{
584
+ claimDateString: '2015-01-01',
585
+ claimId: 'mockClaimId',
586
+ funder: {
587
+ _id: 'funderHICAPSId',
588
+ code: 'nab',
589
+ displayName: 'HICAPS',
590
+ logoUrl: 'http://s3/hicapslogo'
591
+ },
592
+ claimItems: [{
593
+ itemCode: 'mockItemCode',
594
+ fullName: 'mockFullName',
595
+ displayName: 'mockDisplayName',
596
+ description: 'mockItemDescription',
597
+ clinicalCode: '99',
598
+ amountFee: 9000,
599
+ amountFeeString: '$90.00',
600
+ amountCharged: 8000,
601
+ amountChargedString: '$80.00',
602
+ amountBenefit: 5000,
603
+ amountBenefitString: '$50.00',
604
+ amountDiscount: 1000,
605
+ amountDiscountString: '$10.00',
606
+ amountGap: 3000,
607
+ amountGapString: '$30.00',
608
+ status: 'accepted'
609
+ }, {
610
+ itemCode: 'mockItemCode2',
611
+ fullName: 'mockFullName2',
612
+ displayName: 'mockDisplayName2',
613
+ description: 'mockItemDescription2',
614
+ clinicalCode: '12',
615
+ amountFee: 2000,
616
+ amountFeeString: '$20.00',
617
+ amountCharged: 2000,
618
+ amountChargedString: '$20.00',
619
+ amountBenefit: 1000,
620
+ amountBenefitString: '$10.00',
621
+ amountGap: 1000,
622
+ amountGapString: '$10.00',
623
+ status: 'accepted'
624
+ }],
625
+ status: 'accepted'
626
+ }],
627
+ member: {
628
+ _id: 'memberDefaultId',
629
+ firstName: 'Peter',
630
+ lastName: 'Parker',
631
+ defaultHealthFundAccountCardRank: '01',
632
+ email: 'mockpatient@localz.co',
633
+ mobile: '0412345678',
634
+ mobileE164: '+61412345678'
635
+ },
636
+ service: {
637
+ _id: 'serviceDefaultId',
638
+ displayName: 'Specific consultation',
639
+ fullName: 'General consultation',
640
+ description: 'An old description'
641
+ },
642
+ practice: {
643
+ _id: 'practiceDefaultId',
644
+ displayName: 'Practice 1',
645
+ fullName: 'Practice 1',
646
+ address: '1 Main Street',
647
+ postcode: '3163',
648
+ city: 'Carnegie',
649
+ state: 'Victoria',
650
+ country: 'Australia',
651
+ countryCode: 'au',
652
+ tz: 'Australia/Brisbane',
653
+ lnglat: [145.057504, -37.888507],
654
+ abn: 'mockAbn',
655
+ logoUrl: 'mockLogoUrl',
656
+ refId: 'practice1RefId',
657
+ refSource: 'groupMockRefSource1'
658
+ },
659
+ staff: {
660
+ _id: 'staffPractitionerDefaultId',
661
+ staffType: 'practitioner',
662
+ title: 'Dr',
663
+ firstName: 'Bruce',
664
+ lastName: 'Banner',
665
+ profilePictureUrl: 'mockUrl',
666
+ refId: 'practitioner1RefId',
667
+ refSource: 'groupMockRefSource1'
668
+ },
669
+ patient: {
670
+ _id: 'patientDefaultId',
671
+ firstName: 'mockFirstName',
672
+ lastName: 'mockLastName',
673
+ email: 'mockpatient@localz.co',
674
+ mobile: '0412345678',
675
+ mobileE164: '+61412345678',
676
+ dobString: '1984-02-20',
677
+ refId: 'mockPatientRefId',
678
+ refSource: 'mockPatientRefSource'
679
+ },
680
+ status: 'completed',
681
+ payments: [{
682
+ paymentDateString: '2015-01-01',
683
+ paymentId: '6790ac7c-24ac-4f98-8464-42f6d98a53ae',
684
+ amount: 1000,
685
+ requested: new Date('2015-01-01T00:00:00').toISOString(),
686
+ responded: new Date('2015-01-01T00:00:00').toISOString(),
687
+ paymentType: 'sale',
688
+ status: 'approved',
689
+ paymentMethod: {
690
+ _id: 'paymentMethodDefaultId',
691
+ source: 'braintree',
692
+ methodType: 'creditCard',
693
+ cardType: 'MasterCard',
694
+ lastFour: '8776'
695
+ }
696
+ }, {
697
+ paymentId: 'mockRefundPayment',
698
+ amount: 1000,
699
+ requested: new Date('2015-01-01T00:00:00').toISOString(),
700
+ responded: new Date('2015-01-01T00:00:00').toISOString(),
701
+ paymentType: 'refund',
702
+ status: 'approved'
703
+ }],
704
+ modality: {
705
+ displayName: 'mockModality'
706
+ },
707
+ created: new Date('2015-01-01T00:00:00').toISOString(),
708
+ modified: new Date('2015-01-02T00:00:00Z').toISOString(),
709
+ approvedByUsername: 'jake@medipass.io'
710
+ };
711
+ var transactionWithMultipleRefundedPayments = {
712
+ _id: 'transactionWithMultipleRefundedPaymentsId',
713
+ abn: 'mockABN',
714
+ organisationId: 'organisationDefaultId',
715
+ businessId: 'businessDefaultId',
716
+ transactionId: '0000-0000-1234',
717
+ merchantId: 'mockMerchantId',
718
+ accountId: 'consumerAccountDefaultId',
719
+ transactionType: 'invoice',
720
+ serviceDateString: '2015-01-01',
721
+ currencyCode: 'AUD',
722
+ amountFee: 9000,
723
+ amountFeeString: '$90.00',
724
+ amountBalance: 0,
725
+ amountBalanceString: '$0.00',
726
+ amountCharged: 8000,
727
+ amountChargedString: '$80.00',
728
+ amountBenefit: 5000,
729
+ amountBenefitString: '$50.00',
730
+ amountClaimsBenefit: 5000,
731
+ amountClaimsBenefitString: '$50.00',
732
+ amountGap: 3000,
733
+ amountGapString: '$30.00',
734
+ amountClaimsGap: 3000,
735
+ amountClaimsGapString: '$30.00',
736
+ amountOutOfPocket: 3000,
737
+ amountOutOfPocketString: '$30.00',
738
+ amountDiscount: 1000,
739
+ amountDiscountString: '$10.00',
740
+ claims: [{
741
+ claimDateString: '2015-01-01',
742
+ claimId: 'mockClaimId',
743
+ funder: {
744
+ _id: 'funderHICAPSId',
745
+ code: 'nab',
746
+ displayName: 'HICAPS',
747
+ logoUrl: 'http://s3/hicapslogo'
748
+ },
749
+ claimItems: [{
750
+ itemCode: 'mockItemCode',
751
+ fullName: 'mockFullName',
752
+ displayName: 'mockDisplayName',
753
+ description: 'mockItemDescription',
754
+ clinicalCode: '99',
755
+ amountFee: 9000,
756
+ amountFeeString: '$90.00',
757
+ amountCharged: 8000,
758
+ amountChargedString: '$80.00',
759
+ amountBenefit: 5000,
760
+ amountBenefitString: '$50.00',
761
+ amountDiscount: 1000,
762
+ amountDiscountString: '$10.00',
763
+ amountGap: 3000,
764
+ amountGapString: '$30.00',
765
+ status: 'accepted'
766
+ }, {
767
+ itemCode: 'mockItemCode2',
768
+ fullName: 'mockFullName2',
769
+ displayName: 'mockDisplayName2',
770
+ description: 'mockItemDescription2',
771
+ clinicalCode: '12',
772
+ amountFee: 2000,
773
+ amountFeeString: '$20.00',
774
+ amountCharged: 2000,
775
+ amountChargedString: '$20.00',
776
+ amountBenefit: 1000,
777
+ amountBenefitString: '$10.00',
778
+ amountGap: 1000,
779
+ amountGapString: '$10.00',
780
+ status: 'accepted'
781
+ }],
782
+ status: 'accepted'
783
+ }],
784
+ member: {
785
+ _id: 'memberDefaultId',
786
+ firstName: 'Peter',
787
+ lastName: 'Parker',
788
+ defaultHealthFundAccountCardRank: '01',
789
+ email: 'mockpatient@localz.co',
790
+ mobile: '0412345678',
791
+ mobileE164: '+61412345678'
792
+ },
793
+ service: {
794
+ _id: 'serviceDefaultId',
795
+ displayName: 'Specific consultation',
796
+ fullName: 'General consultation',
797
+ description: 'An old description'
798
+ },
799
+ practice: {
800
+ _id: 'practiceDefaultId',
801
+ displayName: 'Practice 1',
802
+ fullName: 'Practice 1',
803
+ address: '1 Main Street',
804
+ postcode: '3163',
805
+ city: 'Carnegie',
806
+ state: 'Victoria',
807
+ country: 'Australia',
808
+ countryCode: 'au',
809
+ tz: 'Australia/Brisbane',
810
+ lnglat: [145.057504, -37.888507],
811
+ abn: 'mockAbn',
812
+ logoUrl: 'mockLogoUrl',
813
+ refId: 'practice1RefId',
814
+ refSource: 'groupMockRefSource1'
815
+ },
816
+ staff: {
817
+ _id: 'staffPractitionerDefaultId',
818
+ staffType: 'practitioner',
819
+ title: 'Dr',
820
+ firstName: 'Bruce',
821
+ lastName: 'Banner',
822
+ profilePictureUrl: 'mockUrl',
823
+ refId: 'practitioner1RefId',
824
+ refSource: 'groupMockRefSource1'
825
+ },
826
+ patient: {
827
+ _id: 'patientDefaultId',
828
+ firstName: 'mockFirstName',
829
+ lastName: 'mockLastName',
830
+ email: 'mockpatient@localz.co',
831
+ mobile: '0412345678',
832
+ mobileE164: '+61412345678',
833
+ dobString: '1984-02-20',
834
+ refId: 'mockPatientRefId',
835
+ refSource: 'mockPatientRefSource'
836
+ },
837
+ status: 'completed',
838
+ payments: [{
839
+ paymentDateString: '2015-01-01',
840
+ paymentId: '6790ac7c-24ac-4f98-8464-42f6d98a53ae',
841
+ amount: 1000,
842
+ amountString: '$10.00',
843
+ requested: new Date('2015-01-01T00:00:00').toISOString(),
844
+ responded: new Date('2015-01-01T00:00:00').toISOString(),
845
+ paymentType: 'sale',
846
+ status: 'approved',
847
+ paymentMethod: {
848
+ _id: 'paymentMethodDefaultId',
849
+ source: 'braintree',
850
+ methodType: 'creditCard',
851
+ cardType: 'MasterCard',
852
+ lastFour: '8776'
853
+ }
854
+ }, {
855
+ paymentId: 'mockRefundPayment',
856
+ amount: 1000,
857
+ amountString: '$10.00',
858
+ refund: {
859
+ claimItems: [{
860
+ itemCode: 'mockItemCode',
861
+ fullName: 'mockFullName',
862
+ displayName: 'mockDisplayName',
863
+ description: 'mockItemDescription',
864
+ amountRefund: 1000,
865
+ amountRefundString: '$10.00'
866
+ }]
867
+ },
868
+ requested: new Date('2015-01-01T00:00:00').toISOString(),
869
+ responded: new Date('2015-01-01T00:00:00').toISOString(),
870
+ paymentType: 'refund',
871
+ status: 'approved'
872
+ }, {
873
+ paymentId: 'mockRefundPayment2',
874
+ amount: 750,
875
+ amountString: '$7.50',
876
+ refund: {
877
+ claimItems: [{
878
+ itemCode: 'mockItemCode',
879
+ fullName: 'mockFullName',
880
+ displayName: 'mockDisplayName',
881
+ description: 'mockItemDescription',
882
+ amountRefund: 250,
883
+ amountRefundString: '$2.50'
884
+ }, {
885
+ itemCode: 'mockItemCode2',
886
+ fullName: 'mockFullName2',
887
+ displayName: 'mockDisplayName2',
888
+ description: 'mockItemDescription2',
889
+ amountRefund: 500,
890
+ amountRefundString: '$5.00'
891
+ }]
892
+ },
893
+ requested: new Date('2015-01-01T00:00:00').toISOString(),
894
+ responded: new Date('2015-01-01T00:00:00').toISOString(),
895
+ paymentType: 'refund',
896
+ status: 'approved'
897
+ }],
898
+ created: new Date('2015-01-01T00:00:00').toISOString(),
899
+ modified: new Date('2015-01-02T00:00:00Z').toISOString(),
900
+ approvedByUsername: 'jake@medipass.io'
901
+ };
902
+ var transactionWithOtherItems = {
903
+ _id: 'transactionWithOtherItemsId',
904
+ abn: 'mockABN',
905
+ organisationId: 'organisationDefaultId',
906
+ businessId: 'businessDefaultId',
907
+ transactionId: '0000-0000-1234',
908
+ merchantId: 'mockMerchantId',
909
+ accountId: 'consumerAccountDefaultId',
910
+ transactionType: 'invoice',
911
+ serviceDateString: '2015-01-01',
912
+ currencyCode: 'AUD',
913
+ amountFee: 9000,
914
+ amountFeeString: '$90.00',
915
+ amountBalance: 8000,
916
+ amountBalanceString: '$80.00',
917
+ amountCharged: 8000,
918
+ amountChargedString: '$80.00',
919
+ amountBenefit: 5000,
920
+ amountBenefitString: '$50.00',
921
+ amountClaimsBenefit: 5000,
922
+ amountClaimsBenefitString: '$50.00',
923
+ amountGap: 3000,
924
+ amountGapString: '$30.00',
925
+ amountClaimsGap: 3000,
926
+ amountClaimsGapString: '$30.00',
927
+ amountOutOfPocket: 3000,
928
+ amountOutOfPocketString: '$30.00',
929
+ amountDiscount: 1000,
930
+ amountDiscountString: '$10.00',
931
+ claims: [{
932
+ claimDateString: '2015-01-01',
933
+ claimId: 'mockClaimId',
934
+ funder: {
935
+ _id: 'funderHICAPSId',
936
+ code: 'nab',
937
+ displayName: 'HICAPS',
938
+ logoUrl: 'http://s3/hicapslogo'
939
+ },
940
+ claimItems: [{
941
+ itemCode: 'mockItemCode',
942
+ fullName: 'mockFullName',
943
+ displayName: 'mockDisplayName',
944
+ description: 'mockItemDescription',
945
+ clinicalCode: '99',
946
+ amountFee: 9000,
947
+ amountFeeString: '$90.00',
948
+ amountCharged: 8000,
949
+ amountChargedString: '$80.00',
950
+ amountBenefit: 5000,
951
+ amountBenefitString: '$50.00',
952
+ amountDiscount: 1000,
953
+ amountDiscountString: '$10.00',
954
+ amountGap: 3000,
955
+ amountGapString: '$30.00',
956
+ status: 'accepted'
957
+ }, {
958
+ itemCode: 'mockItemCode2',
959
+ fullName: 'mockFullName2',
960
+ displayName: 'mockDisplayName2',
961
+ description: 'mockItemDescription2',
962
+ clinicalCode: '12',
963
+ amountFee: 2000,
964
+ amountFeeString: '$20.00',
965
+ amountCharged: 2000,
966
+ amountChargedString: '$20.00',
967
+ amountBenefit: 1000,
968
+ amountBenefitString: '$10.00',
969
+ amountGap: 1000,
970
+ amountGapString: '$10.00',
971
+ status: 'accepted'
972
+ }],
973
+ status: 'accepted'
974
+ }],
975
+ member: {
976
+ _id: 'memberDefaultId',
977
+ firstName: 'Peter',
978
+ lastName: 'Parker',
979
+ defaultHealthFundAccountCardRank: '01',
980
+ email: 'mockpatient@localz.co',
981
+ mobile: '0412345678',
982
+ mobileE164: '+61412345678'
983
+ },
984
+ service: {
985
+ _id: 'serviceDefaultId',
986
+ displayName: 'Specific consultation',
987
+ fullName: 'General consultation',
988
+ description: 'An old description'
989
+ },
990
+ practice: {
991
+ _id: 'practiceDefaultId',
992
+ displayName: 'Practice 1',
993
+ fullName: 'Practice 1',
994
+ address: '1 Main Street',
995
+ postcode: '3163',
996
+ city: 'Carnegie',
997
+ state: 'Victoria',
998
+ country: 'Australia',
999
+ countryCode: 'au',
1000
+ tz: 'Australia/Brisbane',
1001
+ lnglat: [145.057504, -37.888507],
1002
+ abn: 'mockAbn',
1003
+ logoUrl: 'mockLogoUrl',
1004
+ refId: 'practice1RefId',
1005
+ refSource: 'groupMockRefSource1'
1006
+ },
1007
+ staff: {
1008
+ _id: 'staffPractitionerDefaultId',
1009
+ staffType: 'practitioner',
1010
+ title: 'Dr',
1011
+ firstName: 'Bruce',
1012
+ lastName: 'Banner',
1013
+ profilePictureUrl: 'mockUrl',
1014
+ refId: 'practitioner1RefId',
1015
+ refSource: 'groupMockRefSource1'
1016
+ },
1017
+ patient: {
1018
+ _id: 'patientDefaultId',
1019
+ firstName: 'mockFirstName',
1020
+ lastName: 'mockLastName',
1021
+ email: 'mockpatient@localz.co',
1022
+ mobile: '0412345678',
1023
+ mobileE164: '+61412345678',
1024
+ dobString: '1984-02-20',
1025
+ refId: 'mockPatientRefId',
1026
+ refSource: 'mockPatientRefSource'
1027
+ },
1028
+ otherItems: [{
1029
+ itemCode: 'mockItemCode',
1030
+ fullName: 'mockFullName',
1031
+ displayName: 'mockDisplayName',
1032
+ description: 'mockItemDescription',
1033
+ amountFee: 9000,
1034
+ amountFeeString: '$90.00',
1035
+ amountCharged: 8000,
1036
+ amountChargedString: '$80.00',
1037
+ amountDiscount: 1000,
1038
+ amountDiscountString: '$10.00'
1039
+ }],
1040
+ payments: [],
1041
+ status: 'pending',
1042
+ created: new Date('2015-01-01T00:00:00').toISOString(),
1043
+ modified: new Date('2015-01-02T00:00:00Z').toISOString()
1044
+ };
1045
+ var ghsTransactionCompleted = {
1046
+ _id: 'transactionCompletedId',
1047
+ abn: 'mockABN',
1048
+ organisationId: 'organisationDefaultId',
1049
+ transactionId: '0000-0000-9782',
1050
+ businessId: 'businessDefaultId',
1051
+ funderId: 'funderDefaultId',
1052
+ healthFundId: 'healthFundDefaultId',
1053
+ externalReference: 'mockExternalReference',
1054
+ transactionType: 'invoice',
1055
+ currencyCode: 'AUD',
1056
+ amountBalance: 0,
1057
+ amountFee: 0,
1058
+ amountCharged: 0,
1059
+ amountDiscount: 0,
1060
+ amountClaimsFee: 0,
1061
+ amountClaimsCharged: 0,
1062
+ amountClaimsDiscount: 0,
1063
+ amountClaimsBenefit: 0,
1064
+ amountClaimsGap: 0,
1065
+ amountOtherItemsFee: 0,
1066
+ amountOtherItemsCharged: 0,
1067
+ amountOtherItemsDiscount: 0,
1068
+ amountShippingFee: 0,
1069
+ amountShippingCharged: 0,
1070
+ amountShippingDiscount: 0,
1071
+ status: 'completed',
1072
+ tags: [{
1073
+ assignedByAccountId: null,
1074
+ assignedByUsername: 'mockUsername',
1075
+ notes: 'mockNotes',
1076
+ workflowException: {
1077
+ code: 'mockCode',
1078
+ description: 'Mock description',
1079
+ displayName: 'Mock displayName',
1080
+ _id: 'exceptionDefaultId'
1081
+ },
1082
+ _id: 'mockID'
1083
+ }],
1084
+ workflowState: 'completed',
1085
+ workflowStateDateString: '2015-01-01',
1086
+ claimSettlementDueDate: new Date('2015-01-01T00:00:00').toISOString(),
1087
+ claims: [{
1088
+ status: 'requested',
1089
+ providerNumber: '11111111L',
1090
+ claimType: 'claim',
1091
+ claimId: 'mockClaimId',
1092
+ claimDateString: '2016-01-01',
1093
+ claimSettlementDueDate: new Date('2015-01-01T00:00:00').toISOString(),
1094
+ funder: {
1095
+ _id: 'funderDefaultId',
1096
+ code: 'ghs',
1097
+ displayName: 'Garrison',
1098
+ logoUrl: 'http://s3/hicapsLogo'
1099
+ },
1100
+ claimItems: [{
1101
+ status: 'requested',
1102
+ amountBenefit: 10000,
1103
+ amountDiscount: 0,
1104
+ amountGap: 0,
1105
+ amountCharged: 10000,
1106
+ amountFee: 10000,
1107
+ amountFeeUnit: 5000,
1108
+ amountFeeNet: 10000,
1109
+ amountFeeNetUnit: 5000,
1110
+ description: 'mockClaimItemDescription',
1111
+ displayName: 'mockClaimItemDisplayName',
1112
+ fullName: 'mockClaimItemFullName',
1113
+ unit: 'EA',
1114
+ quantity: 2,
1115
+ isTaxable: false,
1116
+ serviceDateString: '2015-01-01',
1117
+ itemCode: 'mockItemCode'
1118
+ }]
1119
+ }],
1120
+ createdByAccountUsername: 'mock@medipass.io',
1121
+ vendor: {
1122
+ _id: 'vendorDefaultId',
1123
+ vendorNumber: 'mockVendorNumber',
1124
+ providerNumber: '11111111L'
1125
+ },
1126
+ rna: {
1127
+ _id: 'rnaDefaultId',
1128
+ epId: '8619751',
1129
+ dan: 'J46640963',
1130
+ rnaNumber: '1001226910',
1131
+ rnaAppointment: {
1132
+ _id: 'rnaAppointmentDefaultId',
1133
+ appointmentDateString: '2018-04-02',
1134
+ rnaItemNumber: '40'
1135
+ }
1136
+ },
1137
+ modality: {
1138
+ _id: 'modalityDefaultId',
1139
+ displayName: 'mockDisplayName'
1140
+ },
1141
+ files: [{
1142
+ fullName: 'invoice-scan',
1143
+ displayName: 'Invoice',
1144
+ s3Bucket: 'mockS3Bucket',
1145
+ isAwsPrivate: true,
1146
+ contentType: 'application/pdf',
1147
+ s3Key: 'invoice-scans/2018-03-02/Scan_2018_10_13_05_15_22_258 32/Scan_2018_10_13_05_15_22_258 32_processed.pdf',
1148
+ pages: [{
1149
+ pageNumber: 1
1150
+ }],
1151
+ url: 'mockUrl'
1152
+ }, {
1153
+ fullName: 'invoice-scan-original',
1154
+ displayName: 'Invoice (original)',
1155
+ s3Bucket: 'mockS3Bucket',
1156
+ isAwsPrivate: true,
1157
+ contentType: 'application/pdf',
1158
+ s3Key: 'invoice-scans/2018-03-02/Scan_2018_10_13_05_15_22_258 32/Scan_2018_10_13_05_15_22_258 32.pdf',
1159
+ pages: [],
1160
+ url: 'mockUrl'
1161
+ }],
1162
+ payments: [],
1163
+ searchWords: ['0000-0000-9782', '9782', '11111111l', '8619751', 'j46640963', 'mockusername'],
1164
+ assignedToUsername: 'mockusername',
1165
+ assignedToAccountId: 'healthFundUserAccountDefaultId',
1166
+ created: new Date('2015-01-01T00:00:00').toISOString(),
1167
+ modified: new Date('2015-01-02T00:00:00Z').toISOString()
1168
+ };
1169
+ var transactionQuoteDefault = {
1170
+ _id: 'transactionQuoteDefaultId',
1171
+ abn: 'mockABN',
1172
+ organisationId: 'organisationDefaultId',
1173
+ businessId: 'businessDefaultId',
1174
+ transactionId: '0000-0000-1244',
1175
+ merchantId: 'mockMerchantId',
1176
+ accountId: 'consumerAccountDefaultId',
1177
+ transactionType: 'quote',
1178
+ serviceDateString: '2015-01-01',
1179
+ currencyCode: 'AUD',
1180
+ amountFee: 9000,
1181
+ amountBalance: 8000,
1182
+ amountCharged: 8000,
1183
+ amountBenefit: 0,
1184
+ amountGap: 8000,
1185
+ amountDiscount: 1000,
1186
+ member: {
1187
+ _id: 'memberDefaultId',
1188
+ firstName: 'Peter',
1189
+ lastName: 'Parker'
1190
+ },
1191
+ service: {
1192
+ _id: 'serviceDefaultId',
1193
+ displayName: 'Specific consultation',
1194
+ fullName: 'General consultation',
1195
+ description: 'An old description'
1196
+ },
1197
+ practice: {
1198
+ _id: 'practiceDefaultId',
1199
+ displayName: 'Practice 1',
1200
+ fullName: 'Practice 1',
1201
+ address: '1 Main Street',
1202
+ postcode: '3163',
1203
+ city: 'Carnegie',
1204
+ state: 'Victoria',
1205
+ country: 'Australia',
1206
+ countryCode: 'au',
1207
+ tz: 'Australia/Brisbane',
1208
+ lnglat: [145.057504, -37.888507],
1209
+ abn: 'mockAbn',
1210
+ logoUrl: 'mockLogoUrl',
1211
+ refId: 'practice1RefId',
1212
+ refSource: 'groupMockRefSource1'
1213
+ },
1214
+ staff: {
1215
+ _id: 'staffPractitionerDefaultId',
1216
+ title: 'Dr',
1217
+ firstName: 'Bruce',
1218
+ lastName: 'Banner',
1219
+ profilePictureUrl: 'mockUrl',
1220
+ refId: 'practitioner1RefId',
1221
+ refSource: 'groupMockRefSource1'
1222
+ },
1223
+ status: 'completed',
1224
+ claims: [{
1225
+ claimDateString: '2015-01-01',
1226
+ claimId: 'mockQuoteClaimId',
1227
+ claimType: 'quote',
1228
+ claimItems: [{
1229
+ itemCode: 'mockItemCode',
1230
+ fullName: 'mockFullName',
1231
+ displayName: 'mockDisplayName',
1232
+ description: 'mockItemDescription',
1233
+ clinicalCode: '99',
1234
+ amountFee: 12095,
1235
+ amountCharged: 11095,
1236
+ amountBenefit: 5000,
1237
+ amountGap: 6095,
1238
+ amountDiscount: 1000
1239
+ }],
1240
+ providerNumber: 'PROVIDER1',
1241
+ funder: {
1242
+ code: 'nab'
1243
+ },
1244
+ requested: new Date('2015-01-01T00:00:00').toISOString(),
1245
+ responded: new Date('2015-01-01T00:00:00').toISOString(),
1246
+ healthFundAccount: {
1247
+ _id: 'healthFundAccountDefaultId',
1248
+ lastFour: '6789',
1249
+ cardRank: '01',
1250
+ cardIssueNumber: '01',
1251
+ healthFund: {
1252
+ _id: 'healthFundDefaultId',
1253
+ fullName: 'Be Healthy Pty Ltd',
1254
+ displayName: 'B Healthy',
1255
+ logoSmallUrl: 'http://s3/smallimage',
1256
+ cardImageUrl: 'http://s3/cardimage'
1257
+ }
1258
+ },
1259
+ status: 'approved',
1260
+ gateway: {
1261
+ refId: 'mockGatewayRefId',
1262
+ refSource: 'mockGatewaySource',
1263
+ data: {
1264
+ data: 'data'
1265
+ },
1266
+ dataVersion: '1.0.0'
1267
+ }
1268
+ }],
1269
+ modality: {
1270
+ displayName: 'mockModality'
1271
+ },
1272
+ payments: [],
1273
+ created: new Date('2015-01-01T00:00:00').toISOString(),
1274
+ modified: new Date('2015-01-02T00:00:00Z').toISOString()
1275
+ };
1276
+ var transactionForMemberRequestQuote = {
1277
+ _id: 'transactionForMemberRequestQuote',
1278
+ abn: 'mockABN',
1279
+ organisationId: 'organisationDefaultId',
1280
+ businessId: 'businessDefaultId',
1281
+ transactionId: 'Q-0000-0000-0001',
1282
+ requesterMessage: 'I have a sore neck',
1283
+ transactionType: 'quote',
1284
+ currencyCode: 'AUD',
1285
+ member: {
1286
+ firstName: 'Apple',
1287
+ lastName: 'Smith',
1288
+ mobile: '0400000111',
1289
+ mobileE164: '+61400000111'
1290
+ },
1291
+ practice: {
1292
+ _id: 'practiceDefaultId',
1293
+ displayName: 'Practice 1',
1294
+ fullName: 'Practice 1',
1295
+ abn: 'mockAbn',
1296
+ logoUrl: 'http://mockLogoUrl/mockPath',
1297
+ address: '1 Main Street',
1298
+ postcode: '3163',
1299
+ city: 'Carnegie',
1300
+ state: 'Victoria',
1301
+ country: 'Australia',
1302
+ countryCode: 'au',
1303
+ tz: 'Australia/Brisbane',
1304
+ lnglat: [145.057504, -37.888507],
1305
+ refId: 'practice1RefId',
1306
+ refSource: 'mockRefSource'
1307
+ },
1308
+ status: 'requested',
1309
+ accountId: 'consumerAccountDefaultId',
1310
+ createdByAccountId: 'consumerAccountDefaultId',
1311
+ created: new Date('2017-08-01T00:00:00').toISOString(),
1312
+ modified: new Date('2017-08-02T00:00:00').toISOString()
1313
+ };
1314
+ var transactionForMemberRequestQuoteComplete = {
1315
+ _id: 'transactionForMemberRequestQuoteComplete',
1316
+ abn: 'mockABN',
1317
+ organisationId: 'organisationDefaultId',
1318
+ businessId: 'businessDefaultId',
1319
+ transactionId: 'Q-0000-0000-0002',
1320
+ requesterMessage: 'I have a sore neck',
1321
+ responderMessage: 'We recommend a neck massage',
1322
+ transactionType: 'quote',
1323
+ currencyCode: 'AUD',
1324
+ member: {
1325
+ firstName: 'Apple',
1326
+ lastName: 'Smith',
1327
+ mobile: '0400000111',
1328
+ mobileE164: '+61400000111'
1329
+ },
1330
+ practice: {
1331
+ _id: 'practiceDefaultId',
1332
+ displayName: 'Practice 1',
1333
+ fullName: 'Practice 1',
1334
+ abn: 'mockAbn',
1335
+ logoUrl: 'http://mockLogoUrl/mockPath',
1336
+ address: '1 Main Street',
1337
+ postcode: '3163',
1338
+ city: 'Carnegie',
1339
+ state: 'Victoria',
1340
+ country: 'Australia',
1341
+ countryCode: 'au',
1342
+ tz: 'Australia/Brisbane',
1343
+ lnglat: [145.057504, -37.888507],
1344
+ refId: 'practice1RefId',
1345
+ refSource: 'mockRefSource'
1346
+ },
1347
+ status: 'completed',
1348
+ created: new Date('2017-08-01T00:00:00').toISOString(),
1349
+ modified: new Date('2017-08-02T00:00:00').toISOString()
1350
+ };
1351
+ var transactionWithPendingMedicareClaim = {
1352
+ _id: 'transactionMedicareWithPendingClaimId',
1353
+ organisationId: 'organisationDefaultId',
1354
+ businessId: 'businessDefaultId',
1355
+ transactionId: '0000-0000-6298',
1356
+ funderId: 'funderMedicareId',
1357
+ merchantId: 'mockMerchantId',
1358
+ ebNumber: 'mockEbNumber',
1359
+ abn: 'mockAbn',
1360
+ accountId: 'consumerAccountDefaultId',
1361
+ transactionType: 'invoice',
1362
+ serviceDateString: '2015-01-01',
1363
+ currencyCode: 'AUD',
1364
+ amountFee: 12095,
1365
+ amountFeeString: '$120.95',
1366
+ amountBalance: 6095,
1367
+ amountBalanceString: '$60.95',
1368
+ amountCharged: 11095,
1369
+ amountChargedString: '$110.95',
1370
+ amountBenefit: 5000,
1371
+ amountBenefitString: '$50.00',
1372
+ amountGap: 6095,
1373
+ amountGapString: '$60.95',
1374
+ amountDiscount: 1000,
1375
+ amountDiscountString: '$10.00',
1376
+ amountShippingFee: 0,
1377
+ amountShippingFeeString: '$0.00',
1378
+ amountShippingCharged: 0,
1379
+ amountShippingChargedString: '$0.00',
1380
+ amountShippingDiscount: 0,
1381
+ amountShippingDiscountString: '$0.00',
1382
+ amountClaimsFee: 12095,
1383
+ amountClaimsFeeString: '$120.95',
1384
+ amountClaimsCharged: 11095,
1385
+ amountClaimsChargedString: '$110.95',
1386
+ amountClaimsDiscount: 1000,
1387
+ amountClaimsDiscountString: '$10.00',
1388
+ amountClaimsBenefit: 5000,
1389
+ amountClaimsBenefitString: '$50.00',
1390
+ amountClaimsGap: 6095,
1391
+ amountClaimsGapString: '$60.95',
1392
+ amountClaimsTax: 0,
1393
+ amountClaimsTaxString: '$0.00',
1394
+ amountOtherItemsFee: 0,
1395
+ amountOtherItemsFeeString: '$0.00',
1396
+ amountOtherItemsCharged: 0,
1397
+ amountOtherItemsChargedString: '$0.00',
1398
+ amountOtherItemsDiscount: 0,
1399
+ amountOtherItemsDiscountString: '$0.00',
1400
+ member: {
1401
+ _id: 'memberDefaultId',
1402
+ firstName: 'Peter',
1403
+ lastName: 'Parker',
1404
+ dobString: '1984-02-19'
1405
+ },
1406
+ modality: {
1407
+ _id: 'modalityDefaultId',
1408
+ displayName: 'Default Chiropractic'
1409
+ },
1410
+ service: {
1411
+ _id: 'serviceDefaultId',
1412
+ displayName: 'Specific consultation',
1413
+ fullName: 'General consultation',
1414
+ description: 'An old description'
1415
+ },
1416
+ practice: {
1417
+ _id: 'practiceDefaultId',
1418
+ displayName: 'Practice 1',
1419
+ fullName: 'Practice 1',
1420
+ abn: 'mockAbn',
1421
+ logoUrl: 'http://logopeople.blog.com/files/2012/12/Health-and-Happiness.png',
1422
+ address: '1 Main Street',
1423
+ postcode: '3163',
1424
+ city: 'Carnegie',
1425
+ state: 'Victoria',
1426
+ country: 'Australia',
1427
+ countryCode: 'au',
1428
+ tz: 'Australia/Brisbane',
1429
+ lnglat: [145.057504, -37.888507],
1430
+ refId: 'practice1RefId',
1431
+ refSource: 'groupMockRefSource1'
1432
+ },
1433
+ staff: {
1434
+ _id: 'staffPractitionerDefaultId',
1435
+ title: 'Dr',
1436
+ firstName: 'Bruce',
1437
+ lastName: 'Banner',
1438
+ profilePictureUrl: 'mockUrl',
1439
+ refId: 'practitioner1RefId',
1440
+ refSource: 'groupMockRefSource1'
1441
+ },
1442
+ patient: {
1443
+ _id: 'patientDefaultId',
1444
+ firstName: 'mockFirstName',
1445
+ lastName: 'mockLastName',
1446
+ email: 'mockpatient@localz.co',
1447
+ mobile: '0412345678',
1448
+ mobileE164: '+61412345678',
1449
+ dobString: '1984-02-20',
1450
+ refId: 'mockPatientRefId',
1451
+ refSource: 'mockPatientRefSource',
1452
+ status: 'NEW'
1453
+ },
1454
+ medicare: {
1455
+ isInHospital: false,
1456
+ isBulkBilled: false,
1457
+ locationId: 'mockLocationId'
1458
+ },
1459
+ status: 'pending',
1460
+ claims: [{
1461
+ claimDateString: '2015-01-01',
1462
+ claimId: 'mockClaimId',
1463
+ claimType: 'claim',
1464
+ claimItems: [{
1465
+ itemCode: 'mockItemCode',
1466
+ fullName: 'mockFullName',
1467
+ displayName: 'mockDisplayName',
1468
+ description: 'mockItemDescription',
1469
+ amountFee: 12095,
1470
+ amountFeeString: '$120.95',
1471
+ amountCharged: 11095,
1472
+ amountChargedString: '$110.95',
1473
+ amountBenefit: 5000,
1474
+ amountBenefitString: '$50.00',
1475
+ amountGap: 6095,
1476
+ amountGapString: '$60.95',
1477
+ amountDiscount: 1000,
1478
+ amountDiscountString: '$10.00',
1479
+ status: 'pending'
1480
+ }],
1481
+ providerNumber: 'PROVIDER3',
1482
+ requested: new Date('2015-01-01T00:00:00Z'),
1483
+ responded: new Date('2015-01-01T00:00:03Z'),
1484
+ funder: {
1485
+ _id: 'funderMedicareId',
1486
+ code: 'medicare',
1487
+ displayName: 'Medicare',
1488
+ logoUrl: 'http://s3/medicarelogo'
1489
+ },
1490
+ healthFundAccount: {
1491
+ _id: 'healthFundAccountMedicareId',
1492
+ lastFour: '7890',
1493
+ cardRank: '01',
1494
+ expiryMonth: '10',
1495
+ expiryYear: '2020',
1496
+ healthFund: {
1497
+ _id: 'healthFundMedicareId',
1498
+ fullName: 'Medicare',
1499
+ displayName: 'Medicare',
1500
+ logoSmallUrl: 'http://s3/smallimage',
1501
+ cardImageUrl: 'http://s3/cardimage'
1502
+ }
1503
+ },
1504
+ status: 'pending'
1505
+ }],
1506
+ payments: [],
1507
+ created: new Date('2015-01-01T00:00:00Z'),
1508
+ modified: new Date('2015-01-02T00:00:00Z')
1509
+ };
1510
+ var transactionWithPendingMedicareClaimAndClaimant = {
1511
+ _id: 'transactionMedicareWithPendingClaimId',
1512
+ organisationId: 'organisationDefaultId',
1513
+ businessId: 'businessDefaultId',
1514
+ transactionId: '0000-0000-6298',
1515
+ funderId: 'funderMedicareId',
1516
+ merchantId: 'mockMerchantId',
1517
+ ebNumber: 'mockEbNumber',
1518
+ abn: 'mockAbn',
1519
+ accountId: 'consumerAccountDefaultId',
1520
+ transactionType: 'invoice',
1521
+ serviceDateString: '2015-01-01',
1522
+ currencyCode: 'AUD',
1523
+ amountFee: 12095,
1524
+ amountFeeString: '$120.95',
1525
+ amountBalance: 6095,
1526
+ amountBalanceString: '$60.95',
1527
+ amountCharged: 11095,
1528
+ amountChargedString: '$110.95',
1529
+ amountBenefit: 5000,
1530
+ amountBenefitString: '$50.00',
1531
+ amountGap: 6095,
1532
+ amountGapString: '$60.95',
1533
+ amountDiscount: 1000,
1534
+ amountDiscountString: '$10.00',
1535
+ amountShippingFee: 0,
1536
+ amountShippingFeeString: '$0.00',
1537
+ amountShippingCharged: 0,
1538
+ amountShippingChargedString: '$0.00',
1539
+ amountShippingDiscount: 0,
1540
+ amountShippingDiscountString: '$0.00',
1541
+ amountClaimsFee: 12095,
1542
+ amountClaimsFeeString: '$120.95',
1543
+ amountClaimsCharged: 11095,
1544
+ amountClaimsChargedString: '$110.95',
1545
+ amountClaimsDiscount: 1000,
1546
+ amountClaimsDiscountString: '$10.00',
1547
+ amountClaimsBenefit: 5000,
1548
+ amountClaimsBenefitString: '$50.00',
1549
+ amountClaimsGap: 6095,
1550
+ amountClaimsGapString: '$60.95',
1551
+ amountClaimsTax: 0,
1552
+ amountClaimsTaxString: '$0.00',
1553
+ amountOtherItemsFee: 0,
1554
+ amountOtherItemsFeeString: '$0.00',
1555
+ amountOtherItemsCharged: 0,
1556
+ amountOtherItemsChargedString: '$0.00',
1557
+ amountOtherItemsDiscount: 0,
1558
+ amountOtherItemsDiscountString: '$0.00',
1559
+ member: {
1560
+ _id: 'memberDefaultId',
1561
+ firstName: 'Peter',
1562
+ lastName: 'Parker',
1563
+ dobString: '1984-02-19'
1564
+ },
1565
+ modality: {
1566
+ _id: 'modalityDefaultId',
1567
+ displayName: 'Default Chiropractic'
1568
+ },
1569
+ service: {
1570
+ _id: 'serviceDefaultId',
1571
+ displayName: 'Specific consultation',
1572
+ fullName: 'General consultation',
1573
+ description: 'An old description'
1574
+ },
1575
+ claimantMember: {
1576
+ _id: 'memberDefault2Id',
1577
+ firstName: 'Peter',
1578
+ lastName: 'Parker',
1579
+ dobString: '1984-02-19'
1580
+ },
1581
+ claimantPatient: {
1582
+ _id: 'patientDefaultId',
1583
+ firstName: 'Peter',
1584
+ lastName: 'Parker',
1585
+ dobString: '1984-02-19'
1586
+ },
1587
+ practice: {
1588
+ _id: 'practiceDefaultId',
1589
+ displayName: 'Practice 1',
1590
+ fullName: 'Practice 1',
1591
+ abn: 'mockAbn',
1592
+ logoUrl: 'http://logopeople.blog.com/files/2012/12/Health-and-Happiness.png',
1593
+ address: '1 Main Street',
1594
+ postcode: '3163',
1595
+ city: 'Carnegie',
1596
+ state: 'Victoria',
1597
+ country: 'Australia',
1598
+ countryCode: 'au',
1599
+ tz: 'Australia/Brisbane',
1600
+ lnglat: [145.057504, -37.888507],
1601
+ refId: 'practice1RefId',
1602
+ refSource: 'groupMockRefSource1'
1603
+ },
1604
+ staff: {
1605
+ _id: 'staffPractitionerDefaultId',
1606
+ title: 'Dr',
1607
+ firstName: 'Bruce',
1608
+ lastName: 'Banner',
1609
+ profilePictureUrl: 'mockUrl',
1610
+ refId: 'practitioner1RefId',
1611
+ refSource: 'groupMockRefSource1'
1612
+ },
1613
+ patient: {
1614
+ _id: 'patientDefaultId',
1615
+ firstName: 'mockFirstName',
1616
+ lastName: 'mockLastName',
1617
+ email: 'mockpatient@localz.co',
1618
+ mobile: '0412345678',
1619
+ mobileE164: '+61412345678',
1620
+ dobString: '1984-02-20',
1621
+ refId: 'mockPatientRefId',
1622
+ refSource: 'mockPatientRefSource',
1623
+ status: 'NEW'
1624
+ },
1625
+ medicare: {
1626
+ isInHospital: false,
1627
+ isBulkBilled: false,
1628
+ locationId: 'mockLocationId'
1629
+ },
1630
+ status: 'pending',
1631
+ claims: [{
1632
+ claimDateString: '2015-01-01',
1633
+ claimId: 'mockClaimId',
1634
+ claimType: 'claim',
1635
+ claimItems: [{
1636
+ itemCode: 'mockItemCode',
1637
+ fullName: 'mockFullName',
1638
+ displayName: 'mockDisplayName',
1639
+ description: 'mockItemDescription',
1640
+ amountFee: 12095,
1641
+ amountFeeString: '$120.95',
1642
+ amountCharged: 11095,
1643
+ amountChargedString: '$110.95',
1644
+ amountBenefit: 5000,
1645
+ amountBenefitString: '$50.00',
1646
+ amountGap: 6095,
1647
+ amountGapString: '$60.95',
1648
+ amountDiscount: 1000,
1649
+ amountDiscountString: '$10.00',
1650
+ status: 'pending'
1651
+ }],
1652
+ providerNumber: 'PROVIDER3',
1653
+ requested: new Date('2015-01-01T00:00:00Z'),
1654
+ responded: new Date('2015-01-01T00:00:03Z'),
1655
+ funder: {
1656
+ _id: 'funderMedicareId',
1657
+ code: 'medicare',
1658
+ displayName: 'Medicare',
1659
+ logoUrl: 'http://s3/medicarelogo'
1660
+ },
1661
+ healthFundAccount: {
1662
+ _id: 'healthFundAccountMedicareId',
1663
+ lastFour: '7890',
1664
+ cardRank: '01',
1665
+ expiryMonth: '10',
1666
+ expiryYear: '2020',
1667
+ healthFund: {
1668
+ _id: 'healthFundMedicareId',
1669
+ fullName: 'Medicare',
1670
+ displayName: 'Medicare',
1671
+ logoSmallUrl: 'http://s3/smallimage',
1672
+ cardImageUrl: 'http://s3/cardimage'
1673
+ }
1674
+ },
1675
+ claimantHealthFundAccount: {
1676
+ _id: 'healthFundAccountMedicare2Id',
1677
+ lastFour: '7899',
1678
+ cardRank: '01',
1679
+ expiryMonth: '10',
1680
+ expiryYear: '2020',
1681
+ healthFund: {
1682
+ _id: 'healthFundMedicareId',
1683
+ fullName: 'Medicare',
1684
+ displayName: 'Medicare',
1685
+ logoSmallUrl: 'http://s3/smallimage',
1686
+ cardImageUrl: 'http://s3/cardimage'
1687
+ }
1688
+ },
1689
+ status: 'pending'
1690
+ }],
1691
+ payments: [],
1692
+ created: new Date('2015-01-01T00:00:00Z'),
1693
+ modified: new Date('2015-01-02T00:00:00Z')
1694
+ };
1695
+ var transactionWithMedicareClaim = {
1696
+ amountClaimsExpectedBenefit: 5000,
1697
+ amountClaimsExpectedBenefitString: '$50.00',
1698
+ amountGap: 11095,
1699
+ amountGapString: '$110.95',
1700
+ amountOutOfPocket: 11095,
1701
+ amountOutOfPocketString: '$110.95',
1702
+ amountDiscount: 0,
1703
+ amountDiscountString: '$0.00',
1704
+ member: {
1705
+ _id: 'memberDefaultId',
1706
+ firstName: 'Peter',
1707
+ lastName: 'Parker',
1708
+ dobString: '1984-02-19'
1709
+ },
1710
+ practice: {
1711
+ _id: 'practiceDefaultId',
1712
+ displayName: 'Practice 1',
1713
+ fullName: 'Practice 1',
1714
+ abn: '33102417032',
1715
+ logoUrl: 'http://logopeople.blog.com/files/2012/12/Health-and-Happiness.png',
1716
+ address: '1 Main Street',
1717
+ postcode: '3163',
1718
+ city: 'Carnegie',
1719
+ state: 'Victoria',
1720
+ country: 'Australia',
1721
+ countryCode: 'au',
1722
+ tz: 'Australia/Brisbane',
1723
+ lnglat: [145.057504, -37.888507],
1724
+ refId: 'practice1RefId',
1725
+ refSource: 'groupMockRefSource1'
1726
+ },
1727
+ staff: {
1728
+ _id: 'staffPractitionerDefaultId',
1729
+ title: 'Dr',
1730
+ firstName: 'Bruce',
1731
+ lastName: 'Banner',
1732
+ profilePictureUrl: 'mockUrl',
1733
+ refId: 'practitioner1RefId',
1734
+ refSource: 'groupMockRefSource1'
1735
+ },
1736
+ patient: {
1737
+ _id: 'patientDefaultId',
1738
+ firstName: 'mockFirstName',
1739
+ lastName: 'mockLastName',
1740
+ email: 'mockpatient@localz.co',
1741
+ mobile: '0412345678',
1742
+ mobileE164: '+61412345678',
1743
+ dobString: '1984-02-20',
1744
+ refId: 'mockPatientRefId',
1745
+ refSource: 'mockPatientRefSource'
1746
+ },
1747
+ status: 'pending',
1748
+ medicare: {
1749
+ isInHospital: false,
1750
+ isBulkBilled: false,
1751
+ locationId: 'mockLocationId'
1752
+ },
1753
+ otherItems: [{
1754
+ itemName: 'mockItemName',
1755
+ itemCode: 'mockItemCode',
1756
+ description: 'mockDescription',
1757
+ amountFee: 500,
1758
+ amountFeeString: '$5.00',
1759
+ amountCharged: 500,
1760
+ amountChargedString: '$5.00',
1761
+ amountDiscount: 0,
1762
+ amountDiscountString: '$0.00'
1763
+ }],
1764
+ shipping: {
1765
+ amountShipping: 500,
1766
+ amountShippingString: '$5.00',
1767
+ amountHandling: 0,
1768
+ amountHandlingString: '$0.00',
1769
+ amountInsurance: 0,
1770
+ amountInsuranceString: '$0.00'
1771
+ },
1772
+ claims: [{
1773
+ claimDateString: '2015-01-01',
1774
+ claimId: 'mockClaimId',
1775
+ claimType: 'claim',
1776
+ claimItems: [{
1777
+ itemCode: 'mockItemCode',
1778
+ fullName: 'mockFullName',
1779
+ displayName: 'mockDisplayName',
1780
+ description: 'mockItemDescription',
1781
+ clinicalCode: '99',
1782
+ amountFee: 12095,
1783
+ amountFeeString: '$120.95',
1784
+ amountCharged: 10095,
1785
+ amountChargedString: '$100.95',
1786
+ amountBenefit: 0,
1787
+ amountBenefitString: '$0.00',
1788
+ amountExpectedBenefit: 5000,
1789
+ amountExpectedBenefitString: '$50.00',
1790
+ amountGap: 10095,
1791
+ amountGapString: '$100.95',
1792
+ amountDiscount: 2000,
1793
+ amountDiscountString: '$20.00',
1794
+ serviceDateString: '2000-01-01',
1795
+ status: 'pending'
1796
+ }],
1797
+ providerNumber: 'PROVIDER1',
1798
+ requested: new Date('2015-01-01T00:00:00Z'),
1799
+ responded: new Date('2015-01-01T00:00:03Z'),
1800
+ funder: {
1801
+ _id: 'funderMedicareId',
1802
+ displayName: 'Medicare',
1803
+ logoUrl: 'http://s3/medicarelogo',
1804
+ code: 'medicare'
1805
+ },
1806
+ healthFundAccount: {
1807
+ membershipNumber: '1234567890',
1808
+ lastFour: '7890',
1809
+ cardRank: '1',
1810
+ expiryMonth: '10',
1811
+ expiryYear: '2020',
1812
+ healthFund: {
1813
+ _id: 'healthFundMedicareId',
1814
+ fullName: 'Medicare',
1815
+ displayName: 'Medicare',
1816
+ logoSmallUrl: 'http://s3/smallimage',
1817
+ cardImageUrl: 'http://s3/cardimage',
1818
+ code: 'MDC'
1819
+ }
1820
+ },
1821
+ status: 'pending',
1822
+ gateway: {
1823
+ refId: 'mockGatewayRefId',
1824
+ refSource: 'mockGatewaySource',
1825
+ data: {
1826
+ data: 'data'
1827
+ },
1828
+ dataVersion: '1.0.0'
1829
+ }
1830
+ }],
1831
+ payments: [],
1832
+ webhooks: [{
1833
+ method: 'PosT',
1834
+ event: 'memberApprovedInvoice',
1835
+ url: 'https://localhost.webhook/blah/{{transactionId}}/{{event}}',
1836
+ headers: {
1837
+ hello: 'world'
1838
+ }
1839
+ }, {
1840
+ method: 'GET',
1841
+ event: 'memberRejectedInvoice',
1842
+ url: 'https://localhost.webhook/blah/{{transactionId}}/{{event}}',
1843
+ headers: {
1844
+ Authorization: 'Bearer XXX'
1845
+ }
1846
+ }],
1847
+ created: new Date('2015-01-01T00:00:00Z'),
1848
+ modified: new Date('2015-01-02T00:00:00Z')
1849
+ };
1850
+
1851
+ var transactions = /*#__PURE__*/Object.freeze({
1852
+ __proto__: null,
1853
+ defaultTransaction: defaultTransaction,
1854
+ transactionWithClaim: transactionWithClaim,
1855
+ transactionWithApprovedPayment: transactionWithApprovedPayment,
1856
+ transactionWithApprovedInPersonPayment: transactionWithApprovedInPersonPayment,
1857
+ transactionWithRefundedPayment: transactionWithRefundedPayment,
1858
+ transactionWithMultipleRefundedPayments: transactionWithMultipleRefundedPayments,
1859
+ transactionWithOtherItems: transactionWithOtherItems,
1860
+ ghsTransactionCompleted: ghsTransactionCompleted,
1861
+ transactionQuoteDefault: transactionQuoteDefault,
1862
+ transactionForMemberRequestQuote: transactionForMemberRequestQuote,
1863
+ transactionForMemberRequestQuoteComplete: transactionForMemberRequestQuoteComplete,
1864
+ transactionWithPendingMedicareClaim: transactionWithPendingMedicareClaim,
1865
+ transactionWithPendingMedicareClaimAndClaimant: transactionWithPendingMedicareClaimAndClaimant,
1866
+ transactionWithMedicareClaim: transactionWithMedicareClaim
1867
+ });
1868
+
1869
+ exports.defaultTransaction = defaultTransaction;
1870
+ exports.ghsTransactionCompleted = ghsTransactionCompleted;
1871
+ exports.transactionForMemberRequestQuote = transactionForMemberRequestQuote;
1872
+ exports.transactionForMemberRequestQuoteComplete = transactionForMemberRequestQuoteComplete;
1873
+ exports.transactionQuoteDefault = transactionQuoteDefault;
1874
+ exports.transactionWithApprovedInPersonPayment = transactionWithApprovedInPersonPayment;
1875
+ exports.transactionWithApprovedPayment = transactionWithApprovedPayment;
1876
+ exports.transactionWithClaim = transactionWithClaim;
1877
+ exports.transactionWithMedicareClaim = transactionWithMedicareClaim;
1878
+ exports.transactionWithMultipleRefundedPayments = transactionWithMultipleRefundedPayments;
1879
+ exports.transactionWithOtherItems = transactionWithOtherItems;
1880
+ exports.transactionWithPendingMedicareClaim = transactionWithPendingMedicareClaim;
1881
+ exports.transactionWithPendingMedicareClaimAndClaimant = transactionWithPendingMedicareClaimAndClaimant;
1882
+ exports.transactionWithRefundedPayment = transactionWithRefundedPayment;
1883
+ exports.transactions = transactions;