diff --git a/.github/workflows/validate-fhir-resources.yaml b/.github/workflows/validate-fhir-resources.yaml new file mode 100644 index 00000000..a561124a --- /dev/null +++ b/.github/workflows/validate-fhir-resources.yaml @@ -0,0 +1,31 @@ +name: validate-fhir-resources + +on: + pull_request: + branches: [master] + push: + branches: [master] + +permissions: read-all + +jobs: + validate-fhir-resource: + name: Validate FHIR resources + runs-on: ubuntu-22.04 + container: ghcr.io/miracum/ig-build-tools:v2.0.12@sha256:f2cca9f26f7bdb9fe238798b6f60b7798553c7d488633ded6f5a90ce6f083deb + steps: + - name: Checkout code + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Install Firely.Terminal + run: | + dotnet tool install --global Firely.Terminal --version 3.1.0 + fhir --help + + - name: Restore FHIR package dependencies + run: | + fhir restore + + - name: Validate generated FHIR resources + run: | + find src/test/java/snapshots -name "*.fhir.json" -exec fhir validate --verbose --fail "{}" \; diff --git a/.gitignore b/.gitignore index 7edfa81f..202756cc 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,7 @@ deploy/connectors/* !deploy/connectors/README.md bin + +# ignored since it isn't automatically refreshed by renovate +# (we're also pinning the dependency versions anyways) +fhirpkg.lock.json diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..dfd82ce2 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +registry=https://packages.simplifier.net diff --git a/.releaserc.json b/.releaserc.json index cb548540..7c934b22 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -92,6 +92,17 @@ "hasChanged": true } ] + }, + { + "files": ["package.json"], + "from": "\"version\": \".*\"", + "to": "\"version\": \"${nextRelease.version}\"", + "results": [ + { + "file": "package.json", + "hasChanged": true + } + ] } ] } diff --git a/README.md b/README.md index e1ea8130..701b3fe9 100644 --- a/README.md +++ b/README.md @@ -4,31 +4,7 @@ This project contains a Kafka Stream processor that creates FHIR resources from ## Used FHIR profiles -## Observations - -- Histologie () -- Grading () -- TNMc () -- TNMp () -- Fernmetastasen () -- Tod Ursache () - -## Condition - -- Primärdiagnose () - -## Procedure - -- Operation () -- Strahlentherapie () - -## MedicationStatement - -- Systemtherapie () - -## Patient - -- Patient () +See [package.json](package.json) for a list of used profiles and their versions. ## Dev diff --git a/package.json b/package.json new file mode 100644 index 00000000..f5324513 --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "name": "obds-to-fhir", + "version": "0.1.0", + "description": "Creates FHIR resources from oBDS-XML data", + "dependencies": { + "hl7.fhir.r4.core": "4.0.1", + "de.dktk.oncology": "1.3.0", + "de.medizininformatikinitiative.kerndatensatz.person": "2024.0.0-alpha1" + }, + "fhirVersions": [ + "4.0.1" + ] +}