@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.
Files changed (241) hide show
  1. package/.eslintrc +16 -2
  2. package/README.md +54 -9
  3. package/__mocks__/bills.mock.ts +12 -0
  4. package/__mocks__/react-i18next.js +6 -5
  5. package/dist/1119.js +1 -1
  6. package/dist/1146.js +1 -2
  7. package/dist/1146.js.map +1 -1
  8. package/dist/1197.js +1 -1
  9. package/dist/1537.js +1 -0
  10. package/dist/1537.js.map +1 -0
  11. package/dist/1856.js +1 -0
  12. package/dist/1856.js.map +1 -0
  13. package/dist/2146.js +1 -1
  14. package/dist/2177.js +1 -1
  15. package/dist/2177.js.map +1 -1
  16. package/dist/2524.js +1 -0
  17. package/dist/2524.js.map +1 -0
  18. package/dist/2690.js +1 -1
  19. package/dist/3099.js +1 -1
  20. package/dist/3584.js +1 -1
  21. package/dist/3717.js +2 -0
  22. package/dist/3717.js.map +1 -0
  23. package/dist/4055.js +1 -1
  24. package/dist/4132.js +1 -1
  25. package/dist/4300.js +1 -1
  26. package/dist/4335.js +1 -1
  27. package/dist/439.js +1 -0
  28. package/dist/4618.js +1 -1
  29. package/dist/4652.js +1 -1
  30. package/dist/4724.js +1 -0
  31. package/dist/4724.js.map +1 -0
  32. package/dist/4739.js +1 -1
  33. package/dist/4739.js.map +1 -1
  34. package/dist/4944.js +1 -1
  35. package/dist/5173.js +1 -1
  36. package/dist/5241.js +1 -1
  37. package/dist/5442.js +1 -1
  38. package/dist/5661.js +1 -1
  39. package/dist/6022.js +1 -1
  40. package/dist/6468.js +1 -1
  41. package/dist/6540.js +1 -1
  42. package/dist/6540.js.map +1 -1
  43. package/dist/6589.js +1 -0
  44. package/dist/6679.js +1 -1
  45. package/dist/6840.js +1 -1
  46. package/dist/6859.js +1 -1
  47. package/dist/7097.js +1 -1
  48. package/dist/7159.js +1 -1
  49. package/dist/723.js +1 -1
  50. package/dist/7255.js +1 -1
  51. package/dist/7255.js.map +1 -1
  52. package/dist/7617.js +1 -1
  53. package/dist/795.js +1 -1
  54. package/dist/8163.js +1 -1
  55. package/dist/8349.js +1 -1
  56. package/dist/8371.js +1 -0
  57. package/dist/8572.js +1 -0
  58. package/dist/8572.js.map +1 -0
  59. package/dist/8618.js +1 -1
  60. package/dist/8708.js +2 -0
  61. package/dist/{6557.js.LICENSE.txt → 8708.js.LICENSE.txt} +22 -0
  62. package/dist/8708.js.map +1 -0
  63. package/dist/890.js +1 -1
  64. package/dist/9214.js +1 -1
  65. package/dist/9538.js +1 -1
  66. package/dist/9569.js +1 -1
  67. package/dist/961.js +1 -1
  68. package/dist/961.js.map +1 -1
  69. package/dist/986.js +1 -1
  70. package/dist/9879.js +1 -1
  71. package/dist/9895.js +1 -1
  72. package/dist/9900.js +1 -1
  73. package/dist/9913.js +1 -1
  74. package/dist/main.js +1 -1
  75. package/dist/main.js.map +1 -1
  76. package/dist/openmrs-esm-billing-app.js +1 -1
  77. package/dist/openmrs-esm-billing-app.js.buildmanifest.json +321 -249
  78. package/dist/openmrs-esm-billing-app.js.map +1 -1
  79. package/dist/routes.json +1 -1
  80. package/e2e/README.md +19 -18
  81. package/e2e/commands/billing-operations.ts +96 -0
  82. package/e2e/commands/index.ts +3 -0
  83. package/e2e/commands/patient-operations.ts +82 -0
  84. package/e2e/commands/types.ts +73 -0
  85. package/e2e/core/test.ts +12 -1
  86. package/e2e/fixtures/api.ts +2 -3
  87. package/e2e/pages/billing-dashboard-page.ts +84 -0
  88. package/e2e/pages/billing-form-page.ts +114 -0
  89. package/e2e/pages/index.ts +4 -1
  90. package/e2e/pages/invoice-page.ts +113 -0
  91. package/e2e/pages/payment-page.ts +104 -0
  92. package/e2e/specs/billing-dashboard.spec.ts +203 -0
  93. package/e2e/specs/billing-patient-chart.spec.ts +738 -0
  94. package/e2e/support/github/Dockerfile +1 -1
  95. package/e2e/support/github/run-e2e-docker-env.sh +29 -32
  96. package/example.env +15 -1
  97. package/package.json +19 -16
  98. package/playwright.config.ts +4 -2
  99. package/src/bill-history/bill-history.component.tsx +15 -17
  100. package/src/bill-history/bill-history.scss +4 -94
  101. package/src/bill-history/bill-history.test.tsx +37 -77
  102. package/src/bill-item-actions/bill-item-actions.scss +21 -5
  103. package/src/bill-item-actions/edit-bill-item.modal.tsx +227 -0
  104. package/src/bill-item-actions/edit-bill-item.test.tsx +233 -40
  105. package/src/billable-services/bill-waiver/bill-selection.component.tsx +5 -5
  106. package/src/billable-services/bill-waiver/bill-waiver-form.component.tsx +37 -39
  107. package/src/billable-services/bill-waiver/patient-bills.component.tsx +7 -7
  108. package/src/billable-services/bill-waiver/utils.ts +13 -3
  109. package/src/billable-services/{create-edit/add-billable-service.scss → billable-service-form/billable-service-form.scss} +32 -64
  110. package/src/billable-services/billable-service-form/billable-service-form.test.tsx +1099 -0
  111. package/src/billable-services/billable-service-form/billable-service-form.workspace.tsx +516 -0
  112. package/src/billable-services/billable-service.resource.ts +71 -27
  113. package/src/billable-services/billable-services-home.component.tsx +13 -42
  114. package/src/billable-services/billable-services-left-panel-link.component.tsx +50 -0
  115. package/src/billable-services/billable-services-left-panel-menu.component.tsx +48 -0
  116. package/src/billable-services/billable-services-menu-item/item.component.tsx +5 -4
  117. package/src/billable-services/billable-services.component.tsx +156 -152
  118. package/src/billable-services/billable-services.scss +29 -0
  119. package/src/billable-services/billable-services.test.tsx +6 -49
  120. package/src/billable-services/cash-point/add-cash-point.modal.tsx +170 -0
  121. package/src/billable-services/cash-point/cash-point-configuration.component.tsx +19 -193
  122. package/src/billable-services/cash-point/cash-point-configuration.scss +1 -5
  123. package/src/billable-services/dashboard/dashboard.component.tsx +0 -2
  124. package/src/billable-services/payment-modes/delete-payment-mode.modal.tsx +77 -0
  125. package/src/billable-services/payment-modes/payment-mode-form.modal.tsx +131 -0
  126. package/src/billable-services/payment-modes/payment-modes-config.component.tsx +139 -0
  127. package/src/billable-services/{payyment-modes → payment-modes}/payment-modes-config.scss +5 -4
  128. package/src/billable-services-admin-card-link.component.test.tsx +2 -2
  129. package/src/billable-services-admin-card-link.component.tsx +1 -1
  130. package/src/billing-dashboard/billing-dashboard.scss +1 -1
  131. package/src/billing-form/billing-checkin-form.component.tsx +29 -29
  132. package/src/billing-form/billing-checkin-form.scss +0 -7
  133. package/src/billing-form/billing-checkin-form.test.tsx +100 -27
  134. package/src/billing-form/billing-form.component.tsx +226 -284
  135. package/src/billing-form/billing-form.scss +143 -0
  136. package/src/billing-form/visit-attributes/visit-attributes-form.component.tsx +47 -41
  137. package/src/billing-form/visit-attributes/visit-attributes-form.scss +16 -3
  138. package/src/billing.resource.test.ts +503 -0
  139. package/src/billing.resource.ts +68 -76
  140. package/src/bills-table/bills-table.component.tsx +17 -24
  141. package/src/bills-table/bills-table.test.tsx +98 -54
  142. package/src/config-schema.ts +84 -31
  143. package/src/dashboard.meta.ts +5 -3
  144. package/src/helpers/functions.ts +5 -4
  145. package/src/index.ts +75 -13
  146. package/src/invoice/invoice-table.component.tsx +36 -70
  147. package/src/invoice/invoice-table.scss +8 -5
  148. package/src/invoice/invoice-table.test.tsx +273 -62
  149. package/src/invoice/invoice.component.tsx +44 -38
  150. package/src/invoice/invoice.scss +11 -4
  151. package/src/invoice/invoice.test.tsx +324 -120
  152. package/src/invoice/payments/invoice-breakdown/invoice-breakdown.scss +9 -9
  153. package/src/invoice/payments/payment-form/payment-form.component.tsx +45 -36
  154. package/src/invoice/payments/payment-form/payment-form.scss +5 -6
  155. package/src/invoice/payments/payment-form/payment-form.test.tsx +217 -67
  156. package/src/invoice/payments/payment-history/payment-history.component.tsx +6 -4
  157. package/src/invoice/payments/payment-history/payment-history.test.tsx +9 -14
  158. package/src/invoice/payments/payments.component.tsx +56 -68
  159. package/src/invoice/payments/payments.scss +4 -3
  160. package/src/invoice/payments/payments.test.tsx +282 -0
  161. package/src/invoice/payments/utils.ts +15 -27
  162. package/src/invoice/printable-invoice/print-receipt.component.tsx +3 -3
  163. package/src/invoice/printable-invoice/print-receipt.test.tsx +14 -25
  164. package/src/invoice/printable-invoice/printable-footer.component.tsx +2 -2
  165. package/src/invoice/printable-invoice/printable-footer.test.tsx +4 -13
  166. package/src/invoice/printable-invoice/printable-invoice-header.component.tsx +20 -11
  167. package/src/invoice/printable-invoice/printable-invoice-header.test.tsx +95 -16
  168. package/src/invoice/printable-invoice/printable-invoice.component.tsx +21 -35
  169. package/src/left-panel-link.component.tsx +9 -8
  170. package/src/left-panel-link.test.tsx +1 -4
  171. package/src/metrics-cards/metrics-cards.component.tsx +16 -6
  172. package/src/metrics-cards/metrics-cards.scss +4 -0
  173. package/src/metrics-cards/metrics-cards.test.tsx +18 -5
  174. package/src/modal/require-payment-modal.test.tsx +27 -22
  175. package/src/modal/{require-payment-modal.component.tsx → require-payment.modal.tsx} +18 -19
  176. package/src/routes.json +44 -20
  177. package/src/types/index.ts +87 -24
  178. package/translations/am.json +140 -80
  179. package/translations/ar.json +141 -81
  180. package/translations/ar_SY.json +141 -81
  181. package/translations/bn.json +143 -83
  182. package/translations/cs.json +230 -0
  183. package/translations/de.json +141 -81
  184. package/translations/en.json +142 -81
  185. package/translations/en_US.json +141 -81
  186. package/translations/es.json +140 -80
  187. package/translations/es_MX.json +141 -81
  188. package/translations/fr.json +224 -164
  189. package/translations/he.json +140 -80
  190. package/translations/hi.json +141 -81
  191. package/translations/hi_IN.json +141 -81
  192. package/translations/id.json +141 -81
  193. package/translations/it.json +166 -106
  194. package/translations/ka.json +141 -81
  195. package/translations/km.json +140 -80
  196. package/translations/ku.json +141 -81
  197. package/translations/ky.json +141 -81
  198. package/translations/lg.json +141 -81
  199. package/translations/ne.json +141 -81
  200. package/translations/pl.json +141 -81
  201. package/translations/pt.json +141 -81
  202. package/translations/pt_BR.json +141 -81
  203. package/translations/qu.json +141 -81
  204. package/translations/ro_RO.json +225 -165
  205. package/translations/ru_RU.json +141 -81
  206. package/translations/si.json +141 -81
  207. package/translations/sq.json +230 -0
  208. package/translations/sw.json +141 -81
  209. package/translations/sw_KE.json +141 -81
  210. package/translations/tr.json +141 -81
  211. package/translations/tr_TR.json +141 -81
  212. package/translations/uk.json +141 -81
  213. package/translations/uz.json +141 -81
  214. package/translations/uz@Latn.json +141 -81
  215. package/translations/uz_UZ.json +141 -81
  216. package/translations/vi.json +141 -81
  217. package/translations/zh.json +141 -81
  218. package/translations/zh_CN.json +171 -111
  219. package/translations/zh_TW.json +230 -0
  220. package/dist/1146.js.LICENSE.txt +0 -21
  221. package/dist/2352.js +0 -1
  222. package/dist/2352.js.map +0 -1
  223. package/dist/246.js +0 -1
  224. package/dist/246.js.map +0 -1
  225. package/dist/4689.js +0 -2
  226. package/dist/4689.js.map +0 -1
  227. package/dist/6557.js +0 -2
  228. package/dist/6557.js.map +0 -1
  229. package/dist/8638.js +0 -1
  230. package/dist/8638.js.map +0 -1
  231. package/dist/9968.js +0 -1
  232. package/dist/9968.js.map +0 -1
  233. package/e2e/pages/home-page.ts +0 -9
  234. package/e2e/specs/sample-test.spec.ts +0 -11
  235. package/src/bill-item-actions/edit-bill-item.component.tsx +0 -221
  236. package/src/billable-services/create-edit/add-billable-service.component.tsx +0 -401
  237. package/src/billable-services/create-edit/add-billable-service.test.tsx +0 -154
  238. package/src/billable-services/dashboard/service-metrics.component.tsx +0 -41
  239. package/src/billable-services/payyment-modes/payment-modes-config.component.tsx +0 -280
  240. package/src/invoice/payments/payments.component.test.tsx +0 -121
  241. /package/dist/{4689.js.LICENSE.txt → 3717.js.LICENSE.txt} +0 -0
