Skip to content

Commit

Permalink
fixed the issue that give the error relative informativeness
Browse files Browse the repository at this point in the history
  • Loading branch information
nanli-emory committed Oct 5, 2023
1 parent dfe2139 commit df8f82d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions handlers/dataHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -784,16 +784,19 @@ SeerService.collectionDataExports = async function(req, res, next) {
],
});
const csvData = [];

// first?, second?, third?
const {first, second, third} = data.relativeInformative;

data.slides.forEach((sid)=>{
const slideData = slideMap.get(sid);
// Relative Informativeness need to add
if (sid == first) {
const tumorPresent = slideData.csvData.tumorPresent;
if (tumorPresent == 1 && sid == first) {
slideData.csvData.relativeInformativeness = '1';
} else if (sid == second) {
} else if (tumorPresent == 1 && sid == second) {
slideData.csvData.relativeInformativeness = '2';
} else if (sid == third) {
} else if (tumorPresent == 1 && sid == third) {
slideData.csvData.relativeInformativeness = '3';
} else {
slideData.csvData.relativeInformativeness = '';
Expand Down

0 comments on commit df8f82d

Please sign in to comment.