[[TOC]]

PHMS Provincial Registry Service

REST service serving as ambassador proxy to receive requests response from provincial systems.

Understanding provincial registry service

Dependencies

The service relies on various internal and third-party dependencies. Following are the internal (VPHX/PE) dependencies which are used, and requires to be upgraded on timely fashion:

<dependencies>
  <dependency>
      <groupId>com.sdm.ehealth</groupId>
      <artifactId>rds-client</artifactId>
      <version>${rds-client.version}</version>
  </dependency>
  <dependency>
      <groupId>com.lblw.vphx.iams</groupId>
      <artifactId>security-audit-engine</artifactId>
      <version>${security-audit-engine.version}</version>
  </dependency>
</dependencies>

There are a number of third-party dependencies used in the project. Browse the Maven pom.xml file for details of libraries and versions used.

Installation and Getting Started

These instructions will get you a copy of the project up and help you build the project.

Prerequisites

You will need:

  • JDK 11
  • Maven 3.5+, download here
  • GIT. See Git setup guide
  • Docker, download here
  • MongoDB Compass, download here
  • GCP CLI. For access instructions and more, check here
  • GlobalVPN Connect. Find download instructions I and II

Working with local copy in your IDE

Steps

1) Setting GCP configurations and credentials

gcloud components update
gcloud components install kubectl
gcloud auth application-default login
gcloud auth login --brief
gcloud config set project lt-sre-shipyard
gcloud config set compute/region northamerica-northeast1
gcloud container clusters get-credentials banting

2) Configure docker container

git clone https://gitlab.lblw.ca/health-watch/domains/PHMS/phms-docker-setup.git
docker compose up --quite-pull -d 

3) Building the service

git clone https://gitlab.lblw.ca/health-watch/domains/PHMS/phms-provincial-registry-service.git
mvn clean install
OR
mvn clean install -DskipTests

4) Importing project in IntelliJ

File -> Open -> {project_location}/phms-provincial-registry-service
OR 
In the main menu, choose `File -> Open` and select the /phms-provincial-registry-service/pom.xml. Click on the `Open` button.

5) Configure build profile to local, and set following Environment Variables:

SPRING_PROFILES_ACTIVE=local

6) Running the service

java -jar /app/target/phms-provincial-registry-service*.jar
OR 
Run com/lblw/vphx/phms/registry/ProvincialRegistryServiceApplication.java

7) Navigate to following Swagger URL to verify service availability.

Swagger OpenAPI Specification

Deployment

For cloud deployment, follow the Gitlab -> Pipeline

Future Enhancements

  • Module common-utils to be deprecated and removed.
  • Integrate with common libraries.
  • Resolve pending //TODO:
  • Enhance code coverage.
  • Pending Tech Debt/ Backlog
    https://jira.lblw.cloud/browse/LTPHVPHXQC-2960
    
    https://jira.lblw.cloud/browse/LTPHVPHXQC-2963
    
    https://jira.lblw.cloud/browse/LTPHVPHXQC-2901