@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,456 @@
1
+ {
2
+ "name": "Adult NCD Registration",
3
+ "description": "Adult NCD Registration Form",
4
+ "version": "1",
5
+ "published": true,
6
+ "retired": false,
7
+ "encounter": "Consultation",
8
+ "processor": "EncounterFormProcessor",
9
+ "uuid": "xxxx",
10
+ "referencedForms": [],
11
+ "pages": [
12
+ {
13
+ "label": "General",
14
+ "sections": [
15
+ {
16
+ "isExpanded": "true",
17
+ "label": "General",
18
+ "questions": [
19
+ {
20
+ "id": "referralType",
21
+ "questionOptions": {
22
+ "rendering": "radio",
23
+ "concept": "fd588078-9286-46ea-b133-36aab1b025ec",
24
+ "answers": [
25
+ {
26
+ "concept": "37811074-14d1-41f3-bda9-e3422f6e22b0"
27
+ },
28
+ {
29
+ "concept": "989a3c74-141f-4dcf-9716-d4d3e2eaacdb"
30
+ }
31
+ ],
32
+ "allowUnselect": true
33
+ },
34
+ "type": "obs",
35
+ "validators": []
36
+ }
37
+ ]
38
+ }
39
+ ]
40
+ },
41
+ {
42
+ "label": "Past Medical History",
43
+ "sections": [
44
+ {
45
+ "isExpanded": "true",
46
+ "label": "Past Medical History",
47
+ "questions": [
48
+ {
49
+ "id": "diagnosedForDM",
50
+ "questionOptions": {
51
+ "rendering": "radio",
52
+ "concept": "7083941d-1342-4dd7-ba16-ddc78b61f239",
53
+ "answers": [
54
+ {
55
+ "concept": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
56
+ },
57
+ {
58
+ "concept": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
59
+ }
60
+ ]
61
+ },
62
+ "type": "obs",
63
+ "validators": []
64
+ },
65
+ {
66
+ "id": "prevDMdx",
67
+ "questionOptions": {
68
+ "rendering": "radio",
69
+ "concept": "fe0b5b8e-c9a2-4c87-813d-f10884987d9c",
70
+ "answers": [
71
+ {
72
+ "concept": "105903f4-7b6d-496a-b613-37ab9d0f5450"
73
+ },
74
+ {
75
+ "concept": "8b26ecd3-8726-4c8e-b042-cbe71e44a863"
76
+ },
77
+ {
78
+ "concept": "932d395c-d509-4d42-bac4-5a3281efe149"
79
+ }
80
+ ]
81
+ },
82
+ "type": "obs",
83
+ "validators": []
84
+ },
85
+ {
86
+ "id": "yearOfDx",
87
+ "questionOptions": {
88
+ "rendering": "date",
89
+ "concept": "3fe4ac96-893f-4193-a896-1b7e9528719d"
90
+ },
91
+ "type": "obs",
92
+ "validators": []
93
+ },
94
+ {
95
+ "id": "HighBloodPressureSx",
96
+ "questionOptions": {
97
+ "rendering": "textarea",
98
+ "concept": "d3c8a8d4-c141-401f-8354-adbeda86011f",
99
+ "rows": 5
100
+ },
101
+ "type": "obs",
102
+ "validators": []
103
+ },
104
+ {
105
+ "id": "currentTherapy",
106
+ "questionOptions": {
107
+ "rendering": "radio",
108
+ "concept": "00808084-99a8-4ea8-98b4-63cae2a34273",
109
+ "answers": [
110
+ {
111
+ "concept": "4aea53d6-88d1-4e4c-8702-a8142366af02"
112
+ },
113
+ {
114
+ "concept": "8c0fc1cc-f430-4201-968b-db0071b01dfd"
115
+ },
116
+ {
117
+ "concept": "d99b139e-4d8f-462c-9825-a0cdc0824417"
118
+ },
119
+ {
120
+ "concept": "c4c14717-6624-4963-b038-863eb51669a8"
121
+ },
122
+ {
123
+ "concept": "35eaca92-c94d-404c-aa06-1d366db4e8b9"
124
+ }
125
+ ]
126
+ },
127
+ "type": "obs",
128
+ "validators": []
129
+ },
130
+ {
131
+ "id": "traditionmedicineUse",
132
+ "questionOptions": {
133
+ "rendering": "radio",
134
+ "concept": "5d65d35a-8ccc-474a-a2ce-746a518ed6f5",
135
+ "answers": [
136
+ {
137
+ "concept": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
138
+ },
139
+ {
140
+ "concept": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
141
+ }
142
+ ]
143
+ },
144
+ "type": "obs",
145
+ "validators": []
146
+ },
147
+ {
148
+ "id": "previousMedicalComplications",
149
+ "questionOptions": {
150
+ "rendering": "radio",
151
+ "concept": "a9e26e21-126f-45ed-98f2-f4fb423bc634",
152
+ "answers": [
153
+ {
154
+ "concept": "634f28c7-74c9-4b4e-b74d-6ac6a7a797ea"
155
+ },
156
+ {
157
+ "concept": "871389dc-a412-40ba-aa6d-d12497065ce0"
158
+ },
159
+ {
160
+ "concept": "63ab6543-78c9-4079-887a-8498a51bb98c"
161
+ },
162
+ {
163
+ "concept": "fcf078a5-a839-49d7-99cf-5427b0fbaad3"
164
+ },
165
+ {
166
+ "concept": "c64409ef-18fb-4e33-a187-e127243cb30c"
167
+ },
168
+ {
169
+ "concept": "11a2da88-7235-4182-b808-99ba2fb4a1a5"
170
+ }
171
+ ]
172
+ },
173
+ "type": "obs",
174
+ "validators": []
175
+ },
176
+ {
177
+ "id": "otherHealthComplications",
178
+ "questionOptions": {
179
+ "rendering": "textarea",
180
+ "concept": "868e9ebe-86fd-467a-b7a8-345437f340af",
181
+ "rows": 5
182
+ },
183
+ "type": "obs",
184
+ "validators": []
185
+ },
186
+ {
187
+ "id": "presenceOfAllergies",
188
+ "questionOptions": {
189
+ "rendering": "radio",
190
+ "concept": "c67a6c5e-2559-46a8-b9da-2cb38bfff8a3",
191
+ "answers": [
192
+ {
193
+ "concept": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
194
+ },
195
+ {
196
+ "concept": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
197
+ }
198
+ ]
199
+ },
200
+ "type": "obs",
201
+ "validators": []
202
+ },
203
+ {
204
+ "id": "allergiesDetails",
205
+ "questionOptions": {
206
+ "rendering": "textarea",
207
+ "concept": "b082eb80-3495-4af8-a970-0ae0af6ce184",
208
+ "rows": 5
209
+ },
210
+ "type": "obs",
211
+ "validators": []
212
+ },
213
+ {
214
+ "id": "severityOfAllergies",
215
+ "questionOptions": {
216
+ "rendering": "radio",
217
+ "concept": "436880a8-e47a-4fc1-9ad6-07fe543034c8",
218
+ "answers": [
219
+ {
220
+ "concept": "cfb6f0f6-b5a8-433f-8e2d-70ef668e2094"
221
+ },
222
+ {
223
+ "concept": "8a72a904-5931-4780-9d6c-603215fa5e51"
224
+ },
225
+ {
226
+ "concept": "c6f4a5ac-75ff-45b2-b0a6-cc44d1c80499"
227
+ }
228
+ ]
229
+ },
230
+ "type": "obs",
231
+ "validators": []
232
+ }
233
+ ]
234
+ }
235
+ ]
236
+ },
237
+ {
238
+ "label": "Life Style",
239
+ "sections": [
240
+ {
241
+ "isExpanded": "true",
242
+ "label": "Life Style",
243
+ "questions": [
244
+ {
245
+ "id": "smoked",
246
+ "questionOptions": {
247
+ "rendering": "radio",
248
+ "concept": "7533aa7e-04cb-4cfd-9c97-6ac36f114bab",
249
+ "answers": [
250
+ {
251
+ "concept": "60bf95e1-04b5-48cf-8d05-3f5883a891e0"
252
+ },
253
+ {
254
+ "concept": "fd676d9a-1a47-4f6c-a24e-f57ac796b7f1"
255
+ },
256
+ {
257
+ "concept": "57ce8832-7ea7-45f9-91ba-09e1c064073b"
258
+ }
259
+ ]
260
+ },
261
+ "type": "obs",
262
+ "validators": []
263
+ },
264
+ {
265
+ "id": "exercise",
266
+ "questionOptions": {
267
+ "rendering": "radio",
268
+ "concept": "c31a2da0-f16b-44e3-baea-8a259d8beb31",
269
+ "answers": [
270
+ {
271
+ "concept": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
272
+ },
273
+ {
274
+ "concept": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
275
+ }
276
+ ]
277
+ },
278
+ "type": "obs",
279
+ "validators": []
280
+ },
281
+ {
282
+ "id": "drinkAlcohol",
283
+ "questionOptions": {
284
+ "rendering": "radio",
285
+ "concept": "e737c8c9-a154-47a1-aa20-ed13008d46cf",
286
+ "answers": [
287
+ {
288
+ "concept": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
289
+ },
290
+ {
291
+ "concept": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
292
+ }
293
+ ]
294
+ },
295
+ "type": "obs",
296
+ "validators": []
297
+ }
298
+ ]
299
+ }
300
+ ]
301
+ },
302
+
303
+ {
304
+ "label": "Vitals and Biometrics",
305
+ "sections": [
306
+ {
307
+ "isExpanded": "true",
308
+ "label": "Vitals and Biometrics",
309
+ "questions": [
310
+ {
311
+ "id": "Ht",
312
+ "questionOptions": {
313
+ "rendering": "number",
314
+ "concept": "5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
315
+ "max": "272",
316
+ "min": "10",
317
+ "showDate": "false"
318
+ },
319
+ "type": "obs",
320
+ "validators": []
321
+ },
322
+ {
323
+ "id": "Wt",
324
+ "questionOptions": {
325
+ "rendering": "number",
326
+ "concept": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
327
+ "max": "250",
328
+ "min": "0",
329
+ "showDate": "false"
330
+ },
331
+ "type": "obs",
332
+ "validators": []
333
+ },
334
+ {
335
+ "id": "waistCircumference",
336
+ "questionOptions": {
337
+ "rendering": "number",
338
+ "concept": "90c9e0ae-d9f6-477c-9f23-bd7af88994e4",
339
+ "max": "",
340
+ "min": "",
341
+ "showDate": "false"
342
+ },
343
+ "type": "obs",
344
+ "validators": []
345
+ },
346
+ {
347
+ "id": "BMI",
348
+ "questionOptions": {
349
+ "rendering": "number",
350
+ "concept": "a89c60c0-1350-11df-a1f1-0026b9348838",
351
+ "max": "",
352
+ "min": "",
353
+ "showDate": "false",
354
+ "calculate": {
355
+ "calculateExpression": "calcBMI(Ht,Wt)"
356
+ }
357
+ },
358
+ "type": "obs",
359
+ "validators": []
360
+ },
361
+ {
362
+ "id": "systole",
363
+ "questionOptions": {
364
+ "rendering": "number",
365
+ "concept": "5085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
366
+ "max": "250",
367
+ "min": "0",
368
+ "showDate": "false"
369
+ },
370
+ "type": "obs",
371
+ "validators": []
372
+ },
373
+ {
374
+ "id": "diastole",
375
+ "questionOptions": {
376
+ "rendering": "number",
377
+ "concept": "5086AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
378
+ "max": "150",
379
+ "min": "0",
380
+ "showDate": "false"
381
+ },
382
+ "type": "obs",
383
+ "validators": []
384
+ },
385
+ {
386
+ "id": "pulse",
387
+ "questionOptions": {
388
+ "rendering": "number",
389
+ "concept": "5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
390
+ "max": "230",
391
+ "min": "0",
392
+ "showDate": "false"
393
+ },
394
+ "type": "obs",
395
+ "validators": []
396
+ },
397
+ {
398
+ "id": "temp",
399
+ "questionOptions": {
400
+ "rendering": "number",
401
+ "concept": "5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
402
+ "max": "43",
403
+ "min": "25",
404
+ "showDate": "false"
405
+ },
406
+ "type": "obs",
407
+ "validators": []
408
+ }
409
+ ]
410
+ },
411
+ {
412
+ "isExpanded": "true",
413
+ "label": "Blood sugar levels",
414
+ "questions": [
415
+ {
416
+ "id": "FBS",
417
+ "questionOptions": {
418
+ "rendering": "number",
419
+ "concept": "4a6ad2db-86af-4acc-906b-b749b7f6cda6",
420
+ "max": "600",
421
+ "min": "0",
422
+ "showDate": "false"
423
+ },
424
+ "type": "obs",
425
+ "validators": []
426
+ },
427
+ {
428
+ "id": "RBS",
429
+ "questionOptions": {
430
+ "rendering": "number",
431
+ "concept": "f52d731e-58da-4f3a-a480-77c5e9d8d2eb",
432
+ "max": "600",
433
+ "min": "0",
434
+ "showDate": "false"
435
+ },
436
+ "type": "obs",
437
+ "validators": []
438
+ },
439
+ {
440
+ "id": "HBA1c",
441
+ "questionOptions": {
442
+ "rendering": "number",
443
+ "concept": "a8af7520-1350-11df-a1f1-0026b9348838",
444
+ "max": "20",
445
+ "min": "0",
446
+ "showDate": "false"
447
+ },
448
+ "type": "obs",
449
+ "validators": []
450
+ }
451
+ ]
452
+ }
453
+ ]
454
+ }
455
+ ]
456
+ }
@@ -0,0 +1,10 @@
1
+ import { TranslateLoader } from '@ngx-translate/core';
2
+ import { Observable, of } from 'rxjs';
3
+
4
+ export class JsonLoader implements TranslateLoader {
5
+ constructor() {}
6
+
7
+ getTranslation(lang: string): Observable<any> {
8
+ return of(require(`../../translations/${lang}.json`));
9
+ }
10
+ }
@@ -0,0 +1,23 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { HttpClient, HttpClientModule } from '@angular/common/http';
4
+ import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
5
+ import { JsonLoader } from './json-loader';
6
+
7
+ @NgModule({
8
+ declarations: [],
9
+ imports: [
10
+ CommonModule,
11
+ HttpClientModule,
12
+ TranslateModule.forRoot({
13
+ defaultLanguage: 'en',
14
+ loader: {
15
+ provide: TranslateLoader,
16
+ useClass: JsonLoader,
17
+ deps: [HttpClient]
18
+ }
19
+ })
20
+ ],
21
+ exports: [TranslateModule]
22
+ })
23
+ export class NgxTranslateModule {}
File without changes