This project has three purposes:
- To provide a FHIR Validation Service which runs either in ECS or via commandline and provides a FHIR /$validate operation
- To provide a FHIR Validation Service which runs as a AWS Lambda and provides a FHIR /$validate operation
- To provide a FHIR Validation service for AWS FHIR Works (which works with Simplifier generated packages)
It has several configuration options:
a. To validate against a supplied set of FHIR Implementation Guides (NPM packages are supplied). b. To validate against a configured FHIR Implementation Guide (NPM package are retrieved by the service and configured via environment variables) c. Optionally validate using the NHS Digital Ontology Service (configured via environment variables).
The configuration is aimed at supporting different use cases. For example the lambda version with no ontology support is aimed at performing basic FHIR validation checks. This may just be FHIR core and schema validation but can also test against UKCore profiles.
FHIR packages: manifest.json HAPI Update: pom.xml
Cusom error messages can be found within /src/main/kotlin/uk/nhs/england/fhirvalidator/provider/ValidateR4Provider.kt
Installation of the following on a local machine
-
- Installation (Debian): How to Install Apache Maven on Debian 11
-
- Installation (Debian): Install Docker Engine
*Note:*If the os is a fork from Debian, e.g. LMDE, replace $(. /etc/os-release && echo “$VERSION_CODENAME”) with $(echo ) Where e.g. bookworm (lowercase) for Debian.
- Installation (Debian): Install Docker Engine
-
HAPI-FHIR
- The latest release of hapi-fhir can be found at github.com/hapifhir/hapi-fhir
- The changelog can be found at hapifhir.io/hapi-fhir/docs/introduction/changelog
-
Go to https://github.com/NHSDigital/IOPS-FHIR-Validation-Service repo
-
Create a new branch named update/
-
edit pom.xml
- Set the <fhir.version> to the relevant hapi-fhir version
- Set the to the same hapi-fhir version.
-
Within the validator folder run the following:
- $ mvn clean install
- $ docker build -t fhir-validator-r4 .
- $ docker tag fhir-validator-r4:latest 365027538941.dkr.ecr.eu-west-2.amazonaws.com/fhir-validator-r4:
- $ docker tag fhir-validator-r4:latest 365027538941.dkr.ecr.eu-west-2.amazonaws.com/fhir-validator-r4:latest
-
Login in to https://d-9c67018f89.awsapps.com/start/#/ (hscic acct)
-
Click ‘Command line or programmatic access’ within NHS Digital IOPS FHIR dev
-
Sign into AWS using either:
- Copy option 1 if using bash / windows / powershell
- Copy Option 2 into credentials.txt if you have aws toolkit installed
-
run
- $ aws get-login-password –region eu-west-2 | docker login –username AWS –password stdin 365027538941.dkr.ecr.eu-west-2.amazonaws.com
- $ docker push 365027538941.dkr.ecr.eu-west-2.amazonaws.com/fhir-validator-r4:[hapi-fhir version-number]
-
In AWS go to ‘Management console’
-
Search for ECR
-
Ensure the server is set to ‘eu-west-2’
-
On the LHS choose repositories
-
Within Private repositories choose ‘fhir-validator-r4’
-
Ensure the latest image is the recently uploaded version.
-
Search for ECS
-
Go to ‘Task definitions’ (on LHS)
-
Choose ‘iops-fhir-validation-service’
-
Choose latest revision
-
Choose ‘Create new revision’
-
Go to ‘Container-1’ section
-
Update the version number within the Image URI
-
Click ‘Create’
-
Go to Clusters (on LHS)
-
Choose ‘iops-fhir-r4’
-
Choose ‘svc-fhir-validator’
-
Click ‘Update service’
-
Change ‘Revision’ to the latest version
-
Click ‘Update’ This will start the checks. Logs can be found within CloudWatch. ECS is set up for 1 task only so the previous task will shut down automatically.
-
Once the validator update has been checked to ensure no issues with the build create a GitHub PR and get it approved. Once approved create a new release and detail the changes made.
$ mvn spring-boot:run