lforms 29.3.0 → 33.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 (116) hide show
  1. package/CHANGELOG.md +261 -0
  2. package/README.md +97 -14
  3. package/changed-features.md +99 -0
  4. package/dist/lforms/LICENSE.md +70 -0
  5. package/dist/lforms/README.md +100 -0
  6. package/dist/lforms/fhir/R4/lformsFHIR.min.js +2 -0
  7. package/dist/lforms/fhir/R4/lformsFHIR.min.js.map +1 -0
  8. package/dist/lforms/fhir/STU3/lformsFHIR.min.js +2 -0
  9. package/dist/lforms/fhir/STU3/lformsFHIR.min.js.map +1 -0
  10. package/dist/lforms/fhir/lformsFHIRAll.min.js +2 -0
  11. package/dist/lforms/fhir/lformsFHIRAll.min.js.map +1 -0
  12. package/dist/lforms/webcomponent/assets/lib/zone.min.js +134 -0
  13. package/dist/lforms/webcomponent/down_arrow_gray_10_10.png +0 -0
  14. package/dist/lforms/webcomponent/favicon.ico +0 -0
  15. package/dist/lforms/webcomponent/index.html +9 -0
  16. package/dist/lforms/webcomponent/lhc-forms.js +2471 -0
  17. package/dist/lforms/webcomponent/magnifying_glass.png +0 -0
  18. package/dist/lforms/webcomponent/main.js +2464 -0
  19. package/dist/lforms/webcomponent/main.js.map +1 -0
  20. package/dist/lforms/webcomponent/polyfills.js +2 -0
  21. package/dist/lforms/webcomponent/polyfills.js.map +1 -0
  22. package/dist/lforms/webcomponent/runtime.js +2 -0
  23. package/dist/lforms/webcomponent/runtime.js.map +1 -0
  24. package/dist/lforms/webcomponent/scripts.js +3 -0
  25. package/dist/lforms/webcomponent/scripts.js.map +1 -0
  26. package/dist/lforms/webcomponent/styles.css +3 -0
  27. package/dist/lforms/webcomponent/styles.css.map +1 -0
  28. package/form_definition.md +382 -0
  29. package/lforms-33.2.0.tgz +0 -0
  30. package/package.json +94 -88
  31. package/r4-support.md +147 -0
  32. package/sdc-support.md +127 -0
  33. package/app/.npmignore +0 -3
  34. package/app/images/blank.gif +0 -0
  35. package/app/images/signal-stop.png +0 -0
  36. package/app/index.html +0 -10
  37. package/app/lforms.js +0 -56
  38. package/app/lforms.tpl.js +0 -964
  39. package/app/scripts/angular-packages.js +0 -11
  40. package/app/scripts/bootstrap-decorators.js +0 -31
  41. package/app/scripts/bower-index.js +0 -14
  42. package/app/scripts/fhir/R4/export.js +0 -33
  43. package/app/scripts/fhir/R4/fhirRequire.js +0 -36
  44. package/app/scripts/fhir/R4/lformsFHIR.js +0 -27260
  45. package/app/scripts/fhir/R4/sdc-export.js +0 -455
  46. package/app/scripts/fhir/R4/sdc-import.js +0 -483
  47. package/app/scripts/fhir/STU3/export.js +0 -27
  48. package/app/scripts/fhir/STU3/fhirRequire.js +0 -36
  49. package/app/scripts/fhir/STU3/lformsFHIR.js +0 -27291
  50. package/app/scripts/fhir/STU3/sdc-export.js +0 -493
  51. package/app/scripts/fhir/STU3/sdc-import.js +0 -494
  52. package/app/scripts/fhir/diagnostic-report.js +0 -707
  53. package/app/scripts/fhir/export-common.js +0 -209
  54. package/app/scripts/fhir/expression-processor.js +0 -670
  55. package/app/scripts/fhir/extensions/rendering-style.js +0 -23
  56. package/app/scripts/fhir/fhir-common.js +0 -3
  57. package/app/scripts/fhir/obs-prepop.mjs +0 -97
  58. package/app/scripts/fhir/runtime-common.js +0 -33
  59. package/app/scripts/fhir/sdc-common.js +0 -334
  60. package/app/scripts/fhir/sdc-export-common.js +0 -1046
  61. package/app/scripts/fhir/sdc-import-common.js +0 -1343
  62. package/app/scripts/fhir/versions.js +0 -8
  63. package/app/scripts/index.js +0 -20
  64. package/app/scripts/lforms-config.js +0 -12
  65. package/app/scripts/lforms-constants.js +0 -10
  66. package/app/scripts/lforms-controllers.js +0 -1196
  67. package/app/scripts/lforms-directives.js +0 -424
  68. package/app/scripts/lforms-index.js +0 -20
  69. package/app/scripts/lib/cross_browser.js +0 -21
  70. package/app/scripts/lib/lforms-data.js +0 -3591
  71. package/app/scripts/lib/lforms-hl7.js +0 -525
  72. package/app/scripts/lib/lforms-util.js +0 -1122
  73. package/app/scripts/lib/lforms-validate.js +0 -277
  74. package/app/scripts/lib/polyfill.js +0 -81
  75. package/app/scripts/themeList.js +0 -17
  76. package/app/styles/lforms.css +0 -1219
  77. package/app/styles/redmond-theme/README.txt +0 -2
  78. package/app/styles/redmond-theme/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  79. package/app/styles/redmond-theme/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  80. package/app/styles/redmond-theme/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  81. package/app/styles/redmond-theme/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  82. package/app/styles/redmond-theme/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  83. package/app/styles/redmond-theme/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  84. package/app/styles/redmond-theme/images/ui-icons_217bc0_256x240.png +0 -0
  85. package/app/styles/redmond-theme/images/ui-icons_2e83ff_256x240.png +0 -0
  86. package/app/styles/redmond-theme/images/ui-icons_469bdd_256x240.png +0 -0
  87. package/app/styles/redmond-theme/images/ui-icons_6da8d5_256x240.png +0 -0
  88. package/app/styles/redmond-theme/images/ui-icons_cd0a0a_256x240.png +0 -0
  89. package/app/styles/redmond-theme/images/ui-icons_d8e7f3_256x240.png +0 -0
  90. package/app/styles/redmond-theme/images/ui-icons_f9bd01_256x240.png +0 -0
  91. package/app/styles/redmond-theme/jquery-ui.css +0 -1311
  92. package/app/styles/redmond-theme/jquery-ui.min.css +0 -7
  93. package/app/styles/redmond-theme/theme.css +0 -443
  94. package/app/styles/themes.css +0 -1541
  95. package/app/styles/themes.css.map +0 -9
  96. package/app/styles/themes.scss +0 -411
  97. package/app/version.json +0 -1
  98. package/app/views/partials/attachment.html +0 -38
  99. package/app/views/partials/field-answers.html +0 -67
  100. package/app/views/partials/field-units.html +0 -24
  101. package/app/views/partials/form-controls.html +0 -19
  102. package/app/views/partials/form-header.html +0 -35
  103. package/app/views/partials/form-options.html +0 -50
  104. package/app/views/partials/form-title.html +0 -20
  105. package/app/views/partials/form-view.html +0 -13
  106. package/app/views/partials/item-options.html +0 -48
  107. package/app/views/partials/item.html +0 -126
  108. package/app/views/partials/itemPrefixAndText.html +0 -4
  109. package/app/views/partials/layout-horizontal.html +0 -156
  110. package/app/views/partials/layout-matrix.html +0 -145
  111. package/app/views/partials/popover-content.html +0 -1
  112. package/app/views/partials/repeating-button.html +0 -16
  113. package/app/views/partials/table-item.html +0 -30
  114. package/app/views/partials/template-table.html +0 -69
  115. package/app/views/partials/uib-popover-templates/uib-popover-template.html +0 -13
  116. package/app/views/partials/uib-popover-templates/uib-popover.html +0 -11
