sdc-qrf 0.3.17 → 0.3.19

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 (102) hide show
  1. package/dist/components.js +20 -64
  2. package/dist/components.js.map +1 -1
  3. package/dist/converter/extensions.js +8 -6
  4. package/dist/converter/extensions.js.map +1 -1
  5. package/dist/converter/fceToFhir/questionnaire/index.js +4 -5
  6. package/dist/converter/fceToFhir/questionnaire/index.js.map +1 -1
  7. package/dist/converter/fceToFhir/questionnaire/processExtensions.d.ts.map +1 -1
  8. package/dist/converter/fceToFhir/questionnaire/processExtensions.js +11 -3
  9. package/dist/converter/fceToFhir/questionnaire/processExtensions.js.map +1 -1
  10. package/dist/converter/fceToFhir/questionnaire/processItems.js +9 -13
  11. package/dist/converter/fceToFhir/questionnaire/processItems.js.map +1 -1
  12. package/dist/converter/fceToFhir/questionnaire/processMeta.js +4 -2
  13. package/dist/converter/fceToFhir/questionnaire/processMeta.js.map +1 -1
  14. package/dist/converter/fceToFhir/questionnaireResponse/index.js +2 -4
  15. package/dist/converter/fceToFhir/questionnaireResponse/index.js.map +1 -1
  16. package/dist/converter/fceToFhir/questionnaireResponse/processAnswers.js +3 -5
  17. package/dist/converter/fceToFhir/questionnaireResponse/processAnswers.js.map +1 -1
  18. package/dist/converter/fceToFhir/questionnaireResponse/processMeta.js +2 -1
  19. package/dist/converter/fceToFhir/questionnaireResponse/processMeta.js.map +1 -1
  20. package/dist/converter/fceToFhir/questionnaireResponse/processReference.js +8 -16
  21. package/dist/converter/fceToFhir/questionnaireResponse/processReference.js.map +1 -1
  22. package/dist/converter/fhirToFce/questionnaire/index.js +4 -11
  23. package/dist/converter/fhirToFce/questionnaire/index.js.map +1 -1
  24. package/dist/converter/fhirToFce/questionnaire/processExtensions.d.ts +1 -0
  25. package/dist/converter/fhirToFce/questionnaire/processExtensions.d.ts.map +1 -1
  26. package/dist/converter/fhirToFce/questionnaire/processExtensions.js +45 -28
  27. package/dist/converter/fhirToFce/questionnaire/processExtensions.js.map +1 -1
  28. package/dist/converter/fhirToFce/questionnaire/processItems.js +15 -20
  29. package/dist/converter/fhirToFce/questionnaire/processItems.js.map +1 -1
  30. package/dist/converter/fhirToFce/questionnaire/processMeta.js +3 -6
  31. package/dist/converter/fhirToFce/questionnaire/processMeta.js.map +1 -1
  32. package/dist/converter/fhirToFce/questionnaireResponse/index.js +2 -4
  33. package/dist/converter/fhirToFce/questionnaireResponse/index.js.map +1 -1
  34. package/dist/converter/fhirToFce/questionnaireResponse/processAnswers.js +5 -6
  35. package/dist/converter/fhirToFce/questionnaireResponse/processAnswers.js.map +1 -1
  36. package/dist/converter/fhirToFce/questionnaireResponse/processMeta.js +4 -3
  37. package/dist/converter/fhirToFce/questionnaireResponse/processMeta.js.map +1 -1
  38. package/dist/converter/fhirToFce/questionnaireResponse/processReference.js +5 -4
  39. package/dist/converter/fhirToFce/questionnaireResponse/processReference.js.map +1 -1
  40. package/dist/converter/fhirToFce/utils.js +4 -3
  41. package/dist/converter/fhirToFce/utils.js.map +1 -1
  42. package/dist/converter/index.js +11 -33
  43. package/dist/converter/index.js.map +1 -1
  44. package/dist/converter/utils.js +2 -4
  45. package/dist/converter/utils.js.map +1 -1
  46. package/dist/index.js +6 -19
  47. package/dist/index.js.map +1 -1
  48. package/dist/utils.js +74 -103
  49. package/dist/utils.js.map +1 -1
  50. package/package.json +2 -2
  51. package/src/converter/__tests__/resources/questionnaire_fce/allergies.json +1 -0
  52. package/src/converter/__tests__/resources/questionnaire_fce/beverages.json +67 -66
  53. package/src/converter/__tests__/resources/questionnaire_fce/choice_answer_option.json +49 -48
  54. package/src/converter/__tests__/resources/questionnaire_fce/consent.json +1 -0
  55. package/src/converter/__tests__/resources/questionnaire_fce/constraint.json +2 -2
  56. package/src/converter/__tests__/resources/questionnaire_fce/cqf-examples.json +59 -63
  57. package/src/converter/__tests__/resources/questionnaire_fce/enable_when.json +1 -0
  58. package/src/converter/__tests__/resources/questionnaire_fce/encounter_create.json +1 -0
  59. package/src/converter/__tests__/resources/questionnaire_fce/gad_7.json +6 -14
  60. package/src/converter/__tests__/resources/questionnaire_fce/immunization.json +6 -14
  61. package/src/converter/__tests__/resources/questionnaire_fce/medication.json +165 -164
  62. package/src/converter/__tests__/resources/questionnaire_fce/multiple_type_launch_context.json +5 -12
  63. package/src/converter/__tests__/resources/questionnaire_fce/patient_create.json +78 -77
  64. package/src/converter/__tests__/resources/questionnaire_fce/patient_edit.json +1 -0
  65. package/src/converter/__tests__/resources/questionnaire_fce/phq_2_phq_9.json +1 -0
  66. package/src/converter/__tests__/resources/questionnaire_fce/physicalexam.json +381 -380
  67. package/src/converter/__tests__/resources/questionnaire_fce/practitioner_create.json +79 -78
  68. package/src/converter/__tests__/resources/questionnaire_fce/practitioner_create_structure_map.json +1 -0
  69. package/src/converter/__tests__/resources/questionnaire_fce/practitioner_edit.json +127 -126
  70. package/src/converter/__tests__/resources/questionnaire_fce/practitioner_role_create.json +35 -34
  71. package/src/converter/__tests__/resources/questionnaire_fce/public_appointment.json +3 -4
  72. package/src/converter/__tests__/resources/questionnaire_fce/review_of_systems.json +384 -383
  73. package/src/converter/__tests__/resources/questionnaire_fce/source_queries.json +31 -30
  74. package/src/converter/__tests__/resources/questionnaire_fce/unit-option.json +1 -0
  75. package/src/converter/__tests__/resources/questionnaire_fce/vitals.json +1 -0
  76. package/src/converter/__tests__/resources/questionnaire_fhir/allergies.json +7 -8
  77. package/src/converter/__tests__/resources/questionnaire_fhir/beverages.json +96 -90
  78. package/src/converter/__tests__/resources/questionnaire_fhir/choice_answer_option.json +49 -43
  79. package/src/converter/__tests__/resources/questionnaire_fhir/consent.json +4 -0
  80. package/src/converter/__tests__/resources/questionnaire_fhir/constraint.json +6 -0
  81. package/src/converter/__tests__/resources/questionnaire_fhir/cqf-examples.json +87 -86
  82. package/src/converter/__tests__/resources/questionnaire_fhir/enable_when.json +6 -0
  83. package/src/converter/__tests__/resources/questionnaire_fhir/encounter_create.json +4 -0
  84. package/src/converter/__tests__/resources/questionnaire_fhir/gad_7.json +7 -8
  85. package/src/converter/__tests__/resources/questionnaire_fhir/immunization.json +7 -8
  86. package/src/converter/__tests__/resources/questionnaire_fhir/medication.json +203 -199
  87. package/src/converter/__tests__/resources/questionnaire_fhir/multiple_type_launch_context.json +387 -383
  88. package/src/converter/__tests__/resources/questionnaire_fhir/patient_create.json +92 -88
  89. package/src/converter/__tests__/resources/questionnaire_fhir/patient_edit.json +6 -4
  90. package/src/converter/__tests__/resources/questionnaire_fhir/phq_2_phq_9.json +565 -561
  91. package/src/converter/__tests__/resources/questionnaire_fhir/physicalexam.json +540 -536
  92. package/src/converter/__tests__/resources/questionnaire_fhir/practitioner_create.json +78 -74
  93. package/src/converter/__tests__/resources/questionnaire_fhir/practitioner_create_structure_map.json +4 -0
  94. package/src/converter/__tests__/resources/questionnaire_fhir/practitioner_edit.json +176 -172
  95. package/src/converter/__tests__/resources/questionnaire_fhir/practitioner_role_create.json +45 -41
  96. package/src/converter/__tests__/resources/questionnaire_fhir/public_appointment.json +6 -4
  97. package/src/converter/__tests__/resources/questionnaire_fhir/review_of_systems.json +364 -358
  98. package/src/converter/__tests__/resources/questionnaire_fhir/source_queries.json +37 -33
  99. package/src/converter/__tests__/resources/questionnaire_fhir/unit-option.json +6 -0
  100. package/src/converter/__tests__/resources/questionnaire_fhir/vitals.json +4 -0
  101. package/src/converter/fceToFhir/questionnaire/processExtensions.ts +8 -1
  102. package/src/converter/fhirToFce/questionnaire/processExtensions.ts +21 -15
