/// <summary> /// 编辑医嘱条目 /// </summary> /// <param name="ciOrderDO"></param> public override void EditOrder(ciorder.d.CiOrderDO ciOrderDO) { EmsRstDTO[] rsts = LoadRemote(ciOrderDO.Id_or); EmsRstDTO rst = rsts[0]; if (rst != null) { uiEmsDTO.Status = DOStatus.UPDATED; uiEmsDTO.Emsapcons.deSerializeJson((rst.Document[0] as EmsConsItemDO).serializeJson()); //String utf8Str = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(rst.DocumentString)); //uiEmsDTO.Emsapcons.deSerializeJson(utf8Str); if (rst.Extension != null && rst.Extension.Keys.Contains("CiEmsDTO")) { this.ciEmsDTO = rst.Extension["CiEmsDTO"] as CiEmsDTO; } if (rst.Extension != null && rst.Extension.Keys.Contains("MedSrvDO")) { this.uiEmsDTO.MedSrvDO = rst.Extension["MedSrvDO"] as MedSrvDO; } // 附加手术项目 if (uiEmsDTO.Emsapcons.ConsAssList != null) { uiEmsDTO.Emsapcons.ConsAssList.Cast <EmsItemInCons>().ToList().ForEach(p => { uiEmsDTO.Emsapcons.EmsConsAssistItem.Add(p); }); if (uiEmsDTO.Emsapcons.EmsConsAssistItem.Count > 0) { uiEmsDTO.Emsapcons.Id_dep_emp = uiEmsDTO.Emsapcons.EmsConsAssistItem[0].Id_dep_emp; uiEmsDTO.Emsapcons.Name_dep_emp = uiEmsDTO.Emsapcons.EmsConsAssistItem[0].Name_dep_emp; uiEmsDTO.Emsapcons.Id_emp_doctor = uiEmsDTO.Emsapcons.EmsConsAssistItem[0].Id_emp_doctor; uiEmsDTO.Emsapcons.Name_emp_doctor = uiEmsDTO.Emsapcons.EmsConsAssistItem[0].Name_emp_doctor; } } // 状态处理 uiEmsDTO.Emsapcons.Status = uiEmsDTO.Status; this.tableDataSource.Add(uiEmsDTO.Emsapcons); this.ciEmsDTO.Status = DOStatus.UPDATED; this.uiEmsDTO.Status = DOStatus.UPDATED; // 处理分拣费用项目 HandleExpenseItems(ciEmsDTO); } }
/// <summary> /// 编辑医疗单 /// </summary> /// <param name="ciOrderDO"></param> public override void EditOrder(ciorder.d.CiOrderDO ciOrderDO) { EmsRstDTO[] rsts = LoadRemote(ciOrderDO.Id_or); EmsRstDTO rst = rsts[0]; if (rst != null) { uiEmsDTO.Emsapop.deSerializeJson((rst.Document[0] as EmsOpitemDO).serializeJson()); //String utf8Str = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(rst.DocumentString)); //uiEmsDTO.Emsapop.deSerializeJson(utf8Str); if (rst.Extension != null && rst.Extension.Keys.Contains("CiEmsDTO")) { this.ciEmsDTO = rst.Extension["CiEmsDTO"] as CiEmsDTO; } if (rst.Extension != null && rst.Extension.Keys.Contains("MedSrvDO")) { this.uiEmsDTO.MedSrvDO = rst.Extension["MedSrvDO"] as MedSrvDO; strSd_srvtp = this.uiEmsDTO.MedSrvDO.Sd_srvtp; } if (rst.Extension != null && rst.Extension.Keys.Contains("MpDepFilter")) { idDepMps = rst.Extension["MpDepFilter"] as String; } // 附加手术项目 if (uiEmsDTO.Emsapop.OpAppendList != null) { uiEmsDTO.Emsapop.OpAppendList.Cast <EmsItemInOp>().ToList().ForEach(p => { uiEmsDTO.Emsapop.OpAppendOpItem.Add(p); }); } // 手术人员 if (uiEmsDTO.Emsapop.OpPersonList != null) { uiEmsDTO.Emsapop.OpPersonList.Cast <EmsItemInOp>().ToList().ForEach(p => { uiEmsDTO.Emsapop.OpEmpItem.Add(p); }); } // 手术物品 if (uiEmsDTO.Emsapop.OpDrugList != null) { uiEmsDTO.Emsapop.OpDrugList.Cast <EmsItemInOp>().ToList().ForEach(p => { uiEmsDTO.Emsapop.OpMmItem.Add(p); }); } // 手术动态检查指标 if (uiEmsDTO.Emsapop.OpCheckIndicatorList != null) { uiEmsDTO.Emsapop.OpCheckIndicatorList.Cast <OrdApSugViewItemDO>().ToList().ForEach(p => { uiEmsDTO.Emsapop.OpLabItem.Add(p); }); } // 附加手术信息转换 this.OpAppendItem2OpexInfo(); tableDatasource.Add(uiEmsDTO.Emsapop); this.ciEmsDTO.Status = DOStatus.UPDATED; this.uiEmsDTO.Status = DOStatus.UPDATED; // 处理分拣费用项目 HandleExpenseItems(ciEmsDTO); } }