Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into static_lookup_met…
Browse files Browse the repository at this point in the history
…hods
  • Loading branch information
pcvolkmer committed Aug 17, 2024
2 parents 824dddd + 22165f3 commit 66d4eed
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 22 deletions.
1 change: 0 additions & 1 deletion .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ DISABLE_LINTERS:
- REPOSITORY_DUSTILOCK
- SQL_TSQLLINT
- MARKDOWN_MARKDOWN_TABLE_FORMATTER
- SQL_SQL_LINT # Oracle Syntax is not supported

GROOVY_NPM_GROOVY_LINT_ARGUMENTS:
- "--failon=warning"
Expand Down
9 changes: 1 addition & 8 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@
"releaseRules": [
{
"type": "chore",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "style",
"scope": "deps",
"release": "patch"
},
{
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# obds-to-fhir

[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/bzkf/obds-to-fhir/badge)](https://scorecard.dev/viewer/?uri=github.com/bzkf/obds-to-fhir)
[![SLSA 3](https://slsa.dev/images/gh-badge-level3.svg)](https://slsa.dev)

This project contains a Kafka Stream processor that creates FHIR resources from Onkostar oBDS-XML data and writes them to a FHIR Topic.

## Used FHIR profiles
Expand Down
10 changes: 10 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Security Policy

## Supported Versions

Only the most recent major version is regularly updated and receives security fixes.

## Reporting a Vulnerability

Please use the project's [private vulnerability reporting feature](https://github.com/bzkf/obds-to-fhir/security/advisories)
to report any vulnerabilities. For more information, see <https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = 'org.miracum.streams.ume'
version = '2.1.2'
version = '2.1.3'
sourceCompatibility = '21'
targetCompatibility = '21'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public Bundle mapOnkoResourcesToCondition(
}

// get first element of meldungExportList
var meldungExport = meldungExportList.get(0);
var meldungExport = meldungExportList.getFirst();

LOG.debug(
"Mapping Meldung {} to {}", getReportingIdFromAdt(meldungExport), ResourceType.Condition);
Expand Down Expand Up @@ -167,10 +167,9 @@ public Bundle mapOnkoResourcesToCondition(
fhirProperties.getSystems().getIdentifierType(), "MR", null)))
.setValue(pid)));

var conditionDateString = primDia.getDiagnosedatum();
if (conditionDateString.isPresent()) {
onkoCondition.setOnset(convertObdsDateToDateTimeType(conditionDateString.get()));
}
primDia
.getDiagnosedatum()
.ifPresent(value -> onkoCondition.setOnset(convertObdsDateToDateTimeType(value)));

var stageBackBoneComponentList = new ArrayList<Condition.ConditionStageComponent>();
var evidenceBackBoneComponentList = new ArrayList<Condition.ConditionEvidenceComponent>();
Expand All @@ -193,7 +192,7 @@ public Bundle mapOnkoResourcesToCondition(
stageBackBoneComponentList.add(conditionStageComponent);
}
} else {
var profile = obsEntry.getResource().getMeta().getProfile().get(0).getValue();
var profile = obsEntry.getResource().getMeta().getProfile().getFirst().getValue();
if (profile.equals(fhirProperties.getProfiles().getHistologie())) {
// || profile.equals(fhirProperties.getProfiles().getGenVariante())) { Genetische
// Variante
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public Bundle mapOnkoResourcesToMedicationStatement(List<MeldungExport> meldungE
var bundle = new Bundle();

// get first element of meldungExportList
var meldungExport = meldungExportList.get(0);
var meldungExport = meldungExportList.getFirst();

LOG.debug(
"Mapping Meldung {} to {}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public Bundle mapOnkoResourcesToPatient(List<MeldungExport> meldungExportList) {
}

// address
var patAddess = patData.getMenge_Adresse().getAdresse().get(0);
var patAddess = patData.getMenge_Adresse().getAdresse().getFirst();
if (StringUtils.hasLength(patAddess.getPatienten_PLZ())) {
var address = new Address();
address.setPostalCode(patAddess.getPatienten_PLZ()).setType(Address.AddressType.BOTH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public Procedure createOpProcedure(
// Complication
if (op.getMenge_Komplikation() != null
&& op.getMenge_Komplikation().getOP_Komplikation() != null
&& op.getMenge_Komplikation().getOP_Komplikation().size() > 0) {
&& !op.getMenge_Komplikation().getOP_Komplikation().isEmpty()) {
var complicationConcept = new CodeableConcept();
for (var complication : op.getMenge_Komplikation().getOP_Komplikation()) {
complicationConcept.addCoding(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ public ValueMapper<Pair<MeldungExportList, Bundle>, Bundle> getOnkoToConditionBu
private static String patientBundleKeySelector(Bundle bundle) {
var patients = BundleUtil.toListOfResourcesOfType(ctx, bundle, Patient.class);

if (patients.isEmpty() || patients.size() > 1) {
if (patients.size() != 1) {
throw new RuntimeException(
String.format("A patient bundle contains %d resources instead of 1", patients.size()));
}
var patient = patients.get(0);
var patient = patients.getFirst();
return String.format("%s/%s", patient.getResourceType(), patient.getId());
}
}
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
app:
version: 2.1.2
version: 2.1.3
enableCheckDigitConv: ${CHECK_DIGIT_CONVERSION:false}

fhir:
Expand Down

0 comments on commit 66d4eed

Please sign in to comment.