Instructions



Development


Run a Local Server


In order to develop the implementation guide, do the following steps:

git clone https://github.com/HealthSamurai/ig-ae.git

cd ig-ae

npm install

git submodule init

git submodule update

./igpop.sh dev -p 8891

Console output:

$ ./igpop.sh dev -p 8891
Dev... (dev -p 8891)
Run server on http://localhost: 8891

Project Structure and Configuration


Project structure

id: prefix for your FHIR resources
title: title displayed on the home page of your IG site
url: base URL for your profiles (StructureDefinition.url and fixedUri)
description: your IG general description
fhir: FHIR version (current value is 4.0.0)

ig.yaml

Edit Profiles and ValueSets


When you are running profiles locally, you can edit them directly on the site:

Editing

Generate Structure Definitions


Package

Validate Generated Structure Definitions


java -jar validator_cli.jar -version 4.0.1 adverse-event-profile/* -ig adverse-event-profile/ -recurse

See more Using the FHIR Validator.

Validate Resources against AZ Profiles


Validate against an IG as a FHIR Package .tgz file's URL

java -jar validator_cli.jar -version 4.0.1 path/to/resource -ig https://github.com/HealthSamurai/ig-ae/raw/master/package/az-ig-package.tgz -profile profile/StructureDefinition/url

java -jar validator_cli.jar -version 4.0.1 resourcesToValidate/adverseEventSample.json -ig https://github.com/HealthSamurai/ig-ae/raw/master/package/az-ig-package.tgz -profile https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent

java -jar validator_cli.jar -version 4.0.1 "docs/for review/fixed/New Adverse Event FHIR payload.json" -ig https://github.com/HealthSamurai/ig-ae/raw/master/package/az-ig-package.tgz -profile https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent

java -jar validator_cli.jar -version 4.0.1 "docs/for review/fixed/New Adverse Event FHIR payload.json" -tx n/a

java -jar validator_cli.jar -version 4.0.1 "docs/for review/fixed/New Adverse Event FHIR payload.json" -ig https://github.com/HealthSamurai/ig-ae/raw/master/package/az-ig-package.tgz -tx n/a

Validate against an IG as a FHIR Package .tgz local file

java -jar validator_cli.jar -version 4.0.1 path/to/resource.json -ig D:/path/to/az-ig-package.tgz -profile profile/canonical/url

java -jar validator_cli.jar -version 4.0.1 resourcesToValidate/adverseEventSample.json -ig D:/Work/Healthsamurai/az-fhir-profiles/az-ig-package.tgz -profile https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent

Validate against an IG as a local folder

java -jar validator_cli.jar -version 4.0.1 path/to/resource -ig path/to/ig/folder/ -recurse -profile profile/canonical/url

java -jar validator_cli.jar -version 4.0.1 resourcesToValidate/adverseEventSample.json -ig adverse-event-profile/ -recurse -profile https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent

Validate a resource with meta element

"meta": {
    "profile": ["https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent"]
  }

java -jar validator_cli.jar -version 4.0.1 path/to/resource -ig https://github.com/HealthSamurai/ig-ae/raw/master/package/az-ig-package.tgz

java -jar validator_cli.jar -version 4.0.1 resourcesToValidate/adverseEventSample.json -ig https://github.com/HealthSamurai/ig-ae/raw/master/package/az-ig-package.tgz

Validation without a terminology server

-tx n/a

java -jar validator_cli.jar -version 4.0.1 resourcesToValidate/adverseEventSample.json -ig https://github.com/HealthSamurai/ig-ae/raw/master/package/az-ig-package.tgz -profile https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent -tx n/a

Validate against a FHIR Package published to FHIR Registry

Sample FHIR Package

java -jar validator_cli.jar -version 4.0.1 resourcesToValidate/adverseEventSample.json -ig hl7.fhir.us.patient-reported-outcomes

Validate against an IG files by their URLs

java -jar validator_cli.jar -version 4.0.1 resourcesToValidate/adverseEventSample.json -profile https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent -ig https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent.json -ig https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent-AZEmployeeReporter.json -ig https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent-lateReason.json -ig https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent-localReference.json -ig https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent-positiveDechallenge.json -ig https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent-positiveRechallenge.json -ig https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent-programNumber.json -ig https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent-rechallenge.json -ig https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent-reporterType.json -ig https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent-sourceType.json -ig https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent-surveyStatus.json -ig https://healthsamurai.github.io/ig-ae/ValueSet/astrazeneca.fhir.ig.ae-survey-status.json -ig https://healthsamurai.github.io/ig-ae/ValueSet/astrazeneca.fhir.ig.ae-intelligent-source.json

Validating a single resource in a bundle

To validate a particular resource in the bundle against a given profile:

-bundle {entry rule} {profile url}

This invokes the nominated profile (by canonical URL) on any entry in any bundle validated that meets the entry rule. The entry rule is either a Resource name, a integer index, or both:

Example:

java -jar validator_cli.jar path/to/bundle.json -version 4.0.1 -ig https://github.com/HealthSamurai/ig-ae/raw/master/package/az-ig-package.tgz -bundle Patient:0 https://healthsamurai.github.io/ig-ae/StructureDefinition/astrazeneca.fhir.ig.ae-AdverseEvent

Create new profile

See the IGPOP spec.