AIMS/AIMSEntity/Extensions/BOperationReview.cs
2022-11-08 14:33:16 +08:00

45 lines
3.1 KiB
C#

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 of1.ApplyId,OperationRoom,PlanOrder ,OrderOperationTime , of1.ApplyDepName,of1.SickBed, of1.MdrecNo, of1.PatientName, of1.Sex, of1.Age,of1.ApplyDiagnoseInfoName, of1.ApplyOperationInfoName,of1.OperationDoctor, of1.Assistant1 Assistant, " +
" of1.AnaesthesiaMethodName , of1.AnesthesiaDoctor , of1.InstrumentNurse , of1.TourNurse , of1.Remark,of1.OperationType" +
" FROM V_OperationFront of1 WHERE of1.PlanOperationTime>='" + BeginDate + "' AND of1.PlanOperationTime<'" + EndDate + "' Order By OperationRoomID,PlanOrder";
return HelperDB.DbHelperSQL.GetDataTable(strSql);
}
public static DataTable GetOperationPlanDataTable(string ApplyId)
{
string strSql = "SELECT of1.ApplyId,OperationRoom,PlanOrder ,OrderOperationTime , of1.ApplyDepName,of1.SickBed, of1.MdrecNo, of1.PatientName, of1.Sex, of1.Age,of1.ApplyDiagnoseInfoName, of1.ApplyOperationInfoName,of1.OperationDoctor, of1.Assistant1 Assistant, " +
" of1.AnaesthesiaMethodName , of1.AnesthesiaDoctor , of1.InstrumentNurse , of1.TourNurse , of1.Remark ,of1.OperationType " +
" FROM V_OperationFront of1 WHERE " + ApplyId + " ";
return HelperDB.DbHelperSQL.GetDataTable(strSql);
}
}
}