Awesome
<a name="readme-top"></a>
<div align="center"> <img src="./images/logo.png" width="100" height="100" /> <h3 align="center">Mere Medical</h3> <p align="center"> A personal health record to aggregate and sync all of your medical records from multiple patient portals in one place. Currently supports thousands of hospitals and clinics and major electronic medical record systems. Self-hosted, privacy-focused, and offline-first. </p> </div> <div align="center"> <p align="center"> <br /> <a href="https://meremedical.co/"><strong>See Docs</strong></a> <span> • </span> <a href="https://demo.meremedical.co/"><strong>View Demo</strong></a> </p> </div> <p align="center"> <a href="https://cloud.digitalocean.com/apps/new?repo=https://github.com/cfu288/mere-medical/tree/main&refcode=f6e0d718edc7"> <img src="https://www.deploytodo.com/do-btn-blue.svg" alt="Deploy to DO"> </a> </p> <p align="center"> <a href="https://discord.gg/FjtQ84qADe"> <img src="https://img.shields.io/badge/Discord-7289DA?style=flat&logo=discord&logoColor=white" alt="Discord"> </a> <a href="https://github.com/cfu288/mere-medical/actions/workflows/staging.yaml"> <img src="https://img.shields.io/github/actions/workflow/status/cfu288/mere-medical/staging.yaml" alt="Build Status"> </a> <img src="https://img.shields.io/github/license/cfu288/mere-medical.svg" alt="licence"> <img src="https://img.shields.io/github/v/release/cfu288/mere-medical.svg" alt="release"> <img src="https://img.shields.io/docker/image-size/cfu288/mere-medical.svg" alt="docker image size"> <img src="https://img.shields.io/github/sponsors/cfu288" alt="sponsor"> </p>[!WARNING]
Mere is currently pre-release software: updates may break backwards compatibility.
[!NOTE]
This project is supported by a single developer who is also a full-time medical resident. If you would like to support this project, please consider donating or help by tackling one of the issues.
[!NOTE] If Mere doesn't fit your needs, another great open-source PHR is Fasten Health
What is Mere Medical
<div align="center" > <img src="./images/multiscreen.webp" width="600" /> </div>Mere Medical is a self-hosted web app to aggregate and sync all of your medical records from all your doctor and hospital visits in one place. See everything in a timeline view or quickly summarize your records.
Getting Started
Here are some ways to get Mere Medical running on your local computer
Docker Compose
version: '3.9'
services:
app:
image: cfu288/mere-medical:latest
ports:
- '4200:80'
environment:
- ONPATIENT_CLIENT_ID=${ONPATIENT_CLIENT_ID}
- ONPATIENT_CLIENT_SECRET=${ONPATIENT_CLIENT_SECRET}
- EPIC_CLIENT_ID=${EPIC_CLIENT_ID}
- EPIC_SANDBOX_CLIENT_ID=${EPIC_SANDBOX_CLIENT_ID}
- CERNER_CLIENT_ID=${CERNER_CLIENT_ID}
- VERADIGM_CLIENT_ID=${VERADIGM_CLIENT_ID}
- PUBLIC_URL=${PUBLIC_URL}
<p align="right">(<a href="#readme-top">back to top</a>)</p>
Local Development
Prerequisites
- npm
- nvm
- Docker
- nx
Installation
-
Clone the repo
git clone https://github.com/cfu288/mere-medical.git
-
Set up NPM and install NPM packages
nvm install v20.11.0 nvm use npm install
-
If Nx is not installed, install it
npm i nx -g
if you are prompted to run migrations, run the following:
npx nx migrate --run-migrations
-
Create
.env
files for each project to run and fill with valuescp apps/api/.example.env apps/api/.env
vim apps/web/src/environments/config.json
-
Generate localhost ssl certs
mkdir -p .dev/certs mkcert -key-file .dev/certs/localhost-key.pem -cert-file .dev/certs/localhost.pem localhost mkcert -install
-
Serve each one on its own:
npx nx serve web npx nx serve api
or together as a full app:
npx nx run-many --target=serve --projects=api,web
-
Run e2e tests
npx nx run web-e2e:e2e
-
Build and serve in docker container:
docker build -t mere-medical . docker run -p 4200:80 -i -t \ --name mere-medical \ -e ONPATIENT_CLIENT_ID=<> \ -e ONPATIENT_CLIENT_SECRET=<> \ -e EPIC_CLIENT_ID=<> \ -e EPIC_SANDBOX_CLIENT_ID=<> \ -e CERNER_CLIENT_ID=<> \ -e VERADIGM_CLIENT_ID=<ID_HERE> \ -e PUBLIC_URL=https://localhost:4200 \ mere-medical:latest
Design Goals
- Respect user autonomy and user control.
- Prioritize privacy/security and UX - if those are in conflict, ask the user what they would prefer but default to security.
- Be transparent about decisions on data storage, handling, and usage.
- Where feasible, build features to be local first (run on the users device). This essentially means client side/offline first. Mere's core functionality should continue to work without any internet connection.
- For features that cannot be client-side, enable users to self-host server side functionality where feasible. This means that the user should be able to run Mere on their own server and not rely on a third party.
- Optionally fall back to third party services when self-hosting is not feasible. Should only apply to features that are not core functionality and should always be opt-in.