@@ -129,19 +129,23 @@ async function mcodeApp(Client, fromDate, toDate, pathToConfig, pathToRunLogs, d
129
129
}
130
130
}
131
131
132
+
133
+
134
+
132
135
// Finally, save the data to disk
133
- const outputPath = './output' ;
134
- if ( ! fs . existsSync ( outputPath ) ) {
135
- logger . info ( `Creating directory ${ outputPath } ` ) ;
136
- fs . mkdirSync ( outputPath ) ;
137
- }
138
- // For each bundle in our extractedData, write it to our output directory
139
- extractedData . forEach ( ( bundle , i ) => {
140
- const outputFile = path . join ( outputPath , `mcode-extraction-patient-${ i + 1 } .json` ) ;
141
- logger . debug ( `Logging mCODE output to ${ outputFile } ` ) ;
142
- fs . writeFileSync ( outputFile , JSON . stringify ( bundle ) , 'utf8' ) ;
143
- } ) ;
144
- logger . info ( `Successfully logged ${ extractedData . length } mCODE bundle(s) to ${ outputPath } ` ) ;
136
+ // const outputPath = './output';
137
+ // if (!fs.existsSync(outputPath)) {
138
+ // logger.info(`Creating directory ${outputPath}`);
139
+ // fs.mkdirSync(outputPath);
140
+ // }
141
+ // // For each bundle in our extractedData, write it to our output directory
142
+ // extractedData.forEach((bundle, i) => {
143
+ // const outputFile = path.join(outputPath, `mcode-extraction-patient-${i + 1}.json`);
144
+ // logger.debug(`Logging mCODE output to ${outputFile}`);
145
+ // fs.writeFileSync(outputFile, JSON.stringify(bundle), 'utf8');
146
+ // });
147
+ // logger.info(`Successfully logged ${extractedData.length} mCODE bundle(s) to ${outputPath}`);
148
+ return extractedData ;
145
149
}
146
150
147
151
module . exports = {
0 commit comments