Mobilizing Million Hearts
Mobilizing Million Hearts is a portable SMART On FHIR powered application to calculate and display the risk of having cardiac issues.
Configure your application
The application must be configured with the proper SMART on
in order to launch securely against your FHIR Server. Create a
.env file in
app directory with your application configuration before building. The
following variables are configurable.
.env file might like this:
CLIENT_ID=your-client-id SCOPE=patient/Patient.read patient/Observation.read patient/MedicationOrder.read patient/MedicationStatement.read patient/MedicationAdministration.read patient/Condition.read patient/DocumentReference.read patient/DocumentReference.write ISS=https://your-fhir-server/ REDIRECT_URI=http://where-your-app-is-deployed/
The server also offers some configuration to be more flexible in different situations. Create a
.env file in the server directory.
How to Build and Run
This application is a modular Smart On FHIR application. The application that is
sent to the client lives in the
app directory. The Smart On FHIR launch server
lives in the
You must create an application in a SMART on FHIR server such as Cerner Code.
Create an App
Select the following scopes at a minimum:
- patient/Patient.read - patient/Observation.read - patient/MedicationStatement.read - patient/Condition.read
/launch.htmlas the launch context
/as the Redirect URI
See CONFIGURATION on how to build your application with your App details
Serve the app using the included Express server:
cd server yarn install yarn migrate yarn start
Build the application
yarn install yarn build
- Launch the App from a SMART on FHIR portal
Because this app is a compiled React SPA, you must rebuild it on any change to the code. The server is configured to have its public path in the build location.
Or: Use docker-compose
Or: Use docker
NODE_ENV=development docker build -t hearts .
docker run -p 3000:3000 hearts
The application uses SQLite to persist some usage information when AUDITING is enabled. If you need access to this data, consider mounting a volume when running the application:
mkdir data docker run -p 3000:3000 -v data:/usr/src/app/data hearts