1

I'm working through the capabilities of LHC-Forms (LForms) in github here:

https://github.com/lhncbc/lforms-fhir-app

Looking at the example here:

https://lhcforms.nlm.nih.gov/sdc

There is a button that lets the user see a FHIR QuestionnaireResponse based on the form and the data entered in the form. Using the debugging/Elements tool in my browser, the button has a javascript:void(0) method for href. What does LForms use to generate the QuestionnaireResponse from the form displayed on the page? Is this documented somewhere?

enter image description here

John
  • 3,458
  • 4
  • 33
  • 54

1 Answers1

1

Documentation for LHC-Forms is at http://lhncbc.github.io/lforms/. Following the "Exporting FHIR" link on the left (http://lhncbc.github.io/lforms/#retrieving-fhir-data), you will see it provides this API call for getting back a FHIR Resource:

LForms.Util.getFormFHIRData(resourceType, fhirVersion, formDataSource, options)

So, for an R4 QuestionnaireResponse, one could write:

LForms.Util.getFormFHIRData("QuestionnaireResponse", "R4")

Incidentally, questions about LHC-Forms are more likely to get noticed on the "questionnaire" stream at chat.fhir.org, or by posting an issue on the GitHub package (though sometimes I miss the notice about those).

Paul Lynch
  • 1,297
  • 13
  • 20