public static SqliteOptions CreateInstance() { if (Instance == null) { lock (LockHelper) { if (Instance == null) { Instance = new SqliteOptions(); } } } return(Instance); }
private void SelEcgList(string patientId) { SelEcgData selEcgData = delegate() { var so = new CommonProj.SqliteOptions(); string sqsel = "select distinct(dp.wardshipId) as wardshipId,errorLead,CompressType,'查阅与诊断' as EcgAnalisis,'删除' as DeleteEcgData,'申请' as LongConnect,'打印' as FastPrint,dp.ApplicationID,Status,InterpretationStatus,replace(ReportTitleName,'心电图报告','')as OrgName,LEU,NIT,UBG,PRO,PH,BLD,KET,BIL,GLU,VC,SG,Mmol,Spo2,DIA,SYS,Temperature from Tb_Application dp left join Tb_ReportTitle rt on dp.ApplicationID=rt.ApplicationID where dp.PatientID='" + patientId + "' "; _dtEcgDataList = so.ExcuteSqlite(sqsel); if (null != _dtEcgDataList) { for (int i = 0; i < _dtEcgDataList.Rows.Count; i++) { string status = _dtEcgDataList.Rows[i]["Status"].ToString(); if (status == "1") //未申请 { _dtEcgDataList.Rows[i]["LongConnect"] = AppName; } else if (status == "2") //已申请,但未判读完成 { _dtEcgDataList.Rows[i]["LongConnect"] = "正在判读中"; } else if (status == "3") //已申请,远程判读完成 { _dtEcgDataList.Rows[i]["LongConnect"] = "判读完成"; _dtEcgDataList.Rows[i]["InterpretationStatus"] = "已判读"; } else if (status == "4") //已申请,但是数据发送失败 { _dtEcgDataList.Rows[i]["LongConnect"] = "正在申请中"; } } } gc_EcgList.DataSource = _dtEcgDataList; }; gc_EcgList.Invoke(selEcgData); }