Skip to content

Managing MSP Direct and Compap Registrations for BC's Ministry of Health

License

Notifications You must be signed in to change notification settings

bcgov/moh-sitereg

Repository files navigation

MOHsiteReg - MSP Direct Acces

MOH - Ministry of Health Web Application for MSP Registration and Maintenance of Direct Access

For more information about MSP Direct Access, please visit the official website.

Overview

The primary purpose of application is end-user could apply registration and maintenance of organization MSP Direct request. Application consists of two modules

  1. Registration
  2. Update/Maintenance

Developer Information

Application Frontend Framework

Application developed using Angular Single Page Application Framework. Please read package.json for the specific version of CLI and dependencies.

Running Application

$ npm run start: Application is accessible outside the hosting environment.
$ npm run dev: Application is accessible only in the hosting environment.

Browse http://localhost:4200 in your favorite browser.
Default port can be update in scripts section of package.json

Running e2e Tests

e2e tests populate application forms with appropriate data. Automated e2e tests apply for registration and maintenance and receives confirmation code.
Data uses in e2e tests can be updated in relevant JSON data files.

  1. Registration Application

    Console command : $ npm run e2e-register:happy-path-local
    For custom data update registration data file.

  2. Update Application

    Console command : $ npm run e2e-update:happy-path-local
    For custom data update update application data file.

Code Linting

$ npm run lint: runs linting on the code.

Code Format

$ npm run format: formats all typescript code files.

Code Publish

Application all environments are set up to deploy application in production build of Angular using OpenShift Kubernetes.

Verify all changes to code are serving for production build of Angular by running following
Console command: $ npm run publish

Pre Build

This fetch and update the last commit hash. Application last commit has could be found in deployed application browser console window.
Console Command: $ npm run prebuild

Checklist of Developers

The following checklists are intended to guide developers on the implementation of success criteria for coding. The checklists should be used during the development phase to ensure compliance of all coding on the site and should form part of the testing phase undergone by developers when updating code.

Before Commit


Additional Settings

Application Maitenance Messages

For maintenance messages, a feature splash messages is available in the application.
Splash page could be enabled using environment variables for the "spa-env-server" in the connected environment in OpenShift.

To enable maintenance page:

  1. Go to the correct OpenShift environment (e.g. dev/test/prod)
  2. Applications > Deployments > spa-env-server
  3. Environment tab
  4. Set SPA_ENV_SITEREG_MAINTENANCE_START and SPA_ENV_SITEREG_MAINTENANCE_END

The spa-env-server will automatically set the maintenance mode flag between these times.

SPA_ENV_SITEREG_MAINTENANCE_MESSAGE is an optional field. If anything is provided it will be displayed on the page below the default splash page. If it is empty, only the default page is shown with no custom message.

Application Styling

Application is using various moh-common-styles library components. These Angular components are regularly maintained and implemented in various web applications of the Ministry of Health.
For more information please visit moh-common-styles repository.