lib/rxnorm.js
function (cb) {
            fs.readFile(path.resolve(__dirname, "dose_form_groups.txt"), "UTF-8", function (err, doseForms) {
                if (err) return cb(err);
                // each group is a new line in the file
                doseFormGroups = doseForms.toString().split("\n").filter(function (form) {
                    // ignore empty lines
                    return form.length > 0;
                });
                cb();
            });
        }
function (cb) {
            fs.readFile(path.resolve(__dirname, "dose_form_groups.txt"), "UTF-8", function (err, doseForms) {
                if (err) return cb(err);
                // each group is a new line in the file
                doseFormGroups = doseForms.toString().split("\n").filter(function (form) {
                    // ignore empty lines
                    return form.length > 0;
                });
                cb();
            });
        }
function ( cb ) { fs . readFile ( path . resolve ( __dirname , "dose_form_groups.txt" ) , "UTF-8" , function ( err , doseForms ) { if ( err ) return cb ( err ) ; // each group is a new line in the file doseFormGroups = doseForms . toString ( ) . split ( "\n" ) . filter ( function ( form ) { // ignore empty lines return form . length > 0 ; } ) ; cb ( ) ; } ) ; }
read in doseFormGroups from text file
read in doseFormGroups from text file