@openmrs/esm-form-engine-lib 2.1.0-pre.1510 → 2.1.0-pre.1511

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.
@@ -1,69 +1,69 @@
1
1
  {
2
- "name": "Test HTS POC",
3
- "pages": [
2
+ "name": "Test HTS POC",
3
+ "pages": [
4
+ {
5
+ "label": "Screening",
6
+ "sections": [
4
7
  {
5
- "label": "Screening",
6
- "sections": [
7
- {
8
- "label": "Testing history",
9
- "isExpanded": "true",
10
- "questions": [
11
- {
12
- "label": "Height",
13
- "type": "obs",
14
- "questionOptions": {
15
- "rendering": "number",
16
- "concept": "164400AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
17
- },
18
- "required": "true",
19
- "unspecified": "true",
20
- "hide": {
21
- "hideWhenExpression": "false"
22
- },
23
- "validators": [],
24
- "id": "height"
25
- },
26
- {
27
- "label": "Weight",
28
- "type": "obs",
29
- "questionOptions": {
30
- "rendering": "number",
31
- "concept": "184400AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
32
- },
33
- "required": "true",
34
- "unspecified": "true",
35
- "hide": {
36
- "hideWhenExpression": "false"
37
- },
38
- "validators": [],
39
- "id": "weight"
40
- },
41
- {
42
- "label": "BMI",
43
- "type": "obs",
44
- "questionOptions": {
45
- "rendering": "text",
46
- "calculate": {
47
- "calculateExpression": "calcBMI('height','weight')"
48
- },
49
- "concept": "164400AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
50
- },
51
- "required": "true",
52
- "unspecified": "true",
53
- "hide": {
54
- "hideWhenExpression": "false"
55
- },
56
- "validators": [],
57
- "id": "bmi"
58
- }
59
- ]
60
- }
61
- ]
8
+ "label": "Testing history",
9
+ "isExpanded": "true",
10
+ "questions": [
11
+ {
12
+ "label": "Height",
13
+ "type": "obs",
14
+ "questionOptions": {
15
+ "rendering": "number",
16
+ "concept": "164400AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
17
+ },
18
+ "required": "true",
19
+ "unspecified": "true",
20
+ "hide": {
21
+ "hideWhenExpression": "false"
22
+ },
23
+ "validators": [],
24
+ "id": "height"
25
+ },
26
+ {
27
+ "label": "Weight",
28
+ "type": "obs",
29
+ "questionOptions": {
30
+ "rendering": "number",
31
+ "concept": "184400AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
32
+ },
33
+ "required": "true",
34
+ "unspecified": "true",
35
+ "hide": {
36
+ "hideWhenExpression": "false"
37
+ },
38
+ "validators": [],
39
+ "id": "weight"
40
+ },
41
+ {
42
+ "label": "BMI",
43
+ "type": "obs",
44
+ "questionOptions": {
45
+ "rendering": "text",
46
+ "calculate": {
47
+ "calculateExpression": "calcBMI(height, weight)"
48
+ },
49
+ "concept": "164400AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
50
+ },
51
+ "required": "true",
52
+ "unspecified": "true",
53
+ "hide": {
54
+ "hideWhenExpression": "false"
55
+ },
56
+ "validators": [],
57
+ "id": "bmi"
58
+ }
59
+ ]
62
60
  }
63
- ],
64
- "availableIntents": [],
65
- "processor": "EncounterFormProcessor",
66
- "uuid": "da24c540-cc83-43bc-978f-c1ef180a497f",
67
- "referencedForms": [],
68
- "encounterType": "79c1f50f-f77d-42e2-ad2a-d29304dde2fe"
69
- }
61
+ ]
62
+ }
63
+ ],
64
+ "availableIntents": [],
65
+ "processor": "EncounterFormProcessor",
66
+ "uuid": "da24c540-cc83-43bc-978f-c1ef180a497f",
67
+ "referencedForms": [],
68
+ "encounterType": "79c1f50f-f77d-42e2-ad2a-d29304dde2fe"
69
+ }
@@ -1,69 +1,69 @@
1
1
  {
2
- "name": "Test HTS POC",
3
- "pages": [
2
+ "name": "Test HTS POC",
3
+ "pages": [
4
+ {
5
+ "label": "Screening",
6
+ "sections": [
4
7
  {
5
- "label": "Screening",
6
- "sections": [
7
- {
8
- "label": "Testing history",
9
- "isExpanded": "true",
10
- "questions": [
11
- {
12
- "label": "Height",
13
- "type": "obs",
14
- "questionOptions": {
15
- "rendering": "number",
16
- "concept": "164400AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
17
- },
18
- "required": "true",
19
- "unspecified": "true",
20
- "hide": {
21
- "hideWhenExpression": "false"
22
- },
23
- "validators": [],
24
- "id": "height"
25
- },
26
- {
27
- "label": "Weight",
28
- "type": "obs",
29
- "questionOptions": {
30
- "rendering": "number",
31
- "concept": "184400AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
32
- },
33
- "required": "true",
34
- "unspecified": "true",
35
- "hide": {
36
- "hideWhenExpression": "false"
37
- },
38
- "validators": [],
39
- "id": "weight"
40
- },
41
- {
42
- "label": "BSA",
43
- "type": "obs",
44
- "questionOptions": {
45
- "rendering": "text",
46
- "calculate": {
47
- "calculateExpression": "calcBSA('height','weight')"
48
- },
49
- "concept": "164400AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
50
- },
51
- "required": "true",
52
- "unspecified": "true",
53
- "hide": {
54
- "hideWhenExpression": "false"
55
- },
56
- "validators": [],
57
- "id": "bsa"
58
- }
59
- ]
60
- }
61
- ]
8
+ "label": "Testing history",
9
+ "isExpanded": "true",
10
+ "questions": [
11
+ {
12
+ "label": "Height",
13
+ "type": "obs",
14
+ "questionOptions": {
15
+ "rendering": "number",
16
+ "concept": "164400AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
17
+ },
18
+ "required": "true",
19
+ "unspecified": "true",
20
+ "hide": {
21
+ "hideWhenExpression": "false"
22
+ },
23
+ "validators": [],
24
+ "id": "height"
25
+ },
26
+ {
27
+ "label": "Weight",
28
+ "type": "obs",
29
+ "questionOptions": {
30
+ "rendering": "number",
31
+ "concept": "184400AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
32
+ },
33
+ "required": "true",
34
+ "unspecified": "true",
35
+ "hide": {
36
+ "hideWhenExpression": "false"
37
+ },
38
+ "validators": [],
39
+ "id": "weight"
40
+ },
41
+ {
42
+ "label": "BSA",
43
+ "type": "obs",
44
+ "questionOptions": {
45
+ "rendering": "text",
46
+ "calculate": {
47
+ "calculateExpression": "calcBSA(height, weight)"
48
+ },
49
+ "concept": "164400AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
50
+ },
51
+ "required": "true",
52
+ "unspecified": "true",
53
+ "hide": {
54
+ "hideWhenExpression": "false"
55
+ },
56
+ "validators": [],
57
+ "id": "bsa"
58
+ }
59
+ ]
62
60
  }
63
- ],
64
- "availableIntents": [],
65
- "processor": "EncounterFormProcessor",
66
- "uuid": "da24c540-cc83-43bc-978f-c1ef180a497f",
67
- "referencedForms": [],
68
- "encounterType": "79c1f50f-f77d-42e2-ad2a-d29304dde2fe"
69
- }
61
+ ]
62
+ }
63
+ ],
64
+ "availableIntents": [],
65
+ "processor": "EncounterFormProcessor",
66
+ "uuid": "da24c540-cc83-43bc-978f-c1ef180a497f",
67
+ "referencedForms": [],
68
+ "encounterType": "79c1f50f-f77d-42e2-ad2a-d29304dde2fe"
69
+ }
@@ -1,88 +1,88 @@
1
1
  {
2
- "name": "",
3
- "pages": [
4
- {
5
- "label": "POC Test EDD",
6
- "sections": [
7
- {
8
- "label": "Test EDD",
9
- "isExpanded": "true",
10
- "questions": [
11
- {
12
- "label": "LMP",
13
- "type": "obs",
14
- "questionOptions": {
15
- "rendering": "date",
16
- "concept": "166079AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
17
- "weeksList": "",
18
- "conceptMappings": [
19
- {
20
- "type": "CIEL",
21
- "value": "166079"
22
- },
23
- {
24
- "type": "SNOMED-CT",
25
- "value": "248993009"
26
- }
27
- ]
28
- },
29
- "required": "true",
30
- "unspecified": "true",
31
- "hide": {
32
- "hideWhenExpression": "false"
33
- },
34
- "validators": [],
35
- "id": "LMP"
36
- },
37
- {
38
- "label": "EDD",
39
- "type": "obs",
40
- "questionOptions": {
41
- "rendering": "date",
42
- "calculate": {
43
- "calculateExpression": "calcEDD('LMP')"
44
- },
45
- "concept": "5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
46
- "weeksList": "",
47
- "conceptMappings": [
48
- {
49
- "type": "AMPATH",
50
- "value": "1854"
51
- },
52
- {
53
- "type": "SNOMED-CT",
54
- "value": "366322004"
55
- },
56
- {
57
- "type": "AMPATH",
58
- "value": "5596"
59
- },
60
- {
61
- "type": "CIEL",
62
- "value": "5596"
63
- },
64
- {
65
- "type": "LOINC",
66
- "value": "11779-6"
67
- }
68
- ]
69
- },
70
- "required": "true",
71
- "unspecified": "true",
72
- "hide": {
73
- "hideWhenExpression": "false"
74
- },
75
- "validators": [],
76
- "id": "EDD"
77
- }
78
- ]
79
- }
80
- ]
81
- }
82
- ],
83
- "availableIntents": [],
84
- "processor": "EncounterFormProcessor",
85
- "uuid": "da24c540-cc83-43bc-978f-c1ef180a497f",
86
- "referencedForms": [],
87
- "encounterType": "79c1f50f-f77d-42e2-ad2a-d29304dde2fe"
88
- }
2
+ "name": "",
3
+ "pages": [
4
+ {
5
+ "label": "POC Test EDD",
6
+ "sections": [
7
+ {
8
+ "label": "Test EDD",
9
+ "isExpanded": "true",
10
+ "questions": [
11
+ {
12
+ "label": "LMP",
13
+ "type": "obs",
14
+ "questionOptions": {
15
+ "rendering": "date",
16
+ "concept": "166079AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
17
+ "weeksList": "",
18
+ "conceptMappings": [
19
+ {
20
+ "type": "CIEL",
21
+ "value": "166079"
22
+ },
23
+ {
24
+ "type": "SNOMED-CT",
25
+ "value": "248993009"
26
+ }
27
+ ]
28
+ },
29
+ "required": "true",
30
+ "unspecified": "true",
31
+ "hide": {
32
+ "hideWhenExpression": "false"
33
+ },
34
+ "validators": [],
35
+ "id": "LMP"
36
+ },
37
+ {
38
+ "label": "EDD",
39
+ "type": "obs",
40
+ "questionOptions": {
41
+ "rendering": "date",
42
+ "calculate": {
43
+ "calculateExpression": "calcEDD(LMP)"
44
+ },
45
+ "concept": "5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
46
+ "weeksList": "",
47
+ "conceptMappings": [
48
+ {
49
+ "type": "AMPATH",
50
+ "value": "1854"
51
+ },
52
+ {
53
+ "type": "SNOMED-CT",
54
+ "value": "366322004"
55
+ },
56
+ {
57
+ "type": "AMPATH",
58
+ "value": "5596"
59
+ },
60
+ {
61
+ "type": "CIEL",
62
+ "value": "5596"
63
+ },
64
+ {
65
+ "type": "LOINC",
66
+ "value": "11779-6"
67
+ }
68
+ ]
69
+ },
70
+ "required": "true",
71
+ "unspecified": "true",
72
+ "hide": {
73
+ "hideWhenExpression": "false"
74
+ },
75
+ "validators": [],
76
+ "id": "EDD"
77
+ }
78
+ ]
79
+ }
80
+ ]
81
+ }
82
+ ],
83
+ "availableIntents": [],
84
+ "processor": "EncounterFormProcessor",
85
+ "uuid": "da24c540-cc83-43bc-978f-c1ef180a497f",
86
+ "referencedForms": [],
87
+ "encounterType": "79c1f50f-f77d-42e2-ad2a-d29304dde2fe"
88
+ }
@@ -1,40 +1,39 @@
1
1
  {
2
- "name": "",
3
- "pages": [
4
- {
5
- "label": "Page 1",
6
- "sections": [
7
- {
8
- "label": "Section 1",
9
- "isExpanded": "true",
10
- "questions": [
11
- {
12
- "label": "Body Weight",
13
- "type": "obs",
14
- "questionOptions": {
15
- "rendering": "number",
16
- "concept": "560555AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
17
- "calculate": {
18
- "calculateExpression": "resolve(api.getLatestObs('50512033-e047-4855-b2d3-1a6d9e889ff4', '560555AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')).valueNumeric"
19
- },
20
- "conceptMappings": [
21
- {
22
- "type": "CIEL",
23
- "value": "160555"
24
- }
25
- ]
26
-
27
- },
28
- "id": "bodyWeight",
29
- "validators": [],
30
- "required": "true",
31
- "unspecified": "true"
32
- }
33
- ]
34
- }
35
- ]
36
- }
37
- ],
2
+ "name": "",
3
+ "pages": [
4
+ {
5
+ "label": "Page 1",
6
+ "sections": [
7
+ {
8
+ "label": "Section 1",
9
+ "isExpanded": "true",
10
+ "questions": [
11
+ {
12
+ "label": "Body Weight",
13
+ "type": "obs",
14
+ "questionOptions": {
15
+ "rendering": "number",
16
+ "concept": "560555AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
17
+ "calculate": {
18
+ "calculateExpression": "api.getLatestObs('50512033-e047-4855-b2d3-1a6d9e889ff4', '560555AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA').then(obs => obs.valueNumeric)"
19
+ },
20
+ "conceptMappings": [
21
+ {
22
+ "type": "CIEL",
23
+ "value": "160555"
24
+ }
25
+ ]
26
+ },
27
+ "id": "bodyWeight",
28
+ "validators": [],
29
+ "required": "true",
30
+ "unspecified": "true"
31
+ }
32
+ ]
33
+ }
34
+ ]
35
+ }
36
+ ],
38
37
  "availableIntents": [],
39
38
  "processor": "EncounterFormProcessor",
40
39
  "uuid": "na24c540-cc83-43bc-978f-c1ef180a597f",
@@ -14,7 +14,7 @@
14
14
  {
15
15
  "label": "Reasons for assessment",
16
16
  "type": "obs",
17
- "historicalExpression": "HD.getObject('prevEnc').getValue('ae46f4b1-c15d-4bba-ab41-b9157b82b0ce')",
17
+ "historicalExpression": "HD.getObject('prevEnc')?.getValue('ae46f4b1-c15d-4bba-ab41-b9157b82b0ce')",
18
18
  "questionOptions": {
19
19
  "rendering": "checkbox",
20
20
  "concept": "ae46f4b1-c15d-4bba-ab41-b9157b82b0ce",
@@ -121,7 +121,7 @@
121
121
  },
122
122
  {
123
123
  "type": "js_expression",
124
- "failsWhenExpression": "!isDateEqualTo(myValue, useFieldValue('visit_date'))",
124
+ "failsWhenExpression": "!isDateEqualTo(myValue, useFieldValue(visit_date))",
125
125
  "message": "Child birth date should be the same as the visit date!"
126
126
  }
127
127
  ]