Skip to content

Commit

Permalink
fix: use distinct ID when condition is generated from a tumorzuordnung
Browse files Browse the repository at this point in the history
avoids overriding existing resources but may cause duplicate diagnosis being present
  • Loading branch information
chgl committed Apr 25, 2024
1 parent 81ac1cd commit b2f4b8e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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));

Expand Down

0 comments on commit b2f4b8e

Please sign in to comment.