Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: beta -> master #139

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
- master
- beta
release:
types: [created]
types:
- created
pull_request:
branches:
- master
- beta
workflow_dispatch: {}

permissions: read-all

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ package-lock.json
tests/k8s/**/charts

node_modules/

# generated code
src/generated/
37 changes: 36 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ plugins {
}

group = 'org.miracum.streams.ume'
version = '2.2.1'
version = '2.3.0-beta.1'
sourceCompatibility = '21'
targetCompatibility = '21'

configurations {
compileOnly {
extendsFrom annotationProcessor
}
xsd2java
}

repositories {
Expand All @@ -25,6 +26,15 @@ repositories {
ext {
set('springCloudVersion', "2023.0.3")
set('hapiVersion', "7.4.0")
jaxbTargetDir = file("src/generated/java")
}

sourceSets {
main {
java {
srcDirs jaxbTargetDir
}
}
}

dependencies {
Expand All @@ -44,7 +54,11 @@ dependencies {
// Jackson v3 supports Optional out-of-the-box but isn't yet provided by Spring Boot by default
// <https://github.com/FasterXML/jackson-modules-java8>
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8'
implementation 'com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations'

// JAXB code generation
xsd2java "com.sun.xml.bind:jaxb-xjc:4.0.5"
xsd2java "com.sun.xml.bind:jaxb-impl:4.0.5"

annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"

Expand All @@ -71,6 +85,8 @@ jacoco {

spotless {
java {
target("**/*.java")
targetExclude("src/generated/java/**/*.*")
importOrder()
removeUnusedImports()
googleJavaFormat()
Expand All @@ -88,3 +104,22 @@ jacocoTestReport {
jar {
enabled = false
}

tasks.register('xsd2java') {

doLast {
jaxbTargetDir.mkdirs()

ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJCTask', classpath: configurations.xsd2java.asPath)
ant.jaxbTargetDir = jaxbTargetDir


ant.xjc(
destdir: "${jaxbTargetDir}",
package: 'de.basisdatensatz.obds.v3',
schema: 'src/main/resources/schema/oBDS_v3.0.3.xsd'
)

}
}
compileJava.dependsOn xsd2java
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.gradle.jvmargs=-Dfile.enconding=UTF-8
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"dependencies": {
"hl7.fhir.r4.core": "4.0.1",
"de.dktk.oncology": "1.6.0",
"de.medizininformatikinitiative.kerndatensatz.person": "2024.0.0"
"de.medizininformatikinitiative.kerndatensatz.person": "2024.0.0",
"de.medizininformatikinitiative.kerndatensatz.onkologie": "2024.0.0-beta-2"
},
"fhirVersions": [
"4.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public static class FhirProfiles {
private String systMedStatement;
private String miiPatientPseudonymisiert;
private String deathObservation;
private String miiPrOnkoDiagnosePrimaertumor;
}

@Data
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package org.miracum.streams.ume.obdstofhir.mapper.mii;

import de.basisdatensatz.obds.v3.OBDS;
import org.hl7.fhir.r4.model.*;
import org.miracum.streams.ume.obdstofhir.FhirProperties;
import org.miracum.streams.ume.obdstofhir.mapper.ObdsToFhirMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ConditionMapper extends ObdsToFhirMapper {

private static final Logger LOG = LoggerFactory.getLogger(ConditionMapper.class);

@Autowired
public ConditionMapper(FhirProperties fhirProperties) {
super(fhirProperties);
}

public Condition map(OBDS.MengePatient.Patient.MengeMeldung.Meldung meldung, Reference patient) {
var condition = new Condition();
condition.setSubject(patient);
condition.getMeta().addProfile(fhirProperties.getProfiles().getMiiPrOnkoDiagnosePrimaertumor());
var tumorzuordnung = meldung.getTumorzuordnung();
if (tumorzuordnung == null) {
throw new RuntimeException("tumorzuordnung ist null");
}
condition.setRecordedDate(
tumorzuordnung.getDiagnosedatum().getValue().toGregorianCalendar().getTime());

condition.setCode(
new CodeableConcept(
new Coding(
fhirProperties.getSystems().getIcd10gm(),
tumorzuordnung.getPrimaertumorICD().getCode(),
"")));
return condition;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package org.miracum.streams.ume.obdstofhir.mapper.mii;

import de.basisdatensatz.obds.v3.OBDS;
import de.basisdatensatz.obds.v3.PatientenStammdatenMelderTyp;
import java.util.List;
import org.hl7.fhir.r4.model.*;
import org.miracum.streams.ume.obdstofhir.FhirProperties;
import org.miracum.streams.ume.obdstofhir.mapper.ObdsToFhirMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PatientMapper extends ObdsToFhirMapper {

private static final Logger LOG = LoggerFactory.getLogger(PatientMapper.class);

@Autowired
public PatientMapper(FhirProperties fhirProperties) {
super(fhirProperties);
}

public Patient map(
PatientenStammdatenMelderTyp stammdaten,

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'stammdaten' is never used.
List<OBDS.MengePatient.Patient.MengeMeldung.Meldung> meldungen) {

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'meldungen' is never used.
var patient = new Patient();
patient.getMeta().addProfile(fhirProperties.getProfiles().getMiiPatientPseudonymisiert());
return patient;
}
}
6 changes: 4 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app:
version: 2.2.1
version: 2.3.0-beta.1
enableCheckDigitConv: ${CHECK_DIGIT_CONVERSION:false}
patient-id-pattern: "[^0]\\d{8}"

Expand Down Expand Up @@ -62,8 +62,10 @@ fhir:
opProcedure: "http://dktk.dkfz.de/fhir/StructureDefinition/onco-core-Procedure-Operation"
stProcedure: "http://dktk.dkfz.de/fhir/StructureDefinition/onco-core-Procedure-Strahlentherapie"
systMedStatement: "http://dktk.dkfz.de/fhir/StructureDefinition/onco-core-MedicationStatement-Systemtherapie"
miiPatientPseudonymisiert: "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/PatientPseudonymisiert"
deathObservation: "http://dktk.dkfz.de/fhir/StructureDefinition/onco-core-Observation-TodUrsache"
# MII
miiPatientPseudonymisiert: "https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/PatientPseudonymisiert"
mii-pr-onko-diagnose-primaertumor: https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/StructureDefinition/mii-pr-onko-diagnose-primaertumor
display:
histologyLoinc: "Histology and Behavior ICD-O-3 Cancer"
gradingLoinc: "Grade pathology value Cancer"
Expand Down
Loading
Loading