@@ -1,53 +1,54 @@
1
1
  {
2
- "item": [
3
- {
4
- "text": "What is your favorite color?",
5
- "type": "choice",
6
- "linkId": "1",
7
- "answerOption": [
2
+ "item": [
8
3
  {
9
- "value": {
10
- "Coding": {
11
- "code": "red",
12
- "system": "http://example.org/colors",
13
- "display": "Red"
14
- }
15
- }
16
- },
17
- {
18
- "value": {
19
- "Coding": {
20
- "code": "blue",
21
- "system": "http://example.org/colors",
22
- "display": "Blue"
23
- }
24
- }
25
- },
26
- {
27
- "value": {
28
- "Reference": {
29
- "id": "123",
30
- "resourceType": "Color",
31
- "display": "Other"
32
- }
33
- }
34
- },
35
- {
36
- "value": {
37
- "string": "I don't have a favorite color"
38
- }
4
+ "text": "What is your favorite color?",
5
+ "type": "choice",
6
+ "linkId": "1",
7
+ "answerOption": [
8
+ {
9
+ "value": {
10
+ "Coding": {
11
+ "code": "red",
12
+ "system": "http://example.org/colors",
13
+ "display": "Red"
14
+ }
15
+ }
16
+ },
17
+ {
18
+ "value": {
19
+ "Coding": {
20
+ "code": "blue",
21
+ "system": "http://example.org/colors",
22
+ "display": "Blue"
23
+ }
24
+ }
25
+ },
26
+ {
27
+ "value": {
28
+ "Reference": {
29
+ "id": "123",
30
+ "resourceType": "Color",
31
+ "display": "Other"
32
+ }
33
+ }
34
+ },
35
+ {
36
+ "value": {
37
+ "string": "I don't have a favorite color"
38
+ }
39
+ }
40
+ ]
39
41
  }
40
- ]
42
+ ],
43
+ "status": "draft",
44
+ "subjectType": ["Patient"],
45
+ "assembledFrom": "choice-answer-option",
46
+ "id": "example",
47
+ "resourceType": "Questionnaire",
48
+ "meta": {
49
+ "profile": ["https://beda.software/beda-emr-questionnaire"],
50
+ "lastUpdated": "2023-04-24T00:09:09.518780Z",
51
+ "createdAt": "2023-04-24T00:09:09.518780Z",
52
+ "versionId": "205"
41
53
  }
42
- ],
43
- "status": "draft",
44
- "subjectType": ["Patient"],
45
- "id": "example",
46
- "resourceType": "Questionnaire",
47
- "meta": {
48
- "profile": ["https://beda.software/beda-emr-questionnaire"],
49
- "lastUpdated": "2023-04-24T00:09:09.518780Z",
50
- "createdAt": "2023-04-24T00:09:09.518780Z",
51
- "versionId": "205"
52
- }
53
54
  }
@@ -81,6 +81,7 @@
81
81
  "resourceType": "Questionnaire",
82
82
  "title": "Sign-off Consent",
83
83
  "status": "active",
84
+ "assembledFrom": "consent",
84
85
  "id": "consent",
85
86
  "url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/consent"
86
87
  }
