Skip to content

Commit

Permalink
Merge pull request #347 from cidgoh/monkeypox-3.3.1
Browse files Browse the repository at this point in the history
Monkeypox 3.3.1
  • Loading branch information
ddooley authored Aug 4, 2022
2 parents 1abf545 + 4404909 commit 85f2293
Show file tree
Hide file tree
Showing 8 changed files with 586 additions and 412 deletions.
6 changes: 4 additions & 2 deletions lib/DataHarmonizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1528,12 +1528,14 @@ class DataHarmonizer {
* @param {String} prefix of export format to access in .exportField dictionary.
*/
getTransformedField(headerName, value, field, prefix) {
const self = this;
if (field.sources) {
// iterate thru and will return the first match found in field.sources
for (const source_index in field.sources) {
const term =
DataHarmonizer.schema.enums[field.sources[source_index]]
.permissible_values[value];
self.schema.enums[field.sources[source_index]].permissible_values[
value
];
// Looking for term.exportField['GRDI'] for example:
if (term && term.exportField && prefix in term.exportField) {
// Here mapping involves a value substitution
Expand Down
2 changes: 1 addition & 1 deletion web/templates/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@
"display": true
}
}
}
}
2 changes: 1 addition & 1 deletion web/templates/monkeypox/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export default {

['PH_SEQUENCING_CENTRE', []],

['PH_SEQUENCING_SUBMITTER', []],
['PH_SEQUENCE_SUBMITTER', []],

['HC_COLLECT_DATE', []],
['HC_TEXT2', []],
Expand Down
Loading

0 comments on commit 85f2293

Please sign in to comment.