Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 43 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
# IOPS-Validation

This is a typescript module used to test HL7 FHIR resources using [IOPS-FHIR-Validation-Service ](https://github.com/NHSDigital/IOPS-FHIR-Validation-Service)
This is a typescript module used to test HL7 FHIR resources using [IOPS-FHIR-Validation-Service](https://github.com/NHSDigital/IOPS-FHIR-Validation-Service)

The configuration and setup of this service is not covered here.

Current status of **validation-service-fhir-r4**
Current status of **IOPS-FHIR-Validation-Service**


[![NHSDigital IOPS Validation)](https://github.com/NHSDigital/IOPS-Validation/actions/workflows/testingbranch.yml/badge.svg)](https://github.com/NHSDigital/IOPS-Validation/actions/workflows/testingbranch.yml)

## Prerequisite

Install [node-js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
The following software are required but are preinstalled on the GitHub ubuntu runner:
- [Maven](https://maven.apache.org/)
- [node-js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)


Running instance of the [IOPS-FHIR-Validation-Service](https://github.com/NHSDigital/IOPS-FHIR-Validation-Service)


## Tests

### Basic Tests
Expand Down Expand Up @@ -91,16 +93,19 @@ The action checks the quality of FHIR assets as per the [UK Core](https://simpli
## Workflows

### Validation
Package-Test-Runner - Checks NHSE assets for conformance to specific UKCore packages. Useful to find breaking changes when new UKCore packages are created. Works on manual workflow run. Change `packagename` & `packageversion` within the action.
masterfhirvalidation - Validates FHIR assets to ensure conformance to FHIR and checks examples are valid and all codes within them are correct as per the ontoserver. Works on push from FHIR Repo.
testingbranch - used to test the latest validator against a test suite (currently in progress)
Package-Test-Runner
 Checks NHSE assets for conformance to specific UKCore packages. Useful to find breaking changes when new UKCore packages are created. Works on manual workflow run. Change `packagename` & `packageversion` within the action.
masterfhirvalidation
 Validates FHIR assets to ensure conformance to FHIR and checks examples are valid and all codes within them are correct as per the ontoserver. Works on push from FHIR Repo.
testingbranch
 used to test the latest validator against a test suite (currently in progress)
validator-test

### Quality Control
errorChecker - Checks for html errors in Simplifier IGs. Works on push to this repo
linkChecker - Checks for url errors in Simplifier IGs. Works on push to this repo
spellChecker - Checks for spelling errors in Simplifier IGs. Works on push to this repo
QualityControlChecker - Checks for spelling and conformance of FHIR assets. Works on push to external FHIR repos
**errorChecker** - Checks for html errors in Simplifier IGs. Works on push to this repo
**linkChecker** - Checks for url errors in Simplifier IGs. Works on push to this repo
**spellChecker** - Checks for spelling errors in Simplifier IGs. Works on push to this repo
**QualityControlChecker** - Checks for spelling and conformance of FHIR assets. Works on push to external FHIR repos


# Ryan's Notes (to be confirmed)
Expand All @@ -109,3 +114,29 @@ The testingbranch.yml creates an action to test the updated validator. These use

## /src/common.js.ts
This holds the code for converting xml into json, testing assets, and creating or ignoring custom errors.

# Workflows
These are the workflows for the validator actions in a human readble format.

## IOPS-FHIR-Validation-Terminology
**Runs on:**
 Push from FHIR repo e.g. FHIR-R4-UKCORE-STAGING-MAIN with ontoserver credentials
**Check out IOPS-Validation**
 Adds IOPS-FHIR-Test-Scripts as folder inside FHIR-R4-UKCORE-STAGING-MAIN folder in the local ubuntu machine.
**Check out validation-service-fhir-r4**
 Adds IOPS-FHIR-Validation-Service as folder inside FHIR-R4-UKCORE-STAGING-MAIN folder in the local ubuntu machine.
**Install npm**
 Install npm in IOPS-FHIR-Test-Scripts folder
**Configure FHIR Validator**
 `npm start` in IOPS-FHIR-Test-Scripts folder (configures FHIR validator using ontoserver credentials). The `start` is defined in package.json as "ts-node src/configureValidator.ts"
**Build FHIR Validator**
 Runs `mvn clean install` inside IOPS-FHIR-Test-Scripts
  Clean: remove target folder
  Package: Follows the lifecycle phase `validate >> compile >> test (optional) >> package`
  (for reference `install`: `validate >> compile >> test (optional) >> package >> verify >> install`)
**Run FHIR Validator**
&emsp;`nohup java -jar validation-service-fhir-r4/target/fhir-validator.jar --<params>`
&emsp;`nohup`: no hang up is a command in Linux systems that keep processes running even after exiting the shell or terminal
&emsp;`java -jar`: run the jar file passing the parameters listed after each `--`
**Run Test**
&emsp;Run `npm test` inside IOPS-FHIR-Test-Scripts folder. The `test` is defined in package.json as `jest --runInBand src/validate.test.ts`