From e86d584da41ca91e102fe18e6fd66c18ae558b4a Mon Sep 17 00:00:00 2001 From: florianschoffke Date: Mon, 19 Feb 2024 08:21:45 +0100 Subject: [PATCH 01/24] add main.yml --- .github/workflows/main.yml | 105 +++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..96760385 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,105 @@ +name: Validate Examples + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ main ] + pull_request: + branches: [ main ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + JAVA_VALIDATOR_VERSION: 6.0.15 + PATH_TO_EXAMPLES: 'temp_folder/' + FHIR_VERSION: "4.0" + INPUT_JAVA_VALIDATION_OPTIONS: "-tx http://tx.fhir.org -debug -allow-example-urls true" + IG_DEPENDENCIES: "-ig de.basisprofil.r4#1.3.2 -ig hl7.fhir.r4.core#4.0.1 -ig kbv.ita.for#1.1.0 -ig kbv.ita.erp#1.1.x -ig de.gematik.erezept-workflow.r4 1.x.x" + +jobs: + CI_EXAMPLES_VALIDATION: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: '20' + + # Install .NET runtime + - name: Setup .NET Core SDK + uses: actions/setup-dotnet@v2 + with: + dotnet-version: 6.0.x + + # Install Java runtime (only needed if you want to run the offical HL7 Java validator) + - name: Setup Java JDK + uses: actions/setup-java@v3 + with: + distribution: 'microsoft' + java-version: '17' + + - name: Identify and Copy Changed .json and .xml Files + run: | + mkdir -p temp_folder # Create a temp folder + git diff --name-only origin/main...HEAD | grep -E '\.(json|xml)$' | xargs -I {} cp {} temp_folder/ + ls -l './temp_folder' + + + # --------------------------------------------------------------------------------------------------- # + # JAVA Validator # + # --------------------------------------------------------------------------------------------------- # + + - name: Check if Java is installed + run: | + if ! command -v java &> /dev/null + then + echo "java could not be found. Please see actions/setup-java to set it up before running this action." + exit 1 + fi + shell: bash + + - name: Download Java Validator + run: | + CHECK_JAVA_VERSION=$(java -version 2>&1 | head -1 | cut -d'"' -f2) + echo "JAVA_VERSION: $CHECK_JAVA_VERSION" + wget -q https://github.com/hapifhir/org.hl7.fhir.core/releases/download/$JAVA_VALIDATOR_VERSION/validator_cli.jar + echo "JAVA_VALIDATOR_VERSION: $JAVA_VALIDATOR_VERSION" + shell: bash + + - name: Install jq + run: | + sudo apt-get update > /dev/null + sudo apt-get install --no-install-recommends -y jq findutils curl ca-certificates > /dev/null + shell: bash + + - name: Validate all example resources in scope of the repository + run: | + for p in $INPUT_PATH_TO_CONFORMANCE_RESOURCES; # Get combined path to conformance resources, we want to validate against the current version of the conformance resources + do + COMBINED_IG_PARAMETERS+="-ig $GITHUB_WORKSPACE/$p " + done + + for p in $PATH_TO_EXAMPLES; + + do + + # Ensure directory ends with "/" + if [[ ! "$p" =~ .*/$ ]]; then + p="$p/" + fi + + UNESCPAED_IG_DEPENDENCIES=$(echo $IG_DEPENDENCIES | tr -d '"') + + java -jar validator_cli.jar temp_folder/$p*.xml temp_folder/$p*.json -version $FHIR_VERSION $INPUT_JAVA_VALIDATION_OPTIONS $UNESCPAED_IG_DEPENDENCIES $COMBINED_IG_PARAMETERS + + done + + - name: Cleanup + if: always() + run: rm -rf temp_folder \ No newline at end of file From 0b98dd2189d695a82f278385b0af2de041c12f77 Mon Sep 17 00:00:00 2001 From: florianschoffke Date: Mon, 19 Feb 2024 08:22:23 +0100 Subject: [PATCH 02/24] Add example to check if pipeline works --- Beispiel_1.xml | 385 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 385 insertions(+) create mode 100644 Beispiel_1.xml diff --git a/Beispiel_1.xml b/Beispiel_1.xml new file mode 100644 index 00000000..8482db0e --- /dev/null +++ b/Beispiel_1.xml @@ -0,0 +1,385 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <custodian> + <reference value="Organization/5d3f4ac0-2b44-4d48-b363-e63efa72973b" /> + </custodian> + <section> + <code> + <coding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_ERP_Section_Type" /> + <code value="Prescription" /> + </coding> + </code> + <entry> + <!-- Referenz auf Verordnung (MedicationRequest) --> + <reference value="MedicationRequest/000abe24-f690-481e-9a9f-1cd0eb434e2f" /> + </entry> + </section> + <section> + <code> + <coding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_ERP_Section_Type" /> + <code value="Coverage" /> + </coding> + </code> + <entry> + <!-- Referenz auf Krankenkasse/Kostenträger --> + <reference value="Coverage/1b89236c-ab14-4e92-937e-5af0b59d0cd4" /> + </entry> + </section> + </Composition> + </resource> + </entry> + <entry> + <fullUrl value="http://pvs.praxis.local/fhir/MedicationRequest/000abe24-f690-481e-9a9f-1cd0eb434e2f" /> + <resource> + <MedicationRequest xmlns="http://hl7.org/fhir"> + <!--Beispiel MedicationRequest für eine PZN-Verordnung --> + <id value="000abe24-f690-481e-9a9f-1cd0eb434e2f"/> + <meta> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Prescription|1.1.0"/> + </meta> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_FOR_StatusCoPayment"> + <valueCoding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_FOR_StatusCoPayment"/> + <code value="0"/> + </valueCoding> + </extension> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_EmergencyServicesFee"> + <valueBoolean value="false"/> + </extension> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_BVG"> + <valueBoolean value="false"/> + </extension> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Multiple_Prescription"> + <extension url="Kennzeichen"> + <valueBoolean value="false"/> + </extension> + </extension> + <status value="active"/> + <intent value="order"/> + <medicationReference> + <reference value="Medication/47076fb4-dc5c-4f75-85f6-b200033b3280"/> + </medicationReference> + <subject> + <reference value="Patient/93866fdc-3e50-4902-a7e9-891b54737b5e"/> + </subject> + <authoredOn value="2022-05-20" /> + <requester> + <reference value="Practitioner/bc329f24-3d65-4286-bf06-b54dd6cad655"/> + </requester> + <insurance> + <reference value="Coverage/1b89236c-ab14-4e92-937e-5af0b59d0cd4"/> + </insurance> + <dosageInstruction> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_DosageFlag"> + <valueBoolean value="false"/> + </extension> + </dosageInstruction> + <dispenseRequest> + <quantity> + <value value="1"/> + <system value="http://unitsofmeasure.org"/> + <code value="{Package}"/> + </quantity> + </dispenseRequest> + <substitution> + <allowedBoolean value="true"/> + </substitution> + </MedicationRequest> + </resource> + </entry> + <entry> + <fullUrl value="http://pvs.praxis.local/fhir/Medication/47076fb4-dc5c-4f75-85f6-b200033b3280" /> + <resource> + <Medication xmlns="http://hl7.org/fhir"> + <id value="47076fb4-dc5c-4f75-85f6-b200033b3280"/> + <meta> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Medication_PZN|1.1.0"/> + </meta> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Medication_Type"> + <valueCodeableConcept> + <coding> + <system value="http://snomed.info/sct"/> + <version value="http://snomed.info/sct/900000000000207008/version/20220331" /> + <code value="763158003" /> + <display value="Medicinal product (product)" /> + </coding> + </valueCodeableConcept> + </extension> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Category"> + <valueCoding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_ERP_Medication_Category"/> + <code value="00" /> + </valueCoding> + </extension> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Vaccine"> + <valueBoolean value="false"/> + </extension> + <extension url="http://fhir.de/StructureDefinition/normgroesse"> + <valueCode value="N1"/> + </extension> + <code> + <coding> + <system value="http://fhir.de/CodeSystem/ifa/pzn"/> + <code value="00814665"/> + </coding> + <text value="Januvia® 50 mg 28 Filmtabletten N1"/> + </code> + <form> + <coding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DARREICHUNGSFORM"/> + <code value="FTA"/> + </coding> + </form> + </Medication> + </resource> + </entry> + <entry> + <fullUrl value="http://pvs.praxis.local/fhir/Patient/93866fdc-3e50-4902-a7e9-891b54737b5e" /> + <resource> + <Patient xmlns="http://hl7.org/fhir"> + <id value="93866fdc-3e50-4902-a7e9-891b54737b5e" /> + <meta> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Patient|1.1.0" /> + </meta> + <identifier> + <type> + <coding> + <system value="http://fhir.de/CodeSystem/identifier-type-de-basis" /> + <code value="GKV" /> + </coding> + </type> + <system value="http://fhir.de/sid/gkv/kvid-10" /> + <value value="K220635158" /> + </identifier> + <name> + <use value="official" /> + <family value="Königsstein"> + <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-name"> + <valueString value="Königsstein" /> + </extension> + </family> + <given value="Ludger" /> + </name> + <birthDate value="1935-06-22" /> + <address> + <type value="both" /> + <line value="Blumenweg"> + <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"> + <valueString value="Blumenweg" /> + </extension> + </line> + <city value="Esens" /> + <postalCode value="26427" /> + <country value="D" /> + </address> + </Patient> + </resource> + </entry> + <entry> + <fullUrl value="http://pvs.praxis.local/fhir/Practitioner/bc329f24-3d65-4286-bf06-b54dd6cad655" /> + <resource> + <Practitioner xmlns="http://hl7.org/fhir"> + <id value="bc329f24-3d65-4286-bf06-b54dd6cad655" /> + <meta> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Practitioner|1.1.0" /> + </meta> + <identifier> + <type> + <coding> + <system value="http://terminology.hl7.org/CodeSystem/v2-0203" /> + <code value="LANR" /> + </coding> + </type> + <system value="https://fhir.kbv.de/NamingSystem/KBV_NS_Base_ANR" /> + <value value="123456628" /> + </identifier> + <name> + <use value="official" /> + <family value="Freiherr von Müller"> + <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-prefix"> + <valueString value="von" /> + </extension> + <extension url="http://fhir.de/StructureDefinition/humanname-namenszusatz"> + <valueString value="Freiherr" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-name"> + <valueString value="Müller" /> + </extension> + </family> + <given value="Paul" /> + <prefix value="Dr. med."> + <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier"> + <valueCode value="AC" /> + </extension> + </prefix> + </name> + <qualification> + <code> + <coding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_FOR_Qualification_Type" /> + <code value="00" /> + </coding> + </code> + </qualification> + <qualification> + <code> + <coding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_FOR_Berufsbezeichnung" /> + <code value="Berufsbezeichnung" /> + </coding> + <text value="Facharzt für Innere Medizin: Kardiologie" /> + </code> + </qualification> + </Practitioner> + </resource> + </entry> + <entry> + <fullUrl value="http://pvs.praxis.local/fhir/Organization/5d3f4ac0-2b44-4d48-b363-e63efa72973b" /> + <resource> + <Organization xmlns="http://hl7.org/fhir"> + <id value="5d3f4ac0-2b44-4d48-b363-e63efa72973b" /> + <meta> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Organization|1.1.0" /> + </meta> + <identifier> + <type> + <coding> + <system value="http://terminology.hl7.org/CodeSystem/v2-0203" /> + <code value="BSNR" /> + </coding> + </type> + <system value="https://fhir.kbv.de/NamingSystem/KBV_NS_Base_BSNR" /> + <value value="721111100" /> + </identifier> + <name value="MVZ" /> + <telecom> + <system value="phone" /> + <value value="0301234567" /> + </telecom> + <telecom> + <system value="fax" /> + <value value="030123456789" /> + </telecom> + <telecom> + <system value="email" /> + <value value="mvz@e-mail.de" /> + </telecom> + <address> + <type value="both" /> + <line value="Herbert-Lewin-Platz 2"> + <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber"> + <valueString value="2" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"> + <valueString value="Herbert-Lewin-Platz" /> + </extension> + </line> + <city value="Berlin" /> + <postalCode value="10623" /> + <country value="D" /> + </address> + </Organization> + </resource> + </entry> + <entry> + <fullUrl value="http://pvs.praxis.local/fhir/Coverage/1b89236c-ab14-4e92-937e-5af0b59d0cd4" /> + <resource> + <Coverage xmlns="http://hl7.org/fhir"> + <id value="1b89236c-ab14-4e92-937e-5af0b59d0cd4" /> + <meta> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Coverage|1.1.0" /> + </meta> + <extension url="http://fhir.de/StructureDefinition/gkv/besondere-personengruppe"> + <valueCoding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_PERSONENGRUPPE" /> + <code value="00" /> + </valueCoding> + </extension> + <extension url="http://fhir.de/StructureDefinition/gkv/dmp-kennzeichen"> + <valueCoding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DMP" /> + <code value="05" /> + </valueCoding> + </extension> + <extension url="http://fhir.de/StructureDefinition/gkv/wop"> + <valueCoding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_ITA_WOP" /> + <code value="17" /> + </valueCoding> + </extension> + <extension url="http://fhir.de/StructureDefinition/gkv/versichertenart"> + <valueCoding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_VERSICHERTENSTATUS" /> + <code value="5" /> + </valueCoding> + </extension> + <status value="active" /> + <type> + <coding> + <system value="http://fhir.de/CodeSystem/versicherungsart-de-basis" /> + <code value="GKV" /> + </coding> + </type> + <beneficiary> + <reference value="Patient/93866fdc-3e50-4902-a7e9-891b54737b5e" /> + </beneficiary> + <payor> + <identifier> + <system value="http://fhir.de/sid/arge-ik/iknr" /> + <value value="109719018" /> + </identifier> + <display value="AOK Nordost" /> + </payor> + </Coverage> + </resource> + </entry> +</Bundle> From 0785f9e1548d75ea47a41b31fec6b68329a177b6 Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 08:28:22 +0100 Subject: [PATCH 03/24] minor fixes --- .github/workflows/main.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 96760385..a1822867 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ env: PATH_TO_EXAMPLES: 'temp_folder/' FHIR_VERSION: "4.0" INPUT_JAVA_VALIDATION_OPTIONS: "-tx http://tx.fhir.org -debug -allow-example-urls true" - IG_DEPENDENCIES: "-ig de.basisprofil.r4#1.3.2 -ig hl7.fhir.r4.core#4.0.1 -ig kbv.ita.for#1.1.0 -ig kbv.ita.erp#1.1.x -ig de.gematik.erezept-workflow.r4 1.x.x" + IG_DEPENDENCIES: "-ig de.basisprofil.r4#1.4.0 -ig hl7.fhir.r4.core#4.0.1 -ig kbv.ita.for#1.1.0 -ig kbv.ita.erp#1.1.x -ig de.gematik.erezept-workflow.r4 1.x.x" jobs: CI_EXAMPLES_VALIDATION: @@ -30,6 +30,13 @@ jobs: - uses: actions/setup-node@v3 with: node-version: '20' + + # Identify and Copy Changed .json and .xml Files + - name: Identify and Copy Changed .json and .xml Files + run: | + mkdir -p temp_folder # Create a temp folder + git diff --name-only main | grep -E '\.(json|xml)$' | xargs -I {} cp {} temp_folder/ + ls -l './temp_folder' # Install .NET runtime - name: Setup .NET Core SDK @@ -44,11 +51,7 @@ jobs: distribution: 'microsoft' java-version: '17' - - name: Identify and Copy Changed .json and .xml Files - run: | - mkdir -p temp_folder # Create a temp folder - git diff --name-only origin/main...HEAD | grep -E '\.(json|xml)$' | xargs -I {} cp {} temp_folder/ - ls -l './temp_folder' + # --------------------------------------------------------------------------------------------------- # From 12ba056083f4ed5c0bde45fbf035fc94d7034574 Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 08:29:44 +0100 Subject: [PATCH 04/24] change to get proper diff --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a1822867..5edaeaff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,7 +35,7 @@ jobs: - name: Identify and Copy Changed .json and .xml Files run: | mkdir -p temp_folder # Create a temp folder - git diff --name-only main | grep -E '\.(json|xml)$' | xargs -I {} cp {} temp_folder/ + git diff --name-only origin/main | grep -E '\.(json|xml)$' | xargs -I {} cp {} temp_folder/ ls -l './temp_folder' # Install .NET runtime From 0ca77bfd6ad1ebeb151bc9f52aed0a7703ec73f5 Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 08:33:18 +0100 Subject: [PATCH 05/24] check out main to compare --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5edaeaff..15ec8df9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,6 +25,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + ref: main - uses: actions/checkout@v4 - uses: actions/setup-node@v3 @@ -35,7 +37,7 @@ jobs: - name: Identify and Copy Changed .json and .xml Files run: | mkdir -p temp_folder # Create a temp folder - git diff --name-only origin/main | grep -E '\.(json|xml)$' | xargs -I {} cp {} temp_folder/ + git diff --name-only main | grep -E '\.(json|xml)$' | xargs -I {} cp {} temp_folder/ ls -l './temp_folder' # Install .NET runtime @@ -51,9 +53,7 @@ jobs: distribution: 'microsoft' java-version: '17' - - # --------------------------------------------------------------------------------------------------- # # JAVA Validator # # --------------------------------------------------------------------------------------------------- # From dbc78f995b53708ba985d7c39be77119b52c5d35 Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 08:35:36 +0100 Subject: [PATCH 06/24] set fetch depth to 0 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15ec8df9..b4c76540 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - ref: main + fetch-depth: 0 - uses: actions/checkout@v4 - uses: actions/setup-node@v3 From 749e9cf77ee93ca902cfd560f383c984a8c4021b Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 08:38:22 +0100 Subject: [PATCH 07/24] try for fix git diff --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b4c76540..ecb5aab2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,7 @@ jobs: - name: Identify and Copy Changed .json and .xml Files run: | mkdir -p temp_folder # Create a temp folder - git diff --name-only main | grep -E '\.(json|xml)$' | xargs -I {} cp {} temp_folder/ + git diff --name-only origin/main origin/${GITHUB_HEAD_REF} | grep -E '\.(json|xml)$' | xargs -I {} cp {} temp_folder/ ls -l './temp_folder' # Install .NET runtime From 8863e3e8307c5f703f9653ceca226790fa476013 Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 08:44:36 +0100 Subject: [PATCH 08/24] bugfixes --- .github/workflows/main.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ecb5aab2..ca4583dd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ on: env: JAVA_VALIDATOR_VERSION: 6.0.15 - PATH_TO_EXAMPLES: 'temp_folder/' + PATH_TO_EXAMPLES: './temp_folder/' FHIR_VERSION: "4.0" INPUT_JAVA_VALIDATION_OPTIONS: "-tx http://tx.fhir.org -debug -allow-example-urls true" IG_DEPENDENCIES: "-ig de.basisprofil.r4#1.4.0 -ig hl7.fhir.r4.core#4.0.1 -ig kbv.ita.for#1.1.0 -ig kbv.ita.erp#1.1.x -ig de.gematik.erezept-workflow.r4 1.x.x" @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v2 with: fetch-depth: 0 @@ -36,9 +36,10 @@ jobs: # Identify and Copy Changed .json and .xml Files - name: Identify and Copy Changed .json and .xml Files run: | - mkdir -p temp_folder # Create a temp folder - git diff --name-only origin/main origin/${GITHUB_HEAD_REF} | grep -E '\.(json|xml)$' | xargs -I {} cp {} temp_folder/ - ls -l './temp_folder' + mkdir -p $PATH_TO_EXAMPLES # Create a temp folder + git fetch origin main:main + git diff --name-only main...HEAD | grep -E '\.(json|xml)$' | xargs -I {} cp {} $PATH_TO_EXAMPLES/ + ls -l '$PATH_TO_EXAMPLES' # Install .NET runtime - name: Setup .NET Core SDK @@ -99,7 +100,7 @@ jobs: UNESCPAED_IG_DEPENDENCIES=$(echo $IG_DEPENDENCIES | tr -d '"') - java -jar validator_cli.jar temp_folder/$p*.xml temp_folder/$p*.json -version $FHIR_VERSION $INPUT_JAVA_VALIDATION_OPTIONS $UNESCPAED_IG_DEPENDENCIES $COMBINED_IG_PARAMETERS + java -jar validator_cli.jar $GITHUB_WORKSPACE/$p*.xml $GITHUB_WORKSPACE/$p*.json -version $FHIR_VERSION $INPUT_JAVA_VALIDATION_OPTIONS $UNESCPAED_IG_DEPENDENCIES $COMBINED_IG_PARAMETERS done From 2382afd88eabe7840b28acd9d71feb35bd8ddef4 Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 08:45:57 +0100 Subject: [PATCH 09/24] bugfix pt.2 --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca4583dd..714bfacc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,8 +38,8 @@ jobs: run: | mkdir -p $PATH_TO_EXAMPLES # Create a temp folder git fetch origin main:main - git diff --name-only main...HEAD | grep -E '\.(json|xml)$' | xargs -I {} cp {} $PATH_TO_EXAMPLES/ - ls -l '$PATH_TO_EXAMPLES' + git diff --name-only main | grep -E '\.(json|xml)$' | xargs -I {} cp {} $PATH_TO_EXAMPLES/ + ls -l $PATH_TO_EXAMPLES # Install .NET runtime - name: Setup .NET Core SDK From fe14849dd54c6bd6057b1e938ddc7be239112429 Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 08:49:23 +0100 Subject: [PATCH 10/24] fix for java validator --- .github/workflows/main.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 714bfacc..c4dbf3fe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,7 +39,7 @@ jobs: mkdir -p $PATH_TO_EXAMPLES # Create a temp folder git fetch origin main:main git diff --name-only main | grep -E '\.(json|xml)$' | xargs -I {} cp {} $PATH_TO_EXAMPLES/ - ls -l $PATH_TO_EXAMPLES + echo "Number of changed files to validate: " && ls -1 | wc -l $PATH_TO_EXAMPLES # Install .NET runtime - name: Setup .NET Core SDK @@ -84,11 +84,6 @@ jobs: - name: Validate all example resources in scope of the repository run: | - for p in $INPUT_PATH_TO_CONFORMANCE_RESOURCES; # Get combined path to conformance resources, we want to validate against the current version of the conformance resources - do - COMBINED_IG_PARAMETERS+="-ig $GITHUB_WORKSPACE/$p " - done - for p in $PATH_TO_EXAMPLES; do @@ -97,10 +92,8 @@ jobs: if [[ ! "$p" =~ .*/$ ]]; then p="$p/" fi - - UNESCPAED_IG_DEPENDENCIES=$(echo $IG_DEPENDENCIES | tr -d '"') - java -jar validator_cli.jar $GITHUB_WORKSPACE/$p*.xml $GITHUB_WORKSPACE/$p*.json -version $FHIR_VERSION $INPUT_JAVA_VALIDATION_OPTIONS $UNESCPAED_IG_DEPENDENCIES $COMBINED_IG_PARAMETERS + java -jar validator_cli.jar $GITHUB_WORKSPACE/$p*.xml $GITHUB_WORKSPACE/$p*.json -version $FHIR_VERSION $INPUT_JAVA_VALIDATION_OPTIONS $IG_DEPENDENCIES $COMBINED_IG_PARAMETERS done From a51b7a494f18199c9d64ab60dd95d3f31654d73c Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 08:50:10 +0100 Subject: [PATCH 11/24] fix for counting files --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c4dbf3fe..604e452b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,7 +39,7 @@ jobs: mkdir -p $PATH_TO_EXAMPLES # Create a temp folder git fetch origin main:main git diff --name-only main | grep -E '\.(json|xml)$' | xargs -I {} cp {} $PATH_TO_EXAMPLES/ - echo "Number of changed files to validate: " && ls -1 | wc -l $PATH_TO_EXAMPLES + echo "Number of changed files to validate: " && ls -1 $PATH_TO_EXAMPLES | wc -l # Install .NET runtime - name: Setup .NET Core SDK From cda1a451f667101190459fde72966eb636d59628 Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 08:51:59 +0100 Subject: [PATCH 12/24] logging --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 604e452b..aea6281f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -92,6 +92,9 @@ jobs: if [[ ! "$p" =~ .*/$ ]]; then p="$p/" fi + + echo "VALIDATION CALL" + echo "java -jar validator_cli.jar $GITHUB_WORKSPACE/$p*.xml $GITHUB_WORKSPACE/$p*.json -version $FHIR_VERSION $INPUT_JAVA_VALIDATION_OPTIONS $IG_DEPENDENCIES $COMBINED_IG_PARAMETERS" java -jar validator_cli.jar $GITHUB_WORKSPACE/$p*.xml $GITHUB_WORKSPACE/$p*.json -version $FHIR_VERSION $INPUT_JAVA_VALIDATION_OPTIONS $IG_DEPENDENCIES $COMBINED_IG_PARAMETERS From 8649efc9ab57252b642c3699a6bfdf2d7e7983ea Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 08:53:57 +0100 Subject: [PATCH 13/24] fix version statement --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aea6281f..ef8393b6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ env: PATH_TO_EXAMPLES: './temp_folder/' FHIR_VERSION: "4.0" INPUT_JAVA_VALIDATION_OPTIONS: "-tx http://tx.fhir.org -debug -allow-example-urls true" - IG_DEPENDENCIES: "-ig de.basisprofil.r4#1.4.0 -ig hl7.fhir.r4.core#4.0.1 -ig kbv.ita.for#1.1.0 -ig kbv.ita.erp#1.1.x -ig de.gematik.erezept-workflow.r4 1.x.x" + IG_DEPENDENCIES: "-ig de.basisprofil.r4#1.4.0 -ig hl7.fhir.r4.core#4.0.1 -ig kbv.ita.for#1.1.0 -ig kbv.ita.erp#1.1.x -ig de.gematik.erezept-workflow.r4" jobs: CI_EXAMPLES_VALIDATION: From b6290c943586e6408698325e8fddaef6cbdbce2b Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 08:56:18 +0100 Subject: [PATCH 14/24] Check for error fail --- Beispiel_1.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Beispiel_1.xml b/Beispiel_1.xml index 8482db0e..f8005205 100644 --- a/Beispiel_1.xml +++ b/Beispiel_1.xml @@ -171,7 +171,7 @@ <system value="http://fhir.de/CodeSystem/ifa/pzn"/> <code value="00814665"/> </coding> - <text value="Januvia® 50 mg 28 Filmtabletten N1"/> + <text value="Januvia® 50 mg 28 Filmtabletten N1, Dieses Zeichen hier sind mehr als die erlaubten 50, die vorgeschrieben sind durch einen Constraint"/> </code> <form> <coding> From 9e2c824db746a63ac0977198b4f625d43d3d9601 Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 10:29:40 +0100 Subject: [PATCH 15/24] remove redundant info --- .github/workflows/main.yml | 4 +- Beispiel_1.xml | 385 ------------------------------------- 2 files changed, 1 insertion(+), 388 deletions(-) delete mode 100644 Beispiel_1.xml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef8393b6..04b48d00 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,9 +93,7 @@ jobs: p="$p/" fi - echo "VALIDATION CALL" - echo "java -jar validator_cli.jar $GITHUB_WORKSPACE/$p*.xml $GITHUB_WORKSPACE/$p*.json -version $FHIR_VERSION $INPUT_JAVA_VALIDATION_OPTIONS $IG_DEPENDENCIES $COMBINED_IG_PARAMETERS" - + java -jar validator_cli.jar $GITHUB_WORKSPACE/$p*.xml $GITHUB_WORKSPACE/$p*.json -version $FHIR_VERSION $INPUT_JAVA_VALIDATION_OPTIONS $IG_DEPENDENCIES $COMBINED_IG_PARAMETERS done diff --git a/Beispiel_1.xml b/Beispiel_1.xml deleted file mode 100644 index f8005205..00000000 --- a/Beispiel_1.xml +++ /dev/null @@ -1,385 +0,0 @@ -<Bundle xmlns="http://hl7.org/fhir"> - <id value="44420ed9-7388-4be5-acc5-9c124fad9f34" /> - <meta> - <lastUpdated value="2022-05-20T08:30:00Z" /> - <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Bundle|1.1.0" /> - </meta> - <identifier> - <system value="https://gematik.de/fhir/erp/NamingSystem/GEM_ERP_NS_PrescriptionId" /> - <value value="160.100.000.000.006.24" /> - </identifier> - <type value="document" /> - <timestamp value="2022-05-20T08:30:00Z"/> - <entry> - <fullUrl value="http://pvs.praxis.local/fhir/Composition/6ac6d8bc-3acd-4e31-ad9b-442fc343c6c0" /> - <resource> - <Composition xmlns="http://hl7.org/fhir"> - <id value="6ac6d8bc-3acd-4e31-ad9b-442fc343c6c0" /> - <meta> - <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Composition|1.1.0" /> - </meta> - <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_FOR_Legal_basis"> - <valueCoding> - <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_STATUSKENNZEICHEN" /> - <code value="00" /> - </valueCoding> - </extension> - <status value="final" /> - <type> - <coding> - <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_FORMULAR_ART" /> - <code value="e16A" /> - </coding> - </type> - <subject> - <reference value="Patient/93866fdc-3e50-4902-a7e9-891b54737b5e" /> - </subject> - <date value="2022-05-20T08:00:00Z"/> - <author> - <reference value="Practitioner/bc329f24-3d65-4286-bf06-b54dd6cad655" /> - <type value="Practitioner" /> - </author> - <author> - <type value="Device" /> - <identifier> - <system value="https://fhir.kbv.de/NamingSystem/KBV_NS_FOR_Pruefnummer" /> - <value value="Y/400/2107/36/999" /> - </identifier> - </author> - <title value="elektronische Arzneimittelverordnung" /> - <custodian> - <reference value="Organization/5d3f4ac0-2b44-4d48-b363-e63efa72973b" /> - </custodian> - <section> - <code> - <coding> - <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_ERP_Section_Type" /> - <code value="Prescription" /> - </coding> - </code> - <entry> - <!-- Referenz auf Verordnung (MedicationRequest) --> - <reference value="MedicationRequest/000abe24-f690-481e-9a9f-1cd0eb434e2f" /> - </entry> - </section> - <section> - <code> - <coding> - <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_ERP_Section_Type" /> - <code value="Coverage" /> - </coding> - </code> - <entry> - <!-- Referenz auf Krankenkasse/Kostenträger --> - <reference value="Coverage/1b89236c-ab14-4e92-937e-5af0b59d0cd4" /> - </entry> - </section> - </Composition> - </resource> - </entry> - <entry> - <fullUrl value="http://pvs.praxis.local/fhir/MedicationRequest/000abe24-f690-481e-9a9f-1cd0eb434e2f" /> - <resource> - <MedicationRequest xmlns="http://hl7.org/fhir"> - <!--Beispiel MedicationRequest für eine PZN-Verordnung --> - <id value="000abe24-f690-481e-9a9f-1cd0eb434e2f"/> - <meta> - <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Prescription|1.1.0"/> - </meta> - <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_FOR_StatusCoPayment"> - <valueCoding> - <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_FOR_StatusCoPayment"/> - <code value="0"/> - </valueCoding> - </extension> - <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_EmergencyServicesFee"> - <valueBoolean value="false"/> - </extension> - <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_BVG"> - <valueBoolean value="false"/> - </extension> - <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Multiple_Prescription"> - <extension url="Kennzeichen"> - <valueBoolean value="false"/> - </extension> - </extension> - <status value="active"/> - <intent value="order"/> - <medicationReference> - <reference value="Medication/47076fb4-dc5c-4f75-85f6-b200033b3280"/> - </medicationReference> - <subject> - <reference value="Patient/93866fdc-3e50-4902-a7e9-891b54737b5e"/> - </subject> - <authoredOn value="2022-05-20" /> - <requester> - <reference value="Practitioner/bc329f24-3d65-4286-bf06-b54dd6cad655"/> - </requester> - <insurance> - <reference value="Coverage/1b89236c-ab14-4e92-937e-5af0b59d0cd4"/> - </insurance> - <dosageInstruction> - <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_DosageFlag"> - <valueBoolean value="false"/> - </extension> - </dosageInstruction> - <dispenseRequest> - <quantity> - <value value="1"/> - <system value="http://unitsofmeasure.org"/> - <code value="{Package}"/> - </quantity> - </dispenseRequest> - <substitution> - <allowedBoolean value="true"/> - </substitution> - </MedicationRequest> - </resource> - </entry> - <entry> - <fullUrl value="http://pvs.praxis.local/fhir/Medication/47076fb4-dc5c-4f75-85f6-b200033b3280" /> - <resource> - <Medication xmlns="http://hl7.org/fhir"> - <id value="47076fb4-dc5c-4f75-85f6-b200033b3280"/> - <meta> - <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Medication_PZN|1.1.0"/> - </meta> - <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Medication_Type"> - <valueCodeableConcept> - <coding> - <system value="http://snomed.info/sct"/> - <version value="http://snomed.info/sct/900000000000207008/version/20220331" /> - <code value="763158003" /> - <display value="Medicinal product (product)" /> - </coding> - </valueCodeableConcept> - </extension> - <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Category"> - <valueCoding> - <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_ERP_Medication_Category"/> - <code value="00" /> - </valueCoding> - </extension> - <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Vaccine"> - <valueBoolean value="false"/> - </extension> - <extension url="http://fhir.de/StructureDefinition/normgroesse"> - <valueCode value="N1"/> - </extension> - <code> - <coding> - <system value="http://fhir.de/CodeSystem/ifa/pzn"/> - <code value="00814665"/> - </coding> - <text value="Januvia® 50 mg 28 Filmtabletten N1, Dieses Zeichen hier sind mehr als die erlaubten 50, die vorgeschrieben sind durch einen Constraint"/> - </code> - <form> - <coding> - <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DARREICHUNGSFORM"/> - <code value="FTA"/> - </coding> - </form> - </Medication> - </resource> - </entry> - <entry> - <fullUrl value="http://pvs.praxis.local/fhir/Patient/93866fdc-3e50-4902-a7e9-891b54737b5e" /> - <resource> - <Patient xmlns="http://hl7.org/fhir"> - <id value="93866fdc-3e50-4902-a7e9-891b54737b5e" /> - <meta> - <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Patient|1.1.0" /> - </meta> - <identifier> - <type> - <coding> - <system value="http://fhir.de/CodeSystem/identifier-type-de-basis" /> - <code value="GKV" /> - </coding> - </type> - <system value="http://fhir.de/sid/gkv/kvid-10" /> - <value value="K220635158" /> - </identifier> - <name> - <use value="official" /> - <family value="Königsstein"> - <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-name"> - <valueString value="Königsstein" /> - </extension> - </family> - <given value="Ludger" /> - </name> - <birthDate value="1935-06-22" /> - <address> - <type value="both" /> - <line value="Blumenweg"> - <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"> - <valueString value="Blumenweg" /> - </extension> - </line> - <city value="Esens" /> - <postalCode value="26427" /> - <country value="D" /> - </address> - </Patient> - </resource> - </entry> - <entry> - <fullUrl value="http://pvs.praxis.local/fhir/Practitioner/bc329f24-3d65-4286-bf06-b54dd6cad655" /> - <resource> - <Practitioner xmlns="http://hl7.org/fhir"> - <id value="bc329f24-3d65-4286-bf06-b54dd6cad655" /> - <meta> - <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Practitioner|1.1.0" /> - </meta> - <identifier> - <type> - <coding> - <system value="http://terminology.hl7.org/CodeSystem/v2-0203" /> - <code value="LANR" /> - </coding> - </type> - <system value="https://fhir.kbv.de/NamingSystem/KBV_NS_Base_ANR" /> - <value value="123456628" /> - </identifier> - <name> - <use value="official" /> - <family value="Freiherr von Müller"> - <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-prefix"> - <valueString value="von" /> - </extension> - <extension url="http://fhir.de/StructureDefinition/humanname-namenszusatz"> - <valueString value="Freiherr" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-name"> - <valueString value="Müller" /> - </extension> - </family> - <given value="Paul" /> - <prefix value="Dr. med."> - <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier"> - <valueCode value="AC" /> - </extension> - </prefix> - </name> - <qualification> - <code> - <coding> - <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_FOR_Qualification_Type" /> - <code value="00" /> - </coding> - </code> - </qualification> - <qualification> - <code> - <coding> - <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_FOR_Berufsbezeichnung" /> - <code value="Berufsbezeichnung" /> - </coding> - <text value="Facharzt für Innere Medizin: Kardiologie" /> - </code> - </qualification> - </Practitioner> - </resource> - </entry> - <entry> - <fullUrl value="http://pvs.praxis.local/fhir/Organization/5d3f4ac0-2b44-4d48-b363-e63efa72973b" /> - <resource> - <Organization xmlns="http://hl7.org/fhir"> - <id value="5d3f4ac0-2b44-4d48-b363-e63efa72973b" /> - <meta> - <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Organization|1.1.0" /> - </meta> - <identifier> - <type> - <coding> - <system value="http://terminology.hl7.org/CodeSystem/v2-0203" /> - <code value="BSNR" /> - </coding> - </type> - <system value="https://fhir.kbv.de/NamingSystem/KBV_NS_Base_BSNR" /> - <value value="721111100" /> - </identifier> - <name value="MVZ" /> - <telecom> - <system value="phone" /> - <value value="0301234567" /> - </telecom> - <telecom> - <system value="fax" /> - <value value="030123456789" /> - </telecom> - <telecom> - <system value="email" /> - <value value="mvz@e-mail.de" /> - </telecom> - <address> - <type value="both" /> - <line value="Herbert-Lewin-Platz 2"> - <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber"> - <valueString value="2" /> - </extension> - <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"> - <valueString value="Herbert-Lewin-Platz" /> - </extension> - </line> - <city value="Berlin" /> - <postalCode value="10623" /> - <country value="D" /> - </address> - </Organization> - </resource> - </entry> - <entry> - <fullUrl value="http://pvs.praxis.local/fhir/Coverage/1b89236c-ab14-4e92-937e-5af0b59d0cd4" /> - <resource> - <Coverage xmlns="http://hl7.org/fhir"> - <id value="1b89236c-ab14-4e92-937e-5af0b59d0cd4" /> - <meta> - <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Coverage|1.1.0" /> - </meta> - <extension url="http://fhir.de/StructureDefinition/gkv/besondere-personengruppe"> - <valueCoding> - <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_PERSONENGRUPPE" /> - <code value="00" /> - </valueCoding> - </extension> - <extension url="http://fhir.de/StructureDefinition/gkv/dmp-kennzeichen"> - <valueCoding> - <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DMP" /> - <code value="05" /> - </valueCoding> - </extension> - <extension url="http://fhir.de/StructureDefinition/gkv/wop"> - <valueCoding> - <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_ITA_WOP" /> - <code value="17" /> - </valueCoding> - </extension> - <extension url="http://fhir.de/StructureDefinition/gkv/versichertenart"> - <valueCoding> - <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_VERSICHERTENSTATUS" /> - <code value="5" /> - </valueCoding> - </extension> - <status value="active" /> - <type> - <coding> - <system value="http://fhir.de/CodeSystem/versicherungsart-de-basis" /> - <code value="GKV" /> - </coding> - </type> - <beneficiary> - <reference value="Patient/93866fdc-3e50-4902-a7e9-891b54737b5e" /> - </beneficiary> - <payor> - <identifier> - <system value="http://fhir.de/sid/arge-ik/iknr" /> - <value value="109719018" /> - </identifier> - <display value="AOK Nordost" /> - </payor> - </Coverage> - </resource> - </entry> -</Bundle> From cc750e811d02759756d5c640f19053e13a1de0ac Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 10:35:32 +0100 Subject: [PATCH 16/24] Change Validator to Gematik Reference Validator --- .github/workflows/main.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 04b48d00..51de999e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ on: workflow_dispatch: env: - JAVA_VALIDATOR_VERSION: 6.0.15 + REFERENZVALIDATOR_VERSION: 6.0.15 PATH_TO_EXAMPLES: './temp_folder/' FHIR_VERSION: "4.0" INPUT_JAVA_VALIDATION_OPTIONS: "-tx http://tx.fhir.org -debug -allow-example-urls true" @@ -72,8 +72,8 @@ jobs: run: | CHECK_JAVA_VERSION=$(java -version 2>&1 | head -1 | cut -d'"' -f2) echo "JAVA_VERSION: $CHECK_JAVA_VERSION" - wget -q https://github.com/hapifhir/org.hl7.fhir.core/releases/download/$JAVA_VALIDATOR_VERSION/validator_cli.jar - echo "JAVA_VALIDATOR_VERSION: $JAVA_VALIDATOR_VERSION" + wget -q https://github.com/gematik/app-referencevalidator/releases/download/$REFERENZVALIDATOR_VERSION/referencevalidator-cli-$REFERENZVALIDATOR_VERSION.jar + echo "REFERENZVALIDATOR_VERSION: $REFERENZVALIDATOR_VERSION" shell: bash - name: Install jq @@ -93,8 +93,7 @@ jobs: p="$p/" fi - - java -jar validator_cli.jar $GITHUB_WORKSPACE/$p*.xml $GITHUB_WORKSPACE/$p*.json -version $FHIR_VERSION $INPUT_JAVA_VALIDATION_OPTIONS $IG_DEPENDENCIES $COMBINED_IG_PARAMETERS + java -jar referencevalidator-cli-$REFERENZVALIDATOR_VERSION.jar erp $GITHUB_WORKSPACE/$p*.xml $GITHUB_WORKSPACE/$p*.json --accepted-encodings xml --accepted-encodings json --no-profile-validity-period-check done From 4d924fd7f1b39dcaf02d0dbe1260825aced5db74 Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 10:36:40 +0100 Subject: [PATCH 17/24] fix version for validator --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 51de999e..29ed5fc7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ on: workflow_dispatch: env: - REFERENZVALIDATOR_VERSION: 6.0.15 + REFERENZVALIDATOR_VERSION: 2.0.2 PATH_TO_EXAMPLES: './temp_folder/' FHIR_VERSION: "4.0" INPUT_JAVA_VALIDATION_OPTIONS: "-tx http://tx.fhir.org -debug -allow-example-urls true" From 5efeaa5f5a7af82bc36d869c71673cfebec6dbbd Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 10:38:37 +0100 Subject: [PATCH 18/24] test for json and xml --- .github/workflows/main.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 29ed5fc7..8e010da2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,12 +40,6 @@ jobs: git fetch origin main:main git diff --name-only main | grep -E '\.(json|xml)$' | xargs -I {} cp {} $PATH_TO_EXAMPLES/ echo "Number of changed files to validate: " && ls -1 $PATH_TO_EXAMPLES | wc -l - - # Install .NET runtime - - name: Setup .NET Core SDK - uses: actions/setup-dotnet@v2 - with: - dotnet-version: 6.0.x # Install Java runtime (only needed if you want to run the offical HL7 Java validator) - name: Setup Java JDK From a4b8b024709d6e2517fa60dfa71612fb1b45ca48 Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 10:38:46 +0100 Subject: [PATCH 19/24] test files --- 008_Request_Communication_test.json | 31 +++ Beispiel_1_test.xml | 385 ++++++++++++++++++++++++++++ 2 files changed, 416 insertions(+) create mode 100644 008_Request_Communication_test.json create mode 100644 Beispiel_1_test.xml diff --git a/008_Request_Communication_test.json b/008_Request_Communication_test.json new file mode 100644 index 00000000..0fdb22e4 --- /dev/null +++ b/008_Request_Communication_test.json @@ -0,0 +1,31 @@ +{ + "resourceType" : "Communication", + "id" : "39004dfc-6e44-471a-942d-86c73293eb94", + "meta" : { + "profile" : [ "https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_Communication_Representative|1.2" ] + }, + "basedOn" : [ { + "reference" : "Task/160.000.226.119.771.59/$accept?ac=2c8be8db04cad4eb3a7fb5f74950cfe82b057d1f83ef87e6c4bbf7347099b7e2" + } ], + "status" : "unknown", + "recipient" : [ { + "identifier" : { + "system" : "http://fhir.de/sid/gkv/kvid-10", + "value" : "X110465770" + } + } ], + "payload" : [ { + "extension" : [ { + "url" : "https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_EX_SubstitutionAllowedType", + "valueBoolean" : true + }, { + "url" : "https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_EX_PrescriptionType", + "valueCoding" : { + "system" : "https://gematik.de/fhir/erp/CodeSystem/GEM_ERP_CS_FlowType", + "code" : "160", + "display" : "Muster 16 (Apothekenpflichtige Arzneimittel)" + } + } ], + "contentString" : "Wenn Chuck Norris Wäsche wäscht, werden sogar schwarze Hemden strahlend weiß." + } ] +} \ No newline at end of file diff --git a/Beispiel_1_test.xml b/Beispiel_1_test.xml new file mode 100644 index 00000000..8482db0e --- /dev/null +++ b/Beispiel_1_test.xml @@ -0,0 +1,385 @@ +<Bundle xmlns="http://hl7.org/fhir"> + <id value="44420ed9-7388-4be5-acc5-9c124fad9f34" /> + <meta> + <lastUpdated value="2022-05-20T08:30:00Z" /> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Bundle|1.1.0" /> + </meta> + <identifier> + <system value="https://gematik.de/fhir/erp/NamingSystem/GEM_ERP_NS_PrescriptionId" /> + <value value="160.100.000.000.006.24" /> + </identifier> + <type value="document" /> + <timestamp value="2022-05-20T08:30:00Z"/> + <entry> + <fullUrl value="http://pvs.praxis.local/fhir/Composition/6ac6d8bc-3acd-4e31-ad9b-442fc343c6c0" /> + <resource> + <Composition xmlns="http://hl7.org/fhir"> + <id value="6ac6d8bc-3acd-4e31-ad9b-442fc343c6c0" /> + <meta> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Composition|1.1.0" /> + </meta> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_FOR_Legal_basis"> + <valueCoding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_STATUSKENNZEICHEN" /> + <code value="00" /> + </valueCoding> + </extension> + <status value="final" /> + <type> + <coding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_FORMULAR_ART" /> + <code value="e16A" /> + </coding> + </type> + <subject> + <reference value="Patient/93866fdc-3e50-4902-a7e9-891b54737b5e" /> + </subject> + <date value="2022-05-20T08:00:00Z"/> + <author> + <reference value="Practitioner/bc329f24-3d65-4286-bf06-b54dd6cad655" /> + <type value="Practitioner" /> + </author> + <author> + <type value="Device" /> + <identifier> + <system value="https://fhir.kbv.de/NamingSystem/KBV_NS_FOR_Pruefnummer" /> + <value value="Y/400/2107/36/999" /> + </identifier> + </author> + <title value="elektronische Arzneimittelverordnung" /> + <custodian> + <reference value="Organization/5d3f4ac0-2b44-4d48-b363-e63efa72973b" /> + </custodian> + <section> + <code> + <coding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_ERP_Section_Type" /> + <code value="Prescription" /> + </coding> + </code> + <entry> + <!-- Referenz auf Verordnung (MedicationRequest) --> + <reference value="MedicationRequest/000abe24-f690-481e-9a9f-1cd0eb434e2f" /> + </entry> + </section> + <section> + <code> + <coding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_ERP_Section_Type" /> + <code value="Coverage" /> + </coding> + </code> + <entry> + <!-- Referenz auf Krankenkasse/Kostenträger --> + <reference value="Coverage/1b89236c-ab14-4e92-937e-5af0b59d0cd4" /> + </entry> + </section> + </Composition> + </resource> + </entry> + <entry> + <fullUrl value="http://pvs.praxis.local/fhir/MedicationRequest/000abe24-f690-481e-9a9f-1cd0eb434e2f" /> + <resource> + <MedicationRequest xmlns="http://hl7.org/fhir"> + <!--Beispiel MedicationRequest für eine PZN-Verordnung --> + <id value="000abe24-f690-481e-9a9f-1cd0eb434e2f"/> + <meta> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Prescription|1.1.0"/> + </meta> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_FOR_StatusCoPayment"> + <valueCoding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_FOR_StatusCoPayment"/> + <code value="0"/> + </valueCoding> + </extension> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_EmergencyServicesFee"> + <valueBoolean value="false"/> + </extension> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_BVG"> + <valueBoolean value="false"/> + </extension> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Multiple_Prescription"> + <extension url="Kennzeichen"> + <valueBoolean value="false"/> + </extension> + </extension> + <status value="active"/> + <intent value="order"/> + <medicationReference> + <reference value="Medication/47076fb4-dc5c-4f75-85f6-b200033b3280"/> + </medicationReference> + <subject> + <reference value="Patient/93866fdc-3e50-4902-a7e9-891b54737b5e"/> + </subject> + <authoredOn value="2022-05-20" /> + <requester> + <reference value="Practitioner/bc329f24-3d65-4286-bf06-b54dd6cad655"/> + </requester> + <insurance> + <reference value="Coverage/1b89236c-ab14-4e92-937e-5af0b59d0cd4"/> + </insurance> + <dosageInstruction> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_DosageFlag"> + <valueBoolean value="false"/> + </extension> + </dosageInstruction> + <dispenseRequest> + <quantity> + <value value="1"/> + <system value="http://unitsofmeasure.org"/> + <code value="{Package}"/> + </quantity> + </dispenseRequest> + <substitution> + <allowedBoolean value="true"/> + </substitution> + </MedicationRequest> + </resource> + </entry> + <entry> + <fullUrl value="http://pvs.praxis.local/fhir/Medication/47076fb4-dc5c-4f75-85f6-b200033b3280" /> + <resource> + <Medication xmlns="http://hl7.org/fhir"> + <id value="47076fb4-dc5c-4f75-85f6-b200033b3280"/> + <meta> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_ERP_Medication_PZN|1.1.0"/> + </meta> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_Base_Medication_Type"> + <valueCodeableConcept> + <coding> + <system value="http://snomed.info/sct"/> + <version value="http://snomed.info/sct/900000000000207008/version/20220331" /> + <code value="763158003" /> + <display value="Medicinal product (product)" /> + </coding> + </valueCodeableConcept> + </extension> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Category"> + <valueCoding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_ERP_Medication_Category"/> + <code value="00" /> + </valueCoding> + </extension> + <extension url="https://fhir.kbv.de/StructureDefinition/KBV_EX_ERP_Medication_Vaccine"> + <valueBoolean value="false"/> + </extension> + <extension url="http://fhir.de/StructureDefinition/normgroesse"> + <valueCode value="N1"/> + </extension> + <code> + <coding> + <system value="http://fhir.de/CodeSystem/ifa/pzn"/> + <code value="00814665"/> + </coding> + <text value="Januvia® 50 mg 28 Filmtabletten N1"/> + </code> + <form> + <coding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DARREICHUNGSFORM"/> + <code value="FTA"/> + </coding> + </form> + </Medication> + </resource> + </entry> + <entry> + <fullUrl value="http://pvs.praxis.local/fhir/Patient/93866fdc-3e50-4902-a7e9-891b54737b5e" /> + <resource> + <Patient xmlns="http://hl7.org/fhir"> + <id value="93866fdc-3e50-4902-a7e9-891b54737b5e" /> + <meta> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Patient|1.1.0" /> + </meta> + <identifier> + <type> + <coding> + <system value="http://fhir.de/CodeSystem/identifier-type-de-basis" /> + <code value="GKV" /> + </coding> + </type> + <system value="http://fhir.de/sid/gkv/kvid-10" /> + <value value="K220635158" /> + </identifier> + <name> + <use value="official" /> + <family value="Königsstein"> + <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-name"> + <valueString value="Königsstein" /> + </extension> + </family> + <given value="Ludger" /> + </name> + <birthDate value="1935-06-22" /> + <address> + <type value="both" /> + <line value="Blumenweg"> + <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"> + <valueString value="Blumenweg" /> + </extension> + </line> + <city value="Esens" /> + <postalCode value="26427" /> + <country value="D" /> + </address> + </Patient> + </resource> + </entry> + <entry> + <fullUrl value="http://pvs.praxis.local/fhir/Practitioner/bc329f24-3d65-4286-bf06-b54dd6cad655" /> + <resource> + <Practitioner xmlns="http://hl7.org/fhir"> + <id value="bc329f24-3d65-4286-bf06-b54dd6cad655" /> + <meta> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Practitioner|1.1.0" /> + </meta> + <identifier> + <type> + <coding> + <system value="http://terminology.hl7.org/CodeSystem/v2-0203" /> + <code value="LANR" /> + </coding> + </type> + <system value="https://fhir.kbv.de/NamingSystem/KBV_NS_Base_ANR" /> + <value value="123456628" /> + </identifier> + <name> + <use value="official" /> + <family value="Freiherr von Müller"> + <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-prefix"> + <valueString value="von" /> + </extension> + <extension url="http://fhir.de/StructureDefinition/humanname-namenszusatz"> + <valueString value="Freiherr" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/humanname-own-name"> + <valueString value="Müller" /> + </extension> + </family> + <given value="Paul" /> + <prefix value="Dr. med."> + <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier"> + <valueCode value="AC" /> + </extension> + </prefix> + </name> + <qualification> + <code> + <coding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_FOR_Qualification_Type" /> + <code value="00" /> + </coding> + </code> + </qualification> + <qualification> + <code> + <coding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_FOR_Berufsbezeichnung" /> + <code value="Berufsbezeichnung" /> + </coding> + <text value="Facharzt für Innere Medizin: Kardiologie" /> + </code> + </qualification> + </Practitioner> + </resource> + </entry> + <entry> + <fullUrl value="http://pvs.praxis.local/fhir/Organization/5d3f4ac0-2b44-4d48-b363-e63efa72973b" /> + <resource> + <Organization xmlns="http://hl7.org/fhir"> + <id value="5d3f4ac0-2b44-4d48-b363-e63efa72973b" /> + <meta> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Organization|1.1.0" /> + </meta> + <identifier> + <type> + <coding> + <system value="http://terminology.hl7.org/CodeSystem/v2-0203" /> + <code value="BSNR" /> + </coding> + </type> + <system value="https://fhir.kbv.de/NamingSystem/KBV_NS_Base_BSNR" /> + <value value="721111100" /> + </identifier> + <name value="MVZ" /> + <telecom> + <system value="phone" /> + <value value="0301234567" /> + </telecom> + <telecom> + <system value="fax" /> + <value value="030123456789" /> + </telecom> + <telecom> + <system value="email" /> + <value value="mvz@e-mail.de" /> + </telecom> + <address> + <type value="both" /> + <line value="Herbert-Lewin-Platz 2"> + <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber"> + <valueString value="2" /> + </extension> + <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName"> + <valueString value="Herbert-Lewin-Platz" /> + </extension> + </line> + <city value="Berlin" /> + <postalCode value="10623" /> + <country value="D" /> + </address> + </Organization> + </resource> + </entry> + <entry> + <fullUrl value="http://pvs.praxis.local/fhir/Coverage/1b89236c-ab14-4e92-937e-5af0b59d0cd4" /> + <resource> + <Coverage xmlns="http://hl7.org/fhir"> + <id value="1b89236c-ab14-4e92-937e-5af0b59d0cd4" /> + <meta> + <profile value="https://fhir.kbv.de/StructureDefinition/KBV_PR_FOR_Coverage|1.1.0" /> + </meta> + <extension url="http://fhir.de/StructureDefinition/gkv/besondere-personengruppe"> + <valueCoding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_PERSONENGRUPPE" /> + <code value="00" /> + </valueCoding> + </extension> + <extension url="http://fhir.de/StructureDefinition/gkv/dmp-kennzeichen"> + <valueCoding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_DMP" /> + <code value="05" /> + </valueCoding> + </extension> + <extension url="http://fhir.de/StructureDefinition/gkv/wop"> + <valueCoding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_ITA_WOP" /> + <code value="17" /> + </valueCoding> + </extension> + <extension url="http://fhir.de/StructureDefinition/gkv/versichertenart"> + <valueCoding> + <system value="https://fhir.kbv.de/CodeSystem/KBV_CS_SFHIR_KBV_VERSICHERTENSTATUS" /> + <code value="5" /> + </valueCoding> + </extension> + <status value="active" /> + <type> + <coding> + <system value="http://fhir.de/CodeSystem/versicherungsart-de-basis" /> + <code value="GKV" /> + </coding> + </type> + <beneficiary> + <reference value="Patient/93866fdc-3e50-4902-a7e9-891b54737b5e" /> + </beneficiary> + <payor> + <identifier> + <system value="http://fhir.de/sid/arge-ik/iknr" /> + <value value="109719018" /> + </identifier> + <display value="AOK Nordost" /> + </payor> + </Coverage> + </resource> + </entry> +</Bundle> From d39a9a3ce1d0ee5a0c0dc7366f1f21fab99aec6c Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 10:45:35 +0100 Subject: [PATCH 20/24] test log --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e010da2..a5b0fcb6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,6 +80,9 @@ jobs: run: | for p in $PATH_TO_EXAMPLES; + echo "here is p" + echo "$p" + do # Ensure directory ends with "/" @@ -87,7 +90,7 @@ jobs: p="$p/" fi - java -jar referencevalidator-cli-$REFERENZVALIDATOR_VERSION.jar erp $GITHUB_WORKSPACE/$p*.xml $GITHUB_WORKSPACE/$p*.json --accepted-encodings xml --accepted-encodings json --no-profile-validity-period-check + # java -jar referencevalidator-cli-$REFERENZVALIDATOR_VERSION.jar erp $GITHUB_WORKSPACE/$p*.xml $GITHUB_WORKSPACE/$p*.json --accepted-encodings xml --accepted-encodings json --no-profile-validity-period-check done From 7598297638a541c60ae5bab7008e1eb767023ee6 Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 10:46:54 +0100 Subject: [PATCH 21/24] syntax fix --- .github/workflows/main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a5b0fcb6..46a0fb4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,11 +79,10 @@ jobs: - name: Validate all example resources in scope of the repository run: | for p in $PATH_TO_EXAMPLES; - + do + echo "here is p" echo "$p" - - do # Ensure directory ends with "/" if [[ ! "$p" =~ .*/$ ]]; then From c8bb7c0547a53263c90af16b8a5eb368a32b550e Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 10:48:27 +0100 Subject: [PATCH 22/24] more logs --- .github/workflows/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 46a0fb4c..1930e1b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,9 +80,14 @@ jobs: run: | for p in $PATH_TO_EXAMPLES; do - echo "here is p" echo "$p" + for f in $p; + do + echo "here is f" + echo "$f" + done + # Ensure directory ends with "/" if [[ ! "$p" =~ .*/$ ]]; then From 77f75e27eeaa329ca05c34427fefdfc03e680ce1 Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 10:54:40 +0100 Subject: [PATCH 23/24] fix bash script to check each file --- .github/workflows/main.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1930e1b2..31e0b9f5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,23 +79,17 @@ jobs: - name: Validate all example resources in scope of the repository run: | for p in $PATH_TO_EXAMPLES; - do - echo "here is p" - echo "$p" - for f in $p; - do - echo "here is f" - echo "$f" - done - + do # Ensure directory ends with "/" if [[ ! "$p" =~ .*/$ ]]; then p="$p/" fi - # java -jar referencevalidator-cli-$REFERENZVALIDATOR_VERSION.jar erp $GITHUB_WORKSPACE/$p*.xml $GITHUB_WORKSPACE/$p*.json --accepted-encodings xml --accepted-encodings json --no-profile-validity-period-check - + for f in $p*; + do + java -jar referencevalidator-cli-$REFERENZVALIDATOR_VERSION.jar erp $f --accepted-encodings xml --accepted-encodings json --no-profile-validity-period-check + done done - name: Cleanup From a3a0bba8b8f604c86926ac5b18ef6889d1d67acf Mon Sep 17 00:00:00 2001 From: florianschoffke <florian.schoffke@gematik.de> Date: Mon, 19 Feb 2024 10:56:23 +0100 Subject: [PATCH 24/24] test fail file --- Beispiel_1_test.xml => Beispiel_1_test_FAIL.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename Beispiel_1_test.xml => Beispiel_1_test_FAIL.xml (95%) diff --git a/Beispiel_1_test.xml b/Beispiel_1_test_FAIL.xml similarity index 95% rename from Beispiel_1_test.xml rename to Beispiel_1_test_FAIL.xml index 8482db0e..9d150ba8 100644 --- a/Beispiel_1_test.xml +++ b/Beispiel_1_test_FAIL.xml @@ -171,7 +171,7 @@ <system value="http://fhir.de/CodeSystem/ifa/pzn"/> <code value="00814665"/> </coding> - <text value="Januvia® 50 mg 28 Filmtabletten N1"/> + <text value="Januvia® 50 mg 28 Filmtabletten N1Januvia® 50 mg 28 Filmtabletten N1Januvia® 50 mg 28 Filmtabletten N1Januvia® 50 mg 28 Filmtabletten N1Januvia® 50 mg 28 Filmtabletten N1"/> </code> <form> <coding>