GitHub - cfu288/mere-medical: An offline-first, self-hosted web app to aggregate and sync all of your medical records from your patient portals in one place.
Skip to content

An offline-first, self-hosted web app to aggregate and sync all of your medical records from your patient portals in one place.

License

Notifications You must be signed in to change notification settings

cfu288/mere-medical

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mere Medical

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.

Deploy to DO

Discord Build Status licence release docker image size sponsor

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

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}

(back to top)

Local Development

Prerequisites

  • npm
  • nvm
  • Docker
  • nx

Installation

  1. Clone the repo

    git clone https://github.com/cfu288/mere-medical.git
  2. Set up NPM and install NPM packages

    nvm install v20.11.0
    nvm use
    npm install
  3. 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
  4. Create .env files for each project to run and fill with values

    cp apps/api/.example.env apps/api/.env
    vim apps/web/src/environments/config.json
  5. 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
    
  6. 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
  7. Run e2e tests

    npx nx run web-e2e:e2e
  8. 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

(back to top)

Design Goals

  1. Respect user autonomy and user control.
  2. Prioritize privacy/security and UX - if those are in conflict, ask the user what they would prefer but default to security.
  3. Be transparent about decisions on data storage, handling, and usage.
  4. 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.
  5. 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.
  6. 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.

(back to top)

About

An offline-first, self-hosted web app to aggregate and sync all of your medical records from your patient portals in one place.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published