Skip to content

Commit 4075b87

Browse files
Merge pull request #156 from mcode/stu2/utils
Stu2/utils updates
2 parents af5f373 + 27adec5 commit 4075b87

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/helpers/lookups/diseaseStatusLookup.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const { createInvertedLookup, createLowercaseLookup } = require('../lookupUtils');
22

3-
// Code mapping is based on current values at http://standardhealthrecord.org/guides/icare/mapping_guidance.html
3+
// Code mapping is based on current values at https://www.hl7.org/fhir/us/mcode/2021May/ValueSet-mcode-condition-status-trend-vs.html
44
const mcodeDiseaseStatusTextToCodeLookup = {
5-
'Not detected (qualifier)': '260415000',
5+
'No abnormality detected (finding)': '281900007',
66
'Patient condition improved (finding)': '268910001',
77
'Patient\'s condition stable (finding)': '359746009',
88
'Patient\'s condition worsened (finding)': '271299001',
@@ -12,6 +12,7 @@ const mcodeDiseaseStatusCodeToTextLookup = createInvertedLookup(mcodeDiseaseStat
1212

1313
// Code mapping is based on initial values still in use by icare implementors
1414
// specifically using lowercase versions of the text specified by ICARE for status
15+
// based on current values at http://standardhealthrecord.org/guides/icare/mapping_guidance.html
1516
const icareDiseaseStatusTextToCodeLookup = {
1617
'no evidence of disease': '260415000',
1718
responding: '268910001',

test/helpers/diseaseStatusUtils.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const {
77
} = require('../../src/helpers/diseaseStatusUtils.js');
88

99
// Code mapping is based on current values at http://standardhealthrecord.org/guides/icare/mapping_guidance.html
10-
const currentDiseaseStatusTextToCodeLookup = {
11-
'Not detected (qualifier)': '260415000',
10+
const mcodeDiseaseStatusTextToCodeLookup = {
11+
'No abnormality detected (finding)': '281900007',
1212
'Patient condition improved (finding)': '268910001',
1313
'Patient\'s condition stable (finding)': '359746009',
1414
'Patient\'s condition worsened (finding)': '271299001',
@@ -38,8 +38,8 @@ const evidenceTextToCodeLookup = {
3838

3939
describe('diseaseStatusUtils', () => {
4040
test('getMcodeDiseaseStatusCode,', () => {
41-
Object.keys(currentDiseaseStatusTextToCodeLookup).forEach((dsText) => {
42-
const dsCode = currentDiseaseStatusTextToCodeLookup[dsText];
41+
Object.keys(mcodeDiseaseStatusTextToCodeLookup).forEach((dsText) => {
42+
const dsCode = mcodeDiseaseStatusTextToCodeLookup[dsText];
4343
expect(getDiseaseStatusCode(dsText, 'mcode')).toEqual(dsCode);
4444
expect(getDiseaseStatusCode(dsText)).toEqual(dsCode);
4545
});
@@ -51,8 +51,8 @@ describe('diseaseStatusUtils', () => {
5151
});
5252
});
5353
test('getMcodeDiseaseStatusDisplay,', () => {
54-
Object.keys(currentDiseaseStatusTextToCodeLookup).forEach((dsText) => {
55-
const dsCode = currentDiseaseStatusTextToCodeLookup[dsText];
54+
Object.keys(mcodeDiseaseStatusTextToCodeLookup).forEach((dsText) => {
55+
const dsCode = mcodeDiseaseStatusTextToCodeLookup[dsText];
5656
expect(getDiseaseStatusDisplay(dsCode, 'mcode')).toEqual(dsText);
5757
expect(getDiseaseStatusDisplay(dsCode)).toEqual(dsText);
5858
});

0 commit comments

Comments
 (0)