Skip to content

medplum/medplum-mso-demo

Repository files navigation

Medplum Managed Service Organization (MSO) Demo App

A starter application for building a MSO platform on Medplum. It shows how to control clinician access where clinicians and patients can be enrolled at multiple clinics.

Overview

Getting Started

It is recommended that you create a new Medplum project to run this demo. Follow the instructions in this tutorial.

Clone the repo to your local machine.

If you want to change any environment variables from the defaults, copy the .env.defaults file to .env

cp .env.defaults .env

And make the changes you need.

Next, install the dependencies.

npm install

Then, run the app

npm run dev

This app will run on http://localhost:3000 and connect to a hosted Medplum project at https://api.medplum.com/ by default. The server url can be changed in main.tsx

Background

What is a Managed Service Organization (MSO)?

A Managed Service Organization (MSO) is a healthcare organization that provides services to multiple different healthcare organizations.

MSO Diagram

For Managed Service Organizations (MSOs), complexity stems from practitioners potentially working across multiple tenants and patients potentially receiving care from multiple healthcare partners.

This demo implements a solution where:

  • Tenants are separated as Organizations (clinics) within a single Medplum Project
  • Patients and clinicians can each be enrolled in multiple clinics
  • AccessPolicy controls limit clinician access to resources only within shared clinics

How it works

Features

Admin Features

  • Create new clinics (Organizations)
  • Create new clinicians (Practitioners)
  • Enroll practitioners in one or more clinics
  • Enroll patients in one or more clinics
  • Manage access policies

Clinician Features

  • View patients, observations, diagnostic reports, encounters, and communications affiliated with their clinics - simulating what they would see in their EHR

Code Organization

This repo is organized into several main directories:

  • src/pages: Contains the React components for each page in the application
  • src/components: Contains reusable UI components
  • src/data: Contains the AccessPolicy definition and other core FHIR resources that can be uploaded
  • src/utils: Contains utility functions for MSO enrollment methods and admin status checking

Key Workflows

  1. Creating a new clinic: Admins can create new Clinics to represent clinics
  2. Creating a new clinician: Admins can create new Practitioners and assign them to Clinics
  3. Enrolling a practitioner in a clinic: Configures access policies for that Practitioner to be able to read/write to all Patients in that Clinic
  4. Enrolling a patient in a clinic: Configures access policies for Clinicians in that Clinic to be able to read/write to that Patient
  5. Viewing patient data: Practitioners can only see patients and their clinical data if they share an organizational affiliation

Resources Used

This demo uses the following FHIR and Medplum resources:

  • AccessPolicy: Defines the access rules for clinicians to resources across the project
  • Organization: Represents a clinic
  • Practitioner: Represents a clinician
  • ProjectMembership: Stores references to the clinics that the clinician can access
  • Patient: Represents an individual receiving care
  • Observation: Represents clinical measurements and findings
  • DiagnosticReport: Represents diagnostic test results
  • Encounter: Represents patient visits
  • Communication: Represents communications between clinicians

About Medplum

Medplum is an open-source, API-first EHR. Medplum makes it easy to build healthcare apps quickly with less code.

Medplum supports self-hosting and provides a hosted service. Medplum MSO Demo uses the hosted service as a backend.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages