Skip to content

Commit

Permalink
Merge pull request #67 from patrickskowronekdkfz/fix/dktk_d_diagnosis
Browse files Browse the repository at this point in the history
DKTK reduce D Diagnosis to only oncology ones
  • Loading branch information
kairosmike authored Jul 2, 2024
2 parents c480ced + 0fd5feb commit 85b6e13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/groovy/projects/dktk/v2/condition.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import static de.kairos.fhir.centraxx.metamodel.RootEntities.diagnosis
condition {

final String icdCode = context.source[diagnosis().icdEntry().code()]
if (!hasRelevantCode(icdCode)) { // diagnosis without C or D code are filtered
if (!hasRelevantCode(icdCode)) { // diagnosis without C or D(0-49) code are filtered
return
}

Expand Down Expand Up @@ -143,5 +143,5 @@ static String normalizeDate(final String dateTimeString) {
}

static boolean hasRelevantCode(final String icdCode) {
return icdCode != null && (icdCode.toUpperCase().startsWith('C') || icdCode.toUpperCase().startsWith('D'))
return icdCode != null && (icdCode.toUpperCase().startsWith('C') || icdCode.toUpperCase() ==~ "D[0-4][0-9].{0,4}" )
}

0 comments on commit 85b6e13

Please sign in to comment.