Skip to content
/ hcap Public

Application supporting access to the Health Career Access Program (HCAP) for employers and participants.

License

Notifications You must be signed in to change notification settings

bcgov/hcap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Health Career Access Program (HCAP) Expression of Interest and Employer Portal

A component of the COVID-19 response


Introduction

This is a digital service built for the Ministry of Health which supports British Columbian residents and health care employers to apply for the Health Career Access Program (HCAP) during the COVID-19 pandemic. HCAP is a paid work and training initiative for individuals seeking an entry point to employment in health. The Portal collects expressions of interest in the program, manages employer-participant matching, and reports ongoing data on participant and employer progress.

Table of Contents

  1. Project Status
  2. Getting Help or Reporting an Issue
  3. How to Contribute
  4. Development
  5. Features
    1. Feature Flags
  6. Formatting
  7. Deployment
  8. GitHub Actions
  9. Available Scripts
  10. Database
  11. License

Project Status

img

This application is in active development.

Getting Help or Reporting an Issue

To report bugs/issues/feature requests, please file an issue.

How to Contribute

If you would like to contribute, please see our contributing guidelines.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Development

For development, you will need:

  • Docker and Docker Compose
  • Node.js and NPM
  • jq (for certain scripts)
  • OpenShift CLI (if working with OpenShift)
  • A working WSL distro (if running on Windows)
    • If using WSL, make sure to run the project from a WSL directory (such as your Linux home directory), not a Windows directory (such as /mnt/c/*). Doing so prevents certain issues with Docker.

To set up your development environment:

  • Configure your environment variables (see the example file for the required variables)
  • Run npm i within the root folder of the project to install NPM script dependencies
  • Run make local-build within the root folder of the project to build the application
  • Run make local-run within the root folder of the project to run the application

You should see the application running at http://hcapemployers.localhost:4000/ and http://hcapparticipants.localhost:4000/.

See Development for more details.

Features

This project includes the following features:

  1. Public web form for Employer Expression of Interest (EEOI) submissions
  2. HCAP Employer Portal, providing secure data upload, access, and reporting

Feature Flags

As a method to improve deployment frequency, this project utilizes flags on some features.

Feature flags are set as environment variables on the server which are then sent to the client.

Setting feature flags

Local development

Add a line to your local .env file in the following format:

<Feature_Key>=true
Openshift

The server's deployment config references a hcap-feature-flags config map. This config map contains the environment variables used for feature flagging. These flags are set per-environment.

Note: The flag will only be enabled if the environment variable's value is exactly true any other values will be treated as false

Formatting

This project is formatted with prettier, make sure to install the VSCode extension.

Note: If you didn't have prettier installed previously, be sure to enable "prettier.requireConfig": true, to avoid formatting files without configurations.

Deployment

See Deployment for details.

GitHub Actions

A service account must be created and assigned permissions to trigger a build. Run make os-permissions to create a service account with admin credentials. The access token for this service account (accessible via Cluster Console > Administration > Service Accounts > Secrets) can be used to login and trigger a build and thus, a new deployment. GitHub Actions has been configured to trigger a new build in a specific namespace (rupaog-dev at the time of writing) in OpenShift. Save the TOKEN secret associated with the service account as a GitHub secret with the name AUTH_TOKEN.

Available Scripts

Note: jq is a dependency for many scripts used in this project.

In the server directory, you can run the following scripts:

Script Description Requires Openshift Login
npm run parse-xml Parses all xml files containing in the scripts/xml directory that follows the Orbeon format, including the file name, and then submits to the /form endpoint. No
npm run feed-sites [filename].csv Parses a given CSV file (or employer_sites.csv, by default) inside the server/test-data/ folder and feeds it to the employer_sites table.
If you've spun up the application using Docker Compose, i.e. make local-run, you can run the site seeding script with the following make command:
make seed-sites [filename].csv
No
npm run feed-participants [filename].csv Parses a given CSV file (or participants.csv, by default) inside the server/test-data/ folder and feeds it to the participants table.
If you've spun up the application using Docker Compose, i.e. make local-run, you can run the participant seeding script with the following make command:
make seed-participants my_spreadsheet.csv
No
npm run stats Shows the EEOI submission stats of a given period of days. Yes
npm run export Exports all EEOI submissions from the database as a CSV file. (Before running this command, make sure that you have logged in to the OpenShift CLI and ran make db-postgres-tunnel)
npm run participant-stats-in-progress Exports all participants In Progress from the database as a CSV file. Yes
npm run participant-stats-hired Exports all hired participants from the database as a CSV file. Exports all rejected participants from the database as a CSV file. (Before running this command, make sure that you have logged in to the OpenShift CLI and ran make db-postgres-tunnel). Records participant ID, employer ID, employer email, employer health regions and the reason and date of rejection. Yes
npm run participant-stats-no-offers Exports participants from the database as a CSV file who have not: withdrawn from the program; been hired; or had an offer made by any employer. Participants exclusively interested in the Northern Health Authority are also excluded as additional participant engagement support is not required for this region. Records participant ID, email address, preferred health regions, current interest indicator, and the date the record was last updated. The results of this report must be handled appropriately as PII. Yes

Before running commands marked with "Requires Openshift Login", make sure that you have logged in to the OpenShift CLI and ran make db-postgres-tunnel.

Database

This application uses both a PostgreSQL database as its main storage as well as a MongoDB database to store logging output.

For more information, see Database.

SSL certificates Renewal

SSL certificates for the Dev and Test environments are automatically renewed using Let's Encrypt through a tool called openshift-acme.

For more information on how that is setup, see SSL Certificates Renewal Tool

License

    Copyright 2020 Province of British Columbia

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

About

Application supporting access to the Health Career Access Program (HCAP) for employers and participants.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks