Skip to content

Commit

Permalink
Update export.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Damion Dooley committed Oct 20, 2021
1 parent 6936d55 commit 2d5f1b7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions template/canada_covid19/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -628,14 +628,16 @@ var exportNML_LIMS = (baseName, hot, data, xlsx, fileType) => {
const outputMatrix = [[...ExportHeaders.keys()]];

// Conversion of all cancogen metadata keywords to NML LIMS version
/*
nullOptionsMap = new Map([
['Not Applicable', 'NA'],
['Missing', 'MISSING'],
['Not Collected', 'NOT_COLLECTED'],
['Not Provided', 'NOT_PROVIDED'],
['Restricted Access', 'RESTRICTED_ACCESS']
]);

*/

for (const inputRow of getTrimmedData(hot)) {
const outputRow = [];
for (const [headerName, sources] of ExportHeaders) {
Expand Down Expand Up @@ -698,7 +700,7 @@ var exportNML_LIMS = (baseName, hot, data, xlsx, fileType) => {
}

// Otherwise apply source (many to one) to target field transform:
const value = getMappedField(headerName, inputRow, sources, sourceFields, sourceFieldNameMap, ';', 'NML_LIMS', nullOptionsMap);
const value = getMappedField(headerName, inputRow, sources, sourceFields, sourceFieldNameMap, ';', 'NML_LIMS');

outputRow.push(value);
}
Expand Down

0 comments on commit 2d5f1b7

Please sign in to comment.