Coder Social home page Coder Social logo

Prepopulating forms about lforms HOT 5 CLOSED

whollervi avatar whollervi commented on August 27, 2024
Prepopulating forms

from lforms.

Comments (5)

plynchnlm avatar plynchnlm commented on August 27, 2024

That kind of loading of data would normally be done by loading data from a QuestionnaireResponse. See http://lhncbc.github.io/lforms/#merge-fhir-data.

from lforms.

whollervi avatar whollervi commented on August 27, 2024

from lforms.

plynchnlm avatar plynchnlm commented on August 27, 2024

That is true-- QuestionnaireResponses don't contain empty answers. Are you trying to pre-populate with data from the patient's record? LHC-Forms supports populating from FHIR Observations (https://build.fhir.org/ig/HL7/sdc/populate.html#obs-pop) and also from the Patient resource via the launchContext extension (https://build.fhir.org/ig/HL7/sdc/populate.html#exp-pop).

from lforms.

whollervi avatar whollervi commented on August 27, 2024

Thanks for pointing me to the launchContext extension, which looks promising.

For now I'll create a QuestionnaireResponse out out the original Questionnaire and prepopulate it before merging with the Questionnaire ...

Thanks for your help!

from lforms.

plynchnlm avatar plynchnlm commented on August 27, 2024

If you are going to do that, you could also just work with LHC-Forms' internal data structure, in which the answers and form definition are together. The call would be LForms.Util.convertFHIRQuestionnaireToLForms(fhirData, fhirVersion) (see http://lhncbc.github.io/lforms/#convert-fhir-data), where fhirData is the Questionnaire, and the return is the internal format form definition which can have 'value' fields placed in items. The drawback is that this internal format might change some day, and the 'value' field is not documented, since we only documented the definition part of the format, and not the user data part.

from lforms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.