Home Applications fhir-profile-validation

fhir-profile-validation

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
4.5
1 reviews
0
Awards
246
Views
0
IPM installs
0
3
Details
Releases
Reviews
Issues
Pull requests
Validating FHIR resources against profiles

What's new in this version

Initial Release

fhir-profile-validation

Validating FHIR resources against profiles in FHIR Resource Repository of InterSystems IRIS for Health 2022+.

Docker Installation

  1. Clone the repo into any local directory, e.g.:
    $ git clone https://github.com/dmitry-zasypkin/fhir-profile-validation.git
    $ cd fhir-profile-validation
    
  2. If necessary, put your FHIR profiles (as well as any related FHIR conformance and terminology resources) into profile directory which initially contains several sample profiles.
  3. If necessary, edit .env file to use the FHIR Terminology Server of your choice, or to change IRIS namespace or FHIR endpoint that will be created during installation.
  4. Build the images and start containers:
    $ docker-compose build
    $ docker-compose up -d
    

Host Installation

  1. Install InterSystems IRIS for Health version 2022.1 or newer. The Community Edition is also acceptable.

  2. Install Java 11 JRE.

  3. 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
    
  4. In IRIS terminal import App.Installer class into USER namespace:

    USER> do $System.OBJ.Load("C:\Git\fhir-profile-validation\Installer.cls", "ck")
    
  5. 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.

    Configuration Registry

    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/.

  6. 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.

  7. 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>

Testing with Postman

  1. Import fhir-profile-validation.postman_collection.json file into Postman.
    • Adjust url variable defined in the collection.
  2. Use the requests from the Postman collection to validate Patient and Bundle resources by calling $validate operation, or by POSTing resources to FHIR Repository.

Postman Collection

Read more
Made with
Version
1.0.030 May, 2023
Category
Technology Example
Works with
InterSystems IRIS for Health
First published
30 May, 2023
Last checked by moderator
27 Jun, 2023Works