Skip to content

Commit

Permalink
test: added fhir validation infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
chgl committed Nov 7, 2023
1 parent c38133d commit 10fd5ec
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 25 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/validate-fhir-resources.yaml
Original file line number Diff line number Diff line change
@@ -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 "{}" \;
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://packages.simplifier.net
11 changes: 11 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@
"hasChanged": true
}
]
},
{
"files": ["package.json"],
"from": "\"version\": \".*\"",
"to": "\"version\": \"${nextRelease.version}\"",
"results": [
{
"file": "package.json",
"hasChanged": true
}
]
}
]
}
Expand Down
26 changes: 1 addition & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,7 @@ This project contains a Kafka Stream processor that creates FHIR resources from

## Used FHIR profiles

## Observations

- Histologie (<https://simplifier.net/oncology/histologie>)
- Grading (<https://simplifier.net/oncology/grading>)
- TNMc (<https://simplifier.net/oncology/tnmc>)
- TNMp (<https://simplifier.net/oncology/tnmp>)
- Fernmetastasen (<https://simplifier.net/oncology/fernmetastasen-duplicate-2>)
- Tod Ursache (<https://simplifier.net/oncology/todursache>)

## Condition

- Primärdiagnose (<https://simplifier.net/oncology/primaerdiagnose>)

## Procedure

- Operation (<https://simplifier.net/oncology/operation>)
- Strahlentherapie (<https://simplifier.net/oncology/strahlentherapie>)

## MedicationStatement

- Systemtherapie (<https://simplifier.net/oncology/systemtherapie>)

## Patient

- Patient (<https://simplifier.net/packages/de.medizininformatikinitiative.kerndatensatz.person/2.0.0-ballot2/files/533910>)
See [package.json](package.json) for a list of used profiles and their versions.

## Dev

Expand Down
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
]
}

0 comments on commit 10fd5ec

Please sign in to comment.