Skip to content

Commit 2051694

Browse files
committed
updated logger message in CancerStaging snippet methods
1 parent 2b01fa0 commit 2051694

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/templates/snippets/cancerStaging.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const _ = require('lodash');
12
const logger = require('../../helpers/logger');
23
const { ifSomeArgsObj } = require('../../helpers/templateUtils');
34
const { isCancerStagingSystem } = require('../../helpers/cancerStagingUtils');
@@ -27,7 +28,9 @@ function stagingMethodTemplate({ code }) {
2728
// System based on http://hl7.org/fhir/us/mcode/Observation-mCODETNMClinicalPrimaryTumorCategoryExample01.json.html
2829
return methodTemplate({ code, system: 'http://ncimeta.nci.nih.gov' });
2930
}
30-
logger.debug(`stagingMethodTemplate received a code ${code} that is not recognized; code will not be added to the resulting FHIR resource`);
31+
if (!_.isNull(code)) {
32+
logger.debug(`stagingMethodTemplate received a code ${code} that is not recognized; code will be added without a codeSystem if possible`);
33+
}
3134
return methodTemplate({ code });
3235
}
3336

0 commit comments

Comments
 (0)