@olaboot/esm-patient-registration-app 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/ADDRESS_CONFIGURATION.md +152 -0
  2. package/IDENTIFIER_CONFIGURATION.md +142 -0
  3. package/IMPLEMENTATION_SUMMARY.md +111 -0
  4. package/QUICK_START.md +95 -0
  5. package/README.md +7 -0
  6. package/address-required-fields-config.json +26 -0
  7. package/dist/126.js +1 -0
  8. package/dist/15.js +1 -0
  9. package/dist/1564.js +1 -0
  10. package/dist/1567.js +1 -0
  11. package/dist/1845.js +1 -0
  12. package/dist/1953.js +1 -0
  13. package/dist/200.js +1 -0
  14. package/dist/200.js.map +1 -0
  15. package/dist/215.js +1 -0
  16. package/dist/2178.js +1 -0
  17. package/dist/250.js +1 -0
  18. package/dist/250.js.map +1 -0
  19. package/dist/2523.js +1 -0
  20. package/dist/2523.js.map +1 -0
  21. package/dist/2566.js +1 -0
  22. package/dist/2586.js +1 -0
  23. package/dist/2586.js.map +1 -0
  24. package/dist/2716.js +1 -0
  25. package/dist/2716.js.map +1 -0
  26. package/dist/2759.js +1 -0
  27. package/dist/2821.js +6 -0
  28. package/dist/2821.js.map +1 -0
  29. package/dist/3089.js +1 -0
  30. package/dist/3089.js.map +1 -0
  31. package/dist/3230.js +1 -0
  32. package/dist/3441.js +1 -0
  33. package/dist/3565.js +1 -0
  34. package/dist/3571.js +1 -0
  35. package/dist/3571.js.map +1 -0
  36. package/dist/3746.js +1 -0
  37. package/dist/3925.js +1 -0
  38. package/dist/3946.js +1 -0
  39. package/dist/4024.js +1 -0
  40. package/dist/4024.js.map +1 -0
  41. package/dist/4744.js +1 -0
  42. package/dist/4744.js.map +1 -0
  43. package/dist/4809.js +1 -0
  44. package/dist/4894.js +1 -0
  45. package/dist/4970.js +1 -0
  46. package/dist/4970.js.map +1 -0
  47. package/dist/5130.js +1 -0
  48. package/dist/5187.js +1 -0
  49. package/dist/5491.js +1 -0
  50. package/dist/5491.js.map +1 -0
  51. package/dist/5595.js +1 -0
  52. package/dist/5961.js +1 -0
  53. package/dist/6133.js +1 -0
  54. package/dist/634.js +1 -0
  55. package/dist/634.js.map +1 -0
  56. package/dist/6456.js +1 -0
  57. package/dist/6466.js +1 -0
  58. package/dist/6613.js +1 -0
  59. package/dist/6783.js +1 -0
  60. package/dist/7073.js +38 -0
  61. package/dist/7073.js.map +1 -0
  62. package/dist/7154.js +1 -0
  63. package/dist/7154.js.map +1 -0
  64. package/dist/7348.js +1 -0
  65. package/dist/7439.js +1 -0
  66. package/dist/7439.js.map +1 -0
  67. package/dist/7543.js +1 -0
  68. package/dist/7607.js +1 -0
  69. package/dist/772.js +1 -0
  70. package/dist/7984.js +1 -0
  71. package/dist/7984.js.map +1 -0
  72. package/dist/8538.js +1 -0
  73. package/dist/8538.js.map +1 -0
  74. package/dist/8599.js +1 -0
  75. package/dist/8727.js +1 -0
  76. package/dist/8847.js +1 -0
  77. package/dist/9015.js +1 -0
  78. package/dist/906.js +1 -0
  79. package/dist/9065.js +1 -0
  80. package/dist/9182.js +1 -0
  81. package/dist/9339.js +1 -0
  82. package/dist/9453.js +1 -0
  83. package/dist/9833.js +1 -0
  84. package/dist/9833.js.map +1 -0
  85. package/dist/9856.js +1 -0
  86. package/dist/9856.js.map +1 -0
  87. package/dist/9920.js +1 -0
  88. package/dist/9938.js +1 -0
  89. package/dist/9943.js +1 -0
  90. package/dist/9943.js.map +1 -0
  91. package/dist/main.js +10 -0
  92. package/dist/main.js.map +1 -0
  93. package/dist/olaboot-esm-patient-registration-app.js +5 -0
  94. package/dist/olaboot-esm-patient-registration-app.js.buildmanifest.json +1627 -0
  95. package/dist/olaboot-esm-patient-registration-app.js.map +1 -0
  96. package/dist/routes.json +1 -0
  97. package/docs/images/patient-registration-hierarchy.png +0 -0
  98. package/example-config.json +14 -0
  99. package/jest.config.js +3 -0
  100. package/package.json +60 -0
  101. package/rspack.config.js +1 -0
  102. package/src/add-patient-link.extension.tsx +21 -0
  103. package/src/add-patient-link.scss +3 -0
  104. package/src/add-patient-link.test.tsx +16 -0
  105. package/src/config-schema.ts +507 -0
  106. package/src/constants.ts +14 -0
  107. package/src/declarations.d.ts +4 -0
  108. package/src/index.ts +59 -0
  109. package/src/nav-link.test.tsx +13 -0
  110. package/src/nav-link.tsx +10 -0
  111. package/src/offline.resources.ts +157 -0
  112. package/src/offline.ts +93 -0
  113. package/src/patient-photo.extension.tsx +11 -0
  114. package/src/patient-registration/before-save-prompt.component.tsx +72 -0
  115. package/src/patient-registration/field/__mocks__/field.resource.ts +60 -0
  116. package/src/patient-registration/field/address/address-field.component.tsx +186 -0
  117. package/src/patient-registration/field/address/address-hierarchy-levels.component.tsx +71 -0
  118. package/src/patient-registration/field/address/address-hierarchy.resource.tsx +157 -0
  119. package/src/patient-registration/field/address/address-hierarchy.test.tsx +296 -0
  120. package/src/patient-registration/field/address/address-search.component.tsx +87 -0
  121. package/src/patient-registration/field/address/address-search.scss +53 -0
  122. package/src/patient-registration/field/address/address-search.test.tsx +141 -0
  123. package/src/patient-registration/field/address/custom-address-field.component.tsx +32 -0
  124. package/src/patient-registration/field/cause-of-death/cause-of-death.component.tsx +98 -0
  125. package/src/patient-registration/field/custom-field.component.tsx +25 -0
  126. package/src/patient-registration/field/date-and-time-of-death/date-and-time-of-death.component.tsx +79 -0
  127. package/src/patient-registration/field/dob/dob.component.tsx +167 -0
  128. package/src/patient-registration/field/dob/dob.test.tsx +90 -0
  129. package/src/patient-registration/field/field.component.tsx +53 -0
  130. package/src/patient-registration/field/field.resource.ts +42 -0
  131. package/src/patient-registration/field/field.scss +171 -0
  132. package/src/patient-registration/field/field.test.tsx +330 -0
  133. package/src/patient-registration/field/gender/gender-field.component.tsx +54 -0
  134. package/src/patient-registration/field/gender/gender-field.test.tsx +99 -0
  135. package/src/patient-registration/field/id/id-field.component.tsx +136 -0
  136. package/src/patient-registration/field/id/id-field.test.tsx +121 -0
  137. package/src/patient-registration/field/id/identifier-selection-overlay.component.tsx +200 -0
  138. package/src/patient-registration/field/id/identifier-selection.scss +41 -0
  139. package/src/patient-registration/field/name/name-field.component.tsx +148 -0
  140. package/src/patient-registration/field/obs/obs-field.component.tsx +261 -0
  141. package/src/patient-registration/field/obs/obs-field.test.tsx +299 -0
  142. package/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx +120 -0
  143. package/src/patient-registration/field/person-attributes/coded-person-attribute-field.test.tsx +141 -0
  144. package/src/patient-registration/field/person-attributes/location-person-attribute-field.component.tsx +105 -0
  145. package/src/patient-registration/field/person-attributes/location-person-attribute-field.resource.tsx +48 -0
  146. package/src/patient-registration/field/person-attributes/person-attribute-field.component.tsx +100 -0
  147. package/src/patient-registration/field/person-attributes/person-attribute-field.test.tsx +193 -0
  148. package/src/patient-registration/field/person-attributes/person-attributes.resource.ts +20 -0
  149. package/src/patient-registration/field/person-attributes/text-person-attribute-field.component.tsx +58 -0
  150. package/src/patient-registration/field/person-attributes/text-person-attribute-field.test.tsx +90 -0
  151. package/src/patient-registration/field/phone/phone-field.component.tsx +17 -0
  152. package/src/patient-registration/form-manager.test.ts +91 -0
  153. package/src/patient-registration/form-manager.ts +443 -0
  154. package/src/patient-registration/input/basic-input/input/input.component.tsx +183 -0
  155. package/src/patient-registration/input/basic-input/input/input.test.tsx +72 -0
  156. package/src/patient-registration/input/basic-input/select/select-input.component.tsx +32 -0
  157. package/src/patient-registration/input/basic-input/select/select-input.test.tsx +49 -0
  158. package/src/patient-registration/input/combo-input/combo-input.component.tsx +130 -0
  159. package/src/patient-registration/input/combo-input/selection-tick.component.tsx +20 -0
  160. package/src/patient-registration/input/custom-input/autosuggest/autosuggest.component.tsx +187 -0
  161. package/src/patient-registration/input/custom-input/autosuggest/autosuggest.scss +62 -0
  162. package/src/patient-registration/input/custom-input/autosuggest/autosuggest.test.tsx +164 -0
  163. package/src/patient-registration/input/custom-input/identifier/identifier-input.component.tsx +193 -0
  164. package/src/patient-registration/input/custom-input/identifier/identifier-input.test.tsx +335 -0
  165. package/src/patient-registration/input/custom-input/identifier/utils.test.ts +81 -0
  166. package/src/patient-registration/input/custom-input/identifier/utils.ts +19 -0
  167. package/src/patient-registration/input/dummy-data/dummy-data-input.component.tsx +56 -0
  168. package/src/patient-registration/input/dummy-data/dummy-data-input.test.tsx +34 -0
  169. package/src/patient-registration/input/input.scss +122 -0
  170. package/src/patient-registration/patient-registration-context.ts +35 -0
  171. package/src/patient-registration/patient-registration-hooks.ts +376 -0
  172. package/src/patient-registration/patient-registration-utils.test.ts +33 -0
  173. package/src/patient-registration/patient-registration-utils.ts +214 -0
  174. package/src/patient-registration/patient-registration.component.tsx +266 -0
  175. package/src/patient-registration/patient-registration.resource.test.tsx +22 -0
  176. package/src/patient-registration/patient-registration.resource.ts +198 -0
  177. package/src/patient-registration/patient-registration.scss +103 -0
  178. package/src/patient-registration/patient-registration.test.tsx +580 -0
  179. package/src/patient-registration/patient-registration.types.ts +322 -0
  180. package/src/patient-registration/section/death-info/death-info-section.component.tsx +36 -0
  181. package/src/patient-registration/section/death-info/death-info-section.test.tsx +47 -0
  182. package/src/patient-registration/section/demographics/demographics-section.component.tsx +30 -0
  183. package/src/patient-registration/section/demographics/demographics-section.test.tsx +98 -0
  184. package/src/patient-registration/section/generic-section.component.tsx +17 -0
  185. package/src/patient-registration/section/patient-relationships/relationships-section.component.tsx +234 -0
  186. package/src/patient-registration/section/patient-relationships/relationships-section.test.tsx +113 -0
  187. package/src/patient-registration/section/patient-relationships/relationships.resource.tsx +78 -0
  188. package/src/patient-registration/section/patient-relationships/relationships.scss +35 -0
  189. package/src/patient-registration/section/section-wrapper.component.tsx +40 -0
  190. package/src/patient-registration/section/section.component.tsx +23 -0
  191. package/src/patient-registration/section/section.scss +21 -0
  192. package/src/patient-registration/ui-components/overlay/overlay.component.tsx +51 -0
  193. package/src/patient-registration/ui-components/overlay/overlay.scss +63 -0
  194. package/src/patient-registration/validation/patient-registration-validation.test.ts +205 -0
  195. package/src/patient-registration/validation/patient-registration-validation.ts +123 -0
  196. package/src/resource.ts +12 -0
  197. package/src/resources-context.ts +14 -0
  198. package/src/root.component.tsx +63 -0
  199. package/src/root.scss +7 -0
  200. package/src/routes.json +61 -0
  201. package/src/widgets/cancel-patient-edit.modal.tsx +33 -0
  202. package/src/widgets/cancel-patient-edit.test.tsx +22 -0
  203. package/src/widgets/delete-identifier-confirmation.modal.tsx +48 -0
  204. package/src/widgets/delete-identifier-confirmation.test.tsx +32 -0
  205. package/src/widgets/edit-patient-details-button.component.tsx +33 -0
  206. package/src/widgets/edit-patient-details-button.scss +3 -0
  207. package/src/widgets/edit-patient-details-button.test.tsx +35 -0
  208. package/translations/am.json +120 -0
  209. package/translations/ar.json +120 -0
  210. package/translations/ar_SY.json +120 -0
  211. package/translations/bn.json +120 -0
  212. package/translations/cs.json +120 -0
  213. package/translations/de.json +120 -0
  214. package/translations/en.json +120 -0
  215. package/translations/en_US.json +120 -0
  216. package/translations/es.json +120 -0
  217. package/translations/es_MX.json +120 -0
  218. package/translations/fr.json +120 -0
  219. package/translations/he.json +120 -0
  220. package/translations/hi.json +120 -0
  221. package/translations/hi_IN.json +120 -0
  222. package/translations/id.json +120 -0
  223. package/translations/it.json +120 -0
  224. package/translations/ka.json +120 -0
  225. package/translations/km.json +120 -0
  226. package/translations/ku.json +120 -0
  227. package/translations/ky.json +120 -0
  228. package/translations/lg.json +120 -0
  229. package/translations/ne.json +120 -0
  230. package/translations/pl.json +120 -0
  231. package/translations/pt.json +120 -0
  232. package/translations/pt_BR.json +120 -0
  233. package/translations/qu.json +120 -0
  234. package/translations/ro_RO.json +120 -0
  235. package/translations/ru_RU.json +120 -0
  236. package/translations/si.json +120 -0
  237. package/translations/sq.json +120 -0
  238. package/translations/sw.json +120 -0
  239. package/translations/sw_KE.json +120 -0
  240. package/translations/tr.json +120 -0
  241. package/translations/tr_TR.json +120 -0
  242. package/translations/uk.json +120 -0
  243. package/translations/uz.json +120 -0
  244. package/translations/uz@Latn.json +120 -0
  245. package/translations/uz_UZ.json +120 -0
  246. package/translations/vi.json +120 -0
  247. package/translations/zh.json +120 -0
  248. package/translations/zh_CN.json +120 -0
  249. package/translations/zh_TW.json +120 -0
  250. package/tsconfig.json +5 -0
