This project contains the generated source code for various FHIR implementation guides (IG). These IGs are served under: http://standardhealthrecord.org/guides/.
Any changes to the files in /doc
will be automatically reflected in the live website linked above.
To deploy a new IG or update an existing IG, follow the steps below. The examples in these steps assume Mac OS and the following locations (which may differ from yours):
- Local clone of this repository:
~/dev/standardhealth/guides
- Local clone of shr_spec:
~/dev/standardhealth/shr_spec
- Local release of SHR-CLI:
~/dev/standardhealth/releases/shr-cli
For the purposes of this doc, the IG short name will be indicated as ${myIG}
, but you should replace that with the actual IG short name you want (e.g., mcode
). This will be part of the IG URL path.
Steps to deploy or update an IG:
- Build the IG using SHR-CLI and the IGPublisher jar, as described here and here
$ cd ~/dev/standardhealth/releases/shr-cli $ rm -r out $ node . -c ig-${myIG}-config.json ~/dev/standardhealth/shr_spec/spec/ $ java $JAVA_OPTS -Xms4g -Xmx8g -jar out/fhir/guide/org.hl7.fhir.igpublisher.jar -ig out/fhir/guide/ig.json
- Do a git pull from the root of the guides repository to ensure you're up to date
$ cd ~/dev/standardhealth/guides $ git pull
- If updating an existing IG: Delete the docs/${myIG}/ folder since we want to fully replace it with the new one
$ rm -r docs/${myIG}
- Copy the output folder of the built IG to the docs/${myIG}/ folder
$ cp -r ~/dev/standardhealth/releases/shr-cli/out/fhir/guide/output docs/${myIG}
- If creating a new IG: Update the docs/index.html file to add an entry for the new IG
- Add all the changes to git and then commit (note: you may see warnings about line endings, but this is OK)
$ git add docs $ git commit -m "Update ${myIG}"
- Push to GitHub
$ git push
- Wait a few minutes and then verify changes at: http://standardhealthrecord.org/guides/. The easiest way to see if the changes were published is to look at the timestamp in the footer of the specific IG pages.