This Github repository own a Proof of Concept about Event-Driven & Microservices Architecture, as part of the implementation of a real-time emergency response system for the MedHead Consortium.
A consortium of four leading companies has come together to consolidate the efforts, data, applications and roadmaps of each to develop a next-generation, patient-centric platform capable of improving the basic care offered, while being responsive, operational in real time and capable of making decisions in emergency situations, taking all data into account.
First and foremost, clone this project.
Setup a postgres container to have a database and store persisted data. Otherwise, application won't start.
-
Install Docker desktop on your machine.
-
Copy and paste this command in your terminal to run a functional container and match this project local config :
docker run --rm -d --name medhead-db -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=password -p 5432:5432 postgres:latest
To versioning data changes, handle data migrations and test data seeding, we use the broadly adopted Liquibase tool.
We use JPA Buddy IntelliJ Plugin to create changelog from JPA Entities and avoid manual scripts. All change comes from our domain model.
At this time, you need to do some actions :
- In IntelliJ IDEA, setup the datasource for the project. you can copy app properties for URl, user/password
- Create a new postgres schema
hospital-service
- Now you can run Liquibase Update. it will check db changelog, create tables and columns, and seed database from data CSV files.