@@ -0,0 +1,152 @@
1
+ # Address Field Configuration Guide
2
+
3
+ This guide explains how to configure which address fields are required in the patient registration form.
4
+
5
+ ## Overview
6
+
7
+ By default, the required address fields are determined by the backend address template configuration. However, you can override this behavior using the `requiredAddressFields` configuration option.
8
+
9
+ ## Configuration Option
10
+
11
+ ### `requiredAddressFields`
12
+
13
+ An array of address field names that should be marked as required in the registration form. This overrides the backend address template's `requiredElements` configuration.
14
+
15
+ **Location in config:** `fieldConfigurations.address.requiredAddressFields`
16
+
17
+ ## Common Address Field Names
18
+
19
+ The following are common address field names you can use:
20
+
21
+ - `country` - Country
22
+ - `stateProvince` - State/Province
23
+ - `countyDistrict` - County/District
24
+ - `cityVillage` - City/Village
25
+ - `address1` - Address line 1
26
+ - `address2` - Address line 2
27
+ - `address3` - Address line 3
28
+ - `postalCode` - Postal/ZIP code
29
+ - `latitude` - Latitude
30
+ - `longitude` - Longitude
31
+
32
+ **Note:** The actual field names available depend on your OpenMRS address template configuration.
33
+
34
+ ## Example Configuration
35
+
36
+ ### Make All Address Fields Required Except Postal Code
37
+
38
+ ```json
39
+ {
40
+ "@openmrs/esm-patient-registration-app": {
41
+ "fieldConfigurations": {
42
+ "address": {
43
+ "requiredAddressFields": [
44
+ "country",
45
+ "stateProvince",
46
+ "countyDistrict",
47
+ "address2",
48
+ "address1"
49
+ ]
50
+ }
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ In this example:
57
+ - ✅ Country - **Required**
58
+ - ✅ State - **Required**
59
+ - ✅ Local Govt. (countyDistrict) - **Required**
60
+ - ✅ Ward (address2) - **Required**
61
+ - ✅ Address (address1) - **Required**
62
+ - ❌ Postal Code - **Optional** (not in the list)
63
+
64
+ ### Make Only Country and State Required
65
+
66
+ ```json
67
+ {
68
+ "@openmrs/esm-patient-registration-app": {
69
+ "fieldConfigurations": {
70
+ "address": {
71
+ "requiredAddressFields": [
72
+ "country",
73
+ "stateProvince"
74
+ ]
75
+ }
76
+ }
77
+ }
78
+ }
79
+ ```
80
+
81
+ ### Make All Fields Optional
82
+
83
+ ```json
84
+ {
85
+ "@openmrs/esm-patient-registration-app": {
86
+ "fieldConfigurations": {
87
+ "address": {
88
+ "requiredAddressFields": []
89
+ }
90
+ }
91
+ }
92
+ }
93
+ ```
94
+
95
+ ## How It Works
96
+
97
+ 1. **If `requiredAddressFields` is configured** (non-empty array):
98
+ - Only the fields listed in the array will be marked as required
99
+ - All other fields will be optional
100
+ - This completely overrides the backend address template configuration
101
+
102
+ 2. **If `requiredAddressFields` is not configured or is an empty array AND you want to use backend defaults**:
103
+ - The system falls back to using the `requiredElements` from the backend address template
104
+ - This is the default behavior
105
+
106
+ 3. **If `requiredAddressFields` is explicitly set to an empty array `[]`**:
107
+ - All address fields will be optional
108
+ - This overrides any backend requirements
109
+
110
+ ## Complete Configuration Example
111
+
112
+ Here's a complete configuration that includes address hierarchy settings and required fields:
113
+
114
+ ```json
115
+ {
116
+ "@openmrs/esm-patient-registration-app": {
117
+ "fieldConfigurations": {
118
+ "address": {
119
+ "useAddressHierarchy": {
120
+ "enabled": true,
121
+ "useQuickSearch": true,
122
+ "searchAddressByLevel": true,
123
+ "useAddressHierarchyLabel": {
124
+ "country": "Country",
125
+ "stateProvince": "State",
126
+ "countyDistrict": "Local Govt.",
127
+ "address2": "Ward",
128
+ "address1": "Address"
129
+ }
130
+ },
131
+ "requiredAddressFields": [
132
+ "country",
133
+ "stateProvince",
134
+ "countyDistrict",
135
+ "address2",
136
+ "address1"
137
+ ]
138
+ }
139
+ }
140
+ }
141
+ }
142
+ ```
143
+
144
+ ## Notes
145
+
146
+ - Field names are case-sensitive
147
+ - Make sure the field names match exactly with your address template configuration
148
+ - Required fields will show without "(optional)" label
149
+ - Optional fields will show with "(optional)" label
150
+ - Form validation will prevent submission if required fields are empty
151
+ - This configuration works with both address hierarchy and non-hierarchy modes
152
+
@@ -0,0 +1,142 @@
1
+ # Patient Identifier Configuration Guide
2
+
3
+ This guide explains how to configure patient identifiers in the registration form.
4
+
5
+ ## Overview
6
+
7
+ Patient identifiers can be configured to control:
8
+ 1. Which identifiers appear in the registration form
9
+ 2. Whether specific identifiers are required or optional
10
+
11
+ ## Configuration Options
12
+
13
+ ### 1. `defaultPatientIdentifierTypes`
14
+
15
+ An array of patient identifier type UUIDs that should be displayed by default in the registration form.
16
+
17
+ **Example:**
18
+ ```json
19
+ {
20
+ "@openmrs/esm-patient-registration-app": {
21
+ "defaultPatientIdentifierTypes": [
22
+ "fd0df06c-fcd4-4625-89b2-6b72ca44b8ed"
23
+ ]
24
+ }
25
+ }
26
+ ```
27
+
28
+ ### 2. `identifierTypeOverrides`
29
+
30
+ Allows you to override the required/optional status of specific identifier types. This is useful when you want to make a backend-required identifier optional in the frontend.
31
+
32
+ **Example:**
33
+ ```json
34
+ {
35
+ "@openmrs/esm-patient-registration-app": {
36
+ "identifierTypeOverrides": [
37
+ {
38
+ "identifierTypeUuid": "fd0df06c-fcd4-4625-89b2-6b72ca44b8ed",
39
+ "required": false
40
+ }
41
+ ]
42
+ }
43
+ }
44
+ ```
45
+
46
+ ## Complete Example
47
+
48
+ To display an identifier with UUID `fd0df06c-fcd4-4625-89b2-6b72ca44b8ed` and make it optional:
49
+
50
+ ```json
51
+ {
52
+ "@openmrs/esm-patient-registration-app": {
53
+ "defaultPatientIdentifierTypes": [
54
+ "fd0df06c-fcd4-4625-89b2-6b72ca44b8ed"
55
+ ],
56
+ "identifierTypeOverrides": [
57
+ {
58
+ "identifierTypeUuid": "fd0df06c-fcd4-4625-89b2-6b72ca44b8ed",
59
+ "required": false
60
+ }
61
+ ]
62
+ }
63
+ }
64
+ ```
65
+
66
+ ## How Identifiers Are Determined
67
+
68
+ Identifiers appear in the registration form if they meet **ANY** of these criteria:
69
+
70
+ 1. **`isPrimary: true`** - Marked as primary identifier type in OpenMRS backend
71
+ 2. **`required: true`** - Marked as required in OpenMRS backend
72
+ 3. **Listed in `defaultPatientIdentifierTypes`** - Configured in the frontend config
73
+
74
+ ## How Required Status Is Determined
75
+
76
+ An identifier is marked as required based on the following logic:
77
+
78
+ 1. **If there's an override** in `identifierTypeOverrides` for that identifier UUID:
79
+ - Use the `required` value from the override
80
+ 2. **Otherwise**:
81
+ - Required if `isPrimary` OR `required` from the backend
82
+
83
+ ## Use Cases
84
+
85
+ ### Use Case 1: Make a Backend-Required Identifier Optional
86
+
87
+ If an identifier is marked as `required: true` in the OpenMRS backend but you want it to be optional in the frontend:
88
+
89
+ ```json
90
+ {
91
+ "@openmrs/esm-patient-registration-app": {
92
+ "identifierTypeOverrides": [
93
+ {
94
+ "identifierTypeUuid": "your-identifier-uuid-here",
95
+ "required": false
96
+ }
97
+ ]
98
+ }
99
+ }
100
+ ```
101
+
102
+ ### Use Case 2: Add an Optional Identifier
103
+
104
+ To add an identifier that is not required or primary in the backend:
105
+
106
+ ```json
107
+ {
108
+ "@openmrs/esm-patient-registration-app": {
109
+ "defaultPatientIdentifierTypes": [
110
+ "your-identifier-uuid-here"
111
+ ]
112
+ }
113
+ }
114
+ ```
115
+
116
+ ### Use Case 3: Add an Optional Identifier (Even if Backend Says Required)
117
+
118
+ Combine both configurations:
119
+
120
+ ```json
121
+ {
122
+ "@openmrs/esm-patient-registration-app": {
123
+ "defaultPatientIdentifierTypes": [
124
+ "your-identifier-uuid-here"
125
+ ],
126
+ "identifierTypeOverrides": [
127
+ {
128
+ "identifierTypeUuid": "your-identifier-uuid-here",
129
+ "required": false
130
+ }
131
+ ]
132
+ }
133
+ }
134
+ ```
135
+
136
+ ## Notes
137
+
138
+ - The "Configure identifiers" button has been removed from the UI
139
+ - Users can still delete non-required identifiers using the trash icon on each identifier field
140
+ - Primary identifiers (`isPrimary: true`) cannot be deleted from the form
141
+ - All identifier validation rules (format, uniqueness, etc.) still apply
142
+
@@ -0,0 +1,111 @@
1
+ # Implementation Summary
2
+
3
+ This document summarizes the changes made to support configurable required address fields and optional patient identifiers in the patient registration form.
4
+
5
+ ## Features Implemented
6
+
7
+ ### 1. Configurable Required Address Fields
8
+
9
+ **Problem:** Address field requirements were hardcoded based on the backend address template configuration, making it impossible to override which fields are required from the frontend.
10
+
11
+ **Solution:** Added a new configuration option `requiredAddressFields` that allows administrators to specify which address fields should be required, overriding the backend configuration.
12
+
13
+ #### Files Modified:
14
+ - `src/config-schema.ts` - Added `requiredAddressFields` configuration option
15
+ - `src/patient-registration/field/address/address-field.component.tsx` - Updated to use the new configuration
16
+ - Test files updated to include the new configuration property
17
+
18
+ #### Configuration Example:
19
+ ```json
20
+ {
21
+ "@openmrs/esm-patient-registration-app": {
22
+ "fieldConfigurations": {
23
+ "address": {
24
+ "requiredAddressFields": [
25
+ "country",
26
+ "stateProvince",
27
+ "countyDistrict",
28
+ "address2",
29
+ "address1"
30
+ ]
31
+ }
32
+ }
33
+ }
34
+ }
35
+ ```
36
+
37
+ ### 2. Optional Patient Identifiers
38
+
39
+ **Problem:** Patient identifiers marked as required in the backend could not be made optional in the frontend registration form.
40
+
41
+ **Solution:** Added a new configuration option `identifierTypeOverrides` that allows administrators to override the required status of specific identifier types.
42
+
43
+ #### Files Modified:
44
+ - `src/config-schema.ts` - Added `identifierTypeOverrides` configuration option
45
+ - `src/patient-registration/field/id/id-field.component.tsx` - Updated `initializeIdentifier` function to respect overrides
46
+ - `src/patient-registration/field/id/identifier-selection-overlay.component.tsx` - Updated to pass overrides
47
+
48
+ #### Configuration Example:
49
+ ```json
50
+ {
51
+ "@openmrs/esm-patient-registration-app": {
52
+ "defaultPatientIdentifierTypes": [
53
+ "fd0df06c-fcd4-4625-89b2-6b72ca44b8ed"
54
+ ],
55
+ "identifierTypeOverrides": [
56
+ {
57
+ "identifierTypeUuid": "fd0df06c-fcd4-4625-89b2-6b72ca44b8ed",
58
+ "required": false
59
+ }
60
+ ]
61
+ }
62
+ }
63
+ ```
64
+
65
+ ## Documentation Created
66
+
67
+ 1. **ADDRESS_CONFIGURATION.md** - Comprehensive guide for configuring required address fields
68
+ 2. **IDENTIFIER_CONFIGURATION.md** - Comprehensive guide for configuring patient identifiers
69
+ 3. **address-required-fields-config.json** - Example configuration for making all address fields except postal code required
70
+ 4. **example-config.json** - Example configuration for optional patient identifiers
71
+
72
+ ## Testing
73
+
74
+ All existing tests have been updated to include the new configuration properties:
75
+ - `address-hierarchy.test.tsx` - 6 test cases updated
76
+ - `address-search.test.tsx` - 1 test case updated
77
+ - `field.test.tsx` - 1 test case updated
78
+ - `patient-registration.test.tsx` - 1 test case updated
79
+
80
+ ## Backward Compatibility
81
+
82
+ Both features are fully backward compatible:
83
+ - If `requiredAddressFields` is not configured, the system falls back to the backend address template's `requiredElements`
84
+ - If `identifierTypeOverrides` is not configured, identifiers use their backend-defined required status
85
+ - Existing configurations will continue to work without any changes
86
+
87
+ ## Usage Instructions
88
+
89
+ ### For Address Fields:
90
+
91
+ 1. Identify the field names from your address template (e.g., country, stateProvince, postalCode)
92
+ 2. Add the `requiredAddressFields` array to your configuration
93
+ 3. List only the fields that should be required
94
+ 4. All other fields will be optional
95
+
96
+ ### For Patient Identifiers:
97
+
98
+ 1. Get the UUID of the identifier type you want to configure
99
+ 2. Add it to `defaultPatientIdentifierTypes` to display it in the form
100
+ 3. Add an override in `identifierTypeOverrides` with `required: false` to make it optional
101
+ 4. The identifier will appear in the form but won't be required for submission
102
+
103
+ ## Benefits
104
+
105
+ ✅ **Flexibility** - Administrators can customize field requirements without backend changes
106
+ ✅ **User Experience** - Forms can be tailored to specific workflows and requirements
107
+ ✅ **No Backend Changes** - Pure frontend configuration
108
+ ✅ **Validation Preserved** - Format validation and other rules still apply
109
+ ✅ **Backward Compatible** - Existing configurations continue to work
110
+ ✅ **Well Documented** - Comprehensive guides and examples provided
111
+
package/QUICK_START.md ADDED
@@ -0,0 +1,95 @@
1
+ # Quick Start Guide
2
+
3
+ ## Make All Address Fields Required Except Postal Code
4
+
5
+ Add this to your OpenMRS frontend configuration:
6
+
7
+ ```json
8
+ {
9
+ "@openmrs/esm-patient-registration-app": {
10
+ "fieldConfigurations": {
11
+ "address": {
12
+ "requiredAddressFields": [
13
+ "country",
14
+ "stateProvince",
15
+ "countyDistrict",
16
+ "address2",
17
+ "address1"
18
+ ]
19
+ }
20
+ }
21
+ }
22
+ }
23
+ ```
24
+
25
+ **Note:** Postal code is not in the list, so it will be optional.
26
+
27
+ ## Make a Patient Identifier Optional
28
+
29
+ Add this to your OpenMRS frontend configuration:
30
+
31
+ ```json
32
+ {
33
+ "@openmrs/esm-patient-registration-app": {
34
+ "defaultPatientIdentifierTypes": [
35
+ "your-identifier-uuid-here"
36
+ ],
37
+ "identifierTypeOverrides": [
38
+ {
39
+ "identifierTypeUuid": "your-identifier-uuid-here",
40
+ "required": false
41
+ }
42
+ ]
43
+ }
44
+ }
45
+ ```
46
+
47
+ Replace `"your-identifier-uuid-here"` with the actual UUID of your identifier type.
48
+
49
+ ## Complete Example
50
+
51
+ Here's a complete configuration combining both features:
52
+
53
+ ```json
54
+ {
55
+ "@openmrs/esm-patient-registration-app": {
56
+ "fieldConfigurations": {
57
+ "address": {
58
+ "useAddressHierarchy": {
59
+ "enabled": true,
60
+ "useQuickSearch": true,
61
+ "searchAddressByLevel": true
62
+ },
63
+ "requiredAddressFields": [
64
+ "country",
65
+ "stateProvince",
66
+ "countyDistrict",
67
+ "address2",
68
+ "address1"
69
+ ]
70
+ }
71
+ },
72
+ "defaultPatientIdentifierTypes": [
73
+ "fd0df06c-fcd4-4625-89b2-6b72ca44b8ed"
74
+ ],
75
+ "identifierTypeOverrides": [
76
+ {
77
+ "identifierTypeUuid": "fd0df06c-fcd4-4625-89b2-6b72ca44b8ed",
78
+ "required": false
79
+ }
80
+ ]
81
+ }
82
+ }
83
+ ```
84
+
85
+ ## Where to Add This Configuration
86
+
87
+ 1. **For local development:** Add to your `config.json` file in the OpenMRS frontend root
88
+ 2. **For production:** Add to your implementation's configuration file or use the OpenMRS configuration UI
89
+
90
+ ## Need More Help?
91
+
92
+ - See `ADDRESS_CONFIGURATION.md` for detailed address field configuration
93
+ - See `IDENTIFIER_CONFIGURATION.md` for detailed identifier configuration
94
+ - See `IMPLEMENTATION_SUMMARY.md` for technical details
95
+
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # esm-patient-registration-app
2
+
3
+ ## Configuring the Registration App to collect custom observations
4
+
5
+ [PR-221](https://github.com/openmrs/openmrs-esm-patient-management/pull/221) made it possible to configure the registration app to include obs, as demoed in the gif video below, using fieldDefinitions:
6
+
7
+ ![Peek 2022-07-13 15-14](https://user-images.githubusercontent.com/1031876/178846444-ac4da88a-073f-4ed2-bf00-a07cf3ab6d2f.gif)
@@ -0,0 +1,26 @@
1
+ {
2
+ "@openmrs/esm-patient-registration-app": {
3
+ "fieldConfigurations": {
4
+ "address": {
5
+ "useAddressHierarchy": {
6
+ "useAddressHierarchyLabel": {
7
+ "country": "Country",
8
+ "stateProvince": "State",
9
+ "countyDistrict": "Local Govt.",
10
+ "address2": "Ward",
11
+ "address1": "Address"
12
+ },
13
+ "searchAddressByLevel": true
14
+ },
15
+ "requiredAddressFields": [
16
+ "country",
17
+ "stateProvince",
18
+ "countyDistrict",
19
+ "address2",
20
+ "address1"
21
+ ]
22
+ }
23
+ }
24
+ }
25
+ }
26
+
package/dist/126.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_olaboot_esm_patient_registration_app=globalThis.webpackChunk_olaboot_esm_patient_registration_app||[]).push([["126"],{82314:function(e){e.exports=JSON.parse('{"addPatient":"Add patient","addRelationshipButtonText":"Add Relationship","addressHeader":"Address","allFieldsRequiredText":"All fields are required unless marked optional","autoGeneratedPlaceholderText":"Auto-generated","birthdayNotInTheFuture":"Birthday cannot be in future","birthdayNotOver140YearsAgo":"Birthday cannot be more than 140 years ago","birthdayRequired":"Birthday is required","birthFieldLabelText":"Birth","cancel":"Cancel","causeOfDeathInputLabel":"Cause of death","closeOverlay":"Close overlay","codedPersonAttributeAnswerSetEmpty":"The coded person attribute field \'{{codedPersonAttributeFieldId}}\' has been defined with an answer concept set UUID \'{{answerConceptSetUuid}}\' that does not have any concept answers.","codedPersonAttributeAnswerSetInvalid":"The coded person attribute field \'{{codedPersonAttributeFieldId}}\' has been defined with an invalid answer concept set UUID \'{{answerConceptSetUuid}}\'.","codedPersonAttributeNoAnswerSet":"The person attribute field \'{{codedPersonAttributeFieldId}}\' is of type \'coded\' but has been defined without an answer concept set UUID. The \'answerConceptSetUuid\' key is required.","configure":"Configure","configureIdentifiers":"Configure identifiers","confirmDiscardChangesBody":"Your unsaved changes will be lost if you proceed to discard the form","confirmDiscardChangesTitle":"Are you sure you want to discard these changes?","confirmIdentifierDeletionText":"Are you sure you want to remove this identifier?","contactSection":"Contact Details","createNewPatient":"Create new patient","dateOfBirthLabelText":"Date of birth","deathCauseRequired":"Cause of death is required","deathDateInFuture":"Death date cannot be in future","deathDateInputLabel":"Date of death","deathDateRequired":"Death date is required","deathdayInvalidDate":"Death date and time cannot be before the birthday","deathdayIsRequired":"Death date is required when the patient is marked as deceased.","deathdayNotInTheFuture":"","deathSection":"Death Info","deathTimeFormatInvalid":"Time format is invalid","deathTimeFormatRequired":"Time format is required","deathTimeInvalid":"Time doesn\'t match the format \'hh:mm\'","deathTimeRequired":"Death time is required","deleteIdentifierModalHeading":"Remove identifier?","deleteIdentifierModalText":" has a value of ","deleteIdentifierTooltip":"Delete","deleteRelationshipTooltipText":"Delete","demographicsSection":"Basic Info","discard":"Discard","discardModalBody":"The changes you made to this patient\'s details have not been saved. Discard changes?","dobToggleLabelText":"Date of Birth Known?","editIdentifierTooltip":"Edit","editPatientDetails":"Edit patient details","editPatientDetailsBreadcrumb":"Edit patient details","enterNonCodedCauseOfDeath":"Enter non-coded cause of death","error":"Error","errorFetchingCodedCausesOfDeath":"Error fetching coded causes of death","errorFetchingOrderedFields":"Error occured fetching ordered fields for address hierarchy","estimatedAgeInMonthsLabelText":"Estimated age in months","estimatedAgeInYearsLabelText":"Estimated age in years","familyNameLabelText":"Family Name","familyNameRequired":"Family name is required","female":"Female","fieldsWithErrors":"The following fields have errors: ","fullNameLabelText":"Full Name","genderLabelText":"Sex","genderRequired":"Gender is required","genderUnspecified":"Gender unspecified","givenNameLabelText":"First Name","givenNameRequired":"Given name is required","identifierValueRequired":"Identifier value is required","idFieldLabelText":"Identifiers","IDInstructions":"Select the identifiers you\'d like to add for this patient:","invalidEmail":"Invalid email","invalidInput":"Invalid Input","isDeadInputLabel":"Is dead","jumpTo":"Jump to","male":"Male","middleNameLabelText":"Middle Name","negativeMonths":"Estimated months cannot be negative","negativeYears":"Estimated years cannot be negative","no":"No","nonCodedCauseOfDeath":"Non-coded cause of death","nonCodedCauseOfDeathRequired":"Cause of death is required","nonsensicalYears":"Estimated years cannot be more than 140","numberInNameDubious":"Number in name is dubious","obsFieldUnknownDatatype":"Concept for obs field \'{{fieldDefinitionId}}\' has unknown datatype \'{{datatypeName}}\'","optional":"optional","optionalIdentifierLabel":"{{identifierName}} (optional)","other":"Other","patientNameKnown":"Patient\'s Name is Known?","patientRegistrationBreadcrumb":"Patient Registration","refreshOrContactAdmin":"Try refreshing the page or contact your system administrator","registerPatient":"Register patient","registerPatientSuccessSnackbarSubtitle":"The patient can now be found by searching for them using their name or ID number","registerPatientSuccessSnackbarTitle":"New Patient Created","registrationErrorSnackbarTitle":"Patient Registration Failed","relationship":"Relationship","relationshipPersonMustExist":"Related person must be an existing person","relationshipPlaceholder":"Relationship","relationshipRemovedText":"Relationship removed","relationshipsSection":"Relationships","relationshipToPatient":"Relationship to patient","relativeFullNameLabelText":"Full name","relativeNamePlaceholder":"Firstname Familyname","removeIdentifierButton":"Remove identifier","resetIdentifierTooltip":"Reset","restoreRelationshipActionButton":"Undo","searchAddress":"Search address","searchIdentifierPlaceholder":"Search identifier","searchLocationPersonAttribute":"Search location","selectAnOption":"Select an option","sexFieldLabelText":"Sex","source":"Source","submitting":"Submitting","timeFormat":"Time Format","timeOfDeathInputLabel":"Time of death (hh:mm)","unableToFetch":"Unable to fetch person attribute type - {{personattributetype}}","unknown":"Unknown","unknownPatientAttributeType":"Patient attribute type has unknown format {{personAttributeTypeFormat}}","updatePatient":"Update patient","updatePatientErrorSnackbarTitle":"Patient Details Update Failed","updatePatientSuccessSnackbarSubtitle":"The patient\'s information has been successfully updated","updatePatientSuccessSnackbarTitle":"Patient Details Updated","yearsEstimateRequired":"Estimated years required","yes":"Yes"}')}}]);
package/dist/15.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_olaboot_esm_patient_registration_app=globalThis.webpackChunk_olaboot_esm_patient_registration_app||[]).push([["15"],{70350:function(e){e.exports=JSON.parse('{"addPatient":"Add patient","addRelationshipButtonText":"Add Relationship","addressHeader":"Address","allFieldsRequiredText":"All fields are required unless marked optional","autoGeneratedPlaceholderText":"Auto-generated","birthdayNotInTheFuture":"Birthday cannot be in future","birthdayNotOver140YearsAgo":"Birthday cannot be more than 140 years ago","birthdayRequired":"Birthday is required","birthFieldLabelText":"Birth","cancel":"Cancel","causeOfDeathInputLabel":"Cause of death","closeOverlay":"Close overlay","codedPersonAttributeAnswerSetEmpty":"The coded person attribute field \'{{codedPersonAttributeFieldId}}\' has been defined with an answer concept set UUID \'{{answerConceptSetUuid}}\' that does not have any concept answers.","codedPersonAttributeAnswerSetInvalid":"The coded person attribute field \'{{codedPersonAttributeFieldId}}\' has been defined with an invalid answer concept set UUID \'{{answerConceptSetUuid}}\'.","codedPersonAttributeNoAnswerSet":"The person attribute field \'{{codedPersonAttributeFieldId}}\' is of type \'coded\' but has been defined without an answer concept set UUID. The \'answerConceptSetUuid\' key is required.","configure":"Configure","configureIdentifiers":"Configure identifiers","confirmDiscardChangesBody":"Your unsaved changes will be lost if you proceed to discard the form","confirmDiscardChangesTitle":"Are you sure you want to discard these changes?","confirmIdentifierDeletionText":"Are you sure you want to remove this identifier?","contactSection":"Contact Details","createNewPatient":"Create new patient","dateOfBirthLabelText":"Date of birth","deathCauseRequired":"Cause of death is required","deathDateInFuture":"Death date cannot be in future","deathDateInputLabel":"Date of death","deathDateRequired":"Death date is required","deathdayInvalidDate":"Death date and time cannot be before the birthday","deathdayIsRequired":"Death date is required when the patient is marked as deceased.","deathdayNotInTheFuture":"","deathSection":"Death Info","deathTimeFormatInvalid":"Time format is invalid","deathTimeFormatRequired":"Time format is required","deathTimeInvalid":"Time doesn\'t match the format \'hh:mm\'","deathTimeRequired":"Death time is required","deleteIdentifierModalHeading":"Remove identifier?","deleteIdentifierModalText":" has a value of ","deleteIdentifierTooltip":"Delete","deleteRelationshipTooltipText":"Delete","demographicsSection":"Basic Info","discard":"Discard","discardModalBody":"The changes you made to this patient\'s details have not been saved. Discard changes?","dobToggleLabelText":"Date of Birth Known?","editIdentifierTooltip":"Edit","editPatientDetails":"Edit patient details","editPatientDetailsBreadcrumb":"Edit patient details","enterNonCodedCauseOfDeath":"Enter non-coded cause of death","error":"Error","errorFetchingCodedCausesOfDeath":"Error fetching coded causes of death","errorFetchingOrderedFields":"Error occured fetching ordered fields for address hierarchy","estimatedAgeInMonthsLabelText":"Estimated age in months","estimatedAgeInYearsLabelText":"Estimated age in years","familyNameLabelText":"Family Name","familyNameRequired":"Family name is required","female":"Female","fieldsWithErrors":"The following fields have errors: ","fullNameLabelText":"Full Name","genderLabelText":"Sex","genderRequired":"Gender is required","genderUnspecified":"Gender unspecified","givenNameLabelText":"First Name","givenNameRequired":"Given name is required","identifierValueRequired":"Identifier value is required","idFieldLabelText":"Identifiers","IDInstructions":"Select the identifiers you\'d like to add for this patient:","invalidEmail":"Invalid email","invalidInput":"Invalid Input","isDeadInputLabel":"Is dead","jumpTo":"Jump to","male":"Male","middleNameLabelText":"Middle Name","negativeMonths":"Estimated months cannot be negative","negativeYears":"Estimated years cannot be negative","no":"No","nonCodedCauseOfDeath":"Non-coded cause of death","nonCodedCauseOfDeathRequired":"Cause of death is required","nonsensicalYears":"Estimated years cannot be more than 140","numberInNameDubious":"Number in name is dubious","obsFieldUnknownDatatype":"Concept for obs field \'{{fieldDefinitionId}}\' has unknown datatype \'{{datatypeName}}\'","optional":"optional","optionalIdentifierLabel":"{{identifierName}} (optional)","other":"Other","patientNameKnown":"Patient\'s Name is Known?","patientRegistrationBreadcrumb":"Patient Registration","refreshOrContactAdmin":"Try refreshing the page or contact your system administrator","registerPatient":"Register patient","registerPatientSuccessSnackbarSubtitle":"The patient can now be found by searching for them using their name or ID number","registerPatientSuccessSnackbarTitle":"New Patient Created","registrationErrorSnackbarTitle":"Patient Registration Failed","relationship":"Relationship","relationshipPersonMustExist":"Related person must be an existing person","relationshipPlaceholder":"Relationship","relationshipRemovedText":"Relationship removed","relationshipsSection":"Relationships","relationshipToPatient":"Relationship to patient","relativeFullNameLabelText":"Full name","relativeNamePlaceholder":"Firstname Familyname","removeIdentifierButton":"Remove identifier","resetIdentifierTooltip":"Reset","restoreRelationshipActionButton":"Undo","searchAddress":"Search address","searchIdentifierPlaceholder":"Search identifier","searchLocationPersonAttribute":"Search location","selectAnOption":"Select an option","sexFieldLabelText":"Sex","source":"Source","submitting":"Submitting","timeFormat":"Time Format","timeOfDeathInputLabel":"Time of death (hh:mm)","unableToFetch":"Unable to fetch person attribute type - {{personattributetype}}","unknown":"Unknown","unknownPatientAttributeType":"Patient attribute type has unknown format {{personAttributeTypeFormat}}","updatePatient":"Update patient","updatePatientErrorSnackbarTitle":"Patient Details Update Failed","updatePatientSuccessSnackbarSubtitle":"The patient\'s information has been successfully updated","updatePatientSuccessSnackbarTitle":"Patient Details Updated","yearsEstimateRequired":"Estimated years required","yes":"Yes"}')}}]);
package/dist/1564.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_olaboot_esm_patient_registration_app=globalThis.webpackChunk_olaboot_esm_patient_registration_app||[]).push([["1564"],{65374:function(e){e.exports=JSON.parse('{"addPatient":"Add patient","addRelationshipButtonText":"Add Relationship","addressHeader":"Address","allFieldsRequiredText":"All fields are required unless marked optional","autoGeneratedPlaceholderText":"Auto-generated","birthdayNotInTheFuture":"Birthday cannot be in future","birthdayNotOver140YearsAgo":"Birthday cannot be more than 140 years ago","birthdayRequired":"Birthday is required","birthFieldLabelText":"Birth","cancel":"Cancel","causeOfDeathInputLabel":"Cause of death","closeOverlay":"Close overlay","codedPersonAttributeAnswerSetEmpty":"The coded person attribute field \'{{codedPersonAttributeFieldId}}\' has been defined with an answer concept set UUID \'{{answerConceptSetUuid}}\' that does not have any concept answers.","codedPersonAttributeAnswerSetInvalid":"The coded person attribute field \'{{codedPersonAttributeFieldId}}\' has been defined with an invalid answer concept set UUID \'{{answerConceptSetUuid}}\'.","codedPersonAttributeNoAnswerSet":"The person attribute field \'{{codedPersonAttributeFieldId}}\' is of type \'coded\' but has been defined without an answer concept set UUID. The \'answerConceptSetUuid\' key is required.","configure":"Configure","configureIdentifiers":"Configure identifiers","confirmDiscardChangesBody":"Your unsaved changes will be lost if you proceed to discard the form","confirmDiscardChangesTitle":"Are you sure you want to discard these changes?","confirmIdentifierDeletionText":"Are you sure you want to remove this identifier?","contactSection":"Contact Details","createNewPatient":"Create new patient","dateOfBirthLabelText":"Date of birth","deathCauseRequired":"Cause of death is required","deathDateInFuture":"Death date cannot be in future","deathDateInputLabel":"Date of death","deathDateRequired":"Death date is required","deathdayInvalidDate":"Death date and time cannot be before the birthday","deathdayIsRequired":"Death date is required when the patient is marked as deceased.","deathdayNotInTheFuture":"","deathSection":"Death Info","deathTimeFormatInvalid":"Time format is invalid","deathTimeFormatRequired":"Time format is required","deathTimeInvalid":"Time doesn\'t match the format \'hh:mm\'","deathTimeRequired":"Death time is required","deleteIdentifierModalHeading":"Remove identifier?","deleteIdentifierModalText":" has a value of ","deleteIdentifierTooltip":"Delete","deleteRelationshipTooltipText":"Delete","demographicsSection":"Basic Info","discard":"Discard","discardModalBody":"The changes you made to this patient\'s details have not been saved. Discard changes?","dobToggleLabelText":"Date of Birth Known?","editIdentifierTooltip":"Edit","editPatientDetails":"Edit patient details","editPatientDetailsBreadcrumb":"Edit patient details","enterNonCodedCauseOfDeath":"Enter non-coded cause of death","error":"Error","errorFetchingCodedCausesOfDeath":"Error fetching coded causes of death","errorFetchingOrderedFields":"Error occured fetching ordered fields for address hierarchy","estimatedAgeInMonthsLabelText":"Estimated age in months","estimatedAgeInYearsLabelText":"Estimated age in years","familyNameLabelText":"Family Name","familyNameRequired":"Family name is required","female":"Female","fieldsWithErrors":"The following fields have errors: ","fullNameLabelText":"Full Name","genderLabelText":"Sex","genderRequired":"Gender is required","genderUnspecified":"Gender unspecified","givenNameLabelText":"First Name","givenNameRequired":"Given name is required","identifierValueRequired":"Identifier value is required","idFieldLabelText":"Identifiers","IDInstructions":"Select the identifiers you\'d like to add for this patient:","invalidEmail":"Invalid email","invalidInput":"Invalid Input","isDeadInputLabel":"Is dead","jumpTo":"Jump to","male":"Male","middleNameLabelText":"Middle Name","negativeMonths":"Estimated months cannot be negative","negativeYears":"Estimated years cannot be negative","no":"No","nonCodedCauseOfDeath":"Non-coded cause of death","nonCodedCauseOfDeathRequired":"Cause of death is required","nonsensicalYears":"Estimated years cannot be more than 140","numberInNameDubious":"Number in name is dubious","obsFieldUnknownDatatype":"Concept for obs field \'{{fieldDefinitionId}}\' has unknown datatype \'{{datatypeName}}\'","optional":"optional","optionalIdentifierLabel":"{{identifierName}} (optional)","other":"Other","patientNameKnown":"Patient\'s Name is Known?","patientRegistrationBreadcrumb":"Patient Registration","refreshOrContactAdmin":"Try refreshing the page or contact your system administrator","registerPatient":"Register patient","registerPatientSuccessSnackbarSubtitle":"The patient can now be found by searching for them using their name or ID number","registerPatientSuccessSnackbarTitle":"New Patient Created","registrationErrorSnackbarTitle":"Patient Registration Failed","relationship":"Relationship","relationshipPersonMustExist":"Related person must be an existing person","relationshipPlaceholder":"Relationship","relationshipRemovedText":"Relationship removed","relationshipsSection":"Relationships","relationshipToPatient":"Relationship to patient","relativeFullNameLabelText":"Full name","relativeNamePlaceholder":"Firstname Familyname","removeIdentifierButton":"Remove identifier","resetIdentifierTooltip":"Reset","restoreRelationshipActionButton":"Undo","searchAddress":"Search address","searchIdentifierPlaceholder":"Search identifier","searchLocationPersonAttribute":"Search location","selectAnOption":"Select an option","sexFieldLabelText":"Sex","source":"Source","submitting":"Submitting","timeFormat":"Time Format","timeOfDeathInputLabel":"Time of death (hh:mm)","unableToFetch":"Unable to fetch person attribute type - {{personattributetype}}","unknown":"Unknown","unknownPatientAttributeType":"Patient attribute type has unknown format {{personAttributeTypeFormat}}","updatePatient":"Update patient","updatePatientErrorSnackbarTitle":"Patient Details Update Failed","updatePatientSuccessSnackbarSubtitle":"The patient\'s information has been successfully updated","updatePatientSuccessSnackbarTitle":"Patient Details Updated","yearsEstimateRequired":"Estimated years required","yes":"Yes"}')}}]);
package/dist/1567.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_olaboot_esm_patient_registration_app=globalThis.webpackChunk_olaboot_esm_patient_registration_app||[]).push([["1567"],{68654:function(e){e.exports=JSON.parse('{"addPatient":"Add patient","addRelationshipButtonText":"أضف علاقة","addressHeader":"العنوان","allFieldsRequiredText":"جميع الحقول مطلوبة ما لم يتم التأشير عليها بأنها اختيارية","autoGeneratedPlaceholderText":"تم إنشاؤه تلقائيًا","birthdayNotInTheFuture":"Birthday cannot be in future","birthdayNotOver140YearsAgo":"Birthday cannot be more than 140 years ago","birthdayRequired":"Birthday is required","birthFieldLabelText":"الميلاد","cancel":"إلغاء","causeOfDeathInputLabel":"Cause of death","closeOverlay":"Close overlay","codedPersonAttributeAnswerSetEmpty":"The coded person attribute field \'{{codedPersonAttributeFieldId}}\' has been defined with an answer concept set UUID \'{{answerConceptSetUuid}}\' that does not have any concept answers.","codedPersonAttributeAnswerSetInvalid":"The coded person attribute field \'{{codedPersonAttributeFieldId}}\' has been defined with an invalid answer concept set UUID \'{{answerConceptSetUuid}}\'.","codedPersonAttributeNoAnswerSet":"The person attribute field \'{{codedPersonAttributeFieldId}}\' is of type \'coded\' but has been defined without an answer concept set UUID. The \'answerConceptSetUuid\' key is required.","configure":"تكوين","configureIdentifiers":"Configure identifiers","confirmDiscardChangesBody":"Your unsaved changes will be lost if you proceed to discard the form","confirmDiscardChangesTitle":"Are you sure you want to discard these changes?","confirmIdentifierDeletionText":"Are you sure you want to remove this identifier?","contactSection":"تفاصيل الاتصال","createNewPatient":"Create new patient","dateOfBirthLabelText":"تاريخ الميلاد","deathCauseRequired":"Cause of death is required","deathDateInFuture":"Death date cannot be in future","deathDateInputLabel":"تاريخ الوفاة","deathDateRequired":"Death date is required","deathdayInvalidDate":"لا يمكن أن يكون تاريخ ووقت الوفاة قبل عيد الميلاد","deathdayIsRequired":"Death date is required when the patient is marked as deceased.","deathdayNotInTheFuture":"","deathSection":"معلومات الوفاة","deathTimeFormatInvalid":"Time format is invalid","deathTimeFormatRequired":"Time format is required","deathTimeInvalid":"Time doesn\'t match the format \'hh:mm\'","deathTimeRequired":"Death time is required","deleteIdentifierModalHeading":"Remove identifier?","deleteIdentifierModalText":" has a value of ","deleteIdentifierTooltip":"حذف","deleteRelationshipTooltipText":"حذف","demographicsSection":"معلومات أساسية","discard":"تجاهل","discardModalBody":"The changes you made to this patient\'s details have not been saved. Discard changes?","dobToggleLabelText":"هل تاريخ الميلاد معروف؟","editIdentifierTooltip":"تعديل","editPatientDetails":"تعديل تفاصيل المريض","editPatientDetailsBreadcrumb":"Edit patient details","enterNonCodedCauseOfDeath":"Enter non-coded cause of death","error":"خطأ","errorFetchingCodedCausesOfDeath":"Error fetching coded causes of death","errorFetchingOrderedFields":"حدث خطأ أثناء جلب الحقول المرتبة لتسلسل العنوان","estimatedAgeInMonthsLabelText":"العمر المقدر بالشهور","estimatedAgeInYearsLabelText":"العمر المقدر بالسنوات","familyNameLabelText":"اسم العائلة","familyNameRequired":"Family name is required","female":"أنثى","fieldsWithErrors":"The following fields have errors: ","fullNameLabelText":"الاسم الكامل","genderLabelText":"الجنس","genderRequired":"Gender is required","genderUnspecified":"Gender unspecified","givenNameLabelText":"الاسم الأول","givenNameRequired":"Given name is required","identifierValueRequired":"قيمة المعرف مطلوبة","idFieldLabelText":"المعرفات","IDInstructions":"Select the identifiers you\'d like to add for this patient:","invalidEmail":"Invalid email","invalidInput":"إدخال غير صالح","isDeadInputLabel":"Is dead","jumpTo":"اذهب إلى","male":"ذكر","middleNameLabelText":"الاسم الأوسط","negativeMonths":"Estimated months cannot be negative","negativeYears":"Estimated years cannot be negative","no":"لا","nonCodedCauseOfDeath":"Non-coded cause of death","nonCodedCauseOfDeathRequired":"Cause of death is required","nonsensicalYears":"Estimated years cannot be more than 140","numberInNameDubious":"Number in name is dubious","obsFieldUnknownDatatype":"Concept for obs field \'{{fieldDefinitionId}}\' has unknown datatype \'{{datatypeName}}\'","optional":"اختياري","optionalIdentifierLabel":"{{identifierName}} (optional)","other":"آخر","patientNameKnown":"هل اسم المريض معروف؟","patientRegistrationBreadcrumb":"Patient Registration","refreshOrContactAdmin":"Try refreshing the page or contact your system administrator","registerPatient":"تسجيل المريض","registerPatientSuccessSnackbarSubtitle":"The patient can now be found by searching for them using their name or ID number","registerPatientSuccessSnackbarTitle":"New Patient Created","registrationErrorSnackbarTitle":"Patient Registration Failed","relationship":"العلاقة","relationshipPersonMustExist":"Related person must be an existing person","relationshipPlaceholder":"العلاقة","relationshipRemovedText":"تمت إزالة العلاقة","relationshipsSection":"العلاقات","relationshipToPatient":"العلاقة بالمريض","relativeFullNameLabelText":"Full name","relativeNamePlaceholder":"الاسم الأول اسم العائلة","removeIdentifierButton":"Remove identifier","resetIdentifierTooltip":"إعادة تعيين","restoreRelationshipActionButton":"تراجع","searchAddress":"ابحث عن العنوان","searchIdentifierPlaceholder":"Search identifier","searchLocationPersonAttribute":"موقع البحث","selectAnOption":"اختر خيارًا","sexFieldLabelText":"الجنس","source":"Source","submitting":"Submitting","timeFormat":"Time Format","timeOfDeathInputLabel":"Time of death (hh:mm)","unableToFetch":"Unable to fetch person attribute type - {{personattributetype}}","unknown":"غير معروف","unknownPatientAttributeType":"Patient attribute type has unknown format {{personAttributeTypeFormat}}","updatePatient":"Update patient","updatePatientErrorSnackbarTitle":"Patient Details Update Failed","updatePatientSuccessSnackbarSubtitle":"The patient\'s information has been successfully updated","updatePatientSuccessSnackbarTitle":"Patient Details Updated","yearsEstimateRequired":"Estimated years required","yes":"نعم"}')}}]);
package/dist/1845.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_olaboot_esm_patient_registration_app=globalThis.webpackChunk_olaboot_esm_patient_registration_app||[]).push([["1845"],{19847:function(e){e.exports=JSON.parse('{"addPatient":"Add patient","addRelationshipButtonText":"Add Relationship","addressHeader":"Address","allFieldsRequiredText":"All fields are required unless marked optional","autoGeneratedPlaceholderText":"Auto-generated","birthdayNotInTheFuture":"Birthday cannot be in future","birthdayNotOver140YearsAgo":"Birthday cannot be more than 140 years ago","birthdayRequired":"Birthday is required","birthFieldLabelText":"Birth","cancel":"Cancel","causeOfDeathInputLabel":"Cause of death","closeOverlay":"Close overlay","codedPersonAttributeAnswerSetEmpty":"The coded person attribute field \'{{codedPersonAttributeFieldId}}\' has been defined with an answer concept set UUID \'{{answerConceptSetUuid}}\' that does not have any concept answers.","codedPersonAttributeAnswerSetInvalid":"The coded person attribute field \'{{codedPersonAttributeFieldId}}\' has been defined with an invalid answer concept set UUID \'{{answerConceptSetUuid}}\'.","codedPersonAttributeNoAnswerSet":"The person attribute field \'{{codedPersonAttributeFieldId}}\' is of type \'coded\' but has been defined without an answer concept set UUID. The \'answerConceptSetUuid\' key is required.","configure":"Configure","configureIdentifiers":"Configure identifiers","confirmDiscardChangesBody":"Your unsaved changes will be lost if you proceed to discard the form","confirmDiscardChangesTitle":"Are you sure you want to discard these changes?","confirmIdentifierDeletionText":"Are you sure you want to remove this identifier?","contactSection":"Contact Details","createNewPatient":"Create new patient","dateOfBirthLabelText":"Date of birth","deathCauseRequired":"Cause of death is required","deathDateInFuture":"Death date cannot be in future","deathDateInputLabel":"Date of death","deathDateRequired":"Death date is required","deathdayInvalidDate":"Death date and time cannot be before the birthday","deathdayIsRequired":"Death date is required when the patient is marked as deceased.","deathdayNotInTheFuture":"","deathSection":"Death Info","deathTimeFormatInvalid":"Time format is invalid","deathTimeFormatRequired":"Time format is required","deathTimeInvalid":"Time doesn\'t match the format \'hh:mm\'","deathTimeRequired":"Death time is required","deleteIdentifierModalHeading":"Remove identifier?","deleteIdentifierModalText":" has a value of ","deleteIdentifierTooltip":"Delete","deleteRelationshipTooltipText":"Delete","demographicsSection":"Basic Info","discard":"Discard","discardModalBody":"The changes you made to this patient\'s details have not been saved. Discard changes?","dobToggleLabelText":"Date of Birth Known?","editIdentifierTooltip":"Edit","editPatientDetails":"Edit patient details","editPatientDetailsBreadcrumb":"Edit patient details","enterNonCodedCauseOfDeath":"Enter non-coded cause of death","error":"Error","errorFetchingCodedCausesOfDeath":"Error fetching coded causes of death","errorFetchingOrderedFields":"Error occured fetching ordered fields for address hierarchy","estimatedAgeInMonthsLabelText":"Estimated age in months","estimatedAgeInYearsLabelText":"Estimated age in years","familyNameLabelText":"Family Name","familyNameRequired":"Family name is required","female":"Female","fieldsWithErrors":"The following fields have errors: ","fullNameLabelText":"Full Name","genderLabelText":"Sex","genderRequired":"Gender is required","genderUnspecified":"Gender unspecified","givenNameLabelText":"First Name","givenNameRequired":"Given name is required","identifierValueRequired":"Identifier value is required","idFieldLabelText":"Identifiers","IDInstructions":"Select the identifiers you\'d like to add for this patient:","invalidEmail":"Invalid email","invalidInput":"Invalid Input","isDeadInputLabel":"Is dead","jumpTo":"Jump to","male":"Male","middleNameLabelText":"Middle Name","negativeMonths":"Estimated months cannot be negative","negativeYears":"Estimated years cannot be negative","no":"No","nonCodedCauseOfDeath":"Non-coded cause of death","nonCodedCauseOfDeathRequired":"Cause of death is required","nonsensicalYears":"Estimated years cannot be more than 140","numberInNameDubious":"Number in name is dubious","obsFieldUnknownDatatype":"Concept for obs field \'{{fieldDefinitionId}}\' has unknown datatype \'{{datatypeName}}\'","optional":"optional","optionalIdentifierLabel":"{{identifierName}} (optional)","other":"Other","patientNameKnown":"Patient\'s Name is Known?","patientRegistrationBreadcrumb":"Patient Registration","refreshOrContactAdmin":"Try refreshing the page or contact your system administrator","registerPatient":"Register patient","registerPatientSuccessSnackbarSubtitle":"The patient can now be found by searching for them using their name or ID number","registerPatientSuccessSnackbarTitle":"New Patient Created","registrationErrorSnackbarTitle":"Patient Registration Failed","relationship":"Relationship","relationshipPersonMustExist":"Related person must be an existing person","relationshipPlaceholder":"Relationship","relationshipRemovedText":"Relationship removed","relationshipsSection":"Relationships","relationshipToPatient":"Relationship to patient","relativeFullNameLabelText":"Full name","relativeNamePlaceholder":"Firstname Familyname","removeIdentifierButton":"Remove identifier","resetIdentifierTooltip":"Reset","restoreRelationshipActionButton":"Undo","searchAddress":"Search address","searchIdentifierPlaceholder":"Search identifier","searchLocationPersonAttribute":"Search location","selectAnOption":"Select an option","sexFieldLabelText":"Sex","source":"Source","submitting":"Submitting","timeFormat":"Time Format","timeOfDeathInputLabel":"Time of death (hh:mm)","unableToFetch":"Unable to fetch person attribute type - {{personattributetype}}","unknown":"Unknown","unknownPatientAttributeType":"Patient attribute type has unknown format {{personAttributeTypeFormat}}","updatePatient":"Update patient","updatePatientErrorSnackbarTitle":"Patient Details Update Failed","updatePatientSuccessSnackbarSubtitle":"The patient\'s information has been successfully updated","updatePatientSuccessSnackbarTitle":"Patient Details Updated","yearsEstimateRequired":"Estimated years required","yes":"Yes"}')}}]);
package/dist/1953.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_olaboot_esm_patient_registration_app=globalThis.webpackChunk_olaboot_esm_patient_registration_app||[]).push([["1953"],{6071:function(e){e.exports=JSON.parse('{"addPatient":"Add patient","addRelationshipButtonText":"Add Relationship","addressHeader":"Address","allFieldsRequiredText":"All fields are required unless marked optional","autoGeneratedPlaceholderText":"Auto-generated","birthdayNotInTheFuture":"Birthday cannot be in future","birthdayNotOver140YearsAgo":"Birthday cannot be more than 140 years ago","birthdayRequired":"Birthday is required","birthFieldLabelText":"Birth","cancel":"Cancel","causeOfDeathInputLabel":"Cause of death","closeOverlay":"Close overlay","codedPersonAttributeAnswerSetEmpty":"The coded person attribute field \'{{codedPersonAttributeFieldId}}\' has been defined with an answer concept set UUID \'{{answerConceptSetUuid}}\' that does not have any concept answers.","codedPersonAttributeAnswerSetInvalid":"The coded person attribute field \'{{codedPersonAttributeFieldId}}\' has been defined with an invalid answer concept set UUID \'{{answerConceptSetUuid}}\'.","codedPersonAttributeNoAnswerSet":"The person attribute field \'{{codedPersonAttributeFieldId}}\' is of type \'coded\' but has been defined without an answer concept set UUID. The \'answerConceptSetUuid\' key is required.","configure":"Configure","configureIdentifiers":"Configure identifiers","confirmDiscardChangesBody":"Your unsaved changes will be lost if you proceed to discard the form","confirmDiscardChangesTitle":"Are you sure you want to discard these changes?","confirmIdentifierDeletionText":"Are you sure you want to remove this identifier?","contactSection":"Contact Details","createNewPatient":"Create new patient","dateOfBirthLabelText":"Date of birth","deathCauseRequired":"Cause of death is required","deathDateInFuture":"Death date cannot be in future","deathDateInputLabel":"Date of death","deathDateRequired":"Death date is required","deathdayInvalidDate":"Death date and time cannot be before the birthday","deathdayIsRequired":"Death date is required when the patient is marked as deceased.","deathdayNotInTheFuture":"","deathSection":"Death Info","deathTimeFormatInvalid":"Time format is invalid","deathTimeFormatRequired":"Time format is required","deathTimeInvalid":"Time doesn\'t match the format \'hh:mm\'","deathTimeRequired":"Death time is required","deleteIdentifierModalHeading":"Remove identifier?","deleteIdentifierModalText":" has a value of ","deleteIdentifierTooltip":"Delete","deleteRelationshipTooltipText":"Delete","demographicsSection":"Basic Info","discard":"Discard","discardModalBody":"The changes you made to this patient\'s details have not been saved. Discard changes?","dobToggleLabelText":"Date of Birth Known?","editIdentifierTooltip":"Edit","editPatientDetails":"Edit patient details","editPatientDetailsBreadcrumb":"Edit patient details","enterNonCodedCauseOfDeath":"Enter non-coded cause of death","error":"Error","errorFetchingCodedCausesOfDeath":"Error fetching coded causes of death","errorFetchingOrderedFields":"Error occured fetching ordered fields for address hierarchy","estimatedAgeInMonthsLabelText":"Estimated age in months","estimatedAgeInYearsLabelText":"Estimated age in years","familyNameLabelText":"Family Name","familyNameRequired":"Family name is required","female":"Female","fieldsWithErrors":"The following fields have errors: ","fullNameLabelText":"Full Name","genderLabelText":"Sex","genderRequired":"Gender is required","genderUnspecified":"Gender unspecified","givenNameLabelText":"First Name","givenNameRequired":"Given name is required","identifierValueRequired":"Identifier value is required","idFieldLabelText":"Identifiers","IDInstructions":"Select the identifiers you\'d like to add for this patient:","invalidEmail":"Invalid email","invalidInput":"Invalid Input","isDeadInputLabel":"Is dead","jumpTo":"Jump to","male":"Male","middleNameLabelText":"Middle Name","negativeMonths":"Estimated months cannot be negative","negativeYears":"Estimated years cannot be negative","no":"No","nonCodedCauseOfDeath":"Non-coded cause of death","nonCodedCauseOfDeathRequired":"Cause of death is required","nonsensicalYears":"Estimated years cannot be more than 140","numberInNameDubious":"Number in name is dubious","obsFieldUnknownDatatype":"Concept for obs field \'{{fieldDefinitionId}}\' has unknown datatype \'{{datatypeName}}\'","optional":"optional","optionalIdentifierLabel":"{{identifierName}} (optional)","other":"Other","patientNameKnown":"Patient\'s Name is Known?","patientRegistrationBreadcrumb":"Patient Registration","refreshOrContactAdmin":"Try refreshing the page or contact your system administrator","registerPatient":"Register patient","registerPatientSuccessSnackbarSubtitle":"The patient can now be found by searching for them using their name or ID number","registerPatientSuccessSnackbarTitle":"New Patient Created","registrationErrorSnackbarTitle":"Patient Registration Failed","relationship":"Relationship","relationshipPersonMustExist":"Related person must be an existing person","relationshipPlaceholder":"Relationship","relationshipRemovedText":"Relationship removed","relationshipsSection":"Relationships","relationshipToPatient":"Relationship to patient","relativeFullNameLabelText":"Full name","relativeNamePlaceholder":"Firstname Familyname","removeIdentifierButton":"Remove identifier","resetIdentifierTooltip":"Reset","restoreRelationshipActionButton":"Undo","searchAddress":"Search address","searchIdentifierPlaceholder":"Search identifier","searchLocationPersonAttribute":"Search location","selectAnOption":"Select an option","sexFieldLabelText":"Sex","source":"Source","submitting":"Submitting","timeFormat":"Time Format","timeOfDeathInputLabel":"Time of death (hh:mm)","unableToFetch":"Unable to fetch person attribute type - {{personattributetype}}","unknown":"Unknown","unknownPatientAttributeType":"Patient attribute type has unknown format {{personAttributeTypeFormat}}","updatePatient":"Update patient","updatePatientErrorSnackbarTitle":"Patient Details Update Failed","updatePatientSuccessSnackbarSubtitle":"The patient\'s information has been successfully updated","updatePatientSuccessSnackbarTitle":"Patient Details Updated","yearsEstimateRequired":"Estimated years required","yes":"Yes"}')}}]);