Giter Club home page Giter Club logo

smart-forms's Introduction

Smart Forms

An open source FHIR powered forms app built in React

Powered by SMART on FHIR and Structured Data Capture, Smart Forms allow you to easily integrate forms into your existing healthcare system.


Smart Forms is a Typescript-based React forms web application currently ongoing development by CSIRO's Australian e-Health Research Centre as part of the Primary Care Data Quality project funded by the Australian Government Department of Health.

The web app is intended to demonstrate the use of HL7 FHIR specifications, such as the Questionnaire and QuestionnaireResponse resources, the Structured Data Capture (SDC) implementation guide, and most notably it leverages SMART on FHIR capabilities that allows the app to be launched by a primary care Clinical Management System (CMS) and capture standardised health check information for healthcare clients.

This project was bootstrapped with Vite.

If you are interested in using the rendering engine in your projects, a standalone package is published on NPM as @aehrc/smart-forms-renderer.

Functionalities

Smart Forms app

Functionality Description Resources Showcase 🖼️ (Right click -> Open link in new tab)
Form population Populate FHIR clinical data into forms, removing the need to re-enter generic information every time a new form is created, allows reusability of data. SDC Populate Population of patient details
Population of patient medical history
Conditional rendering Render form items conditionally based on user decisions or pre-determined data. Questionnaire EnableWhen Form tabs and items presented differently for patients of different age groups
Built-in calculations Perform calculations based on form item answers to produce a calculated result, e.g. BMI, CVD Risk Score. SDC Calculations Calculated BMI based on height and weight values
ValueSet expansion Perform expansion of ValueSet resources via the Ontoserver $expand operation API within autocomplete, dropdown, radio button and checkbox fields. ValueSet expand
Ontoserver ValueSet API
Ontoserver ValueSet Expansion in an Autocomplete component
QuestionnaireResponse write-back A form can either be saved as a draft or as final, which will compile the form answers into a QuestionnaireResponse resource and store it on the CMS's FHIR server via REST API. FHIR RESTful API List of responses in context of a patient
Form preview Generate a human-readable preview of the QuestionnaireResponse which can be viewed while filling in the form or after the form is saved.
-
Human-readable form preview
Generic form implementation The app tries its best to render any Questionnaire as long as it conforms to the FHIR specification! Questionnaire
SDC
Rendering of an Australian absolute CVD Risk calculator questionnaire

NOTE: The patients featured in the screenshots are synthetic and do not represent any real people.

Forms Server API

Functionality Description Resources
Modular questionnaires Allows a questionnaire to be composed of sub-questionnaires which allows for reusability of questionnaire components i.e. a single tab within a form with multiple tabs. Subquestionnaires can be "assembled" to form a complete questionnaire with the $assemble operation. SDC Modular questionnaires

Contents

  1. The Smart Forms web app. Try it out here: smartforms.csiro.au
  2. Implemented operations from the Structured Data Capture (SDC) specification:
  1. A standalone component of the questionnaire-rendering engine published on NPM as @aehrc/smart-forms-renderer.

Conformance

Here's the Structured Data Capture (SDC) conformance sheet for the Smart Forms app: https://github.com/aehrc/smart-forms/blob/main/Conformance.md

Usage

Running on a SMART CMS client (the preferred way)

  1. Open https://launch.smarthealthit.org/ (or your own SMART on FHIR enabled CMS) in a browser.
  2. Set the App Launch URL at the bottom of the page as https://smartforms.csiro.au/launch and launch app.

image

Running in an unlaunched state

This method of running the app does not allow you to save responses as it is not connected to a CMS client.

  1. Open https://smartforms.csiro.au in a browser.
  2. You would have access to some pre-defined local questionnaires

NOTE: The app will not be able to view or save responses as it is not connected to a CMS client.

Configuration

Environment

The default configuration is set to:

# Ontoserver endpoint for $expand operations
# To run your own Ontoserver instance, contact us at https://ontoserver.csiro.au/site/contact-us/ontoserver-contact-form/
VITE_ONTOSERVER_URL=https://r4.ontoserver.csiro.au/fhir

# Questionnaire-hosting FHIR server
VITE_FORMS_SERVER_URL=https://smartforms.csiro.au/api/fhir

# Debug mode - set to true in dev mode
VITE_SHOW_DEBUG_MODE=false

# SMART App Launch scopes and launch contexts
# It will be necessary to tweak these variables if you are connecting the app to your own SMART on FHIR enabled CMS/EHR
VITE_LAUNCH_SCOPE=launch/patient patient/*.read offline_access openid fhirUser
VITE_LAUNCH_CLIENT_ID=smart-forms

In development mode, create a .env.local file in the apps/smart-forms-app directory and tweak the environment variables as needed.

Run app locally

  1. Clone this Git source repository onto your local machine from https://github.com/aehrc/smart-forms.

  2. Install dependencies.

npm install
  1. Change directory into the directory containing the Smart Forms app.
cd apps/smart-forms-app
  1. Start the local server.
npm start
  1. Follow the instructions here but replace https://smartforms.csiro.au/launch with http://localhost:5173/launch

I found a bug/the app crashed, now what?

Report it to us! Create an issue within the repo and we will try our best to get it fixed as soon as possible. If you do have any feedback on the app's behaviour/user experience or anything else, feel free to also create an issue!

Licensing and attribution

Smart Forms is copyright © 2022-2023, Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230. Licensed under the Apache License, version 2.0.

This means that you are free to use, modify and redistribute the software as you wish, even for commercial purposes.

Smart Forms is experimental software at the moment, use it at your own risk!

smart-forms's People

Contributors

fongsean avatar dependabot[bot] avatar johngrimes avatar liambarnes avatar kaicode avatar

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.