@@ -24,8 +24,8 @@
24
24
  "human": "Human second",
25
25
  "expression": "true"
26
26
  }
27
-
28
27
  ]
29
28
  }
30
- ]
29
+ ],
30
+ "assembledFrom": "constraint"
31
31
  }
@@ -1,75 +1,71 @@
1
1
  {
2
- "subjectType": [
3
- "Encounter",
4
- "Patient"
5
- ],
2
+ "subjectType": ["Encounter", "Patient"],
6
3
  "meta": {
7
- "profile": [
8
- "https://beda.software/beda-emr-questionnaire"
9
- ],
10
- "lastUpdated": "2024-11-18T13:35:34.455065Z",
11
- "createdAt": "2024-11-15T17:04:52.598486Z",
12
- "versionId": "11968"
4
+ "profile": ["https://beda.software/beda-emr-questionnaire"],
5
+ "lastUpdated": "2024-11-18T13:35:34.455065Z",
6
+ "createdAt": "2024-11-15T17:04:52.598486Z",
7
+ "versionId": "11968"
13
8
  },
14
9
  "name": "CQF Examples",
15
10
  "item": [
16
- {
17
- "text": "Click on this checkbox to see result",
18
- "type": "boolean",
19
- "linkId": "input-1"
20
- },
21
- {
22
- "text": "This is default input label",
23
- "type": "string",
24
- "_text": {
25
- "cqfExpression": {
26
- "language": "text/fhirpath",
27
- "expression": "iif(%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = true, 'Now the input label changed', null)"
28
- }
29
- },
30
- "linkId": "input-2"
31
- },
32
- {
33
- "item": [
34
- {
35
- "text": "This input is disabled if the checkbox is unchecked",
36
- "type": "string",
37
- "linkId": "input-5",
38
- "readOnly": true,
39
- "_readOnly": {
40
- "cqfExpression": {
41
- "language": "text/fhirpath",
42
- "expression": "%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = false"
43
- }
44
- }
45
- },
46
- {
47
- "text": "This input is required if the checkbox is checked",
48
- "type": "string",
49
- "linkId": "input-6",
50
- "required": false,
51
- "_required": {
52
- "cqfExpression": {
53
- "language": "text/fhirpath",
54
- "expression": "%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = true"
55
- }
11
+ {
12
+ "text": "Click on this checkbox to see result",
13
+ "type": "boolean",
14
+ "linkId": "input-1"
15
+ },
16
+ {
17
+ "text": "This is default input label",
18
+ "type": "string",
19
+ "_text": {
20
+ "cqfExpression": {
21
+ "language": "text/fhirpath",
22
+ "expression": "iif(%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = true, 'Now the input label changed', null)"
23
+ }
24
+ },
25
+ "linkId": "input-2"
26
+ },
27
+ {
28
+ "item": [
29
+ {
30
+ "text": "This input is disabled if the checkbox is unchecked",
31
+ "type": "string",
32
+ "linkId": "input-5",
33
+ "readOnly": true,
34
+ "_readOnly": {
35
+ "cqfExpression": {
36
+ "language": "text/fhirpath",
37
+ "expression": "%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = false"
38
+ }
39
+ }
40
+ },
41
+ {
42
+ "text": "This input is required if the checkbox is checked",
43
+ "type": "string",
44
+ "linkId": "input-6",
45
+ "required": false,
46
+ "_required": {
47
+ "cqfExpression": {
48
+ "language": "text/fhirpath",
49
+ "expression": "%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = true"
50
+ }
51
+ }
52
+ }
53
+ ],
54
+ "text": "This is default group label",
55
+ "type": "group",
56
+ "_text": {
57
+ "cqfExpression": {
58
+ "language": "text/fhirpath",
59
+ "expression": "iif(%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = true, 'Now the group label changed', null)"
60
+ }
61
+ },
62
+ "linkId": "input-3"
56
63
  }
57
- }
58
- ],
59
- "text": "This is default group label",
60
- "type": "group",
61
- "_text": {
62
- "cqfExpression": {
63
- "language": "text/fhirpath",
64
- "expression": "iif(%QuestionnaireResponse.item.where(linkId='input-1').answer.value.boolean = true, 'Now the group label changed', null)"
65
- }
66
- },
67
- "linkId": "input-3"
68
- }
69
64
  ],
70
65
  "resourceType": "Questionnaire",
71
66
  "title": "CQF Examples",
72
67
  "status": "active",
68
+ "assembledFrom": "cqf-examples",
73
69
  "id": "cqf-examples",
74
70
  "url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/cqf-examples"
75
- }
71
+ }
@@ -92,6 +92,7 @@
92
92
  ],
