# A standalone SMART app for FHIR questionnaires, and how we got here

**URL:** <https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072>\
**Category:** OpenEMR Development\
**Tags:** feature, infrastructure\
**Created:** [September 28, 2026, 4:08am UTC](https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072 "2026-09-28T04:08:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjpadgett](https://community.open-emr.org/user_avatar/community.open-emr.org/sjpadgett/32/21623_2.png) [@sjpadgett](https://community.open-emr.org/u/sjpadgett)\
**Post date:** [September 28, 2026, 4:08am UTC](https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072/1 "2026-09-28T04:08:14Z")

</div>

Hi everyone,

I’d like to introduce a small project that’s been a long time coming: **OpenEMR SMART Questionnaires** , now at [GitHub - openemr/oe-smart-questionnaire · GitHub](https://github.com/openemr/oe-smart-questionnaire).

It’s a standalone SMART on FHIR app for completing questionnaires. You launch it from a patient’s chart, fill out the questionnaire, and the answers are saved back to OpenEMR as a FHIR QuestionnaireResponse. Before getting into how it works, I’d like to share how it came about, because it’s really the result of several pieces of work over a number of years, and not all of them mine.

#### A little history

A few years back I added a questionnaire tool to OpenEMR. The idea was simple: let a practice import a standard FHIR Questionnaire, say a depression screen or an SDOH assessment, and use it as a form without having to build a custom encounter form for each one. We used NLM’s LForms library to render them. It got a lot of practices collecting structured assessments they couldn’t easily collect before. But it also meant depending on a large outside library, and the answers lived mostly inside OpenEMR’s own forms rather than as real FHIR data.

Last year I started on the next step, which became PR #12880. It brought native FHIR Questionnaire and QuestionnaireResponse support to the patient dashboard ( **Assessments → FHIR Assessments** ), replaced LForms with a native runtime, and added a SMART launch flow that passes the questionnaire and response in the launch context. Once LForms was removed, questionnaires became a first-class part of the chart instead of a bolt-on.

None of the SMART side would have been possible without **Stephen Nielson**. Stephen did the heavy lifting on OpenEMR’s OAuth2 and SMART on FHIR infrastructure, the launch and authorization plumbing every SMART app depends on. When I built the questionnaire launch on top of it, it held up. That foundation is why a third-party app can open a patient’s chart in context today. Thank you, Stephen.

The last piece was FHIR writes. Until recently OpenEMR’s FHIR API was mostly read-only, so an outside app could display a questionnaire but had no proper way to save the answers. Building on earlier work by Chris (rollingventures), we recently merged POST and PUT support across a good number of FHIR resources. With that in place, an app can write a QuestionnaireResponse back through the standard API like any other SMART app.

This app is what you get when those pieces come together.

#### How the workflow goes

1. From a patient’s **FHIR Assessments** list, choose a questionnaire and pick **Launch SMART App**.
2. OpenEMR asks the clinician to approve access, then opens the app on that questionnaire for that patient.
3. The app follows what OpenEMR tells it:
  - **start** : a new response;
  - **continue** : picks up the draft where it was left;
  - **review** : shows a finished response read-only, with an option to amend.

4. The clinician can save a draft and come back later, or complete it. Required questions are checked before it’s marked complete.
5. Everything is saved through OpenEMR’s FHIR API as a QuestionnaireResponse on the patient’s record, and it shows up in the assessment history.

Behind the scenes the app is a confidential client, so the access token never reaches the browser. The app, not the browser, decides which patient and questionnaire a response belongs to. It can also be registered with several OpenEMR sites from one install, and there’s a small admin page for that.

#### Why I think this matters for clinical workflows

Collecting answers is only half of it. The value of a questionnaire is what happens next. Because the responses are now standard FHIR data written through the standard API, they can drive the next step instead of sitting in a form:

- an SDOH screening that turns into a referral;
- a physical therapy assessment tracked over time;
- a follow-up task when a score crosses a threshold.

That “render, extract, close the loop” idea is laid out in epic #13266. This app is the first working part of it. It also means other SMART apps can do the same thing, since nothing here is specific to this app.

#### Honest caveats

- The current OpenEMR consent screen has a quirk with SMART v2 read-and-write scopes on the same resource, so the app uses v1 scopes for QuestionnaireResponse for now. It works fine that way. I’ll be working on the OpenEMR side as a separate project, and the app already has a v2 option ready for when that lands.
- It’s new. It has a solid test suite, but real-world use is what finds the rough edges.

#### Trying it

The README and INSTALLATION guide in the repo walk through setup on XAMPP, Apache or nginx, registering with your OpenEMR, and troubleshooting.

I’d really appreciate testers, especially anyone using questionnaires in a real clinical setting. Tell me what works, what doesn’t, and what the next step after the questionnaire looks like in your practice. That last part will shape where this goes.

Thanks for reading, and thanks again to Stephen and everyone whose work this sits on.

Jerry

---

<div class="post-metadata">

**Author:** ![Nilesh\_Hake](https://community.open-emr.org/user_avatar/community.open-emr.org/nilesh_hake/32/13927_2.png) [@Nilesh\_Hake](https://community.open-emr.org/u/Nilesh_Hake)\
**Post date:** [September 28, 2026, 6:36am UTC](https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072/2 "2026-09-28T06:36:45Z")

</div>

@sjpadgett & @stephenwaite When I try to push my FHIR API I am getting permission denied error here. Please find screenshot

 ![image](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/3X/a/b/ab8d335f80e25c7b51a400e27db41137ef118f5f.png)

---

<div class="post-metadata">

**Author:** ![Nilesh\_Hake](https://community.open-emr.org/user_avatar/community.open-emr.org/nilesh_hake/32/13927_2.png) [@Nilesh\_Hake](https://community.open-emr.org/u/Nilesh_Hake)\
**Post date:** [September 28, 2026, 4:38pm UTC](https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072/3 "2026-09-28T16:38:27Z")

</div>

@sjpadgett I had created PR [Added the Claim FHIR R4 API into oemr by nileshnbhhealthsoft · Pull Request #14309 · openemr/openemr · GitHub](https://github.com/openemr/openemr/pull/14309)

---

<div class="post-metadata">

**Author:** ![sjpadgett](https://community.open-emr.org/user_avatar/community.open-emr.org/sjpadgett/32/21623_2.png) [@sjpadgett](https://community.open-emr.org/u/sjpadgett)\
**Post date:** [September 28, 2026, 6:07pm UTC](https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072/4 "2026-09-28T18:07:26Z")

</div>

Client management

 ![image](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/3X/0/2/02d4a70912c35c3a490f08b2dfe733e544306573.png)

---

<div class="post-metadata">

**Author:** ![sjpadgett](https://community.open-emr.org/user_avatar/community.open-emr.org/sjpadgett/32/21623_2.png) [@sjpadgett](https://community.open-emr.org/u/sjpadgett)\
**Post date:** [September 29, 2026, 12:42am UTC](https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072/5 "2026-09-29T00:42:22Z")

</div>

Hi @Nilesh_Hake While waiting to get workflows approved by maintainer I’d recommend you to continue PR by fixing the Coderabbitai review issues.  
Keeping up with Coderabbitai reviews throughout will make easier for peer review.

---

<div class="post-metadata">

**Author:** ![Nilesh\_Hake](https://community.open-emr.org/user_avatar/community.open-emr.org/nilesh_hake/32/13927_2.png) [@Nilesh\_Hake](https://community.open-emr.org/u/Nilesh_Hake)\
**Post date:** [September 29, 2026, 5:34am UTC](https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072/6 "2026-09-29T05:34:44Z")

</div>

> [@sjpadgett](#):
>
> Keeping up with Coderabbitai reviews throughout will make easier for peer review.

@sjpadgett Yes I will resolve all issue that raise by Coderabbitai.

---

<div class="post-metadata">

**Author:** ![sjpadgett](https://community.open-emr.org/user_avatar/community.open-emr.org/sjpadgett/32/21623_2.png) [@sjpadgett](https://community.open-emr.org/u/sjpadgett)\
**Post date:** [October 7, 2026, 10:48pm UTC](https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072/7 "2026-10-07T22:48:54Z")

</div>

I find it interesting that there has been only one click to look over the SMART app.  
I want to stress that assessments that are patient facing are starting to become front and center with large EHRs.  
The clinical workflow that tracks patient care throughout the care treatment plan is now a reality starting with next release v8.5.0 in a couple weeks. I don’t know how many have noticed the new concentration to have reliable patch and release versions ready in a predictable way by maintainers.

Just to prove the point I have use the VA for years for my care and this is new

 ![image](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/3X/0/5/05a76d1229b82e14ffc87269120bbf2e68c42287.png)

A SMART app! I was hoping some of you vendors would pick up on our new capability to fulfil this workflow. I think it’d add to your OpenEMR product line.

Let me know if I can help you be successful by any questions or if we are missing any FHIR resource or questionnaire resource. I’m active now expanding FHIR and really could use feedback from you folks on the front lines.

By the way I hope to add some questionnaires as default to Patient Dashboard by care context. Such as before and after appointment questionnaire. Suggestions?

Thanks  
-Jerry

---

<div class="post-metadata">

**Author:** ![sjpadgett](https://community.open-emr.org/user_avatar/community.open-emr.org/sjpadgett/32/21623_2.png) [@sjpadgett](https://community.open-emr.org/u/sjpadgett)\
**Post date:** [October 9, 2026, 6:20pm UTC](https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072/8 "2026-10-09T18:20:49Z")

</div>

I want to announce that I’m developing a Questionnaire Manager with hopes to include in v8.5.0.  
Project will move Template management outside of portal because now templates can be used in most all our workflows.  
See issue at [Questionnaire manager: control where a questionnaire appears · Issue #14484 · openemr/openemr · GitHub](https://github.com/openemr/openemr/issues/14484) which will point to PR if want to follow or comment.

---

<div class="post-metadata">

**Author:** ![moussa](https://community.open-emr.org/letter_avatar_proxy/v4/letter/m/90ced4/32.png) [@moussa](https://community.open-emr.org/u/moussa)\
**Post date:** [October 14, 2026, 1:07pm UTC](https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072/9 "2026-10-14T13:07:31Z")

</div>

> [@sjpadgett](#):
>
> 1. From a patient’s **FHIR Assessments** list, choose a questionnaire and pick **Launch SMART App**.
> 2. OpenEMR asks the clinician to approve access, then opens the app on that questionnaire for that patient.
> 3. The app follows what OpenEMR tells it:
> - **start** : a new response;
> - **continue** : picks up the draft where it was left;
> - **review** : shows a finished response read-only, with an option to amend.
> 
> 4. The clinician can save a draft and come back later, or complete it. Required questions are checked before it’s marked complete.
> 5. Everything is saved through OpenEMR’s FHIR API as a QuestionnaireResponse on the patient’s record, and it shows up in the assessment history.

Thank you for contributing this @sjpadgett .  
2. Since the staff / clinicians are already accessing the chart , I wonder if step 2 is nessessory?

1. I wonder if the Assessments / questionnaire be saved to an encounter . Provider open encounter → pass the questionnaire app to the patient and save to that encounter. This way relevant infomation can be saved togather. If there is no open encounter can be saved in the assessment history

---

<div class="post-metadata">

**Author:** ![sjpadgett](https://community.open-emr.org/user_avatar/community.open-emr.org/sjpadgett/32/21623_2.png) [@sjpadgett](https://community.open-emr.org/u/sjpadgett)\
**Post date:** [October 15, 2026, 1:59pm UTC](https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072/10 "2026-10-15T13:59:05Z")

</div>

> [@moussa](#):
>
> Thank you for contributing this @sjpadgett .  
> 2. Since the staff / clinicians are already accessing the chart , I wonder if step 2 is nessessory?
> 
> 1. I wonder if the Assessments / questionnaire be saved to an encounter . Provider open encounter → pass the questionnaire app to the patient and save to that encounter. This way relevant infomation can be saved togather. If there is no open encounter can be saved in the assessment history

My apology @moussa I missed this notification or this would have been addressed sooner. I may receive 50-100 notifications a day and miss some sometimes.

- 
  1. Staff may be someone else and/or somewhere else.

- 
  1. Good question — and both halves of what you describe already work.

Launch a questionnaire from inside an open encounter (the encounter’s forms menu) and it saves as an encounter form, so it sits with the rest of that visit’s data. Launch it from Patient Dashboard → FHIR Assessments with no encounter in context and it saves patient-level instead — `questionnaire_response.encounter` is nullable precisely for that, and the Assessments history pane lists those. It filters to responses with no encounter so the two views don’t show you the same thing twice.

On the handing-to-the-patient part: the launch context needed for that is already in place. A SMART app launched from an open encounter receives that encounter in its context along with the questionnaire — `SmartLaunchController` resolves the session’s encounter to its FHIR UUID and passes questionnaire and questionnaireResponse context with it, aligned to SMART 2.2 `fhirContext`. So an app the patient fills in already knows which visit it belongs to. What’s missing isn’t the context, it’s the handoff and the tracking around it.

That’s what `Task` gives us — assigning a questionnaire to a patient and following it to completion. There’s an issue open for it and it’s assigned, targeted for 8.5, so this gets a lot closer in the next release.

Worth knowing about category too, since it’s how this stays manageable once you have more than a handful of assessments. Questionnaires carry a category, which is what groups them on the dashboard, and work in flight lets availability be set by category rather than one questionnaire at a time — so “these assessments are offered in the portal” or “in encounters” becomes one rule per group instead of per form.

Thank you for taking the time to respond here. It’s exactly the reason I have so many topics on the forum. In your case I performed poorly in getting back to you and hope you’ll trust I’ll be more disciplined in the future.  
-J

---

<div class="post-metadata">

**Author:** ![sjpadgett](https://community.open-emr.org/user_avatar/community.open-emr.org/sjpadgett/32/21623_2.png) [@sjpadgett](https://community.open-emr.org/u/sjpadgett)\
**Post date:** [October 15, 2026, 2:07pm UTC](https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072/11 "2026-10-15T14:07:02Z")

</div>

By the way for those of you that know me may know when I see a release coming that I consider a milestone release v5.0.0 v6.0.0, v7.0.4, v8.0.0 and the upcoming v8.5.0 I try to push folks to get upgraded to be on a release. So start planning and know, I’m very excited about this release.

---

<div class="post-metadata">

**Author:** ![moussa](https://community.open-emr.org/letter_avatar_proxy/v4/letter/m/90ced4/32.png) [@moussa](https://community.open-emr.org/u/moussa)\
**Post date:** [October 15, 2026, 2:50pm UTC](https://community.open-emr.org/t/a-standalone-smart-app-for-fhir-questionnaires-and-how-we-got-here/27072/12 "2026-10-15T14:50:13Z")

</div>

Thank you @sjpadgett ! I upgraded to version 8.4.1 to try out this feature. I look forward to 8.5.0 . Thanks again for sharing!
