Ejemplo n.º 1
0
 void combineOrderToAction(string orderFilePath)
 {
     using (var sr = new StreamReader(orderFilePath, Encoding.Default))
     {
         orderTitle = new List<string>(sr.ReadLine().Split('\t'));
         var index = new Index();
         index.analyzeTitle(orderTitle);
         var orderIndex = orderTitle.FindIndex(x => x == "ORDER_CODE" || x == "DRUG_NO");
         while (!sr.EndOfStream)
         {
             string dataline = sr.ReadLine();
             string order = dataline.Split('\t')[orderIndex].Trim();
             for (int i = 0; i < orderGroupList.Count; i++)
             {
                 if (orderGroupList[i].hasThisOrder(order))
                 {
                     var comparer = ActionDataCombinedWithOrderData.getComparer(dataline, index);
                     int indexData = actionData.BinarySearch(comparer);
                     if (indexData >= 0)
                     {
                         actionData[indexData].hasThisOrder[i] = true;
                         continue;
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
        void readAction(string actionFilePath)
        {
            using (var sr = new StreamReader(actionFilePath, Encoding.Default))
            {
                actionTitle = new List<string>(sr.ReadLine().Split('\t'));
                var index = new Index();
                index.analyzeTitle(actionTitle);
                while (!sr.EndOfStream)
                {
                    var dataRow = new ActionDataCombinedWithOrderData(sr.ReadLine(), index);
                    actionData.AddDistinct(dataRow);
                }

            }
        }
Ejemplo n.º 3
0
 public static ActionDataCombinedWithOrderData getComparer(string dataline, Index index)
 {
     string[] splitline = dataline.Split('\t');
     return new ActionDataCombinedWithOrderData()
     {
         FEE_YM = splitline[index.FEE_YM],
         HOSP_ID = splitline[index.HOSP_ID],
         APPL_DATE = splitline[index.APPL_DATE],
         SEQ_NO = splitline[index.SEQ_NO],
         CASE_TYPE = splitline[index.CASE_TYPE],
         APPL_TYPE = splitline[index.APPL_TYPE]
     };
 }
Ejemplo n.º 4
0
 public ActionDataCombinedWithOrderData(string dataline, Index index)
 {
     this.dataline = dataline;
     string[] splitline = dataline.Split('\t');
     this.FEE_YM = splitline[index.FEE_YM];
     this.HOSP_ID = splitline[index.HOSP_ID];
     this.APPL_DATE = splitline[index.APPL_DATE];
     this.SEQ_NO = splitline[index.SEQ_NO];
     this.CASE_TYPE = splitline[index.CASE_TYPE];
     this.APPL_TYPE = splitline[index.APPL_TYPE];
 }