Пример #1
0
        public void Do()
        {
            actionTitle = new List<string>();
            actionData = new DistinctList<ActionDataCombinedWithOrderData>();



            foreach (var currentMatch in matchResult)
            {
                if (currentMatch.MatchedOrderFiles.Count == 0) continue;
                readAction(currentMatch.actionFile.path);
                appendOrderGroupToActionTitle();
                foreach (var currentOrder in currentMatch.MatchedOrderFiles)
                {
                    combineOrderToAction(currentOrder.path);
                }
                var query = from q in actionData where q.hasThisOrder.Any(x => x) select q;

                write(currentMatch.actionFile);

                actionData.Clear();
                actionTitle.Clear();
            }
        }
        public void Do()
        {
            var groupList = (from q in inputFile where q.FileType == "CD" || q.FileType == "DD" select q.@group).Distinct();
            var hashGroupList = (from q in inputFile where q.FileType == "CD" || q.FileType == "DD" select q.hashGroup).Distinct();

            System.Windows.MessageBox.Show($"input file count = {inputFile.Count}, group count = {orderGroupList.Count}, dx count = {diagnosisGroupList.Count}, output folder = {outputFolder}, groupList ={groupList.Count()}, hashGroupList = {hashGroupList.Count()}");
            if(!Directory.Exists(outputFolder))
                Directory.CreateDirectory(outputFolder);
            using (swAllCombined = new StreamWriter(outputFolder + @"\" + "Patient Based Data _All.PBD", false, Encoding.Default))
            {
                swAllCombined.WriteLine(makeTitle());
                foreach (var Rgroup in groupList)
                {
                    foreach (var Hgroup in hashGroupList)
                    {
                        PatientList = new DistinctList<PatientBasedData>();
                        analyzeCDfilesInOneGroup(Rgroup, Hgroup);
                        analyzeDDfilesInOneGroup(Rgroup, Hgroup);
                        writeFile(Rgroup, Hgroup);
                        PatientList.Clear();
                    }
                }
            }
        }