@openmrs/ngx-formentry 3.2.1-pre.275 → 3.2.1-pre.276

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 (50) hide show
  1. package/package.json +5 -1
  2. package/src/app/adult-1.4.json +6858 -0
  3. package/src/app/adult-1.6.json +8082 -0
  4. package/src/app/adult.json +5700 -0
  5. package/src/app/app.component.html +25 -0
  6. package/src/app/app.component.spec.ts +23 -0
  7. package/src/app/app.component.ts +414 -0
  8. package/src/app/app.module.ts +24 -0
  9. package/src/app/mock/mock-form.ts +101 -0
  10. package/src/app/mock/mock-obs.ts +440 -0
  11. package/src/app/mock/mock-translations.ts +73 -0
  12. package/src/app/mock/obs.json +4188 -0
  13. package/src/app/mock/orders.json +338 -0
  14. package/src/app/mock/schema/adult-return.json +72 -0
  15. package/src/app/mock/schema/compiled-adult-return.json +706 -0
  16. package/src/app/mock/schema/component_art.json +1705 -0
  17. package/src/app/mock/schema/component_hospitalization.json +133 -0
  18. package/src/app/mock/schema/component_preclinic-review.json +480 -0
  19. package/src/app/ncd-registration-1.0.json +456 -0
  20. package/src/app/translate/json-loader.ts +10 -0
  21. package/src/app/translate/translate.module.ts +23 -0
  22. package/src/assets/.gitkeep +0 -0
  23. package/src/assets/carbon.select.theme.css +356 -0
  24. package/src/environments/environment.prod.ts +3 -0
  25. package/src/environments/environment.ts +15 -0
  26. package/src/favicon.ico +0 -0
  27. package/src/index.html +23 -0
  28. package/src/karma.conf.js +37 -0
  29. package/src/main.ts +13 -0
  30. package/src/polyfills.ts +68 -0
  31. package/src/styles.scss +8 -0
  32. package/src/test.ts +23 -0
  33. package/src/translations/en.json +53 -0
  34. package/src/translations/fr.json +53 -0
  35. package/src/tsconfig.app.json +13 -0
  36. package/src/tsconfig.spec.json +9 -0
  37. package/src/tslint.json +9 -0
  38. package/src/typings.d.ts +4 -0
  39. package/.editorconfig +0 -13
  40. package/.eslintrc.json +0 -45
  41. package/.prettierignore +0 -40
  42. package/.prettierrc +0 -6
  43. package/.turbo/turbo-build:lib.log +0 -37
  44. package/.yarn/plugins/@yarnpkg/plugin-version.cjs +0 -550
  45. package/angular.json +0 -164
  46. package/proxy.conf.json +0 -6
  47. package/scripts/build.sh +0 -2
  48. package/tsconfig.json +0 -29
  49. package/turbo.json +0 -18
  50. /package/{.yarn/versions/6b8f5374.yml → src/app/app.component.css} +0 -0
