using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; namespace AIMSBLL { public class BOperationReview { public static DataTable GetOperationReviewDataTable(string MdrecNo, string PatientName, string OperationBeginTime, string OperationEndTime) { string strSql = " SELECT of1.PatientId, of1.ApplyId, of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.ApplyDepName, of1.PatientKind," + " of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," + " of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType," + " of1.[State],od.DiagnoseInfoName, od.OperationInfoName," + " od.OperationBeginTime,od.OperationEndTime," + " od.AnaesthesiaMethodName, od.OperationCutTypeName," + " od.OperationBodyPositionName, od.OperationPositionName," + " od.OperationDoctor, od.Assistant, od.AnesthesiaDoctor," + " od.Nurse, od.Remarks,of1.MedicalRecord,of1.MedicalRecordTime FROM V_OperationDoing od" + " LEFT JOIN V_OperationFront of1 ON of1.PatientId = od.PatientId WHERE (of1.MdrecNo ='" + MdrecNo + "' OR of1.PatientName LIKE '" + PatientName + "%')" + " AND od.OperationBeginTime >='" + OperationBeginTime + "' AND od.OperationBeginTime <'" + OperationEndTime + "' AND " + " od.[State] IN ('手术结束','麻醉恢复结束')"; return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } public static DataTable GetOperationPlanDataTable(DateTime BeginDate, DateTime EndDate, string DepName) { string strSql = "SELECT CONVERT(VARCHAR(16),OperationRoom)+'-'+CONVERT(VARCHAR(16),PlanOrder ) as OperationRoom , of1.ApplyDepName,of1.SickBed, of1.Contagion, of1.MdrecNo, of1.PatientName, of1.Sex, of1.BirthDay, " + " of1.OrderOperationTime PlanOperationTime,of1.ApplyDiagnoseInfoName, of1.ApplyOperationInfoName,of1.OperationDoctor," + " of1.AnaesthesiaMethodName , of1.AnesthesiaDoctor ," + " of1.InstrumentNurse AS InstrumentNurse, of1.TourNurse AS TourNurse, of1.Remark " + " FROM V_OperationFront of1 WHERE of1.PlanOperationTime>='" + BeginDate + "' AND of1.PlanOperationTime<'" + EndDate + "' AND of1.ApplyDepName LIKE '%%'"; return HelperDB.DbHelperSQL.GetDataTable(strSql); } public static DataTable GetOperationPlanDataTable(string ApplyId) { string strSql = "SELECT of1.OperationRoom, of1.ApplyDepName,of1.SickBed, of1.Contagion, of1.MdrecNo, of1.PatientName, of1.Sex, of1.BirthDay, " + " of1.OrderOperationTime PlanOperationTime,of1.ApplyDiagnoseInfoName, of1.ApplyOperationInfoName,of1.OperationDoctor," + " of1.AnaesthesiaMethodName , (of1.AnesthesiaDoctor + ' ' +of1.AnesthesiaDoctorSucceed) AS AnesthesiaDoctor," + " (of1.InstrumentNurse +' '+ of1.InstrumentNurseSucceed) AS InstrumentNurse,(of1.TourNurse + ' '+of1.TourNurseSucceed) AS TourNurse, of1.Remark " + " FROM V_OperationFront of1 WHERE " + ApplyId + " "; return HelperDB.DbHelperSQL.GetDataTable(strSql); } } }