santedb / hello-mpi

Quick Start for Master Patient Index
Apache License 2.0
0 stars 4 forks source link

Hello MPI!

This quick start guide is intended to provide a quick start for users who wish to test-drive the SanteMPI project.

NOTE: This tutorial is intended as a beginner level introduction to get users up and running with the SanteMPI project. Developers of SanteMPI plugins or triggers will need additional tooling. Additionally, this tutorial should not be used for production environments.

Pre-Requisites

This tutorial uses Docker as a basis for illustrating SanteMPI functions. In order to complete this tutorial, users should:

Create the Docker Application

In a text editor, create a new directory and create a new text file called docker-compose.yml in that directory.

mkdir quickstart
notepad docker-compose.yml

First, you will need to create a postgresql service, this is where the SanteMPI database will be stored.

version: "3.3"

services:
  db:
    image: postgres
    container_name: sdb-postgres
    ports:
      - "5432:5432"
    environment:
      POSTGRES_USER: santedb
      POSTGRES_PASSWORD: SanteDB123
    restart: always

This section:

Next, declare the santedb-mpi service , this service will host the the actual iCDR which has SanteMPI:

  santedb:
    image: santesuite/santedb-mpi:latest
    container_name: santedb-mpi
    environment:
      - SDB_FEATURE=LOG;DATA_POLICY;AUDIT_REPO;ADO;PUBSUB_ADO;RAMCACHE;SEC;SWAGGER;OPENID;FHIR;HL7;HDSI;AMI;BIS;MDM;MATCHING;IHE_PIXM;IHE_PDQM;IHE_PMIR;IHE_PIX;IHE_PDQ
      - SDB_HL7_AUTHENTICATION=Msh8
      - SDB_MATCHING_MODE=WEIGHTED
      - SDB_MDM_RESOURCE=Patient
      - SDB_MDM_AUTO_MERGE=false
      - SDB_DB_MAIN=server=sdb-postgres;port=5432; database=santedb; user id=santedb; password=SanteDB123; pooling=true; MinPoolSize=5; MaxPoolSize=15; Timeout=60;
      - SDB_DB_AUDIT=server=sdb-postgres;port=5432; database=auditdb; user id=santedb; password=SanteDB123; pooling=true; MinPoolSize=5; MaxPoolSize=15; Timeout=60;
      - SDB_DB_MAIN_PROVIDER=Npgsql
      - SDB_DB_AUDIT_PROVIDER=Npgsql
      - SDB_DATA_POLICY_ACTION=HIDE
      - SDB_DELAY_START=5000
    ports:
      - "8080:8080"
      - "2100:2100"
    depends_on:
      - db
    restart: always

This section of the file:

Finally, create a container which will run the web access gateway using santedb-www:latest

  www:
    image: santesuite/santedb-www:latest
    container_name: santedb-www
    ports:
      - "9200:9200"
    depends_on:
      - santedb
    restart: alwaysyaml

This section:

Start the Docker Application

After saving the text file, return to your command prompt and type:

docker compose -f docker-compose.yml up

This will start the SanteDB iCDR (running SanteMPI), the web access gateway and database. Initial startup of the SanteMPI container can take upwards of 5 minutes. You will see a log entry which indicates that startup was successful after this time.

Complete the Tutorial

This readme is intended to provide a quick-start for using the files in this repository. The complete Quick-Start tutorial can be found on the SanteDB Wiki - Quick Start