Skip to content

Commit 44af405

Browse files
committed
Hyphen removed from not evaluated
1 parent d92f99e commit 44af405

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/extractors/CSVCancerDiseaseStatusExtractor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ class CSVCancerDiseaseStatusExtractor {
1616
logger.debug('Reformatting disease status data from CSV into template format');
1717
// Check the shape of the data
1818
arrOfDiseaseStatusData.forEach((record) => {
19-
if (!record.mrn || !record.conditionId || (!record.diseaseStatusCode && record.observationStatus !== 'not-evaluated') || !record.dateOfObservation) {
19+
if (!record.mrn || !record.conditionId || (!record.diseaseStatusCode && record.observationStatus !== 'not evaluated') || !record.dateOfObservation) {
2020
throw new Error('DiseaseStatusData missing an expected property: mrn, conditionId, diseaseStatusCode, and dateOfObservation are required.');
2121
}
2222
});
2323
const evidenceDelimiter = '|';
2424
return arrOfDiseaseStatusData.map((record) => ({
2525
status: record.observationStatus || 'final',
2626
// If the Disease Status was not evaluated, there will be no value to make a record of and this property will be null
27-
value: record.observationStatus === 'not-evaluated' ? null : {
27+
value: record.observationStatus === 'not evaluated' ? null : {
2828
code: record.diseaseStatusCode,
2929
system: 'http://snomed.info/sct',
3030
display: record.diseaseStatusText ? record.diseaseStatusText : getDiseaseStatusDisplay(record.diseaseStatusCode, this.implementation),

src/templates/CancerDiseaseStatusTemplate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function cancerDiseaseStatusTemplate({
4343
value,
4444
evidence,
4545
}) {
46-
if (!id || !status || !effectiveDateTime || !condition || !subject || (!value && status !== 'not-evaluated')) {
46+
if (!id || !status || !effectiveDateTime || !condition || !subject || (!value && status !== 'not evaluated')) {
4747
throw Error('Trying to render a CancerDiseaseStatusTemplate, but a required argument is missing; ensure that id, status, effectiveDateTime, condition, subject, and value are all present');
4848
}
4949

@@ -56,7 +56,7 @@ function cancerDiseaseStatusTemplate({
5656
],
5757
},
5858
...extensionArr(...evidenceTemplate({ evidence })),
59-
status: status === 'not-evaluated' ? 'final' : status,
59+
status: status === 'not evaluated' ? 'final' : status,
6060
category: [
6161
{
6262
coding: [

test/extractors/CSVCancerDiseaseStatusExtractor.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ describe('CSVCancerDiseaseStatusExtractor', () => {
3636
// Only including required properties is valid
3737
expect(csvCancerDiseaseStatusExtractor.joinAndReformatData(localData)).toEqual(expect.anything());
3838

39-
// Excluding diseaseStatusCode with an obseervationStatus of 'not-evaluated' should be valid
40-
localData[0].observationStatus = 'not-evaluated';
39+
// Excluding diseaseStatusCode with an obseervationStatus of 'not evaluated' should be valid
40+
localData[0].observationStatus = 'not evaluated';
4141
localData[0].diseaseStatusCode = '';
4242
expect(csvCancerDiseaseStatusExtractor.joinAndReformatData(localData)).toEqual(expect.anything());
4343

test/templates/cancerDiseaseStatus.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('test CancerDiseaseStatus template', () => {
4444
const MINIMAL_DATA = {
4545
// Minimal amount of data to be accepted, evidence is excluded
4646
id: 'CancerDiseaseStatus-fixture',
47-
status: 'not-evaluated',
47+
status: 'not evaluated',
4848
value: null,
4949
subject: {
5050
id: '123-example-patient',

0 commit comments

Comments
 (0)