Exemplo n.º 1
0
 public LisReport()
 {
     this._reportItemList = new List<ReportItemModel>();
        this._specItemsTable=new Hashtable();
        this._parItemList = new List<int>();
        this._reportInfo = new ReportFormModel();
        this._specItemsList = new List<ReportItemModel>();
 }
Exemplo n.º 2
0
 //获取生成文件名
 private string GenderFileName(ReportFormModel rf, int order)
 {
     StringBuilder sb = new StringBuilder();
     //病案号
     if (rf.PID != null && !rf.PID.Equals(""))
     {
         sb.Append(rf.PID);
     }
     else
     {
         sb.Append('%');
     }
     sb.Append('_');
     //身份证号
     if (rf.CID != null && !rf.CID.Equals(""))
     {
         sb.Append(rf.CID);
     }
     else
     {
         sb.Append('%');
     }
     sb.Append('_');
     //lis
     sb.Append("lis");
     sb.Append('_');
     //门诊类型
     if (rf.SickTypeNo == 1 || rf.SickTypeNo == 3)
     {
         //住院
         sb.Append('I');
     }
     else if (rf.SickTypeNo == 2 || rf.SickTypeNo == 4)
     {
         //menzhen
         sb.Append('O');
     }
     else
     {
         sb.Append('Q');
     }
     sb.Append('_');
     //住院次数
     if (rf.VisitTimes > 0)
     {
         sb.Append(rf.VisitTimes);
     }
     else
     {
         sb.Append('%');
     }
     sb.Append('_');
     //采集时间
     sb.Append(FormatDateTime(rf.CollectDateTime, "yyyyMMdd", "%"));
     sb.Append('_');
     //签收时间
     sb.Append(FormatDateTime(rf.InceptDateTime, "yyyyMMdd", "%"));
     sb.Append('_');
     //报告时间
     sb.Append(FormatDateTime(rf.ReportDateTime, "yyyyMMdd", "%"));
     sb.Append('_');
     //小组号
     sb.Append(rf.SectionNo);
     sb.Append('_');
     //样本号 将\进行转义
     sb.Append(rf.SampleNo.Replace('/','-'));
     sb.Append('_');
     if (rf.SerialNo != null && !rf.SerialNo.Equals(""))
     {
         sb.Append(rf.SerialNo);
     }
     else
     {
         sb.Append('%');
     }
     sb.Append('_');
     sb.Append(order);
     sb.Append(".pdf");
     return sb.ToString();
 }
Exemplo n.º 3
0
 private Hashtable GenderItemEqualFields(ReportFormModel rfm)
 {
     Hashtable ht = new Hashtable();
     ht.Add("receivedate", rfm.ReceiveDate);
     ht.Add("sectionno", rfm.SectionNo);
     ht.Add("testtypeno", rfm.TestTypeNo);
     ht.Add("sampleno", rfm.SampleNo);
     return ht;
 }
Exemplo n.º 4
0
 //报告项集合填充
 private void FillReportItems(List<ReportItemModel> rimList,ReportFormModel rfm, DataSet ds)
 {
     DataTable dt = ds.Tables["ReportItem"];
     DataRow dr;
     foreach (ReportItemModel rim in rimList)
     {
         //过滤不显示项
         if (rim.SecretGrade > 0)
         {
             continue;
         }
         dr = dt.NewRow();
         FillReportItem(rim, dr, rfm);
         dt.Rows.Add(dr);
     }
 }
Exemplo n.º 5
0
 //获取生成文件全路径
 private string GenderFileFullName(ReportFormModel rf, string rootPath,int order)
 {
     string fileFullPath=Path.Combine(rootPath, DateTime.Now.ToString("yyyy-MM-dd"), rf.SectionNo.ToString());
     if (!Directory.Exists(fileFullPath))
     {
         Directory.CreateDirectory(fileFullPath);
     }
     string fileName = GenderFileName(rf,order);
     string fileFullName = Path.Combine(fileFullPath, fileName);
     if (File.Exists(fileFullName))
     {
         string newFileName = fileName.Substring(0, fileName.Length - 4);
         newFileName += "_";
         newFileName += DateTime.Now.ToString("HHmmss");
         newFileName += ".pdf";
         return Path.Combine(fileFullPath, newFileName);
     }
     else
     {
         return fileFullName;
     }
 }
Exemplo n.º 6
0
 //通用报告项数据填充
 private void FillReportItem(ReportItemModel rim, DataRow dr, ReportFormModel rfm)
 {
     dr["ReceiveDate"] = rfm.ReceiveDate;
     dr["SectionNo"] = rfm.SectionNo;
     dr["TestTypeNo"] = rfm.TestTypeNo;
     dr["SampleNo"] = rfm.SampleNo;
     dr["ItemNo"] = rim.ItemNo;
     dr["DispNo"] = rim.DispNo;
     dr["ItemName"] = rim.ItemName;
     if (rim.Precision > 0)
     {
         double temp, temp1;
         bool r = double.TryParse(rim.ItemResult, out temp);
         bool r1 = double.TryParse(rim.ItemEName, out  temp1);
         if (r == true)
         {
             dr["ItemResult"] = temp.ToString(NumberFormatString(rim.Precision));
         }
         else
         {
             dr["ItemResult"] = rim.ItemResult;
         }
         if (r1 == true)
         {
             dr["ItemEName"] = temp1.ToString(NumberFormatString(rim.Precision));
         }
         else
         {
             dr["ItemEName"] = rim.ItemEName;
         }
     }
     else
     {
         dr["ItemEName"] = rim.ItemEName;
         dr["ItemResult"] = rim.ItemResult;
     }
     dr["ResultStatus"] = rim.ResultStatus;
     dr["ItemUnit"] = rim.ItemUnit;
     dr["RefRange"] = rim.RefRange;
 }
