118 lines
4.6 KiB
C#
118 lines
4.6 KiB
C#
using HL_FristAidPlatform_Help;
|
|
using HL_FristAidPlatform_IDataBase;
|
|
using HL_FristAidPlatform_Models;
|
|
using SqlSugar;
|
|
using System.Collections.Generic;
|
|
|
|
namespace HL_FristAidPlatform_DataBase
|
|
{
|
|
/// <summary>
|
|
/// 溶栓筛查表信息记录
|
|
/// </summary>
|
|
public class T_Service_ChestPain_ThrombolysisScreeningDB : BaseDB, IT_Service_ChestPain_ThrombolysisScreening
|
|
{
|
|
public SqlSugarClient db = GetClient();
|
|
|
|
/// <summary>
|
|
/// 增加一条数据
|
|
/// </summary>
|
|
public T_Service_ChestPain_ThrombolysisScreening Add(T_Service_ChestPain_ThrombolysisScreening model)
|
|
{
|
|
return db.Insertable(model).ExecuteReturnEntity();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 更新一条数据
|
|
/// </summary>
|
|
public bool Update(T_Service_ChestPain_ThrombolysisScreening model)
|
|
{
|
|
return db.Updateable(model).ExecuteCommand() == 0 ? false : true;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除一条数据
|
|
/// </summary>
|
|
public bool Delete(long ID)
|
|
{
|
|
return db.Deleteable<T_Service_ChestPain_ThrombolysisScreening>(it => it.ID == ID).ExecuteCommand() == 0 ? false : true; ;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获得数据列表
|
|
/// </summary>
|
|
public TableModel<T_Service_ChestPain_ThrombolysisScreening> GetPageList(int pageIndex, int pageSize)
|
|
{
|
|
int total = 0;
|
|
List<T_Service_ChestPain_ThrombolysisScreening> data = db.Queryable<T_Service_ChestPain_ThrombolysisScreening>().Where(it => it.DeleteFlag == 0).ToPageList(pageIndex, pageSize, ref total);
|
|
TableModel<T_Service_ChestPain_ThrombolysisScreening> t = new TableModel<T_Service_ChestPain_ThrombolysisScreening>();
|
|
t.Code = 0;
|
|
t.PageCount = data.Count;
|
|
t.TotalNumber = total;
|
|
t.Data = data;
|
|
t.Msg = "成功";
|
|
return t;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获得前几行数据
|
|
/// </summary>
|
|
public T_Service_ChestPain_ThrombolysisScreening Get(long ID)
|
|
{
|
|
return db.Queryable<T_Service_ChestPain_ThrombolysisScreening>().First(it => it.ID == ID);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据患者编号(GUID)+所属报表类型 获取数据信息
|
|
/// </summary>
|
|
/// <param name="patientGuid">病人编号(GUID)</param>
|
|
/// <returns></returns>
|
|
public TableModel<T_Service_ChestPain_ThrombolysisScreening> GetByPatientGuid(string patientGuid)
|
|
{
|
|
TableModel<T_Service_ChestPain_ThrombolysisScreening> t = new TableModel<T_Service_ChestPain_ThrombolysisScreening>();
|
|
|
|
var listMode = db.Queryable<T_Service_ChestPain_ThrombolysisScreening>().Where(it => it.PatientGuid == patientGuid && it.DeleteFlag == 0)
|
|
.Select(it => new T_Service_ChestPain_ThrombolysisScreening
|
|
{
|
|
ID = it.ID,
|
|
GUID = it.GUID,
|
|
PatientGuid = it.PatientGuid,
|
|
EcgResult = it.EcgResult,
|
|
Indication_1 = it.Indication_1,
|
|
Indication_2 = it.Indication_2,
|
|
Indication_3 = it.Indication_3,
|
|
Indication_4 = it.Indication_4,
|
|
Indication_5 = it.Indication_5,
|
|
Indication_6 = it.Indication_6,
|
|
Contraindication_1 = it.Contraindication_1,
|
|
Contraindication_2 = it.Contraindication_2,
|
|
Contraindication_3 = it.Contraindication_3,
|
|
Contraindication_4 = it.Contraindication_4,
|
|
Contraindication_5 = it.Contraindication_5,
|
|
Contraindication_6 = it.Contraindication_6,
|
|
Contraindication_7 = it.Contraindication_7,
|
|
Contraindication_8 = it.Contraindication_8,
|
|
Contraindication_9 = it.Contraindication_9,
|
|
Contraindication_10 = it.Contraindication_10,
|
|
Contraindication_11 = it.Contraindication_11,
|
|
Contraindication_12 = it.Contraindication_12,
|
|
Conclusion = it.Conclusion,
|
|
Doctor = it.Doctor,
|
|
ScreeningTime = it.ScreeningTime,
|
|
DeleteFlag = it.DeleteFlag,
|
|
CreationDate = it.CreationDate,
|
|
CreatorID = it.CreatorID,
|
|
Creator = it.Creator,
|
|
EditTime = it.EditTime,
|
|
EditorID = it.EditorID,
|
|
Editor = it.Editor,
|
|
}).OrderBy(it => it.ID, OrderByType.Desc).ToList();
|
|
|
|
t.Code = 0;
|
|
t.TotalNumber = listMode.Count;
|
|
t.Data = listMode;
|
|
t.Msg = "成功";
|
|
return t;
|
|
}
|
|
}
|
|
}
|