From a595e15a42ac0f3e4359edd0c8721313e765ea04 Mon Sep 17 00:00:00 2001 From: Leong Hui Wong Date: Wed, 27 Feb 2019 09:23:53 +0800 Subject: [PATCH] Add SCDC/SBDC as parent concepts --- src/main/groovy/RxTermsToFHIR.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/groovy/RxTermsToFHIR.groovy b/src/main/groovy/RxTermsToFHIR.groovy index cfb01b3..5bdee23 100644 --- a/src/main/groovy/RxTermsToFHIR.groovy +++ b/src/main/groovy/RxTermsToFHIR.groovy @@ -497,10 +497,12 @@ Closure writeMedicationResources = { medications.put(medId, med) - // store associated parent concepts (SCDF/SBDF) in MedicationKnowledge + // store associated parent concepts (SCDF/SBDF/SCDC/SBDC) in MedicationKnowledge // only if the parent concepts are extracted Set parentIds = isa.get(rxCui).findAll { rxNormConcepts.containsKey(it) } + parentIds.addAll(consistsOf.get(rxCui).findAll { rxNormConcepts.containsKey(it) }) + if (parentIds) { medKnowledge.setAssociatedMedication( parentIds.collect { new Reference("Medication/rxNorm-$it") }