diff --git a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java index ed3be0be..c2b01a3c 100644 --- a/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java +++ b/src/main/java/org/miracum/streams/ume/obdstofhir/mapper/ObdsConditionMapper.java @@ -73,7 +73,8 @@ public Bundle mapOnkoResourcesToCondition( // 'Tumorzuordung' // It's possible that 'Meldung.Diagnose' is set but 'Meldung.Diagnose.Primaertumor_*' is not, // in that case also use the TumorZuordnung to construct the Condition. - if (primDia == null || primDia.getPrimaertumor_ICD_Code() == null) { + var useTumorZuordnung = primDia == null || primDia.getPrimaertumor_ICD_Code() == null; + if (useTumorZuordnung) { primDia = meldung.getTumorzuordnung(); if (primDia == null) { @@ -88,6 +89,9 @@ public Bundle mapOnkoResourcesToCondition( } var conIdentifier = pid + "condition" + primDia.getTumor_ID(); + if (useTumorZuordnung) { + conIdentifier += "-from-tumorzuordnung"; + } onkoCondition.setId(this.getHash(ResourceType.Condition, conIdentifier));