mvdzel / ehrsfm-fhir-r5

https://build.fhir.org/ig/mvdzel/ehrsfm-fhir-r5
0 stars 0 forks source link

For issues: https://github.com/mvdzel/ehrsfm-fhir-r5/issues/

CI-Build

Trigger FHIR auto-ig builder

curl -X POST  "https://us-central1-fhir-org-starter-project.cloudfunctions.net/ig-commit-trigger" \
  -H "Content-type: application/json" \
  --data '{"ref": "refs/heads/master", "repository": {"full_name": "mvdzel/ehrsfm-fhir-r5"}}'

Running the scipt and IG publisher

Convert script

Convert current computable version of the FM (MAX file) to FHIR IG artifacts.

> docker run --name=ehrsfm-fhir-r5 -it -v "$(pwd)":/app node:lts-buster /bin/bash
@> cd script
@> (once) dpkg -i jdk-21_linux-x64_bin.deb
@> (once) apt update; apt install graphviz jekyll
@> (once) npm instal
@> node max2fhir.js > output.txt
@> node max2plantuml.js > ../input/images-source/relationships.plantuml 

Copy grouping & resource json from output.txt into ehrs-ig.json

Validate

(optional) > curl -L https://github.com/hapifhir/org.hl7.fhir.core/releases/latest/download/validator_cli.jar -o validator_cli.jar
> java -jar validator_cli.jar -version current input/resources -ig input/resources

To build IG

(optional)> curl -L https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar -o publisher.jar
> java -jar publisher.jar -ig ig.ini

Debugging xslt

<!-- XXX --> <xsl:message><xsl:copy-of select="."/></xsl:message>

IG Parameters

http://build.fhir.org/ig/FHIR/fhir-tools-ig/branches/master/CodeSystem-ig-parameters.html

No narrative removes rendering of Requirement.statements. So don't use this.

  {
    "code" : {
      "system": "http://hl7.org/fhir/tools/CodeSystem/ig-parameters",
      "code" : "no-narrative"
    },
    "value": "Requirements/*"
  },

SFTP Publish

> sftp user@sftp
@> cd WWW/ehrsfm-fhir-r5
@> put -r *

GIT Mirror

The HL7 repo is now setup to being a mirror of the work repo (@mvdzel). Use these commands to update the HL7 mirror.

@> git clone --mirror https://github.com/mvdzel/ehrsfm-fhir-r5.git
@> cd ehrsfm-fhir-r5.git
@> git fetch
@> git push --mirror https://github.com/HL7/ehrsfm-ig.git


Solutions / workarounds

Tips: Convert Overview Table Content to MD

We need these steps to keep formatting in table.

Using Pandoc to convert docx to markdown

https://pandoc.org/

> docker run --rm --volume "`pwd`:/data" --user `id -u`:`id -g` pandoc/core Glossary.docx -o chapter8.md