@@ -73,6 +73,9 @@
73
73
 
74
74
  .grid {
75
75
  margin: layout.$spacing-05;
76
+ display: flex;
77
+ flex-direction: column;
78
+ gap: layout.$spacing-05;
76
79
  }
77
80
 
78
81
  .row {
@@ -85,3 +88,143 @@
85
88
  .spacer {
86
89
  margin-top: layout.$spacing-05;
87
90
  }
91
+
92
+ .selectedItemsContainer {
93
+ margin-top: layout.$spacing-05;
94
+
95
+ h4 {
96
+ margin-bottom: layout.$spacing-05;
97
+ color: $text-02;
98
+ font-size: 1rem;
99
+ font-weight: 600;
100
+ }
101
+
102
+ .itemCard {
103
+ border: 1px solid $ui-03;
104
+ border-radius: layout.$spacing-02;
105
+ padding: layout.$spacing-05;
106
+ margin-bottom: layout.$spacing-05;
107
+ background-color: $ui-01;
108
+
109
+ .itemHeader {
110
+ display: flex;
111
+ justify-content: space-between;
112
+ align-items: center;
113
+ margin-bottom: layout.$spacing-05;
114
+
115
+ .itemName {
116
+ font-weight: 600;
117
+ font-size: 1rem;
118
+ color: $text-02;
119
+ }
120
+ }
121
+
122
+ .itemControls {
123
+ display: flex;
124
+ flex-wrap: wrap;
125
+ gap: layout.$spacing-05;
126
+ margin-top: layout.$spacing-03;
127
+ align-items: flex-end; .controlSection {
128
+ display: flex;
129
+ flex-direction: column;
130
+ min-width: 0;
131
+
132
+ &:first-child {
133
+ flex: 1 1 auto;
134
+ min-width: 250px;
135
+ }
136
+
137
+ &:nth-child(2) {
138
+ flex: 0 0 140px;
139
+ width: 140px;
140
+ }
141
+
142
+ &:last-child {
143
+ flex: 0 0 180px;
144
+ width: 180px;
145
+ margin-left: auto;
146
+ text-align: right;
147
+ }
148
+
149
+ label {
150
+ font-size: 0.875rem;
151
+ font-weight: 500;
152
+ margin-bottom: layout.$spacing-03;
153
+ color: $text-02;
154
+ white-space: nowrap;
155
+ overflow: hidden;
156
+ text-overflow: ellipsis;
157
+ }
158
+
159
+ :global(.cds--list-box),
160
+ :global(.cds--number),
161
+ :global(.cds--combo-box),
162
+ :global(.cds--list-box__wrapper),
163
+ :global(.cds--list-box__field) {
164
+ width: 100% !important;
165
+ max-width: 100% !important;
166
+ min-width: 0 !important;
167
+ }
168
+
169
+ .priceDisplay,
170
+ .totalDisplay {
171
+ font-size: 0.875rem;
172
+ font-size: 0.875rem;
173
+ font-weight: 600;
174
+ color: $text-02;
175
+ padding: layout.$spacing-03 0;
176
+ word-break: break-word;
177
+ }
178
+ }
179
+ }
180
+ }
181
+
182
+ .grandTotal {
183
+ text-align: right;
184
+ padding: layout.$spacing-05;
185
+ border-top: 2px solid $interactive-01;
186
+ margin-top: layout.$spacing-05;
187
+ background-color: $ui-01;
188
+ font-size: 1.125rem;
189
+ font-weight: 600;
190
+ color: $text-02;
191
+ }
192
+ }
193
+
194
+ @media (max-width: 1056px) {
195
+ .selectedItemsContainer {
196
+ .itemCard {
197
+ .itemControls {
198
+ .controlSection {
199
+ &:nth-child(2) {
200
+ flex: 1 1 100%;
201
+ width: 100%;
202
+ }
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
208
+
209
+ @media (max-width: 768px) {
210
+ .selectedItemsContainer {
211
+ .itemCard {
212
+ padding: layout.$spacing-04;
213
+
214
+ .itemControls {
215
+ flex-direction: column;
216
+ gap: layout.$spacing-03;
217
+
218
+ .controlSection {
219
+ &:first-child,
220
+ &:nth-child(2),
221
+ &:last-child {
222
+ flex: 1 1 100%;
223
+ width: 100%;
224
+ max-width: 100%;
225
+ }
226
+ }
227
+ }
228
+ }
229
+ }
230
+ }
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  import { zodResolver } from '@hookform/resolvers/zod';
4
4
  import { Controller, useForm } from 'react-hook-form';
5
5
  import { useTranslation } from 'react-i18next';
6
- import { ComboBox, InlineLoading, RadioButton, RadioButtonGroup, TextInput } from '@carbon/react';
6
+ import { ComboBox, InlineLoading, RadioButton, RadioButtonGroup, Stack, TextInput } from '@carbon/react';
7
7
  import { useConfig } from '@openmrs/esm-framework';
8
8
  import { usePaymentMethods } from '../billing-form.resource';
9
9
  import styles from './visit-attributes-form.scss';
@@ -31,14 +31,14 @@ const visitAttributesFormSchema = z.object({
31
31
 
32
32
  const VisitAttributesForm: React.FC<VisitAttributesFormProps> = ({ setAttributes, setPaymentMethod }) => {
33
33
  const { t } = useTranslation();
34
- const { patientCatergory, catergoryConcepts, nonPayingPatientCategories } = useConfig();
34
+ const { patientCategory, categoryConcepts, nonPayingPatientCategories } = useConfig();
35
35
  const { control, getValues, watch } = useForm<VisitAttributesFormValue>({
36
36
  mode: 'all',
37
37
  defaultValues: {},
38
38
  resolver: zodResolver(visitAttributesFormSchema),
39
39
  });
40
40
 
41
- const [paymentDetails, paymentMethods, insuranceSchema, policyNumber, patientCategory] = watch([
41
+ const [paymentDetails, paymentMethods, insuranceSchema, policyNumber, patientCategoryValue] = watch([
42
42
  'paymentDetails',
43
43
  'paymentMethods',
44
44
  'insuranceScheme',
@@ -49,21 +49,29 @@ const VisitAttributesForm: React.FC<VisitAttributesFormProps> = ({ setAttributes
49
49
  const { paymentModes, isLoading: isLoadingPaymentModes } = usePaymentMethods();
50
50
  const patientCategoryOptions = useMemo(() => {
51
51
  return Object.entries(nonPayingPatientCategories ?? {}).map(([key, uuid]) => ({
52
- text: key,
52
+ // t('childUnder5', 'Child under 5')
53
+ // t('student', 'Student')
54
+ text: t(key),
53
55
  uuid,
54
56
  }));
55
- }, [nonPayingPatientCategories]);
57
+ }, [nonPayingPatientCategories, t]);
56
58
 
57
59
  const createVisitAttributesPayload = useCallback(() => {
58
- const { paymentDetails, paymentMethods, insuranceScheme, policyNumber, patientCategory } = getValues();
60
+ const {
61
+ paymentDetails,
62
+ paymentMethods,
63
+ insuranceScheme,
64
+ policyNumber,
65
+ patientCategory: patientCategoryValue,
66
+ } = getValues();
59
67
  setPaymentMethod?.(paymentMethods);
60
68
 
61
69
  const formPayload = [
62
- { uuid: patientCatergory.paymentDetails, value: paymentDetails },
63
- { uuid: patientCatergory.paymentMethods, value: paymentMethods },
64
- { uuid: patientCatergory.insuranceScheme, value: insuranceScheme },
65
- { uuid: patientCatergory.policyNumber, value: policyNumber },
66
- { uuid: patientCatergory.patientCategory, value: patientCategory },
70
+ { uuid: patientCategory.paymentDetails, value: paymentDetails },
71
+ { uuid: patientCategory.paymentMethods, value: paymentMethods },
72
+ { uuid: patientCategory.insuranceScheme, value: insuranceScheme },
73
+ { uuid: patientCategory.policyNumber, value: policyNumber },
74
+ { uuid: patientCategory.patientCategory, value: patientCategoryValue },
67
75
  ];
68
76
 
69
77
  const visitAttributesPayload = formPayload.filter(
@@ -75,11 +83,11 @@ const VisitAttributesForm: React.FC<VisitAttributesFormProps> = ({ setAttributes
75
83
  }));
76
84
  }, [
77
85
  getValues,
78
- patientCatergory.insuranceScheme,
79
- patientCatergory.patientCategory,
80
- patientCatergory.paymentDetails,
81
- patientCatergory.paymentMethods,
82
- patientCatergory.policyNumber,
86
+ patientCategory.insuranceScheme,
87
+ patientCategory.patientCategory,
88
+ patientCategory.paymentDetails,
89
+ patientCategory.paymentMethods,
90
+ patientCategory.policyNumber,
83
91
  setPaymentMethod,
84
92
  ]);
85
93
 
@@ -90,7 +98,7 @@ const VisitAttributesForm: React.FC<VisitAttributesFormProps> = ({ setAttributes
90
98
  paymentMethods,
91
99
  insuranceSchema,
92
100
  policyNumber,
93
- patientCategory,
101
+ patientCategoryValue,
94
102
  setAttributes,
95
103
  createVisitAttributesPayload,
96
104
  ]);
@@ -100,59 +108,59 @@ const VisitAttributesForm: React.FC<VisitAttributesFormProps> = ({ setAttributes
100
108
  <InlineLoading
101
109
  status="active"
102
110
  iconDescription={t('loadingDescription', 'Loading')}
103
- description={t('loading', 'Loading data...')}
111
+ description={t('loading', 'Loading data') + '...'}
104
112
  />
105
113
  );
106
114
  }
107
115
 
108
116
  return (
109
- <section>
110
- <div className={styles.sectionTitle}>{t('paymentDetails', 'Payment Details')}</div>
117
+ <Stack className={styles.stack} gap={5}>
111
118
  <Controller
112
119
  name="paymentDetails"
113
120
  control={control}
114
121
  render={({ field }) => (
115
122
  <RadioButtonGroup
123
+ className={styles.radioButtonGroup}
124
+ legendText={t('paymentDetails', 'Payment details')}
125
+ name="payment-details"
116
126
  onChange={(selected) => field.onChange(selected)}
117
- orientation="vertical"
118
- legendText={t('paymentDetails', 'Payment Details')}
119
- name="payment-details">
120
- <RadioButton labelText="Paying" value={catergoryConcepts.payingDetails} id="radio-1" />
121
- <RadioButton labelText="Non paying" value={catergoryConcepts.nonPayingDetails} id="radio-2" />
127
+ orientation="vertical">
128
+ <RadioButton labelText={t('paying', 'Paying')} value={categoryConcepts.payingDetails} id="radio-1" />
129
+ <RadioButton
130
+ labelText={t('nonPaying', 'Non paying')}
131
+ value={categoryConcepts.nonPayingDetails}
132
+ id="radio-2"
133
+ />
122
134
  </RadioButtonGroup>
123
135
  )}
124
136
  />
125
-
126
- {paymentDetails === catergoryConcepts.payingDetails && (
137
+ {paymentDetails === categoryConcepts.payingDetails && (
127
138
  <Controller
128
139
  control={control}
129
140
  name="paymentMethods"
130
141
  render={({ field }) => (
131
142
  <ComboBox
132
- className={styles.sectionField}
133
- onChange={({ selectedItem }) => field.onChange(selectedItem?.uuid)}
134
143
  id="paymentMethods"
135
144
  items={paymentModes}
136
145
  itemToString={(item) => (item ? item.name : '')}
137
- titleText={t('paymentMethods', 'Payment methods')}
146
+ onChange={({ selectedItem }) => field.onChange(selectedItem?.uuid)}
138
147
  placeholder={t('selectPaymentMethod', 'Select payment method')}
148
+ titleText={t('paymentMethod', 'Payment method')}
139
149
  />
140
150
  )}
141
151
  />
142
152
  )}
143
-
144
- {paymentMethods === catergoryConcepts.insuranceDetails && paymentDetails === catergoryConcepts.payingDetails && (
153
+ {paymentMethods === categoryConcepts.insuranceDetails && paymentDetails === categoryConcepts.payingDetails && (
145
154
  <>
146
155
  <Controller
147
156
  control={control}
148
157
  name="insuranceScheme"
149
158
  render={({ field }) => (
150
159
  <TextInput
151
- className={styles.sectionField}
152
- onChange={(e) => field.onChange(e.target.value)}
153
160
  id="insurance-scheme"
154
- type="text"
155
161
  labelText={t('insuranceScheme', 'Insurance scheme')}
162
+ onChange={(e) => field.onChange(e.target.value)}
163
+ type="text"
156
164
  />
157
165
  )}
158
166
  />
@@ -161,19 +169,17 @@ const VisitAttributesForm: React.FC<VisitAttributesFormProps> = ({ setAttributes
161
169
  name="policyNumber"
162
170
  render={({ field }) => (
163
171
  <TextInput
164
- className={styles.sectionField}
165
- onChange={(e) => field.onChange(e.target.value)}
166
172
  {...field}
167
173
  id="policy-number"
168
- type="text"
169
174
  labelText={t('policyNumber', 'Policy number')}
175
+ onChange={(e) => field.onChange(e.target.value)}
176
+ type="text"
170
177
  />
171
178
  )}
172
179
  />
173
180
  </>
174
181
  )}
175
-
176
- {paymentDetails === catergoryConcepts.nonPayingDetails && (
182
+ {paymentDetails === categoryConcepts.nonPayingDetails && (
177
183
  <Controller
178
184
  control={control}
179
185
  name="patientCategory"
@@ -190,7 +196,7 @@ const VisitAttributesForm: React.FC<VisitAttributesFormProps> = ({ setAttributes
190
196
  )}
191
197
  />
192
198
  )}
193
- </section>
199
+ </Stack>
194
200
  );
195
201
  };
196
202
 
@@ -1,6 +1,6 @@
1
+ @use '@carbon/colors';
1
2
  @use '@carbon/layout';
2
3
  @use '@carbon/type';
3
- @use '@carbon/colors';
4
4
 
5
5
  .sectionContainer {
6
6
  margin: 0 layout.$spacing-03;
@@ -11,12 +11,25 @@
11
11
  color: colors.$gray-70;
12
12
  margin: 0 0 layout.$spacing-03 0;
13
13
  }
14
+
14
15
  .visitAttributesContainer {
15
16
  row-gap: layout.$spacing-03;
16
17
  display: flex;
17
18
  flex-direction: column;
18
19
  }
19
20
 
20
- .sectionField {
21
- margin-top: layout.$spacing-03;
21
+ .radioButtonGroup {
22
+ :global(.cds--radio-button-group) {
23
+ :global(.cds--radio-button-wrapper) {
24
+ margin-bottom: layout.$spacing-03;
25
+
26
+ &:last-child {
27
+ margin-bottom: 0;
28
+ }
29
+ }
30
+ }
31
+ }
32
+
33
+ .stack {
34
+ margin-bottom: layout.$spacing-05;
22
35
  }