Announcing: FHIR Questionnaire Runtime and Patient Dashboard Assessments

Developer testing requested: FHIR Questionnaire Runtime and Patient Dashboard Assessments

I have a PR up that replaces the current LForms-based browser questionnaire workflow with an OpenEMR-native FHIR Questionnaire Runtime.

The most exciting part of this work is that FHIR Questionnaires can now be launched directly from the Patient Dashboard → FHIR Assessments workflow. This moves questionnaires out of being mostly an import/rendering feature and turns them into reusable patient-facing and provider-facing clinical assessment tools.

The goal is to allow imported FHIR R4 / SDC Questionnaires to be used directly in OpenEMR as structured assessments, without creating a custom OpenEMR form for every new screening tool or workflow.

This PR adds:

  • A new Patient Dashboard FHIR Assessments launcher

  • A reusable OpenEMR FHIR Questionnaire Runtime

  • Direct rendering from stored FHIR Questionnaire resources

  • Native FHIR QuestionnaireResponse generation

  • Save and reopen support for patient-level assessments

  • Encounter questionnaire workflow using the same runtime

  • Portal Questionnaire import/preview workflow using the same runtime

  • Support for common FHIR Questionnaire item types

  • Conditional display using enableWhen

  • Basic SDC variable/calculated-expression support

  • Regression tests for runtime behavior and edge cases

This also removes LForms from the active Questionnaire browser rendering path. The runtime now renders directly from FHIR Questionnaire JSON and produces QuestionnaireResponse JSON without converting through the LForms browser model.

The opportunities this opens are much bigger than one questionnaire renderer. This creates a path for OpenEMR to support reusable structured assessments such as:

  • SDOH screening

  • Behavioral health assessments

  • PROMs and patient-reported outcomes

  • Risk scoring tools

  • Intake questionnaires

  • Institutional assessments

  • Chronic care follow-up forms

  • Quality-program assessments

  • Referral or pre-visit screening workflows

  • Future patient portal assessment workflows

Instead of building and maintaining one-off custom forms, OpenEMR can begin treating standards-based FHIR Questionnaires as reusable clinical content.

I will be putting up an Up for Grabs demo of this PR so developers and interested users can test it without installing the branch locally.

Areas where testing would be especially helpful:

  1. Importing valid FHIR Questionnaire JSON into the repository

  2. Launching assessments from the Patient Dashboard

  3. Saving and reopening QuestionnaireResponses

  4. Using questionnaires from encounter forms

  5. Testing conditional questions and calculated score fields

  6. Trying larger or more complex questionnaires

  7. Verifying portal Questionnaire import/preview behavior

  8. Looking for UI, workflow, accessibility, or data fidelity issues

A few important notes:

  • This is now focused on FHIR Questionnaire / QuestionnaireResponse workflows.

  • Legacy LHC/LForms JSON conversion is no longer part of this runtime path.

  • Imported content should be valid FHIR Questionnaire JSON.

  • The runtime is not intended to be a complete FHIRPath engine yet.

  • Existing backend Questionnaire and QuestionnaireResponse services are preserved.

  • This PR is intended to move OpenEMR away from the LForms browser dependency for Questionnaire rendering and toward a maintainable OpenEMR-native implementation.

This is still early runtime work, so feedback on missing Questionnaire features, edge cases, real-world forms, rendering issues, save/reopen issues, and possible clinical workflows would be very helpful.

Once the demo is available, I would appreciate testing from developers, implementers, clinicians, and anyone working with assessments, SDOH, behavioral health, PROMs, intake workflows, or structured questionnaire-based care.

Thanks in advance to anyone willing to test and help shape where this goes.

Current launch in Patient Dashboard. Note this is from my test dev.

4 Likes

New UI/UX scheme

Next up will be a SMART on FHIR launch example for folks to use in hope our vendors will consider some assessment centric applications both, patient or provider facing. I’m hoping to have merged by Monday. Slated for v8.3.0 and will be available on our 8.3.0 Demo.

Hi All,
Most may not know that I made available to community for a release about 6 months ago many FHIR R4/SDC Assessments and Questionnaires ready for import in Encounters or Portal Dashboard Template Management.

There are several very good pain management assessments and some social ones as well.

They are located in the contrib directory here: openemr/contrib/portal_templates/assessments/SDC FHIR at master · openemr/openemr · GitHub

So please feel free to use and/or test this new with. Merging soon.

Jerry

Re: @PeteBoyd Curious if this affect your installations.

1 Like

Hi Jerry. Either I, or someone else at Open Plan IT, will get back to you about this soon.

Here is a demo folks may use to test:

Just an update for those interested in this project.

I decided to go ahead and add the Questionnaire SMART launch context to this PR. I’ve added SMART to my Api Explorer app(I’ll put up on my repo maybe tonight) that I developed so I’d have a testing client for the API’s and have tested launch from an assessment in Dashboard with success.
I exposed all our other launch contexts like encounter, patient, appointment etc. to allow testing those legacy launches.
Currently working UX for assessment management by site admins.

The new stuff will be up on demo site tomorrow morning after demo reset.
I’m considering working the Context Manager I put in a few releases ago next to move it forward. I’ll put up topic soon for it or continue topic I already have up for original release.
Test contexts are turned on in Config Connectors.

For all watching this project front end is finished and will be part of next OpenEMR release.
For some of our FHIR experts in the community I could use any guidance you’re willing to donate at feat(fhir): Fhir writes continued by sjpadgett · Pull Request #13281 · openemr/openemr · GitHub

Too me, this project is a big win for OpenEMR especially an ability to close the loop on eReferral assessment tracking thus writes.

Please consider donating to OpenEMR so perhaps I can hire some help developing all the new clinical workflows I have planned including Context Manager expansion.