Skip to content

StanfordBDHG/phoenix

Repository files navigation

Phoenix Survey Builder

Build and Test

A web application that allows you to build healthcare surveys using the HL7® FHIR® Questionnaire international data standard using an interactive, drag-and-drop interface, and export JSON to be used in Stanford Spezi iOS and Android applications to deliver surveys to patients.

Features

  • Drag and drop survey creation
  • Exports surveys as HL7® FHIR® Questionnaires
  • Upload and continue editing existing surveys
  • Set skip logic and validation rules

Requirements

  • Node.js & npm

Getting Started

Run for Development

First, ensure that Node.js (version 18 or greater) and npm are installed on your system.

In your terminal, clone this repository from GitHub to your local computer.

git clone https://github.com/StanfordBDHG/phoenix.git

Run the following command in the project directory to install dependencies.

npm install

Now, run the following command to start the application in development mode.

npm run dev

You should see the following message in your terminal if the application is running successfully.

  VITE v5.4.12  ready in 133 ms

  ➜  Local:   http://localhost:3000/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help

You can now open http://localhost:3000/phoenix in your browser to view the application.

Build for Production

First, ensure that Node.js (version 16 or greater) and npm are installed on your system.

In your terminal, clone this repository from GitHub to your local computer.

git clone https://github.com/StanfordBDHG/phoenix.git

Run the following command in the project directory to install dependencies.

npm install

Now, run the following command to build the application for production.

npm run build

The build files will be found in the build/ subdirectory. You may deploy these files to the static web hosting service of your choice.

Build and Run in Docker

First, build the Docker image:

docker build -t phoenix-survey-builder .

Then, run the Docker image:

docker run -p 8080:80 phoenix-survey-builder

Tip

You may also substitute 8080 in the command above with a different port of your choice.

Open http://localhost:8080/phoenix in your browser to view the application.

Deploy to GitHub Pages

The repository contains a GitHub Action that will deploy the application to GitHub pages: deploy.yml.

Before using the action:

  1. Update package.json with the full GitHub pages URL for your repository in the homepage key, i.e. https://username.github.io/repository.
  2. Update the main route path in src/router/index.tsx with your repository name:
<Route path="/YOUR_REPOSITORY_NAME" element={
// remainder of code is unchanged

Contributors & License

The Phoenix Survey Builder is licensed under the MIT license. For a full list of contributors, see CONTRIBUTORS.md.

Phoenix was originally forked from the Structor project in August 2022. We are grateful to the Helse Norge team for open-sourcing their work.

Disclaimer

HL7®, and FHIR® are the registered trademarks of Health Level Seven International and their use of these trademarks does not constitute an endorsement by HL7.

This software is not intended to be a medical device.

Stanford Byers Center for Biodesign Logo Stanford Byers Center for Biodesign Logo

About

Web-based HL7® FHIR® Questionnaire Builder

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages