/// <summary> /// 获取麻醉单血气记录 /// </summary> /// <param name="patientID"></param> /// <param name="visitID"></param> /// <param name="operID"></param> /// <returns></returns> public List <BloodGasMaster> GetBloodGasItems(string patientID, int visitID, int operID) { List <BloodGasMaster> list = new List <BloodGasMaster>(); string[] detailList = ExtendApplicationContext.Current.DefaultBloodGasItem.ToArray(); List <MED_BLOOD_GAS_MASTER> bloodGasMasterDataTable = operationInfoRepository.GetBloodGasMasterList(patientID, visitID, operID).Data; if (bloodGasMasterDataTable != null && bloodGasMasterDataTable.Count > 0) { List <MED_BLOOD_GAS_DETAIL> bloodGasDetailDataTable = null; bloodGasMasterDataTable.ForEach(row => { if (null == row.NURSE_MEMO2 || string.IsNullOrEmpty(row.NURSE_MEMO2)) { string typeName = "静脉"; if (!string.IsNullOrEmpty(row.NURSE_MEMO1)) { typeName = row.NURSE_MEMO1; } else { typeName = "静脉"; } BloodGasMaster item = new BloodGasMaster(); item.DetailId = row.DETAIL_ID; item.DisplayName = typeName + "血气"; item.Recorddate = row.RECORD_DATE; bloodGasDetailDataTable = operationInfoRepository.GetBloodGasDetailList(row.DETAIL_ID).Data; if (bloodGasDetailDataTable != null && bloodGasDetailDataTable.Count > 0) { bloodGasDetailDataTable.ForEach(gasRow => { BloodGasDetail detail = null; detail = new BloodGasDetail(); detail.DetailId = gasRow.DETAIL_ID; detail.BloodGasCode = gasRow.BLG_CODE; detail.BloodGasValue = !string.IsNullOrEmpty(gasRow.BLG_VALUE) ? gasRow.BLG_VALUE : ""; item.Details.Add(detail); }); } list.Add(item); } }); } if (list.Count > 0) { foreach (BloodGasMaster item in list) { foreach (BloodGasDetail detail in item.Details) { if (ExtendApplicationContext.Current.BloodGasItemDict.ContainsKey(detail.BloodGasCode)) { detail.BloodGasName = ExtendApplicationContext.Current.BloodGasItemDict[detail.BloodGasCode]; } } } } return(list); }
/// <summary> /// 获取麻醉单血气记录,修改数据另存 /// </summary> public List <BloodGasMaster> GetBloodGasItems(string patientID, int visitID, int operID) { List <BloodGasMaster> list = new List <BloodGasMaster>(); List <MED_BLOOD_GAS_DICT> bloodGasDict = ApplicationModel.Instance.AllDictList.BloodGasDictList; string[] detailList = ExtendAppContext.Current.DefaultBloodGasItem.ToArray(); List <MED_BLOOD_GAS_MASTER> bloodGasMasterDataTable = AnesInfoService.ClientInstance.GetBloodGasMasterList(patientID, visitID, operID); if (bloodGasMasterDataTable != null && bloodGasMasterDataTable.Count > 0) { List <MED_BLOOD_GAS_DETAIL_SHOW> bloodGasDetailDataTable = null; bloodGasMasterDataTable.ForEach(row => { if (!string.IsNullOrEmpty(row.NURSE_MEMO2) && row.NURSE_MEMO2.StartsWith("ok@")) { string typeName = "静脉"; if (!string.IsNullOrEmpty(row.NURSE_MEMO1)) { typeName = row.NURSE_MEMO1; } BloodGasMaster item = new BloodGasMaster(); item.DetailId = row.DETAIL_ID; item.DisplayName = typeName + "血气"; item.Recorddate = row.RECORD_DATE; //bloodGasDetailDataTable = AnesInfoService.ClientInstance.GetBloodGasDetailList(row.DETAIL_ID); bloodGasDetailDataTable = this.GetDetailShowList(row.DETAIL_ID); if (bloodGasDetailDataTable != null && bloodGasDetailDataTable.Count > 0) { bloodGasDetailDataTable.ForEach(detailRow => { if (!string.IsNullOrEmpty(detailRow.BLG_VALUE)) { //foreach (var bloodGasDictItem in bloodGasDict) //{ //MED_BLOOD_GAS_DETAIL tmpItem = bloodGasDetailDataTable.Find(x => x.BLG_CODE == bloodGasDictItem.BLG_CODE); //if (bloodGasDictItem != null && !string.IsNullOrEmpty(tmpItem.BLG_VALUE)) //{ BloodGasDetail detail = null; detail = new BloodGasDetail(); detail.DetailId = detailRow.DETAIL_ID; detail.BloodGasCode = detailRow.BLG_CODE; detail.BloodGasValue = !string.IsNullOrEmpty(detailRow.BLG_VALUE) ? detailRow.BLG_VALUE : ""; item.Details.Add(detail); } }); } list.Add(item); } }); } if (list.Count > 0) { foreach (BloodGasMaster item in list) { foreach (BloodGasDetail detail in item.Details) { if (ExtendAppContext.Current.BloodGasItemDict.ContainsKey(detail.BloodGasCode)) { detail.BloodGasName = ExtendAppContext.Current.BloodGasItemDict[detail.BloodGasCode]; } } } } return(list); }