lforms
Version:
[LForms](http://lhncbc.github.io/lforms/), a.k.a. LHC-Forms, is a feature-rich, open-source Web Component that creates input forms, based on definition files, for Web-based applications. In addition to its native form-definition format, it partially sup
1,474 lines (1,205 loc) • 65 kB
Markdown
# Change log
This project follows [Semantic Versioning](http://semver.org/).
## [38.0.1] 2025-07-24
### Fixed
- Some languages use a different decimal character like "," instead
of ".". It is now configurable.
## [38.0.0] 2025-07-23
### Changed
- HTML Element IDs for answers now include the code system to ensure their
uniqueness. The element IDs are not a part of the public API, so technically
this is not a breaking change, but we recognize that some people might have
CSS that targets element IDs.
## [37.0.0] 2025-07-10
### Changed
- Not to show the repetition number by default.
- Never show the treeline or indentation on the first level.
- Changed "hideTreeLine" to a string type that accept 'true', 'false' and
'auto'. The default is now 'auto', which means to show the treeline when
the questionnaire has more than 3 levels of the hierarchy, and hide the
treeline when there are up to 3 levels of the hierarchy.
- Changed the treeline color to a lighter, less dominant color.
## [36.20.3] 2025-07-10
### Fixed
- Fixed a bug that the matrix layout ('table' in itemControl extension)
does not always display answers loaded from answerValueSet.
## [36.20.2] 2025-07-09
### Fixed
- answerValueSet expansion error under the field should still show
when the form is loaded for the second time.
## [36.20.1] 2025-06-20
### Changed
- Update autocomplete-lhc version and use new ID lhc-tools-searchResults
in tests.
## [36.20.0] 2025-06-13
### Added
- Show an error message under the field if the answerValueSet expansion fails.
## [36.19.2] 2025-06-11
### Fixed
- A boolean field was not updating in UI according to calculated expression.
## [36.19.1] 2025-06-04
### Fixed
- Tooltips were shown incorrectly when adding a repeating item.
## [36.19.0] 2025-05-21
### Added
- Support for rendering-style on radio buttons and checkboxes.
## [36.18.0] 2025-04-25
### Changed
- If observationExtract=false on an item, child items are not considered
for extraction unless they explicitly turn extraction back on again by
observationExtract=true.
- observationExtract can indicate which code or codes should be applied by being on
item.code (in which case, having it on the item is not necessary).
## [36.17.0] 2025-04-15
### Added
- Support for building into a different language.
- Currently only German is added. Support for additional languages can be added
under src/languages.
## [36.16.1] 2025-04-14
### Fixed
- Fixed a bug that initial values are not rendered on matrix (itemControl 'table')
layout when more than one item has 'initialSelected' or initial values.
## [36.16.0] 2025-04-04
### Added
- Support for rendering-style on 'legal' and 'help' text in the itemControl extension.
## [36.15.3] 2025-03-28
### Fixed
- Updated fhirpath.js to version 3.18.0 to update the `weight()` function and
added unit tests for this function.
- Fixed converting R5 FHIR Questionnaire to LForms form definition.
- Fixed converting LForms form definition to standard STU3 FHIR Questionnaire.
- Fixed model for R5.
## [36.15.2] 2025-03-27
### Changed
- Moved code containing hard-coded SNOMED url out of the lhc-autocomplete
component.
## [36.15.1] 2025-03-18
### Fixed
- Fixed a bug that item.type 'coding' with answerConstraint 'optionsOrType'
in R5 questionnaire should not be converted to 'choice' or 'open-choice'
in R4. An exception should be thrown.
## [36.15.0] 2025-02-10
### Changed
- The promise returned by LForms.Util.addFormToPage, when it fails, will now
reject with an array of error messages instead of just a single error message.
Likewise the onError event emitted by the web component will now
contain an array of errors instead of just a single error message.
This is potentially a breaking change, but the impact is unlikely to be
harmful given the way error messages are typically used, so we did not change
the major version.
## [36.14.0] 2025-03-13
### Added
- Support for itemControl 'legal'.
## [36.13.0] 2025-03-06
### Added
- Support for rendering-xhtml on externally loaded answerValueSet prefetch/radio/checkbox.
## [36.12.0] 2025-03-06
### Added
- Loading answerValueSet for contained ValueSets without an expansion.
### Fixed
- Exported Questionnaire should have answerValueSet property but not populated
answerOptions if they are from contained ValueSets.
## [36.11.2] 2025-03-03
### Fixed
- Only the new externallyDefined URL should be exported.
## [36.11.1] 2025-02-28
### Changed
- New URL for preferredTerminologyServer extension.
- preferredTerminologyServer extension should work at root level as well as
item level.
## [36.11.0] 2025-02-27
### Changed
- Upgraded angular to v19
- Upgraded ng-zorro-antd to v19
## [36.10.5] 2025-02-25
### Fixed
- Fixed a display issue for answers, where the display field might
not have data.
## [36.10.4] 2025-02-24
### Fixed
- Fixed a bug that the repeating numbers are not displayed correctly
on the repeating items when their data are loaded through FHIRPath
expressions.
## [36.10.3] 2025-02-07
### Changed
- Changed the meta.profile for STU3, R4 and R5 in the exported
QuestionnaireResponse so that the standard FHIR profiles are used.
## [36.10.2] 2025-02-03
### Fixed
- The "url" parameter was not URL-encoded when doing expansions.
## [36.10.1] 2025-01-30
### Fixed
- Warning messages were being incorrectly generated for failing to load a value
set for an autocomplete field, for which the value set should not be and is
not loaded at form initialization time.
- Improved the timing of the formReady event, so that it is sent after the form
has been rendered.
## [36.10.0] 2025-01-30
### Added
- Support for rendering-xhtml on contained[valueSet].expansion.contains.display.
## [36.9.0] 2025-01-30
### Added
- Support for rendering-xhtml on answerOption.valueCoding.display.
## [36.8.2] 2025-01-17
### Fixed
- Fixed a bug that linkIds in help text items were lost in exported
Questionnaire.
## [36.8.1] 2024-12-17
### Fixed
- Fixed a bug that code.system was not set correctly when exporting
data as DiagnosticReport.
## [36.8.0] 2024-12-12
### Added
- Support for rendering-xhtml on item.prefix
## [36.7.4] 2024-12-11
### Added
- Added tests for FHIRPath expressions to work with "coding" items in R5.
## [36.7.3] 2024-12-09
### Fixed
- Matrix layout radio group tab issue.
## [36.7.2] 2024-12-03
### Changed
- Upgraded to nodejs version 22.
## [36.7.1] 2024-12-02
### Fixed
- Updated checkForInvalidHtml to allow more tags/attributes.
- Fixed a bug that help text and copyright text could be out of position
if they are too long.
- Fixed a bug that the QuestionnaireResponse data could be modified
when passed in to the mergeFHIRDataIntoLForms function.
## [36.7.0] 2024-11-20
### Added
- Support for rendering-xhtml on answerOption.
## [36.6.1] 2024-10-24
### Fixed
- Errors with attempting to access undefined environment variables when
evaluating FHIRPath expressions where the variables are evaluated
asynchronously.
## [36.6.0] 2024-10-22
### Added
- Added support of disabledDisplay in R5 Questionnaire.
## [36.5.2] 2024-10-21
### Added
- Added a function, 'getSupportedItemControl', to return an object containing a list of supported item controls.
## [36.5.1] 2024-09-19
### Fixed
- Fixed a bug that loaded data on repeating, readonly items could be deleted.
## [36.5.0] 2024-07-29
### Added
- Support for asynchronous FHIRPath expressions.
## [36.4.0] 2024-07-23
### Added
- Support for rendering-xhtml on item.text.
- Added new template option allowHTML. allowHTMLInInstructions is deprecated.
## [36.3.3] 2024-07-22
### Added
- Copy questionnaire-ordinalValue (STU3), ordinalValue (R4) and
itemWeight (R5) extensions to questionnaire response.
## [36.3.2] 2024-07-10
### Changed
- Allow ValueSets to load without a FHIR Context if a terminology server is
on the form.
## [36.3.1] 2024-07-08
### Changed
- Set 500ms delay for SNOMED requests on autocomplete Search instance.
## [36.3.0] 2024-07-08
### Added
- support for maxdecimalplaces extension.
## [36.2.0] 2024-07-03
### Changed
- addFormToPage() can optionally take a questionnaire response in options
to reduce number of lforms API calls.
- Error message for missing enableWhen.question.
## [36.1.3] 2024-06-09
### Fixed
- Removed accidental creation of global variable "self", which caused Google
Analytics to throw exceptions when a link was clicked.
## [36.1.2] 2024-06-07
### Fixed
- Preserve id field in questionnaire items.
## [36.1.1] 2024-06-07
### Changed
- CSS tweaks in attachment fields to align with other fields.
## [36.1.0] 2024-05-24
### Added
- Support for the FHIR observation-extract-category extension which sets
Observation.category when an Observation is extracted from the Questionnaire.
## [36.0.7] 2024-05-22
### Fixed
- Updated fhirpath.js to version 3.13.2 to get resource node data types using
the `fhirpath.types(nodes)` function.
## [36.0.6] 2024-05-21
### Changed
- Remove "Add another" on buttons.
## [36.0.5] 2024-05-09
### Fixed
- Fixed a bug that repeating items that have answer list and have child
items are not rendered correctly.
## [36.0.4] 2024-05-01
### Fixed
- Fetching of ValueSets needs to specify JSON.
## [36.0.3] 2024-04-26
### Fixed
- Fixed a bug to catch and throw an error when an enableWhen field
in Questionnaire points to an invalid linkId.
## [36.0.2] 2024-04-17
### Fixed
- Fixed a position issue of the validation messages.
## [36.0.1] 2024-04-08
### Fixed
- Guard against loading wc-lhc-form webcomponent more than once.
## [36.0.0] 2024-04-04
### Changed
- Removed data types 'CNE' and 'CWE' from the lforms internal data structure, and
replaced them with type 'CODING' and an 'answerConstraint' attribute.
'CNE' and 'CWE' data types are still supported in legacy data files.
### Added
- Added the support of 'answerContraint' in R5. Only 'optionsOnly' and
'optionsOrString are supported. 'OptionsOrType' is not supported yet.
- Added the support of item.type changes R5. Added 'coding' and removed
'choice' and 'open-choice'.
## [35.2.1] 2024-04-03
### Fixed
- Fixed a bug in "npm run start-public"
## [35.2.0] 2024-04-02
### Updated
- Upgraded angular to v17
- Upgraded cypress to v13
## [35.1.0] 2034-03-29
### Added
- Added the support for detecting invalid html tags and attributes
in the html version of the help text.
## [35.0.4] 2024-03-08
### Updated
- Updated autocomplete-lhc version to include loading indicator.
## [35.0.3] 2024-02-20
### Updated
- autocomplete-lhc version.
## [35.0.2] 2024-02-16
### Fixed
- answerValueSet items in repeated groups was not rendered properly.
## [35.0.1] 2024-02-06
### Fixed
- Fixed a bug that enableWhen breaks when there is a loop of references to
the items in enableWhen.question.
## [35.0.0] 2023-12-21
### Fixed
- QuestionnaireResponse no longer contains answers to child questions of
unanswered parent questions. See https://jira.hl7.org/browse/FHIR-32665.
Although the change of the cardinality of item.answer.value to 1..1 was an R5
change, it was the intention all along, so we have made the change for R4 &
STU3 as well. Although we regard this as a fix, it could be a breaking
change for some, which is the reason for the major version increment.
## [34.4.0] 2023-12-05
### Added
- Added the support for using image data in the 'contained' when a local ID
is used in the 'src' attribute of a 'img' in the value of the 'rendering-xhtml'
extension for help text.
## [34.3.1] 2023-12-01
### Added
- Added support for regex strings without '/' in validations
## [34.3.0] 2023-11-16
### Changed
- Changed the option, showQuestionCode, to control the display of all of the
codes of an item, not just the first code.
- Updated styles to display newlines and spaces in coding instructions.
## [34.2.0] 2023-10-18
### Added
- Support for the exporting of QuestionnnaireResponse.questionnaire.
### Fixed
- Fixed a bug that copyright is not displayed when there is no code.
## [34.1.0] 2023-10-13
### Added
- Added support for FHIR verison R4B.
## [34.0.4] 2023-10-04
### Fixed
- The FHIR extension for setting the preferred terminology server now works on
the root of the Questionnaire as well as on items.
## [34.0.3] 2023-09-28
### Fixed
- Fiex a bug that number 0 in QuestionnaireResponse is not imported when
the QuestionnaireResponse is loaded into the corresponding Questionnaire.
## [34.0.2] 2023-09-20
### Fixed
- Fixed a bug in LForms.Util.guessFHIRVersion() to detect STU3 when initial
fields are specified.
## [34.0.1] 2023-08-18
### Fixed
- Fixed a bug that when an item has the sdc-questionnaire-unitOpen extension
set to 'optionsOrString', a user typed unit would be cleared in the UI
even it is still available in the QuestionnaireResonse.
## [34.0.0] 2023-08-15
### Fixed
- jQuery is no longer leaked to the containing app. This might be a breaking
change for users who were relying on jQuery being defined as a result of
loading the lforms package. Apps can either load jQuery themselves or use
LForms.jQuery (which is where the lforms jQuery moved to) but note that we
would like to remove the jQuery dependency in the future if possible. If we
do that, it will be another major-version increment to signal the
breaking change.
## [33.4.2] 2023-07-25
### Fixed
- The sourcemap file for lhc-forms.js now works.
## [33.4.1] 2023-07-19
### Fixed
- The URI for the "preferred terminology server" FHIR extension, which was
previously updated too soon to a new URI that has not gotten into the
published documentation yet. Either will still work on import; this change
affects what is exported.
- Updated autocomplete-lhc to 18.6.1, to get a fix for a bug with the list
positioning which could happen if lforms was inside a dialog box.
## [33.4.0] 2023-07-17
### Added
- Support for %qitem in FHIRPath expressions.
## [33.3.7] 2023-06-14
### Fixed
- Fixed a bug that copyright is not handled in import and export functions.
## [33.3.6] 2023-06-01
### Fixed
- Fixed a bug that the 'system' value is missing in QuestionnaireResponse when
an item has an answerValueSet and it also has a questionnaire-item-control
extension that is 'autocomplete' (search field).
## [33.3.5] 2023-05-17
### Fixed
- Fixed a bug that FHIRPath expressions could run on a QuestionnaireResponse where
the data are invalid. It now throws an error.
## [33.3.4] 2023-05-03
### Fixed
- Fixed a bug that when a QuestionnaireResponse with saved values from an answerValueSet
is loaded back into the Questionnaire, the saved values are not restored.
## [33.3.3] 2023-04-19
### Fixed
- Fixed a bug in updating meta.profile in exported questionnaire based on it version
such as STU3, R4 etc.
## [33.3.2] 2023-02-06
### Fixed
- Fixed a bug that initial values were not displayed in the matrix layout ("Vertical
Answer Table"/"table" in itemControl, http://hl7.org/fhir/questionnaire-item-control).
- Fixed a 508 compliance issue related to the matrix layout.
## [33.3.1] 2023-01-24
### Fixed
- Fixed a bug that changes from FHIRPath expressions did not update treeline status.
## [33.3.0] 2023-01-23
### Changed
- Changed the design of the boolean component. It's now rendered as 3 radio buttons
to support the concept of "no answer".
### Added
- Added the support of enableWhen on string, integer, date and time typed items that
have an answer list.
## [33.2.0] 2022-01-06
### Added
- Added a template option to control whether to display scores along
with texts for answers that have scores.
## [33.1.2] 2022-12-23
### Fixed
- FHIR Expressions were being run on form load once per item with an
autocompletion list. It now will only run an extra time (on form load) once
for each item of type quantity which has a unit list, which is still more
often that should be needed, but this fix by itself should help speed up the
loading of many forms.
## [33.1.1] 2022-12-13
### Fixed
- Fixed a bug that hidden items in a questionnaire are displayed when
a questionnaire response is loaded/merged into the questionnaire.
## [33.1.0] 2022-11-30
### Added
- Added support for answerExpression on items whose types are string, integer,
date and time.
### Fixed
- Fixed a configuration issue in webpack dev server that FHIR js files
failed to load through a proxy in dev mode.
## [33.0.0] 2022-11-15
### Updated
- Updated angular from v12 to v14
### Changed
- Removed the support for IE 11.
- Only ES2017 files (no ES5 files) are in the build files.
The concatnated js file name is now lhc-forms.js, not
lhc-forms.es5.js or lhc-forms.es2015.js
- Made item.dataType in lforms internal format required (a breaking change).
- Made initial[x] values and the initialSelected on answerOption both work
when the item.type is choice or open-choice.
### Added
- Added support for string, date, time and integer values in answerOption (R4)
and option (STU3), including the support for related extensions (optionPrefix,
ordinalValue, and itemControl) and the initial[x] values.
### Fixed
- Fixed a bug in a custom cypress command.
- Fixed a bug in importing a DiagnosticReport resource.
## [32.2.3] 2022-11-03
### Fixed
- When running e2e tests, webpack-dev-server now serves the files so that
changes to source files are more quickly recompiled and updated for the test
runner.
## [32.2.2] 2022-10-25
### Fixed
- Fixed a bug in the construction of the URL for a FHIR ValueSet $expand
operation, though there was already a work-around in place, so the only result
was a single failed network call logged to the console (which then can cause a
problem for Cypress tests).
### Updated
- Cypress has been updated to version 10.
## [32.2.1] 2022-10-20
### Fixed
- Fixed a bug that enableWhen does not work on the values calculated from FHIRPath
expressions.
## [32.2.0] 2022-10-18
### Added
- Added support the currenly published URI for the preferred terminology server
extension, though that URI will be changing
(https://jira.hl7.org/browse/FHIR-23977).
## [32.1.0] 2022-09-18
### Added
- Added support the entryFormat extension
## [32.0.3] 2022-09-12
### Changed
- Removed item._modifiedAnswers and use item.answers directly.
- Removed fast-deep-equal package that is causing failed e2e tests in cypress.
### Fixed
- Fixed a bug that a user typed value on open-choice item is not set as a string value.
## [32.0.2] 2022-09-07
### Fixed
- Moved the URI for the custom FHIR extension lforms generates to store
the "externallyDefined" setting out of the HL7 namespace.
- Minor refactoring of the SDC import code, which should not impact users,
except that for STU3 item.definition will no longer be lost if you convert to
LForms format and and back to FHIR. (The R4 import did not have that issue.)
## [32.0.1] 2022-08-31
### Fixed
- Updated fhirpath.js to 3.0.0 to get a fix for
https://github.com/lhncbc/lforms/issues/102
## [32.0.0] 2022-08-30
### Changed
- Removed a feature in which the autocompletion list fields would default to
the answer list value if there were just one answer in the list.
- Changed the implementation on how the data changes in questionnaire data are handled.
- Added the active row indicator for the radio buttons and checkboxes.
## [31.0.1] 2022-08-26
### Fixed
- A very minor fix to the formatting of the form title, probably not visible to
a user, but which was causing a test to fail in another package.
## [31.0.0] 2022-08-04
### Changed
- FHIR Quantities with a comparator can no longer be stored or loaded into a
Questionnaire. This change is in line with
https://jira.hl7.org/browse/FHIR-37468.
### Fixed
- Fixes for handling Quantities in expressions.
## [30.4.2] 2022-07-07
### Changed
- Added a button on the test page (test/pages/lforms_testpage.html) to batch convert lforms
to FHIR questionnaires or vice versa, where both input and output are zip files
## [30.4.1] 2022-06-24
### Fixed
- Fixed a bug that FHIRPath expressions are not calculated on newly added
repeating items.
- Fixed a bug that enableWhen is not working on prepopulated answers.
## [30.4.0] 2022-06-13
### Added
- The beginnings of support to show error messages for individual fields.
## [30.3.0] 2022-05-19
### Added
- Added support for answerOption.initialSelected in R4 Questionnaire
## [30.2.0] 2022-05-18
### Changed
- Updated angular to v12 and ng-zorro-antd to v12.
## [30.1.7] 2022-05-17
### Fixed
- Fixed a bug that the radio button of "Other" of the CWE typed items lost
its checked state when users typed in the input field.
## [30.1.6] 2022-05-02
### Fixed
- Off-list string values from an open-choice field are now usable in an
expression for another open-choice field.
## [30.1.5] 2022-04-22
### Fixed
- Support for multiple values coming from intialExpression or calculateExpresion
on fields that are of type string or coding.
## [30.1.4] 2022-04-20
### Fixed
- Fixed a bug that the initial value of boolean type was not imported correctly
when it was false.
## [30.1.3] 2022-04-04
### Changed
- Adjusted the styles of readonly items
## [30.1.2] 2022-03-30
### Fixed
- Fixed a bug that observations were extracted from items that were either hidden or
had no values.
- Fixed a bug that boolean value false was not extracted correctly.
## [30.1.1] 2022-03-30
### Fixed
- Fixed a performance issue in the initial loading of a Questionnaire when it
contains a lot of choice and/or open-choice items.
- Fixed a bug that the values of date or dateTime items in a repeating group
are not checked when adding a new repeating group.
- Fixed a style issue for the first item in a group.
## [30.1.0] 2022-03-25
### Added
- Added options to hide tree line styles, indentation or repetition numbers.
## [30.0.1] 2020-03-22
### Fixed
- Fixed answerExpression and calculatedExpression processing so that for list
fields, both answers and answer lists can be set by an expression that depends
on the answers of another field.
## [30.0.0] 2020-03-08
Official release of the new Web Component version of lforms. See a list of changed
features in changed-features.md.
### Fixed
- Fixed a minor style issue
### Changed
- Code refactoring and clean up.
- Made most commands in package.json work on Windows.
## [30.0.0-beta.9] 2022-02-24
### Fixed
- Fixed a bug that the user saved data was overwritten by the values from initialExpression.
### Changed
- Added back the support of a CSS selector as the element parameter for LForms.Util functions
such as getFormData, getUserData and getFormFHIRData.
- Removed the redundant resourceType parameter in the LForms.Util.mergeFHIRDataIntoLForms function.
## [30.0.0-beta.8] 2022-02-17
### Fixed
- Fixed a bug that saved user data in a form are lost when answer lists are updated
by FHIRPath expression.
## [30.0.0-beta.7] 2022-02-17
### Added
- Support for the newer launchContext "name" data type, valueCoding. For
backward compatibility, valueId is still supported.
(https://build.fhir.org/ig/HL7/sdc/StructureDefinition-sdc-questionnaire-launchContext.html)
## [30.0.0-beta.6] 2022-02-15
### Added
- Support for arbitrary launchContext names and resource types. A second
parameter has been added to LForms.Util.setFHIRContext which is a map between
launchContext variable names and FHIR resource instances (as objects). This
allows an application that is familiar with a partictular Questionnaire
to pass in the needed resources.
## [30.0.0-beta.5] 2022-02-09
### Fixed
- Fixed a a bug that repeating rows in horizontal table (gtable) are not added
at the end of the table.
### Added
- Added the support of the questionnaire-hidden extension on the horizontal tables
(gtable) and the matrix (table).
## [30.0.0-beta.4] 2022-02-04
### Fixed
- calculatedExpression no longer forces fields to be read-only.
## [30.0.0-beta.3] 2022-01-25
### Added
- Added an onError event, that returns an error when FHIR resources
fail to load, or when there is an exception during the initialization.
- Added cypress for e2e tests.
## [30.0.0-beta.2] 2022-01-10
### Changed
- Removed locale files from moment.js
- Code refactoring on the initial release.
## [30.0.0-beta.1] 2021-12-15
### Fixed
- Fixed a style issue on items with a single unit.
## [30.0.0-beta.0] 2021-12-10
### Changed
- Included the initial release of the Web Component version of the LHC-Forms
widget in the "next" directory. This will be reorganized out of the "next"
directory prior to the non-beta release.
## [29.3.1] 2021-10-20
### Fixed
- If a form contained an attachment type question, hitting enter in another
field opened up the attachment options.
## [29.3.0] 2021-09-01
### Added
- Support for the FHIR enableWhenExpression extension.
## [29.2.3] 2021-08-26
### Fixed
- Fixed a typo in the error message introduced in 29.2.2.
## [29.2.2] 2021-08-24
### Changed
- The LForms.Util.addFormToPage function will now display an error message in
the cases where it does not render the form. The previous behavior was that
the form area was simply blank, so this is judged a "fix" over that.
## [29.2.1] 2021-08-23
### Changed
- Updated the URI for the FHIR "initialExpression" extension, but the old URI is
still supported and will be updated if found in a Questionnaire. As a
side-effect, this means that a re-export back to FHIR will have the updated
initialExpression URI.
## [29.2.0] 2021-07-26
### Added
- Support for attachments, both in FHIR (type="attachment") and in our internal
format (dataType="attachment").
## [29.1.3] 2021-07-26
### Fixed
- FHIR answerExpressions that return arrays of strings now work for setting a
list (though the type needs to be "choice", not "string", which is something
that will be fixed later).
## [29.1.2] 2021-07-22
### Fixed
- Updated fhirpath.js for improved handling of choice types.
## [29.1.1] 2021-06-24
### Changed
- Removed direct refereces to angular in FHIR lib files.
## [29.1.0] 2021-05-27
### Added
- Support for named FHIR expressions. Any supported FHIR expression can now
have a name, which acts like a variable for other expressions.
## [29.0.3] 2021-05-03
### Fixed
- Fixed a bug where hidden items were triggering validation to fail.
## [29.0.2] 2021-04-30
### Fixed
- Fixed a bug that item.repeats is not converted correctly in some cases.
## [29.0.1] 2021-04-29
### Fixed
- Fixed a bug that minValue extention is not imported correctly when the value is 0
## [29.0.0] 2020-12-23
### Changes
- Breaking change to FHIR support. The launchContext URI has changed to
http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-launchContext
## [28.1.6] 2021-03-24
### Fixed
- Updated jQuery to 3.6.0.
## [28.1.5] 2021-03-11
### Fixed
- FHIR calculatedExpressions on editable fields now stop calculating if the user
edits them.
## [28.1.4] 2021-03-03
### Fixed
- A FHIR Observation-based prepoluation issue: the Observations were not
being filtered by status.
- A problem in FHIR expression processing which caused issues if more than one
form was added to the page.
- Sorting was corrected for FHIR Observation-based prepoluation. It now takes
the latest by "date", not "_lastUpdated".
## [28.1.3] 2021-02-18
### Fixed
- Processing of FHIR expressions for fields with multi-select lists, and
for fields with radio buttons.
## [28.1.2] 2021-01-21
### Fixed
- Replaced local js-class.js with npm js-class package.
- Changed requiring a json package using .json extension.
## [28.1.1] 2021-01-13
### Fixed
- Added missing polyfills for IE 11.
- Fixed error handling logic for FHIR expressions.
## [28.1.0] 2021-01-11
### Added
- Support for x-fhir-query variables, and with embedded FHIRPath in the URLs
as described at
http://build.fhir.org/ig/HL7/sdc/expressions.html#x-fhir-query-enhancements.
The variable extension is documented at
http://hl7.org/fhir/R4/extension-variable.html
## [28.0.0] 2020-12-10
### Changed
- Breaking change to FHIR support. Changed the extract behavior to use the Observation Extract Extension
http://build.fhir.org/ig/HL7/sdc/StructureDefinition-sdc-questionnaire-observationExtract.html.
## [27.1.1] 2020-12-17
### Fixed
- Fixed a bug that nummeric value of 0 was not exported in QuestionnaireResponse
## [27.1.0] 2020-12-09
### Added
- Support for the FHIR questionnaire choice orientation extension.
## [27.0.0] 2020-12-08
### Changes
- Breaking change to FHIR support. LForms.Util.setFHIRContext now takes an
instance of 'client-js', a.k.a. npm package fhirclient,
version 2. (See http://docs.smarthealthit.org/client-js).
## [26.4.0] 2020-12-01
### Added
- Multiple code support for observationLinkPeriod prepopulation.
## [26.3.1] 2020-10-19
### Fixed
- Fixed a bug in STU3 Questionnaire import that 'options' is not handled correctly
## [26.3.0] 2020-10-16
### Added
- Added two functions: LForms.Util.isValid, which checks if the form fields are
valid and LForms.Util.getErrors to get a list of errors preventing the form
from being valid.
## [26.2.0] 2020-10-06
### Added
- Added a function, LForms.Util.getAnswersResourceStatus, which checks the status
of the loading of answer lists. (This only applies to forms defined as a
FHIR Questionnaire.)
## [26.1.2] 2020-10-05
### Added
- Support for using a FHIR Questionnaire as a form definition in addFormToPage.
## [26.1.1] 2020-09-30
### Fixed
- Fixed the extensions URI for answer scores
## [26.1.0] 2020-09-23
### Added
- Support for the FHIR answerExpression extension (with FHIRPath expressions
only).
## [26.0.0] 2020-09-16
### Changed
- Changed the default template options to hide the form controls and header.
## [25.1.6] 2020-09-15
### Fixed
- Remove duplicate entry in form level fields.
- Display a marker `*` on labels for required items.
- Add `aria-required` on required inputs.
## [25.1.5] 2020-09-04
### Fixed
- a bug in FHIR Observation-based extraction that kept it from working for
nested items.
## [25.1.4] 2020-08-27
### Fixed
- a bug in detection of STU3 Questionnaires
## [25.1.3] 2020-07-31
### Changed
- Treat skip logic condition source as not existing when it is disabled.
## [25.1.2] 2020-07-17
### Changed
- Fix a bug with skip logic notEqual operator.
## [25.1.1] 2020-06-24
### Changed
- Update angularjs to 1.8.0
## [25.1.0] 2020-06-22
### Added
- Added a support for providing ValueSets via a FHIR resource package at the initialization.
## [25.0.0] 2020-06-17
### Changed
- Updated the URI for the FHIR calculatedExpression extension. (If you are not
using FHIR, this change will not affect you.) The lforms-updater package can
be used to update FHIR Questionnaires generated for previous versions of
LForms.
## [24.1.4] 2020-05-08
### Fixed
- Fixed a bug that answers for questions under a question that has no answers were not exported.
## [24.1.3] 2020-05-06
### Fixed
- Replaced "Number.parseFloat" with "parseFloat" for IE11
## [24.1.2] 2020-05-04
### Fixed
- Fixed contained valueset reference for R4 (from using url to using #vs-id),
but continue to support url-based reference only for the purpose of
backward-compatibility with previous LForms versions.
## [24.1.1] 2020-04-28
### Changed
- Updated the fhirpath dependency to 2.1.3
- Updated the ucum-lhc dependency to 4.1.3
### Fixed
- Textarea placeholder binding causes exception in IE11
## [24.1.0] 2020-04-22
### Changed
- Separated the skip logic 'disabled' status from item's 'hidden' status.
### Fixed
- Correctly handled the import/export of the questionnaire-hidden extension.
## [24.0.2] 2020-04-21
### Fixed
- Fixed a bug that reloading existing LForms form definition object with instances of repeating items
might be very slow.
## [24.0.1] 2020-04-21
### Fixed
- Since 19.0.0, lforms only supports units for types INT, REAL, and QTY.
This fixes a place in which units should have been ignored but were not and
caused exceptions to be raised.
## [24.0.0] 2020-03-31
### Changed
- 'linkId' is now required on each item. 'questionCode' is no longer required.
The original 'questionCode', 'questionCodeSystem' are kept but might be refactored
into 'codeList' in the future versions.
- the name 'sourceItemCode' in dataControl.source becomes 'sourceLinkId' and its value
becomes the source item's linkId value
- the value of 'source' in skipLogic.conditions becomes the source item's linkId value.
- Remove _idPath from item object.
- 'linkId' is used in 'skipLogic', 'dataControl' and 'calculationMethod' to identify
source items across the form. The source items no longer have to be ancestors or
siblings of the target item.
## [23.0.1] 2020-03-24
### Fixed.
- Fixed missing extensions when outputting lforms format.
## [23.0.0] 2020-03-20
### Changed
- The version tag on generated FHIR resources is now set on the "code" property
instead of the "display" property, as some FHIR servers drop tags that do not
contain a code.
- Removed a FHIR extension for indicating that a question can have more than one answer.
We now rely on FHIR Questionnaire.item.repeats, plus the item type, to determine
whether an item repeats or the item's answer repeats in our rendering of the form.
## [22.0.0] 2020-03-12
### Changed
- The URI for the FHIR "observationLinkPeriod" extension has been updated to the
current URI,
http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod.
FHIR Questionnaires coded with the old URI will need to be updated to continue to
support Observation-based prepoluation or extraction. We are releasing a
separate package, lforms-updater which can be used to automate updating LForms
form definitions and FHIR Questionnaires to the current version.
## [21.2.1] 2020-03-05
### Changed
- Changed answer's 'codeSystem' to be 'system'. Legacy form data with 'codeSystem'
are converted into 'system' when a form a loaded.
## [21.2.0] 2020-03-03
### Added
- LForms form definitions now contain an lformsVersion attribute indicating the
LForms version from which they were generated.
- Generated/exported FHIR resources now contain a tag (meta.tag) that starts
with 'lformsVersion: ' followed by the LForms version used to export them.
## [21.1.0] 2020-02-27
### Added
- Added support for a custom extension in FHIR Questionnaire to contain the dataControl
data in LHC-Forms.
## [21.0.1] 2020-02-26
### Fixed
- Fixed a bug that valueBoolean in Questionnaire was not converted to LForms BL value.
## [21.0.0] 2020-02-26
### Changed
- Bumped up angularjs version to 1.7.x. This could potentially break applications still
running prior angularjs versions, hence bumped up the major version.
### Fixed
- Fixed a bug in click event in CNE/CWE control.
Changed ng-click event to ng-change event on radio/checkbox inputs when ngModel is used.
- Fix date time parsing test.
## [20.2.1] 2020-02-18
### Added
- Added support for 'notEqual' in skip logic, to support '!=' in the 'enableWhen' of
FHIR Questionnaire.
## [20.2.0] 2019-02-13
### Changed
- Updated the fhirpath dependency to 1.0.1 (which was a breaking fhirpath
change, but should not affect LForms). This adds some FHIR model information to
the evalution of FHIRPath expressions, paritcularly knowledge of choice-types,
so that expressions like "item.answer.value" can work.
### Added
- Implemented calculated value support for additional FHIR types, particularly
Coding, so that list fields can be set via a FHIRPath expression.
## [20.1.3] 2019-12-31
### Fixed
- Export calculatedExpression, variable and other FHIR extensions in lforms format.
## [20.1.2] 2019-12-26
### Fixed
- Exporting to FHIR no longer include the minOccurs extension if the value is 1
and "required" is true.
## [20.1.1] 2019-12-18
### Fixed
- defaultAnswer was not handled correctly for DT and DTM.
## [20.1.0] 2019-12-17
### Added
- Added support for item.answer.item when importing from/exporting to FHIR.
## [20.0.1] 2019-11-07
### Changed
- Added a vertical scrollbar for long text of coding instructions and copyright notice
in popover windows.
## [20.0.0] 2019-11-06
### Added
- Added "exists" support to skip logic
### Changes
- The trigger.code and triger.value.code were "hidden" features, but the issue of code system
wasn't taken into consideration and therefore was broken.
This has been reimplemented so that when the source question is of type CNE or CWE,
the trigger.value will be a hash with any or all of these three fields:
code, system, and text, and the trigger matching will be based on these fields. Please
see the updated lforms definition for more details.
## [19.0.2] 2019-11-04
### Fixed
- Fixed a bug that autocompleter options are not set for items in templateOptions.
## [19.0.1] 2019-10-31
### Changed
- Default values are no longer set when loading QuestionnaireResponse, DiagnosticReport
and saved form data.
## [19.0.0] 2019-10-28
### Added
- Data type QTY is now documented as a supported data type, and is now validated like a REAL.
(Previously, there was no validation for type QTY).
### Changed
- Removed the "type" field from the form definition (though it should not hurt to
include it).
- The codeSystem field is no longer defaulted to LOINC. The LOINC
default was causing problems for FHIR Questionnaires which did not have a code
system specified.
- Data types INT and REAL are now only allowed to have one unit defined in
field "units", for alignment with FHIR. For more than one unit, use type QTY
(quantity). For backward compatibility with existing form definitions, INT or
REAL fields with more than one unit will be changed to QTY, and a warning will
be output.
- The data type is no longer changed to "ST" if a question has a calculationMethod.
## [18.3.0] 2019-10-22
### Added
- The FHIRPath expressions are now cached after being parsed, which greatly
speeds up the processing.
## [18.2.2] 2019-10-17
### Fixed
- Corrected FHIR export and import of integer, decimal, and quantity types, and
the unit extensions used.
## [18.2.1] 2019-10-15
### Fixed
- Corrected the default for handling multiple skip logic conditions to be "ANY"
instead of "ALL" (i.e. now "ANY" of the conditions being true will make the
field visible). The "ANY" default was what should have been the case per the
documentation in form_definition.md, and also matches the equivalent default
in FHIR.
- Fixed the setting of the FHIR context for evaluating FHIR variables defined on
Questionnaire.
## [18.2.0] 2019-10-15
### Changed
- Units column is no longer shown if there is no units values in the form data.
## [18.1.1] 2019-10-08
### Fixed
- Display of item with TITLE data type is fixed without setting header flag.
## [18.1.0] 2019-10-03
### Added
- Support for the FHIR "rendering-style" (CSS) extension on Questionnaire.title,
item.text, and item.prefix. (Support on answer list text is still TBD).
## [18.0.5] 2019-09-30
### Fixed
- Updated dependencies to get patches for a vulnerability.
## [18.0.4] 2019-09-26
### Fixed
- Fixed a bug that item values that have extra user data are not found in the answer list so that
they are not displayed.
## [18.0.3] 2019-09-26
### Fixed
- Increased the maximum supported nesting level of form sections.
## [18.0.2] 2019-09-25
### Changed
- Changed form title to use title field, if present, otherwise use name field.
### Fixed
- Fixed missing form level fields related to FHIR Questionnaire. All form level fields are preserved.
## [18.0.1] 2019-09-24
### Changed
- The sequence numbers in front of answers won't be displayed if one of the
answers has a numeric value, to avoid confusion.
## [18.0.0] 2019-09-12
### Added
- Added support for 'prefix' in FHIR Questionnaire and in LForms.
### Fixed
- Fixed a bug that on CWE items, user typed answers that are not in the answer list are
not displayed in the "OTHER" fields, when answer list is displayed as radio buttons or
checkboxes.
- Fixed a bug that code system of an answer is not imported for QuestionnaireResponse and
DiagnosticReport.
### Changed
- User typed, not-on-list value for CWE item is now stored as a string.
## [17.4.1] 2019-09-06
### Fixed
- Fixed a bug in conversion of restrictions to corresponding FHIR extensions.
## [17.4.0] 2019-08-28
### Added
- Support for prefetched lists (FHIR item control type = 'dropdown') whose
source comes from external FHIR ValueSets.
## [17.3.3] 2019-08-09
### Fixed
- Fixed a bug which was overwriting linkid with codepath in Questionnaire's item.enableWhen.question.
## [17.3.2] 2019-07-30
### Fixed
- Fixed a bug that multiple repeating items are added when the "add" button is clicked,
if the form with user data that contains multiple repeating items is loaded.
## [17.3.1] 2019-07-26
### Fixed
- Fixed bug in LForms.Util.dateToDTMString()
## [17.3.0] 2019-07-24
### Added
- Support for FHIR Questionnaire items of itemControl type 'autocomplete'.
- Support for the terminology-server extension that specifies the FHIR server
from which ValueSet expansions should be done. (Currently, this assumes the
terminology server does not require a login.)
### Changed
- Modified a test Questionnaire, test/data/R4/ussg-fhp.json, to contain examples
of this new support.
### Fixed
- An issue that prevented observationLinkPeriod from working on fields that were
not top-level.
## [17.2.4] 2019-07-19
### Fixed
- Fixed a bug in parsing ISO date and time string.
## [17.2.3] 2019-07-09
### Fixed
- Fixed a bug that help instructions are not exported correctly in R4 Questionnaire.
## [17.2.2] 2019-07-05
### Changed
- Removed unnecessary default code system value
## [17.2.1] 2019-07-03
### Changed
- Removed generated identifiers from the exported FHIR QuestionnaireResponse resources.
The generated identifiers as they are now are not unique and do not serve specific purposes.
The identifiers from previously imported QuestionnaireResponse resources will be preserved.
This is not considered a breaking change because FHIR spec governs the protocol here and
the identifier field is optional.
## [17.2.0] 2019-07-03
### Added
- Added support for multiple code system in answers.
## [17.1.2] 2019-06-28
### Fixed
- Fixed missing form level properties in conversion of FHIR questionnaire to lforms.
- Fixed missing item code list in conversion of FHIR questionnaire to lforms.
## [17.1.1] 2019-06-26
### Fixed
- Fixed a bug in FHIR/SDC Questionnaire version detection.
## [17.1.0] 2019-06-20
### Added
- DTM support and datetime picker
## [17.0.0] 2019-06-21
### Changed (for FHIR forms only)
- This contains a breaking change that only affects forms imported from FHIR
Questionnaires. The loading of external FHIR resources no longer happens when
an LFormsData object is constructed. Instead, after constructing LFormsData,
one must call (on the instance) loadFHIRResources(), which will return a
promise that resolves when the resources are loaded. Similarly, if using
LForms.Util.addFormToPage(), that will also return a promise that resolves
when external FHIR resources had been loaded. (See the
[documentation](https://lhncbc.github.io/lforms/index.html#fhirQueries).)
## [16.0.1] 2019-06-18
### Fixed
- Fixed extension URLs for SDC Questionnaire
## [16.0.0] 2019-06-17
### Fixed
- Each value of the multiple selected values in CNE/CWE typed item
should be a separate Observation resource when LForms data is converted
to corresponding FHIR resources.
## [15.7.2] 2019-06-14
### Fixed
- Fixed a bug that user selected units in saved data were not loaded correctly into the LForms.
## [15.7.1] 2019-06-06
### Fixed
- Observation-based prepoluation of list fields now works.
## [15.7.0] 2019-06-03
### Fixed
- Used a correct extension for coding instructions in FHIR Questionnaire
### Added
- Added support for coding instructions format in FHIR Questionnaire
## [15.6.2] 2019-05-31
### Fixed
- Fix an error when creating LFormsData object with empty items.
## [15.6.1] 2019-05-28
### Fixed
- Empty Observation records were being saved during data extraction to an STU3
FHIR server (for fields without values).
- Corrected the setting of derivedFrom in extracted obsevations in R4.
## [15.6.0] 2019-05-23
### Added
- The %questionnaire variable is now available for FHIRPath expressions.
## [15.5.1] 2019-05-21
### Fixed
- Fixed URL in R4 for ordinalValue (score)
## [15.5.0] 2019-04-11
### Added
- Support for data extraction via observationLinkPeriod. If you pass in an
"extract" option (set to true) to LForms.Util.getFormFHIRData when
"resourceType" is set to QuestionnaireResponse, it will return an array of the
QuestionnaireResponse resource and any extracted Observation resources.
### Fixed
- Added a check to make sure linked observations do not have focus set to true.
## [15.4.0] 2019-05-09
### Added
- Added support for FHIR Questionnaire form level fields.
- Patched date parsing errors encountered in form builder environment.
## [15.3.2] 2019-05-15
### Fixed
- Changed to allow 'label' in answers to be null.
## [15.3.1] 2019-04-30
### Fixed
- Corrected the FHIR itemControl codes. We still accept the incorrect codes (as
well as the correct ones) for import, but the export is now correct.
## [15.3.0] 2019-04-29
### Changed
- Changed view's screen size breakpoints.
- Changed import function to work around 'linkId' in FHIR QuestionnaireResponse
resource.
- Added validation for signed values of INT and REAL data types.
### Fixed
- Fixed bug in processing regexp value of 'pattern' restriction.
## [15.2.5] 2019-04-25
### Fixed
- Problems with mapping from the LForms structure to QuestionnaireResponse when
running FHIRPath expressions. Added some tests.
## [15.2.4] 2019-04-19
### Fixed
- Enabled generation of source maps for the FHIR supported files.
## [15.2.3] 2019-04-15
### Fixed
- Improved error handling and reporting for LForms.util.getFHIRServerReleaseID.
## [15.2.2] 2019-04-05
### Fixed
- Corrected a problem with detecting which version of FHIR was being used by a
FHIR server.
## [15.2.1] 2019-03-27
### Removed
- Excluded unnecessary files from the npm package.
## [15.2.0] 2019-03-26
### Added
- The build process has been changed to use npm packages, in preparation for
registering this package on npm. (At this point, this package should be ready
for being registered, which we will do soon.) It is not expected that this is
a breaking change.
## [15.1.0] 2019-03-22
### Added
- Support for the questionnaire-observationLinkPeriod extenstion for
pre-population. (Extraction is not yet supported.)
## [15.0.1] 2019-03-20
### Fixed
- This is a fix for calculated expressions in the Safari browser. (Chrome, Edge,
and Firefox were working).
## [15.0.0] 2019-03-20
### Changed
- Updated the jquery-ui package to 1.12.1 from 1.11.4, which is a breaking
change for that package. Since jQuery is a global variable, this is
potentially a breaking change for users of the lforms package. The lforms
APIs themselves are unchanged.
## [14.2.0] 2019-02-13
### Added
- Added code and system attributes to unit, to align with FHIR specs.
## [14.1.4] 2019-02-07
### Changed
- Fix typo in url for FHIR unit option.
## [14.1.3] 2019-01-29
### Changed
- Fixed unit conversions to store the unit lists in unitOption extensions and
change the data type to quantity. Used initial.valueQuantity.unit to store the
lforms default value. If no default is found, the first unit in the list is set to
default.
- Refactored the code to reduce some duplication in STU3 and R4.
## [14.1.2] 2019-01-25
### Fixed
- The BMI "calculationMethod" can now handle "[in_i]" as a unit.
## [14.1.1] 2019-01-23
### Changed
- Standard Questionnaire exports for R4 now contain '4.0' (instead of '3.5') as
the FHIR version.
- Standard QuestionnaireResponse exports now include meta.profile.
- Exceptions raised for problems with detecting the version of a FHIR resource
are now Error objects instead of strings.
## [14.1.0] 2019-01-22
### Added
- Added an option to specify the subject for an exported FHIR resource.
## [14.0.1] 2019-01-15
### Fixed
- Removed some outdated documentation from form_definitions.md.
- Reorganized some code (but not in a way the affects public APIs).
## [14.0.0] 2018-12-22
### Changed.
- The "themes" css file is now in a separate file from the lforms.min.css file
in the distribution, to avoid making that larger than necessary. It has also
been removed from bower.json, so that themes.css will no longer be
automatically pulled in with things like wiredep. (This is possibly a breaking
change for someone, and is the reason for the major-version increase.)
- The autocomplete-lhc package is now being pull in via npm.
## [13.10.2] 2018-01-10
### Fixed
- Now handles FHIR QuestionnaireResponse items that do not have answers.
## [13.10.1] 2018-01-09
### Fixed
- Corrected version number in bower.json.
## [13.10.0] 2018-01-08
### Added
- Support for the FHIR extension "variable" has been added, but as with the
"questionnaire-initialExpression" and "questionnaire-calculatedExpression"
support is currently limited to FHIRPath-based expresions.
## [13.9.1] 2019-01-02
### Fixed.
- Fixed errors in parsing argonaut questionnaire extensions with support for item.option.extension-score.
## [13.9.0] 2018-12-15
### Added
- FHIR Questionnaire contained ValueSet support.
## [13.8.0] 2018-11-30
### Added.
- Added support for the questionnaire-hidden extension
http://hl7.org/fhir/StructureDefinition/questionnaire-hidden
A good test example is:
https://argonautproject.github.io/questionnaire/Questionnaire-questionnaire-example-asq3.html
## [13.7.2] 2018-12-12
### Fixed
- FHIR value quantity import/export
- Misc fixes.
## [13.7.1] 2018-12-07
### Fixed
- FHIRPath intialization has been corrected, so that the context passed in is
now the item on which