From caad0dd2ba097e7b48640d80a7f940191c1a9e49 Mon Sep 17 00:00:00 2001 From: Paul Lynch Date: Thu, 4 Apr 2024 15:27:03 -0400 Subject: [PATCH 1/2] Changed URLs for hosted lforms files to use lhcforms-static --- demos.html | 26 +++++++++++++------------- index.html | 27 +++++++++++++-------------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/demos.html b/demos.html index accbfb6b9..681cea81f 100644 --- a/demos.html +++ b/demos.html @@ -70,7 +70,7 @@

LForms Demos

Click on the "JavaScript" tab to view this form's definition. This form only defines the question "Eye color".
- [Show Demo] + [Show Demo]
@@ -79,7 +79,7 @@

LForms Demos

answer lists. In FHIR, list questions can either be of type "choice" (which limits answers to the list, or "open-choice", which allows entry of off-list answers).
- [Show Demo] + [Show Demo]
@@ -87,7 +87,7 @@

LForms Demos

Date fields & fields with units: Questions can also be date fields with a calendar input, or be numeric fields with units.
- [Show Demo] + [Show Demo]
@@ -97,7 +97,7 @@

LForms Demos

specified via a URL for an external FHIR ValueSet, and the field will show matches as the user types.
- [Show Demo] + [Show Demo]
@@ -106,7 +106,7 @@

LForms Demos

labeled sections and sections can have sub-sections. A "repeats" flag can be set on sections (or questions) to make them repeat.
- [Show Demo] + [Show Demo]
@@ -116,7 +116,7 @@

LForms Demos

href="https://hl7.org/fhir/uv/sdc/rendering.html#itemControl">itemControl extension and setting a value of "gtable".
- [Show Demo] + [Show Demo]
@@ -125,7 +125,7 @@

LForms Demos

text, which by default is shown when the user clicks on the help button next to the question.
- [Show Demo] + [Show Demo]
@@ -137,7 +137,7 @@

LForms Demos

from the other ("source") field is met. In the example below, try picking "Green" for "Favorite color".
- [Show Demo] + [Show Demo]
@@ -148,7 +148,7 @@

LForms Demos

to pick from, when "repeats" is set to true a button will appear which allows the user to add more blanks for that question.
- [Show Demo] + [Show Demo]
@@ -160,7 +160,7 @@

LForms Demos

Service) and one that obtains its list of strengths from the data associated with the selected drug name.
- [Show Demo] + [Show Demo]
@@ -174,7 +174,7 @@

LForms Demos

can also be obtained as FHIR Questionnaires from the LOINC terminology server.
- [Show Demo] + [Show Demo]
@@ -185,13 +185,13 @@

LForms Demos

definition. After filling in the field, click the button to see the FHIR QuestionnaireResponse output.
- [Show Demo] + [Show Demo]
FHIR QuestionnaireResponse data can be merged with a FHIR Questionnaire to show a form with data from the QuestionnaireResponse. The following example shows how do to that.
- [Show Demo] + [Show Demo]
diff --git a/index.html b/index.html index cea4e230f..b640dbeb6 100644 --- a/index.html +++ b/index.html @@ -180,18 +180,18 @@

LHC-Forms can be used either as a prebuilt package or installed using npm (npm -install lforms, but see the note below about the +install lforms), but see the note below about the npm installation). If you aren't using npm, the simplest way to start using LHC-Forms is by linking to the prebuilt version hosted on -clinicaltables.nlm.nih.gov. The URLs for the CSS and JavaScript are: +lhcforms-static.nlm.nih.gov. The URLs for the CSS and JavaScript are:

-
CSS
https://clinicaltables.nlm.nih.gov/lforms-versions/34.0.0/webcomponent/styles.css
+
CSS
https://lhcforms-static.nlm.nih.gov/lforms-versions/34.0.0/webcomponent/styles.css
JavaScript
    -
  1. https://clinicaltables.nlm.nih.gov/lforms-versions/34.0.0/webcomponent/assets/lib/zone.min.js
  2. -
  3. https://clinicaltables.nlm.nih.gov/lforms-versions/34.0.0/webcomponent/lhc-forms.js
  4. +
  5. https://lhcforms-static.nlm.nih.gov/lforms-versions/34.0.0/webcomponent/assets/lib/zone.min.js
  6. +
  7. https://lhcforms-static.nlm.nih.gov/lforms-versions/34.0.0/webcomponent/lhc-forms.js

The zone.min.js file should be left out if you already have that in your page (e.g. if the page contains an Angular app).

@@ -201,23 +201,22 @@

support. The first file provides support for STU3 and R4 versions of FHIR, and the other two provide support for one specific version.
    -
  • https://clinicaltables.nlm.nih.gov/lforms-versions/34.0.0/fhir/lformsFHIRAll.min.js
  • -
  • OR https://clinicaltables.nlm.nih.gov/lforms-versions/34.0.0/fhir/R4/lformsFHIR.min.js
  • -
  • OR https://clinicaltables.nlm.nih.gov/lforms-versions/34.0.0/fhir/STU3/lformsFHIR.min.js
  • +
  • https://lhcforms-static.nlm.nih.gov/lforms-versions/34.0.0/fhir/lformsFHIRAll.min.js
  • +
  • OR https://lhcforms-static.nlm.nih.gov/lforms-versions/34.0.0/fhir/R4/lformsFHIR.min.js
  • +
  • OR https://lhcforms-static.nlm.nih.gov/lforms-versions/34.0.0/fhir/STU3/lformsFHIR.min.js

Note that the URLs contain a release version number, 34.0.0, for which you can substitute any of the other prebuilt versions (34 or higher) available at -https://clinicaltables.nlm.nih.gov/lforms-versions.

+https://lhcforms-static.nlm.nih.gov/lforms-versions.

-

For production applications, it is probably better to download these files -and serve them from your server, to avoid introducing a dependency on the -clinicaltables servers, though you may continue to link to clinicaltables if you -wish. Zip files of each version's files are avaialble at +

For production applications, if you would prefer to download these files +and serve them from your server to avoid introducing a dependency on the +lhcforms-static servers, zip files of each version's files are avaialble at https://clinicaltables.nlm.nih.gov/lforms-versions.

+href="https://lhcforms-static.nlm.nih.gov/lforms-versions">https://lhcforms-static.nlm.nih.gov/lforms-versions.

If you decide to use the npm package, note that for now the JavaScript files do not work when the package is required or imported, so you will still need to From 8a924dfd9e33e03e5bd123acc2ab839924aef008 Mon Sep 17 00:00:00 2001 From: Paul Lynch Date: Thu, 4 Apr 2024 17:54:25 -0400 Subject: [PATCH 2/2] Missed one set of URLs --- demos.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos.html b/demos.html index 681cea81f..29ad6b51c 100644 --- a/demos.html +++ b/demos.html @@ -148,7 +148,7 @@

LForms Demos

to pick from, when "repeats" is set to true a button will appear which allows the user to add more blanks for that question.
- [Show Demo] + [Show Demo]