148 lines
6.1 KiB
C#
148 lines
6.1 KiB
C#
using HL_FristAidPlatform_Help;
|
|
using HL_FristAidPlatform_Help.Model;
|
|
using HL_FristAidPlatform_IDataBase.Service;
|
|
using HL_FristAidPlatform_Models;
|
|
using HL_FristAidPlatform_Models.Sercice;
|
|
using SqlSugar;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HL_FristAidPlatform_DataBase
|
|
{
|
|
public class T_Service_Apoplexy_FollowUpAndHealthInfoDB : BaseDB, IT_Service_Apoplexy_FollowUpAndHealthInfo
|
|
{
|
|
public SqlSugarClient db = GetClient();
|
|
|
|
//新增
|
|
public T_Service_Apoplexy_FollowUpAndHealthInfo Add(T_Service_Apoplexy_FollowUpAndHealthInfo model)
|
|
{
|
|
return db.Insertable(model).ExecuteReturnEntity();
|
|
}
|
|
//修改
|
|
public int Update(T_Service_Apoplexy_FollowUpAndHealthInfo model)
|
|
{
|
|
return db.Updateable(model).ExecuteCommand();
|
|
}
|
|
|
|
//仅更新赋值字段
|
|
public int UpdateNotNullColumns(T_Service_Apoplexy_FollowUpAndHealthInfo model)
|
|
{
|
|
|
|
return db.Updateable(model).IgnoreColumns(ignoreAllNullColumns: true).WhereColumns(it => new { it.PatientGuid }).ExecuteCommand();
|
|
}
|
|
|
|
//根据Guid查询
|
|
public T_Service_Apoplexy_FollowUpAndHealthInfo GetByPatientGuid(string PatientGuid)
|
|
{
|
|
return db.Queryable<T_Service_Apoplexy_FollowUpAndHealthInfo>().First(it => it.PatientGuid == PatientGuid);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据guid获取患者基础信息
|
|
/// </summary>
|
|
/// <param name="PatientGuid"></param>
|
|
/// <returns></returns>
|
|
public TableModel<T_Service_Apoplexy_FollowUpAndHealthInfo> GetByPatientGuid1(string PatientGuid)
|
|
{
|
|
TableModel<T_Service_Apoplexy_FollowUpAndHealthInfo> t = new TableModel<T_Service_Apoplexy_FollowUpAndHealthInfo>();
|
|
List<T_Service_Apoplexy_FollowUpAndHealthInfo> list = new List<T_Service_Apoplexy_FollowUpAndHealthInfo>();
|
|
var listModel = db.Queryable<T_Service_Apoplexy_FollowUpAndHealthInfo>()
|
|
.Where(a => a.DeleteFlag == 0 && a.PatientGuid == PatientGuid)
|
|
.Select(a => new T_Service_Apoplexy_FollowUpAndHealthInfo
|
|
{
|
|
ID = a.ID,
|
|
GUID = a.GUID,
|
|
PatientGuid=a.PatientGuid,
|
|
Temperature=a.Temperature,
|
|
DeleteFlag = a.DeleteFlag,
|
|
Pulse = a.Pulse,
|
|
Breathe = a.Breathe,
|
|
SBP = a.SBP,
|
|
DBP=a.DBP,
|
|
Consciousness = a.Consciousness,
|
|
PupilLSize = a.PupilLSize,
|
|
PupilRSize = a.PupilRSize,
|
|
ReflectionToLightL = a.ReflectionToLightL,
|
|
ReflectionToLightR = a.ReflectionToLightR,
|
|
Muscle = a.Muscle,
|
|
MuscleRT = a.MuscleRT,
|
|
MuscleRB = a.MuscleRB,
|
|
MuscleLT = a.MuscleLT,
|
|
MuscleLB = a.MuscleLB,
|
|
GCSScore1 = a.GCSScore1,
|
|
NIHSSScore1 = a.NIHSSScore1,
|
|
ADLScore = a.ADLScore,
|
|
ADLLevel = a.ADLLevel,
|
|
VTERisk = a.VTERisk,
|
|
FallRisk = a.FallRisk,
|
|
PressureInjuryRisk = a.PressureInjuryRisk,
|
|
Swallow = a.Swallow,
|
|
SwallowDegree = a.SwallowDegree,
|
|
NutritionalRisk = a.NutritionalRisk,
|
|
NutritionalRiskScore = a.NutritionalRiskScore,
|
|
PastMedicalHistory = a.PastMedicalHistory,
|
|
PastMedicalHistoryOther = a.PastMedicalHistoryOther,
|
|
FamilyHistory = a.FamilyHistory,
|
|
IsMedication = a.IsMedication,
|
|
Medication = a.Medication,
|
|
MedicationOther = a.MedicationOther,
|
|
MedicationCompliance = a.MedicationCompliance,
|
|
AllergicHistory = a.AllergicHistory,
|
|
EatingHabits = a.EatingHabits,
|
|
Movement = a.Movement,
|
|
SmokingSituation = a.SmokingSituation,
|
|
SmokingNum = a.SmokingNum,
|
|
DrinkingSituation = a.DrinkingSituation,
|
|
DrinkingSituationDetail = a.DrinkingSituationDetail,
|
|
Assessor = a.Assessor,
|
|
AssessorDate = a.AssessorDate,
|
|
DrugUseIn = a.DrugUseIn,
|
|
DrugUseInOther = a.DrugUseInOther,
|
|
AdverseReactions = a.AdverseReactions,
|
|
AdverseReactionsDescription = a.AdverseReactionsDescription,
|
|
BloodTest = a.BloodTest,
|
|
OtherTest = a.OtherTest,
|
|
LifestyleGuidance = a.LifestyleGuidance,
|
|
Intervention = a.Intervention,
|
|
SpecialIntervention = a.SpecialIntervention,
|
|
OtherIntervention = a.OtherIntervention,
|
|
DischargeSituation = a.DischargeSituation,
|
|
GCSScore2 = a.GCSScore2,
|
|
NIHSSScore2 = a.NIHSSScore2,
|
|
TakeDrugs = a.TakeDrugs,
|
|
ASPLCRPUsage = a.ASPLCRPUsage,
|
|
SSLBGLUsage = a.SSLBGLUsage,
|
|
ATFTTGUsage = a.ATFTTGUsage,
|
|
BHSALDPUsage = a.BHSALDPUsage,
|
|
EBSTUsage = a.EBSTUsage,
|
|
AKBTUsage = a.AKBTUsage,
|
|
EJSGUsage = a.EJSGUsage,
|
|
GLQTHSUsage = a.GLQTHSUsage,
|
|
XBDPKSUsage = a.XBDPKSUsage,
|
|
DrugOther = a.DrugOther,
|
|
DischargeSymptoms = a.DischargeSymptoms,
|
|
ConsciousnessIssue = a.ConsciousnessIssue,
|
|
DischargeMuscleRT = a.DischargeMuscleRT,
|
|
DischargeMuscleRB = a.DischargeMuscleRB,
|
|
DischargeMuscleLT = a.DischargeMuscleLT,
|
|
DischargeMuscleLB = a.DischargeMuscleLB,
|
|
Complication = a.Complication,
|
|
SelfCareAbility = a.SelfCareAbility,
|
|
Mastery120 = a.Mastery120,
|
|
ConceptAndRiskLevel = a.ConceptAndRiskLevel,
|
|
}).ToList();
|
|
list = listModel;
|
|
t.Code = 0;
|
|
t.PageCount = list.Count;
|
|
t.TotalNumber = list.Count;
|
|
t.Data = list;
|
|
t.Msg = "成功";
|
|
return t;
|
|
|
|
}
|
|
}
|
|
}
|