Initial Release
Validating FHIR resources against profiles in FHIR Resource Repository of InterSystems IRIS for Health 2022+.
$ git clone https://github.com/dmitry-zasypkin/fhir-profile-validation.git
$ cd fhir-profile-validation
profile
directory which initially contains several sample profiles.$ docker-compose build
$ docker-compose up -d
Install InterSystems IRIS for Health version 2022.1 or newer. The Community Edition is also acceptable.
Install Java 11 JRE.
Clone the repository into any local directory (C:\Git\fhir-profile-validation
in the following example):
C:\Git> git clone https://github.com/dmitry-zasypkin/fhir-profile-validation.git
In IRIS terminal import App.Installer class into USER
namespace:
USER> do $System.OBJ.Load("C:\Git\fhir-profile-validation\Installer.cls", "ck")
Run setup() method of App.Installer
class passing it a number of parameters:
set repoRoot = "C:\Git\fhir-profile-validation\" set namespace = "FHIRSERVER" // namespace to be created set appKey = "/fhir-validation" // web app path for the FHIR endpoint to be created set igList = repoRoot _ "profile" // comma-separated list of directories containing FHIR profiles set javaGatewayHost = "localhost" // Java Gateway host set javaGatewayPort = "55555" // Java Geteway port set terminologyServer = "https://tx.fhir.org/" // FHIR Terminology Server set fhirVersion = "4.0" // FHIR version set fhirCorePackage = "hl7.fhir.r4.core@4.0.1" // FHIR core package set metadataPackageDirs = "" // this argument should only be used if you need to call $validate operation via HTTP GET and you are running on IRIS version prior to 2023.2 if (+$System.Version.GetMajor() < 2023) || (($System.Version.GetMajor() = 2023) && (+$System.Version.GetMinor() < 2)) set metadataPackageDirs = repoRoot _ "src\search-params-package" set strategyClass = "isc.ateam.validation.FHIRValidationInteractionsStrategy"
zw ##class(App.Installer).setup(repoRoot, namespace, appKey, strategyClass, metadataPackageDirs, igList, javaGatewayHost, javaGatewayPort, terminologyServer, fhirVersion, fhirCorePackage)
Note that items within igList
comma-separated list may be any valid values of -ig
command-line argument described in FHIR Validator documentation. For example, you can pass a URL pointing to a gzipped tarball that contains FHIR profiles.
setup() method creates the specified namespace and database, imports classes from src/cls directory, creates and configures FHIR endpoint based on the specified interactions strategy class, and imports some settings into the Configuration Registry of IRIS. The settings are used by isc.ateam.validation.FHIRValidation class at runtime.
If the tx.fhir.org
terminology server turns out to be down during testing, you can replace it in the Configuration Registry with the address of another public FHIR terminology server by modifying the value of /FHIR/Validation/TerminologyServer
setting. One commonly available server is https://r4.ontoserver.csiro.au/fhir/
.
Download FHIR Validator library from https://github.com/hapifhir/org.hl7.fhir.core/releases/latest/download/validator_cli.jar, and save it to the jgw/lib
subdirectory of the repo directory.
Open IRIS Portal and browse to System Administration
> Configuration
> Connectivity
> External Language Servers
page. Modify the following settings of %Java Server
gateway. Start the gateway.
Setting | Value |
---|---|
Port | 55555 |
Class Path | C:\Git\fhir-profile-validation\jgw\lib\* |
Java Home Directory | <Full path to Java 11 JRE home> |
url
variable defined in the collection.$validate
operation, or by POSTing resources to FHIR Repository.