lforms 33.2.0 → 33.3.1
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.
- package/CHANGELOG.md +12 -0
- package/dist/lforms/README.md +59 -38
- package/dist/lforms/webcomponent/lhc-forms.js +256 -255
- package/dist/lforms/webcomponent/main.js +256 -255
- package/dist/lforms/webcomponent/main.js.map +1 -1
- package/form_definition.md +1 -2
- package/package.json +2 -2
- package/lforms-33.2.0.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
This project follows [Semantic Versioning](http://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [33.3.1] 2023-01-24
|
|
6
|
+
### Fixed
|
|
7
|
+
- Fixed a bug that changes from FHIRPath expressions did not update treeline status.
|
|
8
|
+
|
|
9
|
+
## [33.3.0] 2023-01-23
|
|
10
|
+
### Changed
|
|
11
|
+
- Changed the design of the boolean component. It's now rendered as 3 radio buttons
|
|
12
|
+
to support the concept of "no answer".
|
|
13
|
+
### Added
|
|
14
|
+
- Added the support of enableWhen on string, integer, date and time typed items that
|
|
15
|
+
have an answer list.
|
|
16
|
+
|
|
5
17
|
## [33.2.0] 2022-01-06
|
|
6
18
|
### Added
|
|
7
19
|
- Added a template option to control whether to display scores along
|
package/dist/lforms/README.md
CHANGED
|
@@ -1,36 +1,39 @@
|
|
|
1
1
|
## What is LForms?
|
|
2
2
|
|
|
3
3
|
[LForms](http://lhncbc.github.io/lforms/), a.k.a. LHC-Forms, is a feature-rich,
|
|
4
|
-
open-source Web Component that creates input forms, based on definition files,
|
|
5
|
-
Web-based applications. In addition to its native form-definition format,
|
|
6
|
-
partially supports the HL7 FHIR Questionnaire standard (SDC profile), and work
|
|
4
|
+
open-source Web Component that creates input forms, based on definition files,
|
|
5
|
+
for Web-based applications. In addition to its native form-definition format,
|
|
6
|
+
it partially supports the HL7 FHIR Questionnaire standard (SDC profile), and work
|
|
7
7
|
is in progress to expand that support.
|
|
8
8
|
|
|
9
9
|
It is being developed by the Lister Hill National Center for Biomedical
|
|
10
10
|
Communications ([LHNCBC](https://lhncbc.nlm.nih.gov)), National Library of
|
|
11
11
|
Medicine ([NLM](https://www.nlm.nih.gov)), part of the National Institutes of
|
|
12
|
-
Health ([NIH](https://www.nih.gov)), with the collaboration and support from
|
|
13
|
-
[Regenstrief Institute](https://www.regenstrief.org/), Inc. and the
|
|
12
|
+
Health ([NIH](https://www.nih.gov)), with the collaboration and support from
|
|
13
|
+
the [Regenstrief Institute](https://www.regenstrief.org/), Inc. and the
|
|
14
14
|
[LOINC](https://loinc.org/) Committee.
|
|
15
15
|
|
|
16
16
|
For features and demos, please visit the [project
|
|
17
17
|
page](http://lhncbc.github.io/lforms/).
|
|
18
18
|
|
|
19
19
|
## Licensing and Copyright Notice
|
|
20
|
+
|
|
20
21
|
See [LICENSE.md](LICENSE.md).
|
|
21
22
|
|
|
22
23
|
## Customizing and Contributing
|
|
24
|
+
|
|
23
25
|
If you wish to revise this package, the following steps will allow you to make
|
|
24
26
|
changes and test them:
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
- Install Node.js (version 14 is what we are currently using, but it should work
|
|
29
|
+
with later versions)
|
|
30
|
+
- Clone the lforms repository and cd to its directory
|
|
31
|
+
- `source bashrc.lforms` (make sure node dir is available at ~/)
|
|
32
|
+
- `npm ci`
|
|
33
|
+
- `source bashrc.lforms` # to add node_modules/.bin to your path
|
|
34
|
+
- `npm run build` # build both FHIR libs and LHC-Forms web component
|
|
35
|
+
- `npm run start` # starts the app we use for testing
|
|
36
|
+
- `npm run test` # runs the unit tests and e2e tests
|
|
34
37
|
|
|
35
38
|
If you are planning to contribute new functionality back to us, please
|
|
36
39
|
coordinate with us, so that the new code is in the right places, and so that
|
|
@@ -38,63 +41,81 @@ you don't accidentally add something that we are also working on.
|
|
|
38
41
|
|
|
39
42
|
## Development server
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
- Run `npm run start` for a dev server. Navigate to `http://localhost:4200/`.
|
|
45
|
+
The app will automatically reload if you change any of the source files.
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
- Run `npm run start-public` if you need to access to the dev server from a
|
|
48
|
+
different machine. For example, to run Narrator from a Windows PC.
|
|
46
49
|
|
|
47
50
|
## Build
|
|
48
51
|
|
|
49
|
-
|
|
52
|
+
- Run `npm run build` to build the project and generate a production version of
|
|
50
53
|
the js files, which are much smaller than the development version. It
|
|
51
|
-
generates an ES2017 version of the js files under dist/lforms. For details on
|
|
54
|
+
generates an ES2017 version of the js files under dist/lforms. For details on
|
|
52
55
|
the files to load, see ["Usng the LHC-Forms Web Component"](#using).
|
|
53
|
-
The `dist` directory is deleted and recreated during the process.
|
|
54
|
-
|
|
56
|
+
The `dist` directory is deleted and recreated during the process.
|
|
57
|
+
|
|
55
58
|
The build also concatenates all the js files (except for zone.min.js and the
|
|
56
|
-
FHIR support files) into a single `lhc-forms.js` file, and it works,
|
|
59
|
+
FHIR support files) into a single `lhc-forms.js` file, and it works,
|
|
57
60
|
but we don't currently recommend their use because the
|
|
58
|
-
source maps don't work with these files.
|
|
61
|
+
source maps don't work with these files. Also, there is a dist/webcomponent
|
|
59
62
|
directory that is created with a copy of the files in dist/lforms, but that
|
|
60
63
|
is only needed for the tests.
|
|
61
64
|
|
|
62
65
|
## Running tests
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
|
|
67
|
+
1. Run `npm run test` to run unit tests and e2e tests, which also copies the
|
|
68
|
+
FHIR lib files and built files in places for testing.
|
|
65
69
|
|
|
66
70
|
## Running unit tests
|
|
67
71
|
|
|
68
|
-
1. Run `npm run test:unit` to execute the unit tests via
|
|
72
|
+
1. Run `npm run test:unit` to execute the unit tests via
|
|
73
|
+
[Karma](https://karma-runner.github.io).
|
|
69
74
|
|
|
70
75
|
## Running end-to-end tests
|
|
71
76
|
|
|
72
|
-
1. Run `npm run test:e2e
|
|
73
|
-
|
|
74
|
-
1. Run `npm run test:e2e` to execute the end-to-end tests via [Cypress](https://www.cypress.io/).
|
|
75
|
-
The e2e tests is configured to use Chrome.
|
|
77
|
+
1. Run `npm run test:e2e` to execute the end-to-end tests via
|
|
78
|
+
[Cypress](https://www.cypress.io/). The e2e tests are configured to use Chrome.
|
|
76
79
|
|
|
77
80
|
## <a id="using">Using the LHC-Forms Web Component</a>
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
|
|
82
|
+
There are several script files to load. If you are building this, these files
|
|
83
|
+
will be under `dist/lforms`. If you are using the pre-built versions from
|
|
80
84
|
https://clinicaltables.nlm.nih.gov/lforms-versions, then the file paths below
|
|
81
85
|
are relative to those versioned directories.
|
|
86
|
+
|
|
82
87
|
1. `webcomponent/styles.css`
|
|
83
88
|
|
|
84
|
-
You need to include the following files in your project:
|
|
89
|
+
You need to include the following files in your project:
|
|
90
|
+
|
|
85
91
|
1. `webcomponent/styles.css`
|
|
86
|
-
2. `webcomponent/assets/lib/zone.min.js` (unless you already have zone.min.js
|
|
92
|
+
2. `webcomponent/assets/lib/zone.min.js` (unless you already have zone.min.js
|
|
93
|
+
on the page)
|
|
87
94
|
3. `webcomponent/scripts.js`
|
|
88
95
|
4. `webcomponent/runtime.js`
|
|
89
96
|
5. `webcomponent/polyfills.js`
|
|
90
97
|
6. `webcomponent/main.js`
|
|
91
|
-
7.
|
|
98
|
+
7. _One_ of the FHIR support library files, assuming you are planning to use
|
|
92
99
|
FHIR Questionnaires:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
100
|
+
- `fhir/lformsFHIRAll.min.js`
|
|
101
|
+
- `fhir/R4/lformsFHIR.min.js`
|
|
102
|
+
- `fhir/STU3/lformsFHIR.min.js`
|
|
96
103
|
|
|
97
104
|
There is an example of an app using these files at
|
|
98
105
|
https://lhcforms.nlm.nih.gov/lforms-fhir-app/.
|
|
99
106
|
For details about how to work with this library, and for information about an
|
|
100
107
|
announcements list, see the [documentation](https://lhncbc.github.io/lforms/).
|
|
108
|
+
|
|
109
|
+
## <a id="npm-package">lforms npm package</a>
|
|
110
|
+
|
|
111
|
+
A complete npm package that you can use with import/require statements in your
|
|
112
|
+
code is not ready yet. The current lforms npm package only contains built files
|
|
113
|
+
in `/dist/lforms` directory. You can use those files as described in above
|
|
114
|
+
section [Using the LHC-Forms Web Component](#using).
|
|
115
|
+
|
|
116
|
+
## <a id="docs">Related Documents</a>
|
|
117
|
+
- `form_definition.md` The internal data format of the LHC-Forms widget.
|
|
118
|
+
- `changed-features.md` The list of features that changes between the new
|
|
119
|
+
version (v30.0.0) and previous versions.
|
|
120
|
+
- `r4-support.md` The FHIR R4 features supported by LHC-Forms widget.
|
|
121
|
+
- `sdc-support.md` The FHIR SDC features supported by LHC-Forms widget.
|