@openmrs/esm-billing-app 1.0.2-pre.112 → 1.0.2-pre.1124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +16 -2
- package/README.md +54 -9
- package/__mocks__/bills.mock.ts +12 -0
- package/__mocks__/react-i18next.js +6 -5
- package/dist/1119.js +1 -1
- package/dist/1146.js +1 -2
- package/dist/1146.js.map +1 -1
- package/dist/1197.js +1 -1
- package/dist/1537.js +1 -0
- package/dist/1537.js.map +1 -0
- package/dist/1856.js +1 -0
- package/dist/1856.js.map +1 -0
- package/dist/2146.js +1 -1
- package/dist/2177.js +1 -1
- package/dist/2177.js.map +1 -1
- package/dist/2524.js +1 -0
- package/dist/2524.js.map +1 -0
- package/dist/2690.js +1 -1
- package/dist/3099.js +1 -1
- package/dist/3584.js +1 -1
- package/dist/3717.js +2 -0
- package/dist/3717.js.map +1 -0
- package/dist/4055.js +1 -1
- package/dist/4132.js +1 -1
- package/dist/4300.js +1 -1
- package/dist/4335.js +1 -1
- package/dist/439.js +1 -0
- package/dist/4618.js +1 -1
- package/dist/4652.js +1 -1
- package/dist/4724.js +1 -0
- package/dist/4724.js.map +1 -0
- package/dist/4739.js +1 -1
- package/dist/4739.js.map +1 -1
- package/dist/4944.js +1 -1
- package/dist/5173.js +1 -1
- package/dist/5241.js +1 -1
- package/dist/5442.js +1 -1
- package/dist/5661.js +1 -1
- package/dist/6022.js +1 -1
- package/dist/6468.js +1 -1
- package/dist/6540.js +1 -1
- package/dist/6540.js.map +1 -1
- package/dist/6589.js +1 -0
- package/dist/6679.js +1 -1
- package/dist/6840.js +1 -1
- package/dist/6859.js +1 -1
- package/dist/7097.js +1 -1
- package/dist/7159.js +1 -1
- package/dist/723.js +1 -1
- package/dist/7255.js +1 -1
- package/dist/7255.js.map +1 -1
- package/dist/7617.js +1 -1
- package/dist/795.js +1 -1
- package/dist/8163.js +1 -1
- package/dist/8349.js +1 -1
- package/dist/8371.js +1 -0
- package/dist/8572.js +1 -0
- package/dist/8572.js.map +1 -0
- package/dist/8618.js +1 -1
- package/dist/8708.js +2 -0
- package/dist/{6557.js.LICENSE.txt → 8708.js.LICENSE.txt} +22 -0
- package/dist/8708.js.map +1 -0
- package/dist/890.js +1 -1
- package/dist/9214.js +1 -1
- package/dist/9538.js +1 -1
- package/dist/9569.js +1 -1
- package/dist/961.js +1 -1
- package/dist/961.js.map +1 -1
- package/dist/986.js +1 -1
- package/dist/9879.js +1 -1
- package/dist/9895.js +1 -1
- package/dist/9900.js +1 -1
- package/dist/9913.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-billing-app.js +1 -1
- package/dist/openmrs-esm-billing-app.js.buildmanifest.json +321 -249
- package/dist/openmrs-esm-billing-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/e2e/README.md +19 -18
- package/e2e/commands/billing-operations.ts +96 -0
- package/e2e/commands/index.ts +3 -0
- package/e2e/commands/patient-operations.ts +82 -0
- package/e2e/commands/types.ts +73 -0
- package/e2e/core/test.ts +12 -1
- package/e2e/fixtures/api.ts +2 -3
- package/e2e/pages/billing-dashboard-page.ts +84 -0
- package/e2e/pages/billing-form-page.ts +114 -0
- package/e2e/pages/index.ts +4 -1
- package/e2e/pages/invoice-page.ts +113 -0
- package/e2e/pages/payment-page.ts +104 -0
- package/e2e/specs/billing-dashboard.spec.ts +203 -0
- package/e2e/specs/billing-patient-chart.spec.ts +738 -0
- package/e2e/support/github/Dockerfile +1 -1
- package/e2e/support/github/run-e2e-docker-env.sh +29 -32
- package/example.env +15 -1
- package/package.json +19 -16
- package/playwright.config.ts +4 -2
- package/src/bill-history/bill-history.component.tsx +15 -17
- package/src/bill-history/bill-history.scss +4 -94
- package/src/bill-history/bill-history.test.tsx +37 -77
- package/src/bill-item-actions/bill-item-actions.scss +21 -5
- package/src/bill-item-actions/edit-bill-item.modal.tsx +227 -0
- package/src/bill-item-actions/edit-bill-item.test.tsx +233 -40
- package/src/billable-services/bill-waiver/bill-selection.component.tsx +5 -5
- package/src/billable-services/bill-waiver/bill-waiver-form.component.tsx +37 -39
- package/src/billable-services/bill-waiver/patient-bills.component.tsx +7 -7
- package/src/billable-services/bill-waiver/utils.ts +13 -3
- package/src/billable-services/{create-edit/add-billable-service.scss → billable-service-form/billable-service-form.scss} +32 -64
- package/src/billable-services/billable-service-form/billable-service-form.test.tsx +1099 -0
- package/src/billable-services/billable-service-form/billable-service-form.workspace.tsx +516 -0
- package/src/billable-services/billable-service.resource.ts +71 -27
- package/src/billable-services/billable-services-home.component.tsx +13 -42
- package/src/billable-services/billable-services-left-panel-link.component.tsx +50 -0
- package/src/billable-services/billable-services-left-panel-menu.component.tsx +48 -0
- package/src/billable-services/billable-services-menu-item/item.component.tsx +5 -4
- package/src/billable-services/billable-services.component.tsx +156 -152
- package/src/billable-services/billable-services.scss +29 -0
- package/src/billable-services/billable-services.test.tsx +6 -49
- package/src/billable-services/cash-point/add-cash-point.modal.tsx +170 -0
- package/src/billable-services/cash-point/cash-point-configuration.component.tsx +19 -193
- package/src/billable-services/cash-point/cash-point-configuration.scss +1 -5
- package/src/billable-services/dashboard/dashboard.component.tsx +0 -2
- package/src/billable-services/payment-modes/delete-payment-mode.modal.tsx +77 -0
- package/src/billable-services/payment-modes/payment-mode-form.modal.tsx +131 -0
- package/src/billable-services/payment-modes/payment-modes-config.component.tsx +139 -0
- package/src/billable-services/{payyment-modes → payment-modes}/payment-modes-config.scss +5 -4
- package/src/billable-services-admin-card-link.component.test.tsx +2 -2
- package/src/billable-services-admin-card-link.component.tsx +1 -1
- package/src/billing-dashboard/billing-dashboard.scss +1 -1
- package/src/billing-form/billing-checkin-form.component.tsx +29 -29
- package/src/billing-form/billing-checkin-form.scss +0 -7
- package/src/billing-form/billing-checkin-form.test.tsx +100 -27
- package/src/billing-form/billing-form.component.tsx +226 -284
- package/src/billing-form/billing-form.scss +143 -0
- package/src/billing-form/visit-attributes/visit-attributes-form.component.tsx +47 -41
- package/src/billing-form/visit-attributes/visit-attributes-form.scss +16 -3
- package/src/billing.resource.test.ts +503 -0
- package/src/billing.resource.ts +68 -76
- package/src/bills-table/bills-table.component.tsx +17 -24
- package/src/bills-table/bills-table.test.tsx +98 -54
- package/src/config-schema.ts +84 -31
- package/src/dashboard.meta.ts +5 -3
- package/src/helpers/functions.ts +5 -4
- package/src/index.ts +75 -13
- package/src/invoice/invoice-table.component.tsx +36 -70
- package/src/invoice/invoice-table.scss +8 -5
- package/src/invoice/invoice-table.test.tsx +273 -62
- package/src/invoice/invoice.component.tsx +44 -38
- package/src/invoice/invoice.scss +11 -4
- package/src/invoice/invoice.test.tsx +324 -120
- package/src/invoice/payments/invoice-breakdown/invoice-breakdown.scss +9 -9
- package/src/invoice/payments/payment-form/payment-form.component.tsx +45 -36
- package/src/invoice/payments/payment-form/payment-form.scss +5 -6
- package/src/invoice/payments/payment-form/payment-form.test.tsx +217 -67
- package/src/invoice/payments/payment-history/payment-history.component.tsx +6 -4
- package/src/invoice/payments/payment-history/payment-history.test.tsx +9 -14
- package/src/invoice/payments/payments.component.tsx +56 -68
- package/src/invoice/payments/payments.scss +4 -3
- package/src/invoice/payments/payments.test.tsx +282 -0
- package/src/invoice/payments/utils.ts +15 -27
- package/src/invoice/printable-invoice/print-receipt.component.tsx +3 -3
- package/src/invoice/printable-invoice/print-receipt.test.tsx +14 -25
- package/src/invoice/printable-invoice/printable-footer.component.tsx +2 -2
- package/src/invoice/printable-invoice/printable-footer.test.tsx +4 -13
- package/src/invoice/printable-invoice/printable-invoice-header.component.tsx +20 -11
- package/src/invoice/printable-invoice/printable-invoice-header.test.tsx +95 -16
- package/src/invoice/printable-invoice/printable-invoice.component.tsx +21 -35
- package/src/left-panel-link.component.tsx +9 -8
- package/src/left-panel-link.test.tsx +1 -4
- package/src/metrics-cards/metrics-cards.component.tsx +16 -6
- package/src/metrics-cards/metrics-cards.scss +4 -0
- package/src/metrics-cards/metrics-cards.test.tsx +18 -5
- package/src/modal/require-payment-modal.test.tsx +27 -22
- package/src/modal/{require-payment-modal.component.tsx → require-payment.modal.tsx} +18 -19
- package/src/routes.json +44 -20
- package/src/types/index.ts +87 -24
- package/translations/am.json +140 -80
- package/translations/ar.json +141 -81
- package/translations/ar_SY.json +141 -81
- package/translations/bn.json +143 -83
- package/translations/cs.json +230 -0
- package/translations/de.json +141 -81
- package/translations/en.json +142 -81
- package/translations/en_US.json +141 -81
- package/translations/es.json +140 -80
- package/translations/es_MX.json +141 -81
- package/translations/fr.json +224 -164
- package/translations/he.json +140 -80
- package/translations/hi.json +141 -81
- package/translations/hi_IN.json +141 -81
- package/translations/id.json +141 -81
- package/translations/it.json +166 -106
- package/translations/ka.json +141 -81
- package/translations/km.json +140 -80
- package/translations/ku.json +141 -81
- package/translations/ky.json +141 -81
- package/translations/lg.json +141 -81
- package/translations/ne.json +141 -81
- package/translations/pl.json +141 -81
- package/translations/pt.json +141 -81
- package/translations/pt_BR.json +141 -81
- package/translations/qu.json +141 -81
- package/translations/ro_RO.json +225 -165
- package/translations/ru_RU.json +141 -81
- package/translations/si.json +141 -81
- package/translations/sq.json +230 -0
- package/translations/sw.json +141 -81
- package/translations/sw_KE.json +141 -81
- package/translations/tr.json +141 -81
- package/translations/tr_TR.json +141 -81
- package/translations/uk.json +141 -81
- package/translations/uz.json +141 -81
- package/translations/uz@Latn.json +141 -81
- package/translations/uz_UZ.json +141 -81
- package/translations/vi.json +141 -81
- package/translations/zh.json +141 -81
- package/translations/zh_CN.json +171 -111
- package/translations/zh_TW.json +230 -0
- package/dist/1146.js.LICENSE.txt +0 -21
- package/dist/2352.js +0 -1
- package/dist/2352.js.map +0 -1
- package/dist/246.js +0 -1
- package/dist/246.js.map +0 -1
- package/dist/4689.js +0 -2
- package/dist/4689.js.map +0 -1
- package/dist/6557.js +0 -2
- package/dist/6557.js.map +0 -1
- package/dist/8638.js +0 -1
- package/dist/8638.js.map +0 -1
- package/dist/9968.js +0 -1
- package/dist/9968.js.map +0 -1
- package/e2e/pages/home-page.ts +0 -9
- package/e2e/specs/sample-test.spec.ts +0 -11
- package/src/bill-item-actions/edit-bill-item.component.tsx +0 -221
- package/src/billable-services/create-edit/add-billable-service.component.tsx +0 -401
- package/src/billable-services/create-edit/add-billable-service.test.tsx +0 -154
- package/src/billable-services/dashboard/service-metrics.component.tsx +0 -41
- package/src/billable-services/payyment-modes/payment-modes-config.component.tsx +0 -280
- package/src/invoice/payments/payments.component.test.tsx +0 -121
- /package/dist/{4689.js.LICENSE.txt → 3717.js.LICENSE.txt} +0 -0
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
StructuredListRow,
|
|
13
13
|
StructuredListWrapper,
|
|
14
14
|
} from '@carbon/react';
|
|
15
|
-
import { useConfig } from '@openmrs/esm-framework';
|
|
15
|
+
import { getCoreTranslation, useConfig } from '@openmrs/esm-framework';
|
|
16
16
|
import { useBills } from '../billing.resource';
|
|
17
17
|
import { convertToCurrency } from '../helpers';
|
|
18
18
|
import styles from './require-payment.scss';
|
|
@@ -29,22 +29,23 @@ const RequirePaymentModal: React.FC<RequirePaymentModalProps> = ({ closeModal, p
|
|
|
29
29
|
const lineItems = bills.filter((bill) => bill?.status !== 'PAID').flatMap((bill) => bill?.lineItems);
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
|
-
|
|
32
|
+
<>
|
|
33
33
|
<ModalHeader closeModal={closeModal} title={t('patientBillingAlert', 'Patient Billing Alert')} />
|
|
34
34
|
<ModalBody>
|
|
35
35
|
<p className={styles.bodyShort02}>
|
|
36
36
|
{t(
|
|
37
37
|
'billPaymentRequiredMessage',
|
|
38
|
-
'The current patient has pending bill.
|
|
38
|
+
'The current patient has a pending bill. Advise the patient to settle the bill before receiving services',
|
|
39
39
|
)}
|
|
40
40
|
</p>
|
|
41
41
|
{isLoading && (
|
|
42
42
|
<InlineLoading
|
|
43
43
|
status="active"
|
|
44
|
-
iconDescription=
|
|
45
|
-
description={t('
|
|
44
|
+
iconDescription={getCoreTranslation('loading')}
|
|
45
|
+
description={t('loadingBillItems', 'Loading bill items') + '...'}
|
|
46
46
|
/>
|
|
47
47
|
)}
|
|
48
|
+
|
|
48
49
|
<StructuredListWrapper isCondensed>
|
|
49
50
|
<StructuredListHead>
|
|
50
51
|
<StructuredListRow head>
|
|
@@ -55,30 +56,28 @@ const RequirePaymentModal: React.FC<RequirePaymentModalProps> = ({ closeModal, p
|
|
|
55
56
|
</StructuredListRow>
|
|
56
57
|
</StructuredListHead>
|
|
57
58
|
<StructuredListBody>
|
|
58
|
-
{lineItems.map((lineItem) =>
|
|
59
|
-
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
);
|
|
69
|
-
})}
|
|
59
|
+
{lineItems.map((lineItem) => (
|
|
60
|
+
<StructuredListRow key={lineItem.uuid}>
|
|
61
|
+
<StructuredListCell>{lineItem.billableService || lineItem.item}</StructuredListCell>
|
|
62
|
+
<StructuredListCell>{lineItem.quantity}</StructuredListCell>
|
|
63
|
+
<StructuredListCell>{convertToCurrency(lineItem.price, defaultCurrency)}</StructuredListCell>
|
|
64
|
+
<StructuredListCell>
|
|
65
|
+
{convertToCurrency(lineItem.quantity * lineItem.price, defaultCurrency)}
|
|
66
|
+
</StructuredListCell>
|
|
67
|
+
</StructuredListRow>
|
|
68
|
+
))}
|
|
70
69
|
</StructuredListBody>
|
|
71
70
|
</StructuredListWrapper>
|
|
72
71
|
</ModalBody>
|
|
73
72
|
<ModalFooter>
|
|
74
73
|
<Button kind="secondary" onClick={closeModal}>
|
|
75
|
-
{
|
|
74
|
+
{getCoreTranslation('cancel')}
|
|
76
75
|
</Button>
|
|
77
76
|
<Button kind="primary" onClick={closeModal}>
|
|
78
77
|
{t('ok', 'OK')}
|
|
79
78
|
</Button>
|
|
80
79
|
</ModalFooter>
|
|
81
|
-
|
|
80
|
+
</>
|
|
82
81
|
);
|
|
83
82
|
};
|
|
84
83
|
|
package/src/routes.json
CHANGED
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
"name": "billing",
|
|
20
20
|
"title": "billing",
|
|
21
21
|
"slot": "billing-dashboard-slot"
|
|
22
|
-
}
|
|
23
|
-
"featureFlag": "billing"
|
|
22
|
+
}
|
|
24
23
|
},
|
|
25
24
|
{
|
|
26
25
|
"component": "root",
|
|
@@ -46,8 +45,7 @@
|
|
|
46
45
|
"columnSpan": 1,
|
|
47
46
|
"slot": "patient-chart-billing-dashboard-slot",
|
|
48
47
|
"path": "Billing history"
|
|
49
|
-
}
|
|
50
|
-
"featureFlag": "billing"
|
|
48
|
+
}
|
|
51
49
|
},
|
|
52
50
|
{
|
|
53
51
|
"name": "billable-services-app-menu-item",
|
|
@@ -60,8 +58,7 @@
|
|
|
60
58
|
{
|
|
61
59
|
"name": "billing-checkin-form",
|
|
62
60
|
"slot": "extra-visit-attribute-slot",
|
|
63
|
-
"component": "billingCheckInForm"
|
|
64
|
-
"featureFlag": "billing"
|
|
61
|
+
"component": "billingCheckInForm"
|
|
65
62
|
},
|
|
66
63
|
{
|
|
67
64
|
"slot": "system-admin-page-card-link-slot",
|
|
@@ -75,18 +72,45 @@
|
|
|
75
72
|
"order": 2
|
|
76
73
|
},
|
|
77
74
|
{
|
|
78
|
-
"name": "
|
|
79
|
-
"
|
|
80
|
-
"
|
|
75
|
+
"name": "billable-services-left-panel-link",
|
|
76
|
+
"component": "billableServicesLeftPanelLink",
|
|
77
|
+
"slot": "billable-services-left-panel-slot",
|
|
78
|
+
"order": 0
|
|
81
79
|
},
|
|
82
80
|
{
|
|
83
|
-
"name": "
|
|
84
|
-
"component": "
|
|
85
|
-
"
|
|
86
|
-
"
|
|
81
|
+
"name": "bill-waiver-left-panel-link",
|
|
82
|
+
"component": "billWaiverLeftPanelLink",
|
|
83
|
+
"slot": "billable-services-left-panel-slot",
|
|
84
|
+
"order": 1
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "billing-settings-left-panel-menu",
|
|
88
|
+
"component": "billingSettingsLeftPanelMenu",
|
|
89
|
+
"slot": "billable-services-left-panel-slot",
|
|
90
|
+
"order": 2
|
|
87
91
|
}
|
|
88
92
|
],
|
|
89
93
|
"modals": [
|
|
94
|
+
{
|
|
95
|
+
"name": "add-cash-point-modal",
|
|
96
|
+
"component": "addCashPointModal"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "payment-mode-form-modal",
|
|
100
|
+
"component": "paymentModeFormModal"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "delete-payment-mode-modal",
|
|
104
|
+
"component": "deletePaymentModeModal"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "edit-bill-item-modal",
|
|
108
|
+
"component": "editBillLineItemModal"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "edit-bill-line-item-modal",
|
|
112
|
+
"component": "editBillLineItemModal"
|
|
113
|
+
},
|
|
90
114
|
{
|
|
91
115
|
"name": "require-billing-modal",
|
|
92
116
|
"component": "requirePaymentModal"
|
|
@@ -98,13 +122,13 @@
|
|
|
98
122
|
"title": "billingForm",
|
|
99
123
|
"component": "billingFormWorkspace",
|
|
100
124
|
"type": "form"
|
|
101
|
-
}
|
|
102
|
-
],
|
|
103
|
-
"featureFlags": [
|
|
125
|
+
},
|
|
104
126
|
{
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
127
|
+
"name": "billable-service-form",
|
|
128
|
+
"title": "billableServiceForm",
|
|
129
|
+
"component": "billableServiceFormWorkspace",
|
|
130
|
+
"type": "form",
|
|
131
|
+
"width": "wider"
|
|
108
132
|
}
|
|
109
133
|
]
|
|
110
|
-
}
|
|
134
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type OpenmrsResource } from '@openmrs/esm-framework';
|
|
2
|
+
|
|
1
3
|
export interface MappedBill {
|
|
2
4
|
uuid: string;
|
|
3
5
|
id: number;
|
|
@@ -52,19 +54,19 @@ interface Provider {
|
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
export interface LineItem {
|
|
55
|
-
uuid
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
item: string;
|
|
60
|
-
billableService: string;
|
|
57
|
+
uuid?: string;
|
|
58
|
+
item?: string;
|
|
59
|
+
paymentStatus: string;
|
|
60
|
+
billableService?: string;
|
|
61
61
|
quantity: number;
|
|
62
62
|
price: number;
|
|
63
|
-
priceName
|
|
64
|
-
priceUuid
|
|
65
|
-
lineItemOrder
|
|
66
|
-
resourceVersion
|
|
67
|
-
|
|
63
|
+
priceName?: string;
|
|
64
|
+
priceUuid?: string;
|
|
65
|
+
lineItemOrder?: number;
|
|
66
|
+
resourceVersion?: string;
|
|
67
|
+
display?: string;
|
|
68
|
+
voided?: boolean;
|
|
69
|
+
voidReason?: string | null;
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
interface PatientLink {
|
|
@@ -121,13 +123,21 @@ export interface Payment {
|
|
|
121
123
|
resourceVersion: string;
|
|
122
124
|
}
|
|
123
125
|
|
|
126
|
+
export type PaymentPayload = {
|
|
127
|
+
amount: number;
|
|
128
|
+
amountTendered: number;
|
|
129
|
+
attributes: Array<Attribute>;
|
|
130
|
+
instanceType: string;
|
|
131
|
+
dateCreated?: Date | number;
|
|
132
|
+
};
|
|
133
|
+
|
|
124
134
|
export interface PatientInvoice {
|
|
125
135
|
uuid: string;
|
|
126
136
|
display: string;
|
|
127
137
|
voided: boolean;
|
|
128
138
|
voidReason: string | null;
|
|
129
|
-
adjustedBy:
|
|
130
|
-
billAdjusted:
|
|
139
|
+
adjustedBy: Array<OpenmrsResource>;
|
|
140
|
+
billAdjusted: OpenmrsResource | null;
|
|
131
141
|
cashPoint: CashPoint;
|
|
132
142
|
cashier: Provider;
|
|
133
143
|
dateCreated: string;
|
|
@@ -136,14 +146,14 @@ export interface PatientInvoice {
|
|
|
136
146
|
payments: Payment[];
|
|
137
147
|
receiptNumber: string;
|
|
138
148
|
status: string;
|
|
139
|
-
adjustmentReason:
|
|
149
|
+
adjustmentReason: string | null;
|
|
140
150
|
id: number;
|
|
141
151
|
resourceVersion: string;
|
|
142
152
|
}
|
|
143
153
|
|
|
144
154
|
export interface PatientDetails {
|
|
145
155
|
name: string;
|
|
146
|
-
|
|
156
|
+
birthDate: string;
|
|
147
157
|
gender: string;
|
|
148
158
|
city: string;
|
|
149
159
|
county: string;
|
|
@@ -155,20 +165,16 @@ export interface FacilityDetail {
|
|
|
155
165
|
display: string;
|
|
156
166
|
}
|
|
157
167
|
|
|
158
|
-
export type
|
|
159
|
-
uuid:
|
|
168
|
+
export type ConceptSearchResult = {
|
|
169
|
+
uuid: string;
|
|
160
170
|
concept: {
|
|
161
171
|
uuid: string;
|
|
162
172
|
display: string;
|
|
163
173
|
};
|
|
164
|
-
conceptName: {
|
|
165
|
-
uuid: string;
|
|
166
|
-
display: string;
|
|
167
|
-
};
|
|
168
174
|
display: string;
|
|
169
175
|
};
|
|
170
176
|
|
|
171
|
-
export type
|
|
177
|
+
export type BillableItem = {
|
|
172
178
|
uuid: string;
|
|
173
179
|
id?: number;
|
|
174
180
|
name?: string;
|
|
@@ -177,7 +183,17 @@ export type BillabeItem = {
|
|
|
177
183
|
};
|
|
178
184
|
|
|
179
185
|
export type ServicePrice = {
|
|
180
|
-
|
|
186
|
+
itemPriceId?: number;
|
|
187
|
+
name?: string;
|
|
188
|
+
price: string | number;
|
|
189
|
+
paymentMode?: {
|
|
190
|
+
paymentModeId?: number;
|
|
191
|
+
uuid: string;
|
|
192
|
+
name: string;
|
|
193
|
+
description?: string;
|
|
194
|
+
sortOrder?: number;
|
|
195
|
+
};
|
|
196
|
+
billableService?: BillableService;
|
|
181
197
|
uuid: string;
|
|
182
198
|
};
|
|
183
199
|
|
|
@@ -187,10 +203,57 @@ export interface BillableService {
|
|
|
187
203
|
shortName: string;
|
|
188
204
|
serviceStatus: string;
|
|
189
205
|
serviceType?: {
|
|
206
|
+
uuid: string;
|
|
190
207
|
display: string;
|
|
191
208
|
};
|
|
209
|
+
concept?: ConceptSearchResult;
|
|
210
|
+
servicePrices: Array<ServicePrice>;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export type BillPaymentPayload = {
|
|
214
|
+
cashPoint: string;
|
|
215
|
+
cashier: string;
|
|
216
|
+
lineItems: Array<LineItem>;
|
|
217
|
+
payments: Array<PaymentPayload>;
|
|
218
|
+
patient: string;
|
|
219
|
+
status?: string;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
export type CreateBillPayload = {
|
|
223
|
+
cashPoint: string;
|
|
224
|
+
cashier: string;
|
|
225
|
+
lineItems: Array<LineItem>;
|
|
226
|
+
payments: Array<PaymentPayload>;
|
|
227
|
+
patient: string;
|
|
228
|
+
status: string;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
export type UpdateBillPayload = {
|
|
232
|
+
cashPoint: string;
|
|
233
|
+
cashier: string;
|
|
234
|
+
lineItems: Array<LineItem>;
|
|
235
|
+
patient: string;
|
|
236
|
+
status: string;
|
|
237
|
+
uuid: string;
|
|
238
|
+
payments?: Array<PaymentPayload>;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
export type CreateBillableServicePayload = {
|
|
242
|
+
name: string;
|
|
243
|
+
shortName: string;
|
|
244
|
+
serviceStatus: string;
|
|
245
|
+
serviceType?: string;
|
|
246
|
+
concept?: string;
|
|
192
247
|
servicePrices: Array<{
|
|
193
248
|
name: string;
|
|
194
249
|
price: number;
|
|
250
|
+
paymentMode: string;
|
|
195
251
|
}>;
|
|
196
|
-
}
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
export type UpdateBillableServicePayload = Partial<CreateBillableServicePayload>;
|
|
255
|
+
|
|
256
|
+
export type PaymentModePayload = {
|
|
257
|
+
name: string;
|
|
258
|
+
description: string;
|
|
259
|
+
};
|