Exemple #1
0
        private static void transform()
        {
            using (Pnyx p = new Pnyx())
            {
                p.setSettings(outputNewline: "\n");

                p.read("C:/dev/asclepius/prod_import/bhc_procedures.csv");
                p.parseCsv(hasHeader: true);
                p.withColumns(p2 => p2.lineTransformer(new DateTransform
                {
                    formatSource = DateUtil.FORMAT_MDYYYY, formatDestination = DateUtil.FORMAT_ISO_8601_DATE
                }), 12);
                p.rowTransformer(new DateFixer());
                p.tee(p2 =>
                {
                    p2.removeColumns(7, 8, 9, 10, 11);
                    p2.withColumns(p3 => p3.rowFilter(new RepeatFilter()), 1, 2, 7);
                    p2.write("C:/dev/asclepius/prod_import/bhc_procedure_base.csv");
                });
                p.removeColumns(3, 4, 5, 6);
                p.rowTransformer(new SequenceFixer());
                p.write("C:/dev/asclepius/prod_import/bhc_procedure_diagnosis.csv");
                p.process();
            }
        }