93
93
  "status": "active",
94
94
  "subjectType": ["Patient"],
95
+ "assembledFrom": "enable-when",
95
96
  "id": "example",
96
97
  "resourceType": "Questionnaire",
97
98
  "meta": {
@@ -121,6 +121,7 @@
121
121
  "resourceType": "Questionnaire",
122
122
  "title": "Encounter create",
123
123
  "status": "active",
124
+ "assembledFrom": "encounter-create",
124
125
  "id": "encounter-create",
125
126
  "url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/encounter-create"
126
127
  }
@@ -1,12 +1,7 @@
1
1
  {
2
- "subjectType": [
3
- "Encounter",
4
- "Patient"
5
- ],
2
+ "subjectType": ["Encounter", "Patient"],
6
3
  "meta": {
7
- "profile": [
8
- "https://beda.software/beda-emr-questionnaire"
9
- ],
4
+ "profile": ["https://beda.software/beda-emr-questionnaire"],
10
5
  "lastUpdated": "2023-04-10T03:43:34.792167Z",
11
6
  "createdAt": "2023-04-05T05:22:35.752466Z",
12
7
  "versionId": "694"
@@ -17,18 +12,14 @@
17
12
  "code": "Patient",
18
13
  "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext"
19
14
  },
20
- "type": [
21
- "Patient"
22
- ]
15
+ "type": ["Patient"]
23
16
  },