Exemplo n.º 7
0
        //报告信息填充
        private void FillReportInfo(ReportFormModel rfm, DataSet ds)
        {
            //Type reportFormType = rfm.GetType();
            //PropertyInfo property;
            DataTable dt = ds.Tables["ReportForm"];
            DataRow dr = dt.NewRow();
            dr["ReceiveDate"] = rfm.ReceiveDate;
            dr["SectionNo"] = rfm.SectionNo;
            dr["TestTypeNo"] = rfm.TestTypeNo;
            dr["SampleNo"] = rfm.SampleNo;
            dr["SerialNo"] = rfm.SerialNo;
            dr["DeptName"] = rfm.DeptName;
            dr["BedNo"] = rfm.BedNo;
            dr["CName"] = rfm.CName;
            dr["Sex"] = rfm.Sex;
            dr["Age"] = rfm.Ager.ToString();
            dr["PID"] = rfm.PID;
            dr["SampleTypeName"] = rfm.SampleTypeName;
            dr["ClinicTypeName"] = rfm.ClinicTypeName;
            dr["DoctorName"] = rfm.BillingDoctor;
            dr["ClinicalDiagnosis"] = rfm.ClinicalDiagnosis;
            dr["Explanation"] = rfm.Explanation;
            dr["ParItemName"] = rfm.ParItemName;
            dr["TestDateTime"] = rfm.TestDateTime.ToString("yyyy-MM-dd");

            dr["CollectDateTime"] = FormatDateTime(rfm.CollectDateTime, "yyyy-MM-dd HH:mm", "");
            dr["InceptDateTime"] = FormatDateTime(rfm.InceptDateTime, "yyyy-MM-dd HH:mm", "");
            dr["ReportDateTime"] = FormatDateTime(rfm.ReportDateTime, "yyyy-MM-dd HH:mm", "");

            dr["ReportTitle"] = "";
            dr["Remark"] = rfm.Remark;
            dr["FormMemo"] = rfm.FormMemo;
            dr["FormComment"] = rfm.FormComment;
            dr["FormComment2"] = rfm.FormComment2;

            dr["TechnicianImage"] = rfm.TechnicianImage;
            dr["CheckerImage"] = rfm.CheckerImage;

            dt.Rows.Add(dr);
        }
Exemplo n.º 8
0
 //遗传染色体检验项填充
 private void FillRanReportItem(List<ReportItemModel> rimList, DataSet ds, ReportFormModel rfm)
 {
     DataTable dt = ds.Tables["RanReportItem"];
     DataRow dr = dt.NewRow();
     dr["ReceiveDate"] = rfm.ReceiveDate;
     dr["SectionNo"] = rfm.SectionNo;
     dr["TestTypeNo"] = rfm.TestTypeNo;
     dr["SampleNo"] = rfm.SampleNo;
     foreach (ReportItemModel rim in rimList)
     {
         switch (rim.ItemNo)
         {
             case 90008528:
                 dr["CaryogramDesc"] = rim.ItemResult;
                 break;
             case 90008797:
                 dr["SampleQuality"] = rim.ItemResult;
                 break;
             case 90008798:
                 dr["CulturalMethod"] = rim.ItemResult;
                 break;
             case 90008799:
                 dr["BandMethod"] = rim.ItemResult;
                 break;
             default:
                 dr["Remark"] = rim.ItemResult;
                 break;
         }
     }
     dt.Rows.Add(dr);
 }
Exemplo n.º 9
0
 private void FillGSCommonItems(DataSet ds, List<ReportItemModel> rimList, ReportFormModel rfm)
 {
     DataTable dt = ds.Tables["GSReportItem"];
     DataRow dr = dt.NewRow();
     dr["ReceiveDate"] = rfm.ReceiveDate;
     dr["SectionNo"] = rfm.SectionNo;
     dr["TestTypeNo"] = rfm.TestTypeNo;
     dr["SampleNo"] = rfm.SampleNo;
     GSCommonItemModel gsItem;
     string columnName;
     foreach (ReportItemModel rim in rimList)
     {
         gsItem = rim as GSCommonItemModel;
         if (gsItem == null)
         {
             continue;
         }
         columnName = "i" + gsItem.ItemNo.ToString() + "_" + "xue";
         dr[columnName] = gsItem.XueValue;
         columnName = "i" + gsItem.ItemNo.ToString() + "_" + "gs";
         dr[columnName] = gsItem.GSValue;
     }
     dt.Rows.Add(dr);
 }
Exemplo n.º 10
0
        //获取报告项查询条件集合
        private void GenderItemEqualFields(ReportFormModel rfm, Hashtable ht)
        {
            //
            ht.Remove("receivedate");
            ht.Add("receivedate", rfm.ReceiveDate);

            ht.Remove("sectionno");
            ht.Add("sectionno", rfm.SectionNo);

            ht.Remove("testtypeno");
            ht.Add("testtypeno", rfm.TestTypeNo);

            ht.Remove("sampleno");
            ht.Add("sampleno", rfm.SampleNo);
        }