public LabReport() { this.m_info = new InfoElement(); this.m_superList = new List<int>(8); this.m_itemList = new List<ItemElement>(16); this.m_imageList = new List<ImageElement>(8); this.m_customList = new List<CustomElement>(3); }
public void SaveRecord(InfoElement info, int order, string filePath) { int update = this.UpdateActive(info.ReportID); if (update > 0) { //版本已存在 } this.InsertRecord(info, order, filePath); }
private void FillInfo(InfoElement info, FRInfo header) { header.C0 = info.SerialNo; header.C1 = info.DeptName; header.C2 = info.BedNo; header.C3 = info.SampleNo; header.C4 = info.PatientName; header.C5 = info.GenderName; header.C6 = info.AgeStr; header.C7 = info.PatientID; header.C8 = info.SampleTypeName; header.C9 = info.ClinicName; header.C10 = info.Doctor; header.C11 = info.ClinicalDiagnosis; header.C12 = info.Explanation; header.C13 = info.Memo; header.C14 = info.Comment; header.C15 = info.Description; header.C16 = info.ReportContent; header.C17 = info.CollectTime > MinTime ? info.CollectTime.ToString("yyyy-MM-dd HH:mm") : ""; header.C18 = info.InceptTime > MinTime ? info.InceptTime.ToString("yyyy-MM-dd HH:mm") : ""; header.C19 = info.CheckTime > MinTime ? info.CheckTime.ToString("yyyy-MM-dd HH:mm") : ""; header.C20 = info.TestTime > MinTime ? info.TestTime.ToString("yyyy-MM-dd") : ""; header.C29 = info.ReportID; header.C30 = info.TechnicianImage; header.C31 = info.CheckerImage; }
private void GSCustomConvert(InfoElement info, List<ImageElement> images, List<IFillElement> ls) { GSCustom custom = null; ImageElement image = null; foreach (IFillElement element in ls) { custom = element as GSCustom; if (custom != null) { if (custom.ItemNo == 43) { //结论 info.Comment = custom.ReportComment; } else if (custom.ItemNo == 44) { //描述 info.Description = custom.ReportDescribe; } else if (custom.IsFile == 1) { if (custom.Graph != null) { image = new ImageElement(); image.ReportID = custom.ReportID; image.Name = custom.ItemNo.ToString(); image.Value = custom.Graph; images.Add(image); } } } } }
private void ConvertInfo(InfoElement i1, Info i2) { i2.AgeStr = i1.AgeStr; i2.BedNo = i1.BedNo; i2.Checker = i1.Checker; i2.CheckerUrl = i1.CheckerUrl; i2.CheckTime = i1.CheckTime; i2.CID = i1.CID; i2.ClinicalDiagnosis = i1.ClinicalDiagnosis; i2.ClinicName = i1.ClinicName; i2.CollectTime = i1.CollectTime; i2.Comment = i1.Comment; i2.DeptName = i1.DeptName; i2.Description = i1.Description; i2.Doctor = i1.Doctor; i2.Explanation = i1.Explanation; i2.FinalTime = i1.FinalTime; i2.GenderName = i1.GenderName; i2.InceptTime = i1.InceptTime; i2.Memo = i1.Memo; i2.PatientID = i1.PatientID; i2.PatientName = i1.PatientName; i2.ReceiveTime = i1.ReceiveTime; i2.ReportContent = i1.ReportContent; i2.SampleNo = i1.SampleNo; i2.SampleTypeName = i1.SampleTypeName; i2.SampleTypeNo = i1.SampleTypeNo; i2.SectionNo = i1.SectionNo; i2.SerialNo = i1.SerialNo; i2.Technician = i1.Technician; i2.TechnicianUrl = i1.TechnicianUrl; i2.TestTime = i1.TestTime; i2.VisitTimes = i1.VisitTimes; }
private int InsertRecord(InfoElement info, int order, string filePath) { StringBuilder sb = new StringBuilder(); sb.Append("INSERT INTO dbo.LabPDF("); sb.Append("Name,Gender,Age,CID,PID,ClinicName,VisitTime,DeptName,Doctor,BedNo,ClinicalDiagnosis,Explanation,SectionNo,SerialNo,SampleNo,SampleTypeNo,SampleTypeName,"); sb.Append("Memo,Comment,Description,Technician,Checker,ReportContent,ReceiveTime,CollectTime,InceptTime,TestTime,CheckTime,FinalTime,InsertTime,ReportID,OrderNo,FilePath,IsActive"); sb.Append(") values ("); sb.Append("@Name,@Gender,@Age,@CID,@PID,@ClinicName,@VisitTime,@DeptName,@Doctor,@BedNo,@ClinicalDiagnosis,@Explanation,@SectionNo,@SerialNo,@SampleNo,@SampleTypeNo,@SampleTypeName,"); sb.Append("@Memo,@Comment,@Description,@Technician,@Checker,@ReportContent,@ReceiveTime,@CollectTime,@InceptTime,@TestTime,@CheckTime,@FinalTime,@InsertTime,@ReportID,@OrderNo,@FilePath,@IsActive)"); SqlParameter[] parameters = { new SqlParameter("@Name", SqlDbType.NVarChar,10), new SqlParameter("@Gender", SqlDbType.NVarChar,5), new SqlParameter("@Age", SqlDbType.VarChar,10), new SqlParameter("@CID", SqlDbType.VarChar,18), new SqlParameter("@PID", SqlDbType.VarChar,10), new SqlParameter("@ClinicName", SqlDbType.NVarChar,10), new SqlParameter("@VisitTime", SqlDbType.Int,15), new SqlParameter("@DeptName", SqlDbType.NVarChar,15), new SqlParameter("@Doctor", SqlDbType.NVarChar,10), new SqlParameter("@BedNo", SqlDbType.VarChar,10), new SqlParameter("@ClinicalDiagnosis", SqlDbType.NVarChar,50), new SqlParameter("@Explanation", SqlDbType.NVarChar,50), new SqlParameter("@SectionNo", SqlDbType.Int), new SqlParameter("@SerialNo", SqlDbType.VarChar,10), new SqlParameter("@SampleNo", SqlDbType.VarChar,10), new SqlParameter("@SampleTypeNo", SqlDbType.Int), new SqlParameter("@SampleTypeName", SqlDbType.NVarChar,10), new SqlParameter("@Memo", SqlDbType.NVarChar), new SqlParameter("@Comment", SqlDbType.NVarChar), new SqlParameter("@Description", SqlDbType.NVarChar), new SqlParameter("@Technician", SqlDbType.NVarChar,10), new SqlParameter("@Checker", SqlDbType.NVarChar,10), new SqlParameter("@ReportContent", SqlDbType.NVarChar,500), new SqlParameter("@ReceiveTime", SqlDbType.DateTime), new SqlParameter("@CollectTime", SqlDbType.DateTime), new SqlParameter("@InceptTime", SqlDbType.DateTime), new SqlParameter("@TestTime", SqlDbType.DateTime), new SqlParameter("@CheckTime", SqlDbType.DateTime), new SqlParameter("@FinalTime", SqlDbType.DateTime), new SqlParameter("@InsertTime", SqlDbType.DateTime), new SqlParameter("@ReportID", SqlDbType.VarChar,50), new SqlParameter("@OrderNo", SqlDbType.Int), new SqlParameter("@FilePath", SqlDbType.VarChar,500), new SqlParameter("@IsActive", SqlDbType.Int), }; parameters[0].Value = info.PatientName; parameters[1].Value = info.GenderName; parameters[2].Value = info.AgeStr; parameters[3].Value = info.CID; parameters[4].Value = info.PatientID; parameters[5].Value = info.ClinicName; parameters[6].Value = info.VisitTimes; parameters[7].Value = info.DeptName; parameters[8].Value = info.Doctor; parameters[9].Value = info.BedNo; parameters[10].Value = info.ClinicalDiagnosis; parameters[11].Value = info.Explanation; parameters[12].Value = info.SectionNo; parameters[13].Value = info.SerialNo; parameters[14].Value = info.SampleNo; parameters[15].Value = info.SampleTypeNo; parameters[16].Value = info.SampleTypeName; parameters[17].Value = info.Memo; parameters[18].Value = info.Comment; parameters[19].Value = info.Description; parameters[20].Value = info.Technician; parameters[21].Value = info.Checker; parameters[22].Value = info.ReportContent; parameters[23].Value = this.GetDateValue(info.ReceiveTime); parameters[24].Value = this.GetDateValue(info.CollectTime); parameters[25].Value = this.GetDateValue(info.InceptTime); parameters[26].Value = this.GetDateValue(info.TestTime); parameters[27].Value = this.GetDateValue(info.CheckTime); parameters[28].Value = this.GetDateValue(info.FinalTime); parameters[29].Value = DateTime.Now; parameters[30].Value = info.ReportID; parameters[31].Value = order; parameters[32].Value = filePath; parameters[33].Value = 1; int res = ExecuteSql(sb.ToString(), parameters); return res; }