24
17
  {
25
18
  "name": {
26
19
  "code": "Author",
27
20
  "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext"
28
21
  },
29
- "type": [
30
- "Resource"
31
- ]
22
+ "type": ["Resource"]
32
23
  }
33
24
  ],
34
25
  "name": "GAD-7",
@@ -454,6 +445,7 @@
454
445
  ],
455
446
  "resourceType": "Questionnaire",
456
447
  "status": "active",
448
+ "assembledFrom": "gad-7",
457
449
  "id": "gad-7",
458
450
  "url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/gad7"
459
- }
451
+ }
@@ -1,12 +1,7 @@
1
1
  {
2
- "subjectType": [
3
- "Encounter",
4
- "Patient"
5
- ],
2
+ "subjectType": ["Encounter", "Patient"],
6
3
  "meta": {
7
- "profile": [
8
- "https://beda.software/beda-emr-questionnaire"
9
- ],
4
+ "profile": ["https://beda.software/beda-emr-questionnaire"],
10
5
  "lastUpdated": "2023-04-10T03:43:34.792167Z",
11
6
  "createdAt": "2023-04-05T05:22:35.752466Z",
12
7
  "versionId": "694"
@@ -17,18 +12,14 @@
17
12
  "code": "Patient",
18
13
  "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext"
19
14
  },
20
- "type": [
21
- "Patient"
22
- ]
15
+ "type": ["Patient"]
23
16
  },
24
17
  {
25
18
  "name": {
26
19
  "code": "Author",
27
20
  "system": "http://hl7.org/fhir/uv/sdc/CodeSystem/launchContext"
28
21
  },
29
- "type": [
30
- "Resource"
31
- ]
22
+ "type": ["Resource"]
32
23
  }
33
24
  ],
34
25
  "name": "Immunization",
@@ -177,6 +168,7 @@
177
168
  ],
178
169
  "resourceType": "Questionnaire",
179
170
  "status": "active",
171
+ "assembledFrom": "immunization",
180
172
  "id": "immunization",
181
173
  "url": "https://aidbox.emr.beda.software/ui/console#/entities/Questionnaire/immunization"
182
- }
174
+ }