Skip to content

Commit 612278a

Browse files
authored
Merge pull request #150 from mcode/remove-rxnorm-from-prescription
remove rxnorm from prescription
2 parents 03daa98 + 9b5c32e commit 612278a

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

src/util/buildScript.2017071.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,9 @@ function buildNewRxMedication(doc, medicationRequestResource) {
231231
const coding = medicationCodingList[i];
232232
const system = coding.system.toLowerCase();
233233

234-
if (system.endsWith('rxnorm')) {
235-
// Medication Drug Description
236-
xmlAddTextNode(doc, medicationPrescribed, 'DrugDescription', coding.display);
237-
// Medication Drug Code
238-
var drugDbCode = doc.createElement('DrugDBCode');
239-
xmlAddTextNode(doc, drugDbCode, 'Code', coding.code);
240-
xmlAddTextNode(doc, drugDbCode, 'Qualifier', 'BPK'); // Branded Package BPCK (BPK)
241-
drugCoded.appendChild(drugDbCode);
242-
} else if (system.endsWith('ndc')) {
234+
if (system.endsWith('ndc')) {
243235
// Medication Drug Code
236+
xmlAddTextNode(doc, medicationPrescribed, 'DrugDescription', coding.display);
244237
var productCode = doc.createElement('ProductCode');
245238
xmlAddTextNode(doc, productCode, 'Code', coding.code);
246239
xmlAddTextNode(doc, productCode, 'Qualifier', 'ND'); // National Drug Code (NDC)

src/util/buildScript.2022071.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -223,17 +223,9 @@ function buildNewRxMedication(doc, medicationRequestResource) {
223223
const coding = medicationCodingList[i];
224224
const system = coding.system.toLowerCase();
225225

226-
if (system.endsWith('rxnorm')) {
227-
// Medication Drug Description
228-
xmlAddTextNode(doc, medicationPrescribed, 'DrugDescription', coding.display);
229-
230-
// Medication Drug Code
231-
var productCode = doc.createElement('ProductCode');
232-
xmlAddTextNode(doc, productCode, 'Code', coding.code);
233-
xmlAddTextNode(doc, productCode, 'Qualifier', 'SBD'); // RxNorm Semantic Branded Drug
234-
drugCoded.appendChild(productCode);
235-
} else if (system.endsWith('ndc')) {
226+
if (system.endsWith('ndc')) {
236227
// Medication NDC
228+
xmlAddTextNode(doc, medicationPrescribed, 'DrugDescription', coding.display);
237229
xmlAddTextNode(doc, drugCoded, 'NDC', coding.code); // 10-digit number
238230
}
239231
}

0 commit comments

Comments
 (0)