@@ -0,0 +1,133 @@
1
+ {
2
+ "name": "component_hospitalization",
3
+ "uuid": "xxxx",
4
+ "processor": "EncounterFormProcessor",
5
+ "pages": [
6
+ {
7
+ "label": "Hospitalization",
8
+ "sections": [
9
+ {
10
+ "label": "Hospitalization History",
11
+ "questions": [
12
+ {
13
+ "type": "obsGroup",
14
+ "label": "Recent hospitalizations",
15
+ "questionOptions": {
16
+ "rendering": "group",
17
+ "concept": "a8a003a6-1350-11df-a1f1-0026b9348838"
18
+ },
19
+ "questions": [
20
+ {
21
+ "label": "Was the patient hospitalized since last visit?",
22
+ "id": "wasHospitalized",
23
+ "questionOptions": {
24
+ "concept": "a898c56e-1350-11df-a1f1-0026b9348838",
25
+ "answers": [
26
+ {
27
+ "concept": "a899b35c-1350-11df-a1f1-0026b9348838",
28
+ "label": "Yes"
29
+ },
30
+ {
31
+ "concept": "a899b42e-1350-11df-a1f1-0026b9348838",
32
+ "label": "No"
33
+ }
34
+ ],
35
+ "rendering": "select"
36
+ },
37
+ "type": "obs",
38
+ "validators": []
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "type": "obsGroup",
44
+ "label": "If yes reason for hospitalization:",
45
+ "questionOptions": {
46
+ "concept": "a8a003a6-1350-11df-a1f1-0026b9348838",
47
+ "rendering": "repeating"
48
+ },
49
+ "questions": [
50
+ {
51
+ "label": "Reason for hospitalization:",
52
+ "questionOptions": {
53
+ "concept": "a8a07a48-1350-11df-a1f1-0026b9348838",
54
+ "rendering": "problem"
55
+ },
56
+ "type": "obs",
57
+ "validators": [
58
+ {
59
+ "type": "conditionalAnswered",
60
+ "message": "Providing diagnosis but didn't answer that patient was hospitalized in question 11a",
61
+ "referenceQuestionId": "wasHospitalized",
62
+ "referenceQuestionAnswers": [
63
+ "a899b35c-1350-11df-a1f1-0026b9348838"
64
+ ]
65
+ }
66
+ ]
67
+ }
68
+ ]
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "label": "Past Diagnosis",
74
+ "questions": [
75
+ {
76
+ "label": "Have you ever been diagnosed with these conditions:?",
77
+ "id": "pastDiagnosis",
78
+ "questionOptions": {
79
+ "concept": "b2343ae7-e435-4bc7-9615-74322d5201e4",
80
+ "answers": [
81
+ {
82
+ "concept": "7ccac7e4-f399-48b9-b2c7-944b98ec53b1",
83
+ "label": "Sickle Cell"
84
+ },
85
+ {
86
+ "concept": "a893436e-1350-11df-a1f1-0026b9348838",
87
+ "label": "Diabetes"
88
+ },
89
+ {
90
+ "concept": "a877ca58-1350-11df-a1f1-0026b9348838",
91
+ "label": "Asthma"
92
+ },
93
+ {
94
+ "concept": "a890b810-1350-11df-a1f1-0026b9348838",
95
+ "label": "Mental illness"
96
+ },
97
+ {
98
+ "concept": "acdceb9b-4b84-4e9c-bba4-eaf486b3b4b5",
99
+ "label": "Cancer"
100
+ },
101
+ {
102
+ "concept": "a8933270-1350-11df-a1f1-0026b9348838",
103
+ "label": "Epilepsy"
104
+ },
105
+ {
106
+ "concept": "a8936bb4-1350-11df-a1f1-0026b9348838",
107
+ "label": "RHD"
108
+ },
109
+ {
110
+ "concept": "a8aaf3e2-1350-11df-a1f1-0026b9348838",
111
+ "label": "Other"
112
+ }
113
+ ],
114
+ "rendering": "select"
115
+ },
116
+ "type": "obs",
117
+ "validators": []
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ "label": "Other(specify):",
123
+ "type": "obs",
124
+ "questionOptions": {
125
+ "concept": "a8a06fc6-1350-11df-a1f1-0026b9348838",
126
+ "rendering": "text"
127
+ },
128
+ "validators": []
129
+ }
130
+ ]
131
+ }
132
+ ]
133
+ }
@@ -0,0 +1,480 @@
1
+ {
2
+ "name": "component_preclinic-review",
3
+ "uuid": "xxxx",
4
+ "processor": "EncounterFormProcessor",
5
+ "pages": [
6
+ {
7
+ "label": "Pre-clinic Review",
8
+ "sections": [
9
+ {
10
+ "label": "Pre-clinic Review",
11
+ "isExpanded": "true",
12
+ "questions": [
13
+ {
14
+ "type": "obsGroup",
15
+ "label": "Transfer in from other centre, detailed",
16
+ "questionOptions": {
17
+ "concept": "0f8b7f4e-1656-46b7-bc93-d1fe4f193f5d",
18
+ "rendering": "group"
19
+ },
20
+ "questions": [
21
+ {
22
+ "label": "Transfer in from other centre:",
23
+ "id": "transferIn",
24
+ "questionOptions": {
25
+ "rendering": "select",
26
+ "concept": "35ed8aad-d6fa-429e-961a-c877e1ad4953",
27
+ "answers": [
28
+ {
29
+ "concept": "a89c2f42-1350-11df-a1f1-0026b9348838",
30
+ "label": "Ampath"
31
+ },
32
+ {
33
+ "concept": "a89c301e-1350-11df-a1f1-0026b9348838",
34
+ "label": "Non-Ampath"
35
+ }
36
+ ]
37
+ },
38
+ "type": "obs",
39
+ "validators": []
40
+ },
41
+ {
42
+ "type": "personAttribute",
43
+ "label": "If transfer in from other AMPATH clinic (specify):",
44
+ "id": "transfered_in_to_ampath",
45
+ "required": "false",
46
+ "default": "",
47
+ "questionOptions": {
48
+ "rendering": "ui-select-extended",
49
+ "attributeType": "7ef225db-94db-4e40-9dd8-fb121d9dc370"
50
+ },
51
+ "hide": {
52
+ "hideWhenExpression": "transferIn !== 'a89c2f42-1350-11df-a1f1-0026b9348838'"
53
+ }
54
+ },
55
+ {
56
+ "type": "obs",
57
+ "label": "If non-Ampath, specify:",
58
+ "id": "nonAmpathSpecify",
59
+ "questionOptions": {
60
+ "concept": "a8a06fc6-1350-11df-a1f1-0026b9348838",
61
+ "rendering": "text"
62
+ },
63
+ "validators": [],
64
+ "hide": {
65
+ "hideWhenExpression": "transferIn !== 'a89c301e-1350-11df-a1f1-0026b9348838'"
66
+ }
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "label": "Was this visit scheduled?",
72
+ "id": "scheduledVisit",
73
+ "questionOptions": {
74
+ "rendering": "select",
75
+ "concept": "a89ff9a6-1350-11df-a1f1-0026b9348838",
76
+ "answers": [
77
+ {
78
+ "concept": "a89b6440-1350-11df-a1f1-0026b9348838",
79
+ "label": "Scheduled visit"
80
+ },
81
+ {
82
+ "concept": "a89ff816-1350-11df-a1f1-0026b9348838",
83
+ "label": "Unscheduled Visit Early"
84
+ },
85
+ {
86
+ "concept": "a89ff8de-1350-11df-a1f1-0026b9348838",
87
+ "label": "Unscheduled Visit Late"
88
+ }
89
+ ]
90
+ },
91
+ "type": "obs",
92
+ "validators": []
93
+ },
94
+ {
95
+ "label": "If Unscheduled, actual scheduled date",
96
+ "id": "actualDate",
97
+ "type": "obs",
98
+ "required": {
99
+ "type": "conditionalRequired",
100
+ "message": "Patient visit marked as unscheduled. Please provide the scheduled date.",
101
+ "referenceQuestionId": "scheduledVisit",
102
+ "referenceQuestionAnswers": [
103
+ "a89ff816-1350-11df-a1f1-0026b9348838",
104
+ "a89ff8de-1350-11df-a1f1-0026b9348838"
105
+ ]
106
+ },
107
+ "questionOptions": {
108
+ "rendering": "date",
109
+ "concept": "dc1942b2-5e50-4adc-949d-ad6c905f054e"
110
+ },
111
+ "validators": [
112
+ {
113
+ "type": "date",
114
+ "allowFutureDates": "true"
115
+ },
116
+ {
117
+ "type": "js_expression",
118
+ "failsWhenExpression": "!isEmpty(scheduledVisit) && arrayContains(['a89ff816-1350-11df-a1f1-0026b9348838','a89ff8de-1350-11df-a1f1-0026b9348838'], scheduledVisit) && isEmpty(myValue)",
119
+ "message": "Patient visit marked as unscheduled. Please provide the scheduled date."
120
+ }
121
+ ],
122
+ "hide": {
123
+ "hideWhenExpression": "!arrayContains(['a89ff816-1350-11df-a1f1-0026b9348838','a89ff8de-1350-11df-a1f1-0026b9348838'], scheduledVisit)"
124
+ }
125
+ },
126
+ {
127
+ "label": "Patient covered by NHIF:",
128
+ "questionOptions": {
129
+ "rendering": "select",
130
+ "concept": "a8b02524-1350-11df-a1f1-0026b9348838",
131
+ "answers": [
132
+ {
133
+ "concept": "8b715fed-97f6-4e38-8f6a-c167a42f8923",
134
+ "label": "Yes"
135
+ },
136
+ {
137
+ "concept": "a899e0ac-1350-11df-a1f1-0026b9348838",
138
+ "label": "No"
139
+ }
140
+ ]
141
+ },
142
+ "type": "obs",
143
+ "validators": []
144
+ }
145
+ ]
146
+ },
147
+ {
148
+ "label": "Social History",
149
+ "questions": [
150
+ {
151
+ "label": "Civil status:",
152
+ "id": "civil_status_question",
153
+ "type": "obs",
154
+ "questionOptions": {
155
+ "rendering": "select",
156
+ "concept": "a899a9f2-1350-11df-a1f1-0026b9348838",
157
+ "answers": [
158
+ {
159
+ "concept": "a899af10-1350-11df-a1f1-0026b9348838",
160
+ "label": "Cohabitating"
161
+ },
162
+ {
163
+ "concept": "a899ad58-1350-11df-a1f1-0026b9348838",
164
+ "label": "Divorced"
165
+ },
166
+ {
167
+ "concept": "a8aa76b0-1350-11df-a1f1-0026b9348838",
168
+ "label": "Married monogamous"
169
+ },
170
+ {
171
+ "concept": "a8b03712-1350-11df-a1f1-0026b9348838",
172
+ "label": "Married polygamous"
173
+ },
174
+ {
175
+ "concept": "a899aba0-1350-11df-a1f1-0026b9348838",
176
+ "label": "Separated"
177
+ },
178
+ {
179
+ "concept": "a899ac7c-1350-11df-a1f1-0026b9348838",
180
+ "label": "Single"
181
+ },
182
+ {
183
+ "concept": "a899ae34-1350-11df-a1f1-0026b9348838",
184
+ "label": "Widowed"
185
+ }
186
+ ]
187
+ },
188
+ "validators": []
189
+ },
190
+ {
191
+ "label": "Discordant couple:",
192
+ "questionOptions": {
193
+ "answers": [
194
+ {
195
+ "concept": "a899b35c-1350-11df-a1f1-0026b9348838",
196
+ "label": "Yes"
197
+ },
198
+ {
199
+ "concept": "a899b42e-1350-11df-a1f1-0026b9348838",
200
+ "label": "No"
201
+ },
202
+ {
203
+ "concept": "a899b50a-1350-11df-a1f1-0026b9348838",
204
+ "label": "Unknown"
205
+ },
206
+ {
207
+ "concept": "a89ad3a4-1350-11df-a1f1-0026b9348838",
208
+ "label": "N/A"
209
+ }
210
+ ],
211
+ "concept": "a8af49d8-1350-11df-a1f1-0026b9348838",
212
+ "rendering": "select"
213
+ },
214
+ "type": "obs",
215
+ "validators": []
216
+ }
217
+ ]
218
+ },
219
+ {
220
+ "label": "Prevention With Positives",
221
+ "questions": [
222
+ {
223
+ "label": "Prevention with positives: At risk population:",
224
+ "required": "true",
225
+ "questionOptions": {
226
+ "rendering": "select",
227
+ "concept": "93aa3f1d-1c39-4196-b5e6-8adc916cd5d6",
228
+ "answers": [
229
+ {
230
+ "concept": "5da55301-e28e-4fdf-8b64-02622dedc8b0",
231
+ "label": "Client of sex worker"
232
+ },
233
+ {
234
+ "concept": "a89ff438-1350-11df-a1f1-0026b9348838",
235
+ "label": "Commercial sex worker"
236
+ },
237
+ {
238
+ "concept": "a8af49d8-1350-11df-a1f1-0026b9348838",
239
+ "label": "Discordant couple"
240
+ },
241
+ {
242
+ "concept": "a890d57a-1350-11df-a1f1-0026b9348838",
243
+ "label": "IV drug use"
244
+ },
245
+ {
246
+ "concept": "e19c35f0-12f0-46c2-94ea-97050f37b811",
247
+ "label": "MSM"
248
+ },
249
+ {
250
+ "concept": "a89ad3a4-1350-11df-a1f1-0026b9348838",
251
+ "label": "N/A"
252
+ }
253
+ ]
254
+ },
255
+ "type": "obs",
256
+ "validators": []
257
+ },
258
+ {
259
+ "label": "Prevention with positives: PWP services:",
260
+ "required": "true",
261
+ "questionOptions": {
262
+ "rendering": "select",
263
+ "concept": "9ce5dbf0-a141-4ad8-8c9d-cd2bf84fe72b",
264
+ "answers": [
265
+ {
266
+ "concept": "f0a280e8-eb88-41a8-837a-f9949ed1b9cd",
267
+ "label": "Condom promotion/provision"
268
+ },
269
+ {
270
+ "concept": "bf51f71e-937c-4da5-ae07-654acf59f5bb",
271
+ "label": "Couple counseling"
272
+ },
273
+ {
274
+ "concept": "91f43249-73c7-427c-8300-2038fc0d6be8",
275
+ "label": "Needle exchange"
276
+ },
277
+ {
278
+ "concept": "05656545-86be-4605-9527-34fb580534b1",
279
+ "label": "Targeted risk reduction"
280
+ },
281
+ {
282
+ "concept": "a89ad3a4-1350-11df-a1f1-0026b9348838",
283
+ "label": "N/A"
284
+ }
285
+ ]
286
+ },
287
+ "type": "obs",
288
+ "validators": []
289
+ }
290
+ ]
291
+ },
292
+ {
293
+ "label": "Enrollment History",
294
+ "questions": [
295
+ {
296
+ "label": "Ampath Catchment Area:",
297
+ "questionOptions": {
298
+ "concept": "65c5071a-0cf8-49d4-99d1-5f7da6ef6503",
299
+ "answers": [
300
+ {
301
+ "concept": "a899b50a-1350-11df-a1f1-0026b9348838",
302
+ "label": "Unknown"
303
+ },
304
+ {
305
+ "concept": "5066b630-842b-4105-a66d-74f8aa50aacb",
306
+ "label": "In Ampath catchment area"
307
+ },
308
+ {
309
+ "concept": "83df5f26-f97a-4cda-9c05-d0bdc6e4ebee",
310
+ "label": "Out of Ampath catchment area"
311
+ }
312
+ ],
313
+ "rendering": "select"
314
+ },
315
+ "type": "obs",
316
+ "validators": []
317
+ },
318
+ {
319
+ "label": "Source of prior HIV care and treatment:",
320
+ "questionOptions": {
321
+ "concept": "42ad95d4-ad13-49cb-a870-d3208e339e36",
322
+ "answers": [
323
+ {
324
+ "concept": "a899e0ac-1350-11df-a1f1-0026b9348838",
325
+ "label": "None"
326
+ },
327
+ {
328
+ "concept": "a8aaf3e2-1350-11df-a1f1-0026b9348838",
329
+ "label": "Other"
330
+ }
331
+ ],
332
+ "rendering": "select"
333
+ },
334
+ "type": "obs",
335
+ "validators": []
336
+ },
337
+ {
338
+ "label": "Point of HIV Testing:",
339
+ "questionOptions": {
340
+ "concept": "a8a17e48-1350-11df-a1f1-0026b9348838",
341
+ "answers": [
342
+ {
343
+ "concept": "a89fbedc-1350-11df-a1f1-0026b9348838",
344
+ "label": "pMTCT"
345
+ },
346
+ {
347
+ "concept": "a8a17b3c-1350-11df-a1f1-0026b9348838",
348
+ "label": "VCT"
349
+ },
350
+ {
351
+ "concept": "f6dd6114-a212-4187-b76c-5b6fd8a9e7ba",
352
+ "label": "PHCT"
353
+ },
354
+ {
355
+ "concept": "a8a359a2-1350-11df-a1f1-0026b9348838",
356
+ "label": "DTC/PITC"
357
+ },
358
+ {
359
+ "concept": "a890a96a-1350-11df-a1f1-0026b9348838",
360
+ "label": "TB Clinic"
361
+ },
362
+ {
363
+ "concept": "ff3243bf-05f6-426d-aa49-969034962e45",
364
+ "label": "Adult Inpatient"
365
+ },
366
+ {
367
+ "concept": "3e5ad07b-2ced-4925-8264-cc4d8d1438d4",
368
+ "label": "Pediatric Inpatient"
369
+ },
370
+ {
371
+ "concept": "a8a17d80-1350-11df-a1f1-0026b9348838",
372
+ "label": "MCH"
373
+ },
374
+ {
375
+ "concept": "a8a09ac8-1350-11df-a1f1-0026b9348838",
376
+ "label": "OPD"
377
+ },
378
+ {
379
+ "concept": "a8934292-1350-11df-a1f1-0026b9348838",
380
+ "label": "STI"
381
+ },
382
+ {
383
+ "concept": "3ddd3de4-dbf1-4ae9-8caf-aca6383bfd5e",
384
+ "label": "OSCAR"
385
+ },
386
+ {
387
+ "concept": "7d2c77f9-091b-41d7-8608-aff8985fd708",
388
+ "label": "Tumaini"
389
+ },
390
+ {
391
+ "concept": "a8aaf3e2-1350-11df-a1f1-0026b9348838",
392
+ "label": "Other"
393
+ }
394
+ ],
395
+ "rendering": "select"
396
+ },
397
+ "type": "obs",
398
+ "validators": []
399
+ },
400
+ {
401
+ "label": "Date Confirmed HIV Positive:",
402
+ "id": "dateConfHiv+",
403
+ "questionOptions": {
404
+ "concept": "6d557eec-82f7-4840-a865-a02ac69d93a5",
405
+ "rendering": "date"
406
+ },
407
+ "type": "obs",
408
+ "validators": [
409
+ {
410
+ "type": "date",
411
+ "allowFutureDates": "false"
412
+ }
413
+ ]
414
+ },
415
+ {
416
+ "label": "Date enrolled in HIV Care:",
417
+ "questionOptions": {
418
+ "concept": "edda0fe9-73ba-4dbe-8739-dd8d0a8f1700",
419
+ "rendering": "date"
420
+ },
421
+ "type": "obs",
422
+ "validators": [
423
+ {
424
+ "type": "date",
425
+ "allowFutureDates": "false"
426
+ }
427
+ ]
428
+ },
429
+ {
430
+ "label": "Where was the test done?",
431
+ "id": "testDone",
432
+ "questionOptions": {
433
+ "concept": "12fa8c7d-0e51-42d0-a381-4db7d34b1fcb",
434
+ "rendering": "text"
435
+ },
436
+ "type": "obs",
437
+ "validators": []
438
+ },
439
+ {
440
+ "label": "WHO stage at Enrollment",
441
+ "id": "whoStageEnrol",
442
+ "type": "obs",
443
+ "questionOptions": {
444
+ "concept": "1ea9d6ba-2084-4bc0-97a6-46fe677d40e5",
445
+ "answers": [
446
+ {
447
+ "label": "1",
448
+ "concept": "a89b33d0-1350-11df-a1f1-0026b9348838"
449
+ },
450
+ {
451
+ "label": "2",
452
+ "concept": "a89b34ac-1350-11df-a1f1-0026b9348838"
453
+ },
454
+ {
455
+ "label": "3",
456
+ "concept": "a89b3588-1350-11df-a1f1-0026b9348838"
457
+ },
458
+ {
459
+ "label": "4",
460
+ "concept": "a89b3664-1350-11df-a1f1-0026b9348838"
461
+ }
462
+ ],
463
+ "rendering": "select"
464
+ }
465
+ },
466
+ {
467
+ "label": "Transfer in District:",
468
+ "questionOptions": {
469
+ "concept": "10bca44a-930f-46ae-b686-63ddb36a713f",
470
+ "rendering": "text"
471
+ },
472
+ "type": "obs",
473
+ "validators": []
474
+ }
475
+ ]
476
+ }
477
+ ]
478
+ }
479
+ ]
480
+ }