package/r4-support.md ADDED
@@ -0,0 +1,147 @@
1
+ # Support for FHIR version R4
2
+ This briefly details the support for FHIR R4 Questionnaire and
3
+ QuestionnaireResponse. Note that we have also support for FHIR STU3 for
4
+ Questionnaire and QuestionnaireResponse, but that is not documented here.
5
+
6
+ # Questionnaire
7
+ See https://www.hl7.org/fhir/questionnaire.html for a list of the fields in
8
+ Questionnaire. For a list of core extensions, see
9
+ https://www.hl7.org/fhir/questionnaire-profiles.html#extensions.
10
+
11
+ ## Supported
12
+
13
+ ### Top-level fields
14
+ All top-level (form-level) fields are supported, but since most of those fields
15
+ do not affect the rendering of a Questionnaire, mostly that means that if a
16
+ Questionnaire containing those fields is imported into LHC-Forms, and
17
+ re-exported in FHIR Questionnaire, the fields are preserved.
18
+
19
+ For "status", if it was not previously set at import, it will be set to "draft" on export.
20
+
21
+ ### Item-level fields
22
+ * linkId
23
+ * code
24
+ * prefix
25
+ * text
26
+ * type: All types except reference, and with partial support for date,
27
+ dateTime, and time. (See "not yet supported" for details.)
28
+ * enableWhen: Supported, but has a couple of known bugs:
29
+ * Does not support > on strings or dates.
30
+ * For multi-select lists, the "exists" continues to return true after all
31
+ selected values are removed.
32
+ * enableWhenBehavior
33
+ * required
34
+ * repeats
35
+ * readOnly
36
+ * maxLength
37
+ * answerValueSet: Supported, with the exception "contained" ValueSets are
38
+ required to include an expansion.
39
+ * answerOption
40
+ * answerOption.initialSelected
41
+ * initial
42
+
43
+ ### Extensions
44
+ * maxSize
45
+ * maxValue
46
+ * mimeType
47
+ * minLength
48
+ * minValue
49
+ * ordinalValue
50
+ * choiceOrientation
51
+ * hidden
52
+ * itemControl: Support for types: gtable, table, drop-down, autocomplete,
53
+ radio-button, check-box, help. Note that type "list", "inline", and
54
+ "text-box" are default behavior, so those are supported, and the extension is
55
+ not needed for those cases.
56
+ * maxOccurs
57
+ * minOccurs
58
+ * unitOption
59
+ * regex
60
+ * variable
61
+
62
+ The following extensions seem to be out of scope for a form renderer, but they
63
+ are "supported" in the sense that if a Questionnaire using them is re-exported
64
+ from LHC-Forms, the extensions will still be present.
65
+ * 11179-permitted-value-conceptmap
66
+ * 11179-permitted-value-valueset
67
+ * designNote
68
+ * replaces
69
+ * baseType
70
+
71
+ ## Not yet supported
72
+ ### Item-level fields
73
+ * item.definition
74
+ * item.type: No support for type=reference. Also, there are the following
75
+ limitations on the support for types "date", "dateTime", and "time":
76
+ * The date in "date" "dateTime" must be complete dates. No timezone is shown
77
+ or selectable for "dateTime". When entering a
78
+ dateTime the local timezone is assumed.
79
+ * The time in "time" and "dateTime" must have both hours and minutes, only.
80
+ Seconds and milliseconds cannot be entered.
81
+ * We have not tested what happens if you load a QuestionnaireResponse with
82
+ data that violates the above restrictions. We are planning to correct
83
+ these deficiencies when we can find a suitable UI package that is more
84
+ flexible about entry of dates and times. Possibly we will need to write
85
+ our own.
86
+ * answerValueSet: "contained" ValueSets without expansions are unsupported
87
+
88
+ ### Extensions
89
+ Note that non-supported extensions are simply ignored, but are also retained on
90
+ a re-export to Questionnaire.
91
+ * maxDecimalPlaces
92
+ * constraint
93
+ * displayCategory
94
+ * itemControl: See above for supported types. Unsupported: htable, header,
95
+ footer, lower, upper, flyover, lookup, slider, spinner. Type "unit" is
96
+ unsupported, but is also unnecessary with LHC-Forms if "questionnaire-unit" is
97
+ used. Type "prompt" is also unsupported but is being removed in
98
+ R5 (https://jira.hl7.org/browse/FHIR-21023).
99
+ * unitValueSet
100
+ * usageMode
101
+
102
+
103
+ # QuestionnaireResponse
104
+ See https://www.hl7.org/fhir/questionnaireresponse.html for a list of the fields in
105
+ QuestionnaireResponse.
106
+
107
+ For a list of core extensions, see
108
+ https://www.hl7.org/fhir/questionnaireresponse-profiles.html. LHC-Forms does
109
+ not output any of those extensions when creating a QuestionnaireResponse, and
110
+ they do not affect the display of the form if a QuestionnaireResponse containing
111
+ them is imported.
112
+
113
+ ## Fields in QuestionnaireResponse
114
+
115
+ Because many of the fields in QuestionnaireResponse are either not relevant for
116
+ rendering a form, or when
117
+ [exporting](https://lhncbc.github.io/lforms/#retrieving-fhir-data) to a
118
+ QuestionnaireResponse are left for the application to set, the following list is
119
+ not broken out into supported and unsupported sub-sections as for Questionnaire.
120
+
121
+ * identifier: Not used on import, and not set on export.
122
+ * basedOn: Out of scope; this would be something for the application to set
123
+ * partOf: Out of scope; this would be something for the application to set
124
+ * questionnaire: LHC-Forms currently leaves it up the application to set this
125
+ field, though in the future we plan to set it with value of Questionnaire.url.
126
+ * status: LHC-Forms sets this to "completed", but the application should change
127
+ this value it knows that it should be something else (e.g. "amended").
128
+ * subject: The application can pass in the subject value as an option when
129
+ [exporting](https://lhncbc.github.io/lforms/#retrieving-fhir-data) the
130
+ QuestionnaireResponse, or it can set it afterward.
131
+ * encounter: Left for the application to set. LHC-Forms would not know this
132
+ except in certain cases.
133
+ * authored: Set by LHC-Forms to the date and time at which the QuestionnaireResponse is
134
+ exported.
135
+ * author: Left for the application to set. LHC-Forms would not know this
136
+ except in certain cases.
137
+ * source: Left for the application to set. LHC-Forms would not know this
138
+ except in certain cases.
139
+ * item.linkId: Supported
140
+ * item.definition: Not supported
141
+ * item.text: LHC-Forms does not currently export this field, though we might
142
+ change that in the future. It is not necessary, since it is present in the
143
+ Questionnaire, but it makes it easier to read a QuestionnaireResponse by
144
+ itself.
145
+ * item.answer.value[x]: All types are supported except valueReference.
146
+ * item.item: Supported
147
+
package/sdc-support.md ADDED
@@ -0,0 +1,127 @@
1
+ # Support for FHIR Structured Data Capture
2
+
3
+ The following is a terse listing of our support for the Structured Data Capture
4
+ (SDC) FHIR Implementation Guide. For more details about the items listed here,
5
+ see: https://build.fhir.org/ig/HL7/sdc/index.html
6
+
7
+ For the expression extensions mentioned below, we do not support CQL, but do
8
+ support FHIRPath and x-fhir-query where appropriate for the extension.
9
+
10
+ The following lists are organized by the sections of the SDC implementation
11
+ guide (IG).
12
+
13
+ ## Supported Features
14
+ ### Advanced Rendering
15
+ See https://build.fhir.org/ig/HL7/sdc/rendering.html for descriptions of these
16
+ fields.
17
+ * rendering-style: on item.text and prefix
18
+ * rendering-xhtml: on item.text, but only for itemControl of type "help", and
19
+ it does not perform any sanization, and allows any HTML, so please consider
20
+ security issues before using.
21
+ * hidden
22
+ * itemControl: Support for types: gtable, table, drop-down, autocomplete,
23
+ radio-button, check-box, help. Note that type "list" is the default type of
24
+ display, so that is supported, and the extension is not needed for that case.
25
+ * choiceOrientation
26
+ * optionPrefix
27
+ * required
28
+ * repeats
29
+ * readOnly
30
+ * entryFormat
31
+
32
+ ### Form Behavior
33
+ See https://build.fhir.org/ig/HL7/sdc/behavior.html for descriptions of these
34
+ fields.
35
+ * maxLength
36
+ * minLength
37
+ * regex
38
+ * minValue
39
+ * maxValue
40
+ * mimeType
41
+ * maxSize
42
+ * answerOption
43
+ * answerValueSet: Note that contained ValueSets are expected to contain an expansion.
44
+ * answerExpression
45
+ * required: (also listed in previous section of the SDC IG)
46
+ * repeats
47
+ * readOnly
48
+ * minOccurs
49
+ * maxOccurs
50
+ * unitOption
51
+ * launchContext: limited to what can be obtained through the npm package
52
+ "fhirclient" (user, patient, encounter)
53
+ * variable
54
+ * initialExpression
55
+ * calculatedExpression
56
+ * initial
57
+ * enableWhen
58
+ * enableBehavior
59
+ * enableWhenExpression
60
+ * ordinalValue
61
+
62
+ ### Form Population
63
+ See https://build.fhir.org/ig/HL7/sdc/populate.html for descriptions of these
64
+ fields.
65
+ * observationLinkPeriod
66
+ * launchContext
67
+ * variable
68
+ * initialExpression
69
+
70
+ ### Form Data Extraction
71
+ See https://build.fhir.org/ig/HL7/sdc/extraction.html for descriptions of these
72
+ fields.
73
+ * observationExtract
74
+
75
+
76
+
77
+ ## Not yet supported
78
+ ### Advanced Rendering
79
+ See https://build.fhir.org/ig/HL7/sdc/rendering.html for descriptions of these
80
+ fields.
81
+ * rendering-xhtml: Other than for item.text with itemControl of type "help"
82
+ * displayCategory
83
+ * sliderStepValue
84
+ * width
85
+ * collaspible
86
+ * supportLink
87
+ * choiceColumn
88
+ * valueset-label
89
+ * shortText
90
+ * rendering-styleSensitive
91
+ * optionalDisplay
92
+
93
+ ### Form Behavior
94
+ See https://build.fhir.org/ig/HL7/sdc/behavior.html for descriptions of these
95
+ fields.
96
+ * minQuantity
97
+ * maxQuantity
98
+ * maxDecimalPlaces
99
+ * optionExclusive
100
+ * unitValueSet
101
+ * referenceResource
102
+ * referenceProfile
103
+ * candidateExpression
104
+ * lookupQuestionnaire
105
+ * cqf-library
106
+ * cqf-calculatedValue
107
+ * cqf-expression
108
+ * entryMode
109
+ * usageMode
110
+ * constraint
111
+ * endPoint
112
+ * signatureRequired
113
+
114
+ ### Form Population
115
+ See https://build.fhir.org/ig/HL7/sdc/populate.html for descriptions of these
116
+ fields.
117
+ * itemPopulationContext
118
+ * candidateExpression
119
+ * contextExpression
120
+ * sourceQueries
121
+ * sourceStructureMap
122
+
123
+ ### Form Data Extraction
124
+ See https://build.fhir.org/ig/HL7/sdc/extraction.html for descriptions of these
125
+ fields.
126
+ * itemExtractionContext
127
+ * targetStructureMap
package/app/.npmignore DELETED
@@ -1,3 +0,0 @@
1
- data
2
- fhir-data
3
- test
Binary file
Binary file
package/app/index.html DELETED
@@ -1,10 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <!-- the content of this file is used by grunt tasks only -->
5
- <!-- redirect to a test page -->
6
- <meta http-equiv="refresh" content="0; url=/test/lforms_testpage.html" />
7
- </head>
8
- <body>
9
- </body>
10
- </html>
package/app/lforms.js DELETED
@@ -1,56 +0,0 @@
1
- // Use IIFE so that strict mode is not at the file level
2
- (function() {
3
- 'use strict';
4
- var widgetDeps = [
5
- 'smoothScroll',
6
- 'autocompleteLhcMod',
7
- 'ui.bootstrap.datetimepicker'];
8
- var Def = require('autocomplete-lhc');
9
- if (Def._tooltip)
10
- widgetDeps = [Def._animate, Def._popover, Def._tooltip, 'ui.bootstrap'].concat(widgetDeps);
11
- else
12
- widgetDeps = ['ngAnimate', 'ui.bootstrap'].concat(widgetDeps);
13
- angular.module('lformsWidget', widgetDeps)
14
- .config(['$animateProvider', '$rootScopeProvider', '$compileProvider',
15
- function ($animateProvider, $rootScopeProvider, $compileProvider) {
16
- $animateProvider.classNameFilter(/has-ng-animate/);
17
- // AngularJS complains if there are too many levels of nesting in the form
18
- // (due to directives calling directives....) Increase the maximum from
19
- // the default of 10. When the number of levels is exceeded, the form
20
- // still renders, but error messages appear in the console, and it is
21
- // probably not properly initialized.
22
- $rootScopeProvider.digestTtl(20);
23
- // Allow "data:" URLs to be assigned to an href.
24
- $compileProvider.aHrefSanitizationTrustedUrlList(/^(https?|ftp|mailto|data):/);
25
- }])
26
- .directive('lforms', function() {
27
- return {
28
- restrict: 'E',
29
- scope: {
30
- lfData: '=',
31
- // set a variable 'item' for 'lfData'
32
- // 'item' is used by some internal recursive directives
33
- item: '=lfData',
34
- lfOptions: '=?'},
35
- link: function(scope, element, attributes) {
36
- // watch on data change
37
- scope.$watch("lfOptions", function (value){
38
- if (scope.lfData && value)
39
- scope.lfData.setTemplateOptions(value);
40
- }, true);
41
- // watch on variable change
42
- scope.$watch("lfOptions", function (value){
43
- if (scope.lfData && value)
44
- scope.lfData.setTemplateOptions(value);
45
- });
46
- },
47
- transclude: true,
48
- controller: 'LFormsCtrl',
49
- templateUrl: 'form-view.html'
50
- };
51
- });
52
- })();
53
-
54
- // Define the top-level namespace object
55
- var LForms = Object.assign({}, require('./version.json'));
56
- module.exports = LForms;