proxima_datareader
Advanced tools
Comparing version 1.3.9 to 1.3.10
@@ -66,2 +66,6 @@ "use strict"; | ||
var getKeysData = function getKeysData(searchType, keysType, defaults) { | ||
if (searchType === 'none') { | ||
return [[], _defaults.defaultValues.getDefaultDir()]; | ||
} | ||
var _getOrWriteDefaults = (0, _defaults.getOrWriteDefaults)(defaults), | ||
@@ -231,2 +235,2 @@ defaultKeysSource = _getOrWriteDefaults.defaultKeysSource; | ||
exports.writeDownPaths = writeDownPaths; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9hc2tVc2VyLmpzIl0sIm5hbWVzIjpbImdldFNlYXJjaFBhcmFtcyIsInNlYXJjaFR5cGVzIiwic2VhcmNoVHlwZU5hbWVzIiwiXyIsImtleXMiLCJzZWFyY2hUeXBlTmFtZVBvcyIsInJlYWRsaW5lU3luYyIsImtleUluU2VsZWN0IiwiY29uc29sZSIsImxvZyIsInNlYXJjaFR5cGVOYW1lIiwia2V5c0RhdGFUeXBlIiwiZ2V0S2V5c0RhdGEiLCJzZWFyY2hUeXBlIiwia2V5c1R5cGUiLCJkZWZhdWx0cyIsImRlZmF1bHRLZXlzU291cmNlIiwia2V5c0ZvbGRlciIsInF1ZXN0aW9uUGF0aCIsImV4aXN0cyIsImlzRGlyZWN0b3J5IiwiZGVmYXVsdElucHV0IiwiZmlsZXNMaXN0IiwiZnMiLCJyZWFkZGlyU3luYyIsImZpbGVzV2l0aENvZGVzTGlzdCIsImZpbHRlciIsImZpbGVOYW1lIiwiaW5jbHVkZXMiLCJsZW5ndGgiLCJmaWxlUG9zIiwiZmlsZVdpdGhDb2RlcyIsImZpbGVQYXRoIiwicGF0aCIsImpvaW4iLCJrZXlzQ29udGVudCIsInJlYWRGaWxlU3luYyIsImVuY29kaW5nIiwiY2hhcmRldCIsImRldGVjdCIsImtleXNDb250ZW50RGVjb2RlZCIsImljb252IiwiZGVjb2RlIiwidHJpbSI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YWRsaW5lU3luYy5xdWVzdGlvbignRW50ZXIgdGhyZXNob2xkIGRhdGU6ICcpO1xuLy8gfTtcbiJdfQ== |
@@ -43,6 +43,11 @@ "use strict"; | ||
var notZero = Number(countIn) !== 0 || Number(countOut) !== 0; | ||
if (searchType === 'none') { | ||
return notZero; | ||
} | ||
var isSameCode = drugCode === strToSearch; | ||
var nameIncludesStr = name.toLowerCase().includes(strToSearch.toLowerCase()); | ||
var isMatched = searchType === 'drugCode' ? isSameCode : nameIncludesStr; | ||
var notZero = Number(countIn) !== 0 || Number(countOut) !== 0; | ||
return isMatched && notZero; | ||
@@ -133,2 +138,2 @@ }).filter(function (_ref) { | ||
exports.makeJsonChunk = makeJsonChunk; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb3JlLmpzIl0sIm5hbWVzIjpbImdldE1hdGNoZWQiLCJzdHJUb1NlYXJjaCIsInNlYXJjaFR5cGUiLCJjb250ZW50Iiwic3BsaXQiLCJmaWx0ZXIiLCJsaW5lIiwiZHJ1Z0NvZGUiLCJuYW1lIiwiY291bnRJbiIsImNvdW50T3V0IiwiaXNTYW1lQ29kZSIsIm5hbWVJbmNsdWRlc1N0ciIsInRvTG93ZXJDYXNlIiwiaW5jbHVkZXMiLCJpc01hdGNoZWQiLCJub3RaZXJvIiwiTnVtYmVyIiwibGluZXMiLCJsZW5ndGgiLCJwcm9jZXNzRGF0YSIsImZpbGVQYXRoIiwidG90YWxJbmZvIiwicmVkdWNlIiwiYWNjIiwiY2hhaW5EcnVnQ29kZSIsInJlbWFpbnMiLCJwcmljZUluIiwicHJpY2VPdXQiLCJkYXRlU3RhcnQiLCJkYXRlRW5kIiwiZXhpc3RlZEl0ZW1JbmZvIiwicmVsYXRlZFBhdGhJbmZvIiwicmVtYWluc051bSIsInBjc0luIiwicGNzT3V0IiwiaXRlbUluZm8iLCJjb3VudEluVG90YWwiLCJtb25leUluVG90Y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F0aEluZm8uY291bnRPdXQgfHwgMCkgKyBwY3NPdXQsXG4gICAgICAgICAgbW9uZXlPdXQ6IChyZWxhdGVkUGF0aEluZm8ubW9uZXlPdXQgfHwgMCkgKyBwcmljZU91dCAqIHBjc091dCxcbiAgICAgICAgICBkYXRlU3RhcnQsXG4gICAgICAgICAgZGF0ZUVuZCxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgfTtcblxuICAgIHJldHVybiB7IC4uLmFjYywgLi4uaXRlbUluZm8gfTtcbiAgfSwgdG90YWxJbmZvKTtcblxuZXhwb3J0IGNvbnN0IG1ha2VKc29uQ2h1bmsgPSAoZGF0YSwgdG90YWxTaXplLCBjb3VudCkgPT4ge1xuICBjb25zdCBuZXdDb3VudCA9IGNvdW50ICsgMTtcbiAgbGV0IGZpbmFsU3RyID0gJyc7XG4gIGNvbnN0IFtrZXldID0gXy5rZXlzKGRhdGEpO1xuICBjb25zdCB2YWx1ZSA9IGRhdGFba2V5XTtcbiAgY29uc3QganNvblN0ciA9IGBcIiR7a2V5fVwiOiR7SlNPTi5zdHJpbmdpZnkodmFsdWUpfWA7XG4gIHN3aXRjaCAobmV3Q291bnQpIHtcbiAgICBjYXNlIDEgJiYgdG90YWxTaXplID09PSBuZXdDb3VudDpcbiAgICAgIGZpbmFsU3RyID0gYHske2pzb25TdHJ9fWA7XG4gICAgICBicmVhaztcbiAgICBjYXNlIDE6XG4gICAgICBmaW5hbFN0ciA9IGB7JHtqc29uU3RyfSxgO1xuICAgICAgYnJlYWs7XG4gICAgY2FzZSB0b3RhbFNpemU6XG4gICAgICBmaW5hbFN0ciA9IGAke2pzb25TdHJ9fWA7XG4gICAgICBicmVhaztcbiAgICBkZWZhdWx0OlxuICAgICAgZmluYWxTdHIgPSBgJHtqc29uU3RyfSxgO1xuICB9XG4gIHJldHVybiBbZmluYWxTdHIsIG5ld0NvdW50XTtcbn07XG4iXX0= |
@@ -23,6 +23,3 @@ "use strict"; | ||
getDefaultDir: function getDefaultDir() { | ||
return _path["default"].join(this.homeDir, '/Documents/Proxima/defaults'); | ||
}, | ||
getDefaultValuesPath: function getDefaultValuesPath() { | ||
var defaultDir = this.getDefaultDir(); | ||
var defaultDir = _path["default"].join(this.homeDir, '/Documents/Proxima/defaults'); | ||
@@ -35,2 +32,7 @@ if (!_fs["default"].existsSync(defaultDir)) { | ||
return defaultDir; | ||
}, | ||
getDefaultValuesPath: function getDefaultValuesPath() { | ||
var defaultDir = this.getDefaultDir(); | ||
var defaultValuesPath = _path["default"].join(defaultDir, 'defaultsForDataSelector.json'); | ||
@@ -47,3 +49,4 @@ | ||
drugCode: 'number', | ||
drugName: 'string' | ||
drugName: 'string', | ||
none: null | ||
}, | ||
@@ -82,2 +85,2 @@ renderTypes: ['total', 'detailed'], | ||
exports.getOrWriteDefaults = getOrWriteDefaults; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9kZWZhdWx0cy5qcyJdLCJuYW1lcyI6WyJkZWZhdWx0VmFsdWVzIiwiaG9tZURpciIsInByb2Nlc3MiLCJlbnYiLCJIT01FIiwiSE9NRVBBVEgiLCJVU0VSUFJPRklMRSIsImdldERlZmF1bHREaXIiLCJwYXRoIiwiam9pbiIsImdldERlZmF1bHRWYWx1ZXNQYXRoIiwiZGVmYXVsdERpciIsImZzIiwiZXhpc3RzU3luYyIsIm1rZGlyU3luYyIsInJlY3Vyc2l2ZSIsImRlZmF1bHRWYWx1ZXNQYXRoIiwiZGVmYXVsdFNvdXJjZVBhdGgiLCJkZWZhdWx0S2V5c1NvdXJjZSIsImVuY29kaW5ncyIsInNlYXJjaFR5cGVzIiwiZHJ1Z0NvZGUiLCJkcnVnTmFtZSIsInJlbmRlclR5cGVzIiwiZmlsZVR5cGVzIiwiZ2V0T3JXcml0ZURlZmF1bHRzIiwiZGVmYXVsdHMiLCJkYXRhIiwiY29udGVudCIsInJlYWRGaWxlU3luYyIsInByZXZEYXRh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RGF0YTtcbiAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICBmcy53cml0ZUZpbGVTeW5jKGRlZmF1bHRWYWx1ZXNQYXRoLCBKU09OLnN0cmluZ2lmeShkZWZhdWx0cyksIHsgZW5jb2Rpbmc6ICd1dGYtOCcgfSk7XG4gICAgcmV0dXJuIGRlZmF1bHRzO1xuICB9XG59O1xuIl19 |
@@ -44,3 +44,3 @@ "use strict"; | ||
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() { | ||
var searchTypes, renderTypes, fileTypes, searchParams, _searchParams, searchTypeName, keysDataType, _getKeysData, _getKeysData2, keys, keysFolder, newPath, resFolder, resFolderFilesList, jsonFilesList, fileToRender, selectedDataPath, filesSource, paths, _$partition, _$partition2, emptySources, notEmptySources, processedDataPath, dataStream, totalInfo; | ||
var searchTypes, renderTypes, fileTypes, searchParams, _searchParams, searchTypeName, keysDataType, _getKeysData, _getKeysData2, keys, keysFolder, resFolder, resFolderFilesList, jsonFilesList, fileToRender, selectedDataPath, filesSource, paths, _$partition, _$partition2, emptySources, notEmptySources, processedDataPath, dataStream, totalInfo; | ||
@@ -74,6 +74,11 @@ return regeneratorRuntime.wrap(function _callee$(_context) { | ||
case 9: | ||
newPath = _path["default"].join(keysFolder, 'processedData'); | ||
resFolder = _fs["default"].existsSync(newPath) ? newPath : _fs["default"].mkdirSync(newPath, { | ||
recursive: true | ||
}); | ||
resFolder = _path["default"].join(keysFolder, 'processedData'); | ||
if (!_fs["default"].existsSync(resFolder)) { | ||
_fs["default"].mkdirSync(resFolder, { | ||
recursive: true | ||
}); | ||
} | ||
console.log(resFolder); | ||
resFolderFilesList = _fs["default"].readdirSync(resFolder); | ||
@@ -85,3 +90,3 @@ jsonFilesList = resFolderFilesList.filter(function (fileName) { | ||
if (!(jsonFilesList.length > 0)) { | ||
_context.next = 19; | ||
_context.next = 20; | ||
break; | ||
@@ -93,3 +98,3 @@ } | ||
if (!fileToRender) { | ||
_context.next = 19; | ||
_context.next = 20; | ||
break; | ||
@@ -102,3 +107,3 @@ } | ||
case 19: | ||
case 20: | ||
filesSource = (0, _askUser.getFilesSource)(_defaults.defaultValues); | ||
@@ -111,10 +116,10 @@ paths = (0, _processors.makePaths)(filesSource, fileTypes); | ||
if (!(emptySources.length > 0)) { | ||
_context.next = 25; | ||
_context.next = 26; | ||
break; | ||
} | ||
_context.next = 25; | ||
_context.next = 26; | ||
return (0, _askUser.writeDownPaths)(emptySources, resFolder, 'empty'); | ||
case 25: | ||
case 26: | ||
// const encodingPos = readlineSync.keyInSelect(encodings, 'Please select files encoding'); | ||
@@ -125,10 +130,10 @@ // const [encoding] = encodings; | ||
dataStream = (0, _processors.makeDataStream)(notEmptySources, searchTypeName, keys); | ||
_context.next = 30; | ||
_context.next = 31; | ||
return (0, _processors.makeStructuredData)(dataStream); | ||
case 30: | ||
case 31: | ||
totalInfo = _context.sent; | ||
if (!(_lodash["default"].size(totalInfo) === 0)) { | ||
_context.next = 34; | ||
_context.next = 35; | ||
break; | ||
@@ -140,10 +145,10 @@ } | ||
case 34: | ||
_context.next = 36; | ||
case 35: | ||
_context.next = 37; | ||
return (0, _processors.writeToJson)(totalInfo, processedDataPath); | ||
case 36: | ||
case 37: | ||
(0, _renderers["default"])(processedDataPath, renderTypes, resFolder); | ||
case 37: | ||
case 38: | ||
case "end": | ||
@@ -180,2 +185,2 @@ return _context.stop(); | ||
exports["default"] = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJhcHAiLCJzZWFyY2hUeXBlcyIsImRlZmF1bHRWYWx1ZXMiLCJyZW5kZXJUeXBlcyIsImZpbGVUeXBlcyIsInNlYXJjaFBhcmFtcyIsInNlYXJjaFR5cGVOYW1lIiwia2V5c0RhdGFUeXBlIiwia2V5cyIsImtleXNGb2xkZXIiLCJjb25zb2xlIiwibG9nIiwibmV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xkZXIpO1xuXG4gIGNvbnNvbGUubG9nKCdcXG5EYXRhLXByb2Nlc3NpbmcgaXMgb25nb2luZy4uLlxcbicpO1xuICBjb25zdCBkYXRhU3RyZWFtID0gbWFrZURhdGFTdHJlYW0obm90RW1wdHlTb3VyY2VzLCBzZWFyY2hUeXBlTmFtZSwga2V5cyk7XG4gIGNvbnN0IHRvdGFsSW5mbyA9IGF3YWl0IG1ha2VTdHJ1Y3R1cmVkRGF0YShkYXRhU3RyZWFtKTtcbiAgaWYgKF8uc2l6ZSh0b3RhbEluZm8pID09PSAwKSB7XG4gICAgY29uc29sZS5sb2coJ05vIGRhdGEgaXMgZm91bmRcXG4nKTtcbiAgICByZXR1cm47XG4gIH1cbiAgYXdhaXQgd3JpdGVUb0pzb24odG90YWxJbmZvLCBwcm9jZXNzZWREYXRhUGF0aCk7XG4gIG1ha2VSZW5kZXIocHJvY2Vzc2VkRGF0YVBhdGgsIHJlbmRlclR5cGVzLCByZXNGb2xkZXIpO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgYXN5bmMgKCkgPT4ge1xuICBhcHAoKS5jYXRjaCgoZXJyKSA9PiB7XG4gICAgY29uc29sZS5sb2coZXJyKTtcbiAgICB0aHJvdyBuZXcgRXJyb3IoZXJyKTtcbiAgfSk7XG59O1xuIl19 |
@@ -113,5 +113,5 @@ "use strict"; | ||
var selectedData = keys.reduce(function (acc, key) { | ||
var selectedData = keys.length > 0 ? keys.reduce(function (acc, key) { | ||
return [].concat(_toConsumableArray(acc), _toConsumableArray((0, _core.getMatched)(String(key), searchType, data))); | ||
}, []); | ||
}, []) : (0, _core.getMatched)('', searchType, data); | ||
@@ -221,2 +221,2 @@ if (selectedData.length > 0) { | ||
exports.selectZeroMovements = selectZeroMovements; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wcm9jZXNzb3JzLmpzIl0sIm5hbWVzIjpbIm1ha2VQYXRocy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vzc2VkRGF0YVBhdGh9XFxuYCk7XG4gICAgICAgIHJlc29sdmUoKTtcbiAgICAgIH0pXG4gICAgICAub24oJ2Vycm9yJywgcmVqZWN0KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHN0cmVhbXNJblByb21pc2U7XG59O1xuXG5leHBvcnQgY29uc3Qgc2VsZWN0WmVyb01vdmVtZW50cyA9IChwYXRoRGF0YUNvbGwpID0+IHtcbiAgY29uc3Qgc2VwYXJhdGVkSXRlbXMgPSBfLnBhcnRpdGlvbihwYXRoRGF0YUNvbGwsIChbLCBjb250ZW50XSkgPT4ge1xuICAgIGNvbnN0IGhhc1plcm9zID0gY29udGVudC5zcGxpdCgnXFxuJykuZXZlcnkoKGxpbmUpID0+IHtcbiAgICAgIGNvbnN0IFssLCxcbiAgICAgICAgY291bnRJbiwsXG4gICAgICAgIGNvdW50T3V0LFxuICAgICAgXSA9IGxpbmUuc3BsaXQoJ1xcdCcpO1xuICAgICAgY29uc3QgaXNaZXJvID0gTnVtYmVyKGNvdW50SW4pID09PSAwICYmIE51bWJlcihjb3VudE91dCkgPT09IDA7XG4gICAgICByZXR1cm4gaXNaZXJvO1xuICAgIH0pO1xuXG4gICAgcmV0dXJuIGhhc1plcm9zO1xuICB9KTtcblxuICBjb25zdCBbemVyb0NvdW50cywgcmVzdF0gPSBzZXBhcmF0ZWRJdGVtcztcbiAgY29uc3QgW21hdGNoZWRQYXRoc10gPSBfLnVuemlwKHplcm9Db3VudHMpO1xuICBjb25zdCBbZGF0YVBhdGhzXSA9IF8udW56aXAocmVzdCk7XG5cbiAgcmV0dXJuIFttYXRjaGVkUGF0aHMsIGRhdGFQYXRoc107XG59O1xuIl19 | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wcm9jZXNzb3JzLmpzIl0sIm5hbWVzIjpbIm1ha2VQYXRocyIsInNvdXJjZSIsImZpbGVUeXBlcyIsInBhdGhzT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JdfQ== |
@@ -12,2 +12,4 @@ "use strict"; | ||
var _names = _interopRequireDefault(require("./names")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -60,5 +62,9 @@ | ||
var propNamesStr = _lodash["default"].keys(fromSourceInfo).join('\t'); | ||
var propNamesStr = _lodash["default"].keys(fromSourceInfo).map(function (key) { | ||
return _names["default"][key]; | ||
}).join('\t'); | ||
var headersStr = "drugCode\t".concat(totalValuesNames.join('\t'), "\tsource\t").concat(propNamesStr); | ||
var headersStr = "".concat(_names["default"].drugCode, "\t").concat(totalValuesNames.map(function (key) { | ||
return _names["default"][key]; | ||
}).join('\t'), "\t").concat(_names["default"].source, "\t").concat(propNamesStr); | ||
return "".concat(headersStr, "\n").concat(totalDataStr, "\t").concat(dataStr); | ||
@@ -76,2 +82,2 @@ } | ||
exports["default"] = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yZW5kZXJlcnMvZGV0YWlsZWRWYWx1ZXMuanMiXSwibmFtZXMiOlsiZGF0YSIsImhhc0hlYWRlcnMiLCJkcnVnQ29kZXMiLCJfIiwia2V5cyIsInJlbmRlcmVkSW5mb0NvbGwiLCJtYXAiLCJkcnVnQ29kZSIsImRydWdEYXRhIiwicHJlZGljYXRlIiwia2V5IiwiaXNQbGFpbk9iamVjdCIsInBhcnRpdGlvbiIsInRvdGFsVmFsdWVzTmFtZXMiLCJwYXRoTmFtZXMiLCJ0b3RhbERhdGEiLCJuYW1lIiwidG90YWxEYXRhU3RyIiwiam9pbiIsImRldGFpbGVkRGF0YSIsInNvdXJjZSIsImZyb21Tb3VyY2VJbmZvIiwiaW5mb0NvbGwiLCJ0b0FycmF5IiwiZmlsZU5hbWUiLCJkYXRhU3RyIiwicHJvcE5hbWVzU3RyIiwiaGVhZGVyc1N0ciIsImRldGFpbGVkRGF0YVN0ciJdLCJtYXBwaW5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9Db2xsLmpvaW4oJ1xcdCcpfWA7XG5cbiAgICAgIGlmICghaGFzSGVhZGVycykge1xuICAgICAgICBoYXNIZWFkZXJzID0gdHJ1ZTtcbiAgICAgICAgY29uc3QgcHJvcE5hbWVzU3RyID0gXy5rZXlzKGZyb21Tb3VyY2VJbmZvKS5tYXAoa2V5ID0+IG5hbWVzW2tleV0pLmpvaW4oJ1xcdCcpO1xuICAgICAgICBjb25zdCBoZWFkZXJzU3RyID0gYCR7bmFtZXMuZHJ1Z0NvZGV9XFx0JHt0b3RhbFZhbHVlc05hbWVzXG4gICAgICAgICAgLm1hcChrZXkgPT4gbmFtZXNba2V5XSkuam9pbignXFx0Jyl9XFx0JHtuYW1lcy5zb3VyY2V9XFx0JHtwcm9wTmFtZXNTdHJ9YDtcbiAgICAgICAgcmV0dXJuIGAke2hlYWRlcnNTdHJ9XFxuJHt0b3RhbERhdGFTdHJ9XFx0JHtkYXRhU3RyfWA7XG4gICAgICB9XG4gICAgICByZXR1cm4gYCR7dG90YWxEYXRhU3RyfVxcdCR7ZGF0YVN0cn1gO1xuICAgIH0pO1xuXG4gICAgY29uc3QgZGV0YWlsZWREYXRhU3RyID0gZGV0YWlsZWREYXRhLmpvaW4oJ1xcbicpO1xuXG4gICAgcmV0dXJuIGRldGFpbGVkRGF0YVN0cjtcbiAgfSk7XG5cbiAgcmV0dXJuIHJlbmRlcmVkSW5mb0NvbGw7XG59O1xuIl19 |
{ | ||
"name": "proxima_datareader", | ||
"version": "1.3.9", | ||
"version": "1.3.10", | ||
"description": "data reader & selector 4 incoming data files having 1 of following extensions: \n'.mdr', '.mwr', '.mmr', '.mdi', '.mwi', '.mmi'", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -8,3 +8,3 @@ import fs from 'fs'; | ||
import readlineSync from 'readline-sync'; | ||
import { getOrWriteDefaults } from './defaults'; | ||
import { getOrWriteDefaults, defaultValues } from './defaults'; | ||
@@ -26,2 +26,5 @@ | ||
export const getKeysData = (searchType, keysType, defaults) => { | ||
if (searchType === 'none') { | ||
return [[], defaultValues.getDefaultDir()]; | ||
} | ||
const { defaultKeysSource } = getOrWriteDefaults(defaults); | ||
@@ -28,0 +31,0 @@ const keysFolder = readlineSync.questionPath(`\nPlease specify search keys source |
@@ -14,6 +14,9 @@ import _ from 'lodash'; | ||
} | ||
const notZero = Number(countIn) !== 0 || Number(countOut) !== 0; | ||
if (searchType === 'none') { | ||
return notZero; | ||
} | ||
const isSameCode = drugCode === strToSearch; | ||
const nameIncludesStr = name.toLowerCase().includes(strToSearch.toLowerCase()); | ||
const isMatched = searchType === 'drugCode' ? isSameCode : nameIncludesStr; | ||
const notZero = Number(countIn) !== 0 || Number(countOut) !== 0; | ||
return isMatched && notZero; | ||
@@ -20,0 +23,0 @@ }).filter(([, lines]) => lines.length > 0); |
@@ -7,9 +7,10 @@ import path from 'path'; | ||
getDefaultDir() { | ||
return path.join(this.homeDir, '/Documents/Proxima/defaults'); | ||
const defaultDir = path.join(this.homeDir, '/Documents/Proxima/defaults'); | ||
if (!fs.existsSync(defaultDir)) { | ||
fs.mkdirSync(defaultDir, { recursive: true }); | ||
} | ||
return defaultDir; | ||
}, | ||
getDefaultValuesPath() { | ||
const defaultDir = this.getDefaultDir(); | ||
if (!fs.existsSync(defaultDir)) { | ||
fs.mkdirSync(defaultDir, { recursive: true }); | ||
} | ||
const defaultValuesPath = path.join(defaultDir, 'defaultsForDataSelector.json'); | ||
@@ -25,2 +26,3 @@ return defaultValuesPath; | ||
drugName: 'string', | ||
none: null, | ||
}, | ||
@@ -27,0 +29,0 @@ renderTypes: ['total', 'detailed'], |
@@ -41,5 +41,8 @@ import fs from 'fs'; | ||
} | ||
const newPath = path.join(keysFolder, 'processedData'); | ||
const resFolder = fs.existsSync(newPath) ? newPath : fs.mkdirSync(newPath, { recursive: true }); | ||
const resFolder = path.join(keysFolder, 'processedData'); | ||
if (!fs.existsSync(resFolder)) { | ||
fs.mkdirSync(resFolder, { recursive: true }); | ||
} | ||
console.log(resFolder); | ||
const resFolderFilesList = fs.readdirSync(resFolder); | ||
@@ -68,3 +71,2 @@ const jsonFilesList = resFolderFilesList | ||
console.log('\nData-processing is ongoing...\n'); | ||
const dataStream = makeDataStream(notEmptySources, searchTypeName, keys); | ||
@@ -71,0 +73,0 @@ const totalInfo = await makeStructuredData(dataStream); |
@@ -57,4 +57,5 @@ import fs from 'fs'; | ||
const [filePath, data] = ch; | ||
const selectedData = keys | ||
.reduce((acc, key) => [...acc, ...getMatched(String(key), searchType, data)], []); | ||
const selectedData = keys.length > 0 | ||
? keys.reduce((acc, key) => [...acc, ...getMatched(String(key), searchType, data)], []) | ||
: getMatched('', searchType, data); | ||
if (selectedData.length > 0) { | ||
@@ -61,0 +62,0 @@ this.push([selectedData, filePath]); |
import _ from 'lodash'; | ||
import { basename } from 'path'; | ||
import names from './names'; | ||
@@ -23,4 +24,5 @@ export default (data) => { | ||
hasHeaders = true; | ||
const propNamesStr = _.keys(fromSourceInfo).join('\t'); | ||
const headersStr = `drugCode\t${totalValuesNames.join('\t')}\tsource\t${propNamesStr}`; | ||
const propNamesStr = _.keys(fromSourceInfo).map(key => names[key]).join('\t'); | ||
const headersStr = `${names.drugCode}\t${totalValuesNames | ||
.map(key => names[key]).join('\t')}\t${names.source}\t${propNamesStr}`; | ||
return `${headersStr}\n${totalDataStr}\t${dataStr}`; | ||
@@ -27,0 +29,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28
17
139772
1448