public MmForm(XapDataList <EmsOrDrug> list) : this() { mm = new MmRefView(list); mm.DoubleClickEvent += new EventHandler(mm_DoubleClickEvent); this.Panel = mm; }
protected override ciordems.d.EmsOrDrug[] Convert2Drugs(iih.ci.ord.dto.d.CiOrAggAndRelInfo info, object viewModel) { if (viewModel == null || !(viewModel is XapDataList <EmsPathgyItemDO>)) { return(null); } XapDataList <EmsPathgyItemDO> drugList = viewModel as XapDataList <EmsPathgyItemDO>; CiOrderDO ord = info.OrAggDO.getParentDO(); FMap orSrvMmMap = info.OrSrvMmMap; List <EmsOrDrug> szDrugs = new List <EmsOrDrug>(); Dictionary <String, object> tmpCacheSrv = new Dictionary <string, object>(); // 处理医嘱带过来的信息 EmsPathgyItemDO consItemDO = null; if (drugList.Count > 0) { consItemDO = drugList[0]; tmpCacheSrv.Add(consItemDO.Id_srv, consItemDO); // szDrugs.Add(EmsOrDrugFromEmsPathgyItemDO(consItemDO)); } // 处理附加项 szDrugs.AddRange(ToEmsOrDrugs(info.OrAggDO, tmpCacheSrv, info.OrSrvMmMap, info.BlSrvMap)); return(szDrugs.ToArray()); }
public XapDataList <EmsOrDrug> GetBdSrvMM(string id_srv) { XapDataList <EmsOrDrug> list = new XapDataList <EmsOrDrug>(); //OrdSrvMmDO[] srvmms = serviceMm.find("a0.id_orsrv = '" + id_srv + "'", "", false); //if (srvmms != null && srvmms.Count() > 0) //{ // foreach (OrdSrvMmDO srvmm in srvmms) // { // EmsOrDrug drug = new EmsOrDrug(); // drug.Id_mm = srvmm.Id_mm; // drug.Id_mmtp = srvmm.Id_mmtp; // drug.Name_mm = srvmm.Name_mm; // drug.Spec_mm = ""; // drug.Des = srvmm.Ds_name; // //todo // list.Add(drug); // } //} return(list); }
public XapDataList <EmsObsItemDO> getLabImplList(EmsUIDTO headDO, MedsrvAggDO[] medsrvagg) { XapDataList <EmsObsItemDO> list = new XapDataList <EmsObsItemDO>(); if (medsrvagg != null && medsrvagg.Length > 0) { int i = 1; foreach (MedsrvAggDO medsrvAgg in medsrvagg) { EmsObsItemDO labItem = new EmsObsItemDO(); headDO.Emsaplab.Name_samptp = medsrvAgg.getMedSrvLisDO()[0].Samptp_name; headDO.Emsaplab.Id_samptp = medsrvAgg.getMedSrvLisDO()[0].Samptp_code; headDO.Emsaplab.Id_srv = medsrvAgg.getParentDO().Id_srv; headDO.Emsaplab.Id_srvtp = medsrvAgg.getParentDO().Id_srvtp; headDO.Emsaplab.Name_srv = medsrvAgg.getParentDO().Name; headDO.Emsaplab.Des_sympsign = medsrvAgg.getMedSrvLisDO()[0].Note; headDO.Emsaplab.Des_sympsign = medsrvAgg.getMedSrvLisDO()[0].Note; labItem.Name_srv = medsrvAgg.getParentDO().Name; labItem.Des_sympsign = medsrvAgg.getParentDO().Note; headDO.Emsaplab.Des_sympsign = medsrvAgg.getParentDO().Note; labItem.Sortno = i; i++; list.Add(labItem); } } return(list); }
public CiOrderDO New_Save() { this.uiEmsDTO.Emsapcons.Id_srvof = emsMgrDTO.Id_ems; //处理草药的代煎付数 if (true == this.uiEmsDTO.Emsdrugs.Fg_boil) { this.uiEmsDTO.Emsdrugs.Orders_boil = this.uiEmsDTO.Emsdrugs.Orders; } else { this.uiEmsDTO.Emsdrugs.Orders_boil = 0; } this.uiEmsDTO.Emsdrugs.EmsOrDrugListEx.Clear(); XapDataList <EmsOrDrug> drugList = this.uiEmsDTO.Emsdrugs.EmsOrDrugList; foreach (EmsOrDrug drug in this.uiEmsDTO.Emsdrugs.EmsOrDrugList) { this.uiEmsDTO.Emsdrugs.EmsOrDrugListEx.Add(drug); } EmsRstDTO rst = SaveRemote(this.uiEmsDTO.Emsdrugs); if (rst != null) { return((rst.Document[0] as CiorderAggDO).getParentDO()); } return(null); }
public override void EditEms(CiEmsDTO ems) { base.EditEms(ems); orCiEmsToUiEms.EditApbtuse(uiEmsDTO, ems); var srvCommon = (CiEmsSrvDTO)ems.Emssrvs[0]; var service = XapServiceMgr.find <IMedsrvMDOCrudService>(); //查询用血对应的服务 uiEmsDTO.MedSrvDO = service.findById(srvCommon.Id_srv); var btService = XapServiceMgr.find <ICiorappbtMDOCrudService>(); OrdApBtDO[] btdos = btService.find("a0.id_or='" + ems.Id_or_rel + "'", null, FBoolean.False); OrdApBtDO btdo = btdos[0]; this.uiEmsDTO.CiordubDTO.Id_mp_dep = srvCommon.Id_dep; this.uiEmsDTO.CiordubDTO.Name_mp_dep = srvCommon.Name_dep; uiEmsDTO.CiordubDTO.Applyform = btdo.No_applyform; uiEmsDTO.CiordubDTO.Dt_bt_pl = Convert.ToDateTime(btdo.Dt_bt_pl); uiEmsDTO.CiordubDTO.Num_margin_bu = btdo.Num_margin_bu; uiEmsDTO.CiordubDTO.Quan_medu = btdo.Num_margin_bu; uiEmsDTO.CiordubDTO.Des_or = ems.Note; tableDatasource = new XapDataList <CiordubDTO>(); tableDatasource.Add(uiEmsDTO.CiordubDTO); }
public XapDataList <OrdSrvDO> getDataSource(string[] id_ors) { ICiorderCrudService ciorderService = XapServiceMgr.find <ICiorderCrudService>(); CiorderAggDO[] ciordAggDOs = ciorderService.findByBIds(id_ors, FBoolean.False); //医保审核数据 XapDataList <OrdSrvDO> hpData = new XapDataList <OrdSrvDO>(); foreach (CiorderAggDO aggDO in ciordAggDOs) { CiOrderDO ciOrderDO = aggDO.getParentDO(); if (ciOrderDO.Eu_hpindicjudge == (int)HpIndicJudgeEnum.NONEEDJUDGE) { continue; } OrdSrvDO[] ordSrvDOs = aggDO.getOrdSrvDO(); foreach (OrdSrvDO ordSrvDO in ordSrvDOs) { // 如果是药品 并且是待判断的,才显示,非药品的不显示 if (ciOrderDO.Sd_srvtp.StartsWith(BdSrvTpDictCodeConst.SD_SRVTP_DRUG)) { if (ordSrvDO.Fg_hpindicjudged == (int)HpIndicJudgeEnum.WAITINGJUDGE) { hpData.Add(ordSrvDO); } } else if (ordSrvDO.Fg_bl == FBoolean.True) { hpData.Add(ordSrvDO); } } } return(hpData); }
/// <summary> /// 拼接受邀科室、受邀医生 /// </summary> /// <param name="itemList"></param> /// <returns></returns> public static string ConstructInvitedDeptInfo(XapDataList <EmsItemInCons> itemList) { string info = ""; if (itemList != null) { foreach (EmsItemInCons item in itemList) { // 受邀科室为空时,受邀医生肯定为空(受邀方选择框中,新增空行是受邀科室会为空值) if (string.IsNullOrEmpty(item.Name_dep_emp)) { continue; } info += "、" + item.Name_dep_emp; if (!string.IsNullOrEmpty(item.Name_emp_doctor)) { info += String.Format("({0}医生)", item.Name_emp_doctor); } } } if (!string.IsNullOrEmpty(info)) { return(info.Substring(1)); } return(""); }
public override void DeleteItemData(object value) { XapDataList <EmsOrDrug> itemList = this.GetTableDataSource() as XapDataList <EmsOrDrug>; if (itemList.Count(p => !p.IsDELETED) > 0) { EmsOrDrug item = value as EmsOrDrug; itemList.Delete(item, item.IsNEW); } // 如果模型中数据列表为空,则新建一个空数据 if (GetCountWithOutDelete() == 0) { SetSelectedObject(AddNew()); this.uiEmsDTO.Emsdrugs.Fg_self = null; this.uiEmsDTO.Emsdrugs.Fg_selfpay = null; this.uiEmsDTO.Emsdrugs.Fg_treat = null; this.uiEmsDTO.Emsdrugs.Fg_propc = null; this.uiEmsDTO.Emsdrugs.Fg_mp_in = null; this.uiEmsDTO.Emsdrugs.Id_routedes = null; this.uiEmsDTO.Emsdrugs.Name_routedes = null; this.uiEmsDTO.Emsdrugs.Note_or = null; } // 当前选中对象为最后一个可显示的有效数据 else { SetSelectedObject(itemList.LastOrDefault(p => !p.IsDELETED)); } }
void xapFormControl1_RefCanSelect(object sender, RefCanSelectEventArgs e) { if (e.BindingFieldName.Equals("Name_srv")) { string name = (string)e.SelectingData["Name"]; string id_srv = (string)e.SelectingData["Id_srv"]; XapDataList <EmsOrDrug> drugs = cof.GetSrvMm(EmsHeadDO, id_srv, EmsHeadDO.PatInfo.Code_entp); if (drugs.Count == 1 && drugs[0].Id_mm == null) { e.Cancel = true; e.Message = string.Format("服务未绑定物品,请与信息科联系!"); return; } int i = 0; foreach (EmsOrDrug routeDo in EmsHeadDO.Emsdrugs.EmsOrDrugList) { if (routeDo.Status != DOStatus.DELETED && routeDo.Name_srv == name) { i++; if (i == 1) { e.Cancel = true; e.Message = string.Format("因为重复,您选中的数据'{0}'禁止选中!", (e.SelectingData == null) ? "Null" : e.SelectingData.DisplayText); break; } } } } }
private void getDIList() { if (cidiagcard == null) { cidiagcard = new OverViewTableCard(); SecCols.AddRender(cidiagcard); cidiagcard.Text = "诊断"; } cidiagcard.Size = new Size(355, 300); List <string> fieldNameList = new List <string>(); fieldNameList.Add("name"); BindingList <object> valueList = new BindingList <object>(); if (ent4BannerDto != null && ent4BannerDto.Id_ent != null) { XapDataList <IpViewDiagDTO> listCiDi = this.model.GetDiagDataList(ent4BannerDto.Id_ent); if (listCiDi != null && listCiDi.Count > 0) { } foreach (IpViewDiagDTO item in listCiDi) { valueList.Add(item); } } cidiagcard.SetData(fieldNameList, valueList, null); }
public bool Reload(Ent4BannerDTO e) { mEnt4BannerDTO = e; if (mEnt4BannerDTO == null) { mDataSource.Clear(); return(false); } var sql = string.Format("a0.id_en='{0}'", e.Id_ent); var szCidiagAggDO = cidiagCrud.find(sql, "a0.createdtime desc", false); if (szCidiagAggDO.Length > 0) { SetCidiagAggDO(szCidiagAggDO.LastOrDefault()); } else { SetCidiagAggDO(CreateCidiagAggDO(this.mEnt4BannerDTO)); } mDataSource = (XapDataList <CiDiagItemDO>)GetCidiagAggDO().getCiDiagItemDO().ToArray(); return(szCidiagAggDO.Length > 0); }
public void init() { panelItemList = new List <BaseCheckRepoatView>(); foreach (KeyValuePair <int, object> pair in dataDic) { int key = pair.Key; switch (key) { case ReportCodeDict.HP_REPORT_CODE: XapDataList <OrdSrvDO> dataList = pair.Value as XapDataList <OrdSrvDO>; BaseCheckRepoatView reportview = new HealthCheckRepoatView(dataList, this.id_ors, ReportCodeDict.REPORT_DICT[key], key, this.ciOrderDO); panelItemList.Add(reportview); this.AddRender(reportview); break; case ReportCodeDict.UNCPOR_REPORT_CODE: XapDataList <CiOrderDO> cpordataList = pair.Value as XapDataList <CiOrderDO>; BaseCheckRepoatView cporReportview = new CporCheckRepoatView(cpordataList, this.id_ors, ReportCodeDict.REPORT_DICT[key], key); panelItemList.Add(cporReportview); this.AddRender(cporReportview); break; } } ReLocation(); this.getScrollBarRect(); }
public ConsInvitedDeptsDialog(object ds) { datasource = ds as XapDataList <EmsItemInCons>; InitializeComponent(); rootPanel = new XLayoutPanel(); this.Size = new Size(380, 300); this.Name = "受邀科室选择"; this.Panel = rootPanel; this.Panel.Size = this.Size; xapFormControl = new XapFormControl(); this.xapFormControl.AutoSize = true; rootPanel.Dock = DockStyle.None; this.xapFormControl.Context = null; //this.xapFormControl1.Dock = DockStyle.Fill; this.xapFormControl.File = null; this.xapFormControl.Location = new System.Drawing.Point(0, 0); this.xapFormControl.Name = "xapFormControl1"; this.xapFormControl.Size = new System.Drawing.Size(380, 300); this.xapFormControl.TabIndex = 0; this.xapFormControl.ViewFile = null; rootPanel.AddControl(this.xapFormControl, ControlPosition.Center); // 按钮 this.loadBottomButtons(); // 初始化事件 this.xapFormControl.Load += new EventHandler(ConsInvitedDeptsDialog_Load); this.xapFormControl.FormCreated += new EventHandler(xapFormControl_FormCreated); this.xapFormControl.ModelFilled += new EventHandler(xapFormControl_ModelFilled); this.xapFormControl.RefFilter += new EventHandler <xap.rui.control.refcontrol.events.RefActivatingEventArgs>(xapFormControl_RefFilter); }
public EmsPathgyViewModel(Ent4BannerDTO ent) : base(ent) { lstEmsPathgyItemDO = new XapDataList <EmsPathgyItemDO>(); uiEmsDTO.EmsType = EmsType.PATHGY; }
/// <summary> /// 查询诊断证明数据 /// </summary> /// <param name="id_ent"></param> public void LoadData(string id_ent) { string sql = string.Format(" id_ent='{0}'", id_ent); arryEntDiProveDOs = service.find(sql, "dt_diprove", false); lstEntDiProveDOs = new XapDataList <EntDiProveDO>(service, arryEntDiProveDOs); }
public void onSave(bool type, bool IsAdd, PatiVisitDO patientsDTO, string id_di) { if (this.CidixyAggDto != null) { XapDataList <Cidixy> xylist = this.CidixyAggDto.AggDO.getCidixy(); } }
/// <summary> /// 收集所有的执行科室 /// </summary> /// <param name="xapDataList"></param> /// <returns></returns> public static string collectIdDepmps(XapDataList <EmsOrDrug> drugList) { List <string> idList = new List <string>(); string retStrId = ""; foreach (EmsOrDrug drug in drugList) { string ids = drug.Str_mp_dep_ids; if (ids == null) { continue; } string[] idArr = ids.Split(','); foreach (string id in idArr) { if (retStrId.IndexOf(id) == -1) { retStrId += "," + id; } } } if (retStrId.Length > 0) { retStrId = retStrId.Substring(1); } return(retStrId); }
internal void save(XapDataList <OrdSrvDO> dataSource, string[] id_ors) { try { ICiOrdMaintainService service = XapServiceMgr.find <ICiOrdMaintainService>(); foreach (OrdSrvDO ordSrvDO in dataSource) { ordSrvDO.Status = DOStatus.UPDATED; if (ordSrvDO.Eu_hpdoctorjudge == 0) { ordSrvDO.Fg_hpindicjudged = (int)HpIndicJudgeEnum.WAITINGJUDGE; } else if (ordSrvDO.Eu_hpdoctorjudge == 1) { ordSrvDO.Fg_indic = true; ordSrvDO.Fg_selfpay = false; ordSrvDO.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED; } else if (ordSrvDO.Eu_hpdoctorjudge == 2) { ordSrvDO.Fg_indic = false; ordSrvDO.Fg_selfpay = true; ordSrvDO.Fg_hpindicjudged = (int)HpIndicJudgeEnum.JUDGED; } } service.saveHealthCheckReport(dataSource, id_ors); } catch (Exception ex) { ex.Publish(); } }
}//频次 protected override void OnRefResult(object sender, RefResultEventArgs e) { RefDataCollection data = e.RefResultSet; if (e.BindingFieldName == "Name_freq") { if (data.IsEmpty) { EmsHeadDO.Emsdrugs.Sd_frequnitct = null; EmsHeadDO.Emsdrugs.Id_freq = null; EmsHeadDO.Emsdrugs.Freqct = null; return; } string id_freq = data.FirstData["Id_freq"] as string;//获取字段值 EmsHeadDO.Emsdrugs.Sd_frequnitct = data.FirstData["Sd_frequnitct"] as string; EmsHeadDO.Emsdrugs.Freqct = null; this.setTime_cur(); setQauntum(this.EmsHeadDO.Emsdrugs.Orders); } if (e.BindingFieldName.Equals("Name_srv")) { //新增时候 参照写会 EmsOrDrug drugNew = gv.GetFocusedRow().RowDataSource as EmsOrDrug; if (e.RefResultSet.IsEmpty) { drugNew.Id_srv = ""; drugNew.Name_srv = ""; drugNew.Spec_mm = ""; drugNew.Quan_med = null; drugNew.Name_unit_med = ""; drugNew.Quan_cur = null; drugNew.Name_unit_sale = ""; drugNew.Note_ext = ""; drugNew.Name_mm = ""; drugNew.Name_boildes = ""; return; } string strSrv = data.FirstData["Name"].ToString(); if (EmsHeadDO.Emsdrugs.EmsOrDrugList.Count(p => p.Name_srv == strSrv) > 1) { this.ShowInfo("存在相同的服务!"); drugNew.Name_srv = null; drugNew.Id_srv = null; return; } drugNew.Quan_med = double.Parse(data.FirstData["Quan_med"].ToString()); XapDataList <EmsOrDrug> drugs = cof.GetSrvMm(EmsHeadDO, drugNew.Id_srv, EmsHeadDO.PatInfo.Code_entp); if (drugs.Count > 0) { EmsOrDrug drugRef = drugs.FirstOrDefault(); cof.CopyTo(drugRef, drugNew, "Id_srv", "Name_srv"); cof.concateExtNote(new XapDataList <EmsOrDrug>() { drugNew }, EmsHeadDO.PatInfo, EmsHeadDO); } this.setTime_cur(); setQauntum(this.EmsHeadDO.Emsdrugs.Orders); } }
/// <summary> /// 根据就诊信息费用清单数据 /// </summary> /// <returns></returns> public bool newLoad() { if (this.GetEnt4BannerDTO() == null) { return(false); } FeeListLoadDTO feeListLoadDTO = new FeeListLoadDTO(); CiEnContextDTO ciEnContextDTO = BaseEmsView.BaseEmsInfoContext["CiEnContextDTO"] as CiEnContextDTO; if (ciEnContextDTO == null) { return(false); } feeListLoadDTO.EnContext = ciEnContextDTO; FeeListRstDTO feeListRstDTO = iCiFeeListMainService.load(feeListLoadDTO); FArrayList feeList = feeListRstDTO.Document as FArrayList; if (null != feeList && feeList.Count > 0) { this.tableDatasource = feeList.Cast <CiOrdFeeSrvDTO>().ToArray(); // 控件不支持,不应该直接改写对象 } else { //this.errorMsgString = "获取费用清单数据失败"; tableDatasource.Clear(); } return(false); }
public void ShowDrugDes(XapDataList <EmsOrDrug> drugList) { if (this.panel != null) { this.panel.RemoveRenderAll(); List <XLabel> labelList = new List <XLabel>(); foreach (EmsOrDrug p in drugList) { MedSrvDO md = new GetMedSrvImpl().GetMedSrvById(p.Id_srv); string str = viewModel.GetDrugDes(p.Id_srv); XLabel lbltitle = new XLabel(); lbltitle.Font = new System.Drawing.Font("微软雅黑", 18.75F); lbltitle.ValueText = p.Name_srv + "说明书"; lbltitle.Size = lbltitle.GetPreferredSize(new Size(this.Width - 20, 0)); lbltitle.CanFocus = true; XLabel lblDes = new XLabel(); lblDes.Font = new System.Drawing.Font("微软雅黑", 10.75F); lblDes.ValueText = str; lblDes.Size = lblDes.GetPreferredSize(new Size(this.Width - 20, 0)); lblDes.CanFocus = true; this.panel.AddRender(lbltitle); this.panel.AddRender(lblDes); labelList.Add(lbltitle); labelList.Add(lblDes); } ; ReLocation(labelList); } this.getScrollBarRect(); }
public OrderTemplateListViewModel(string id_srvtpl) { this.qryService = XapServiceMgr.find <ICiOrdQryService>(); OrderTemplateDTO orderTemplateDto = this.qryService.getSrvortplitemAggDOS(id_srvtpl); FMap aggMap = orderTemplateDto.Srvortplitemaggdo; FArrayList srvagg = aggMap["SrvortplitemAggDO"] as FArrayList; FMap freqmap = orderTemplateDto.Freqdefdo; FArrayList freqList = freqmap["FreqDefDO"] as FArrayList; FMap measMap = orderTemplateDto.Measdocdo; FArrayList measList = measMap["MeasDocDO"] as FArrayList; XapDataList <SrvortplitemAggDO> xaplist = new XapDataList <SrvortplitemAggDO>(); if (srvagg != null) { foreach (SrvortplitemAggDO agg in srvagg) { agg.setFreqdefdo(freqList); agg.setmeasList(measList); xaplist.Add(agg); } } SrvortplitemAggDOList = xaplist; }
/// <summary> /// 保存重整打印医嘱 /// </summary> /// <param name="ordPrintDOs">重整后的医嘱OrdPrintDO集合</param> /// <returns></returns> public OrdPrintDO[] SaveResretOrdPrintDO(OrdPrintDO[] ordPrintDOs) { List <object> args = new List <object>(); args.Add(ordPrintDOs[0].Id_en); args.Add((FBoolean)ordPrintDOs[0].Fg_long); args.Add(ordPrintDOs[0].Page_num); StringBuilder builder = new StringBuilder(); builder.Append("Id_en = '{0}' and Fg_long = '{1}' and Page_num < {2} and Fg_reformed = 'N'"); //builder.Append("Id_en = '{0}' and Fg_long = '{1}' and Fg_reformed = 'N'"); string condition = string.Format(builder.ToString(), args.ToArray()); string orderBy = "Page_num,Row_num"; //查询重整第一页之前的已打印医嘱 OrdPrintDO[] ordPrintDOsUpdate = ordPrintService.find(condition, orderBy, FBoolean.False); XapDataList <OrdPrintDO> lstPrintDOsUpdate = new XapDataList <OrdPrintDO>(); for (int i = 0; i < ordPrintDOsUpdate.Length; i++) { ordPrintDOsUpdate[i].Fg_reformed = FBoolean.True; ordPrintDOsUpdate[i].Dt_reform = ordPrintDOs[0].Dt_reform != null ? ordPrintDOs[0].Dt_reform : DateTime.Now; ordPrintDOsUpdate[i].Status = DOStatus.UPDATED; lstPrintDOsUpdate.Add(ordPrintDOsUpdate[i]); } ordPrintService.update(lstPrintDOsUpdate.ToArray()); return(ordPrintService.save(ordPrintDOs)); }
public OrderTemplateTreeViewModel(string tpltypeCode, string code_entp) { this.qryService = XapServiceMgr.find <ICiOrdQryService>(); Emp2Dep2GroupDTO edg = new Emp2Dep2GroupDTO(); edg.Id_dep = UserManager.getInstance().CurrentDept.Id_dep; edg.Name_dep = UserManager.getInstance().CurrentDept.Name; edg.Id_emp = UserManager.getInstance().CurrentPsnInfo.Id_psndoc; edg.Name_emp = UserManager.getInstance().CurrentPsnInfo.Name; edg.Id_org = UserManager.getInstance().CurrentOrg.Id_org; edg.Name_org = UserManager.getInstance().CurrentOrg.Name; edg.Code_entp = code_entp; UdidocDO udidocDo = UdiDocCache.GetInstance() .GetUdidoc(BdSrvDictCodeTypeConst.SD_ORTPLTP, tpltypeCode); if (udidocDo != null) { this.OrderTplTreeList = this.qryService.getOrderTplTreeDto(udidocDo.Id_udidoc, edg); } KeyNodeDataAdapterFactory <OrderTplTreeDto> moduleAdapter = new KeyNodeDataAdapterFactory <OrderTplTreeDto>("Id", "Parent"); moduleAdapter.CustomCaptionFunc = (dataobj => dataobj.Nm); this.TreeModel = new TreeKeyModel <OrderTplTreeDto>(moduleAdapter); this.TreeModel.Loader = new OTreeKeyLoader(); this.TreeModel.AddRange(this.OrderTplTreeList); }
public medSrvTreeViewModel(string typeparameter) { service = XapServiceMgr.find <ISrvcateCrudService>(); if (typeparameter == null) { return; } //string str = " a0.ds=0"; //if (typeparameter == BdSrvDictCodeTypeConst.MEDSRV_DRUG) //{ // str += " and (a0.code like '01%' or a0.code like '14%')"; //} //if (typeparameter == BdSrvDictCodeTypeConst.MEDSRV_DIAGTREAT) //{ // str += " and (a0.code not like '01%' and a0.code not like '14%' and a0.code not like '07%')"; //} SrvCateDO[] srvca = service.find(typeparameter, "code", false); srvcas = new XapDataList <SrvCateDO>(service, srvca); //List<SrvCateDO> srvs = agg.Select(p => p.getParentDO() as SrvCateDO).ToList(); //srvs.ForEach(p => { if (p.Id_parent == null)p.Id_parent = "A"; }); //srvs.Add(new SrvCateDO() { Id_srvca = "A", Id_parent = null, Name = "基本服务分类" }); //medsrvs = srvs.ToArray(); KeyNodeDataAdapterFactory <SrvCateDO> moduleAdapter = new KeyNodeDataAdapterFactory <SrvCateDO>("Id_srvca", "Id_parent"); moduleAdapter.CustomCaptionFunc = (dataobj => dataobj.Code + " " + dataobj.Name); this.TreeModel = new TreeKeyModel <SrvCateDO>(moduleAdapter); this.TreeModel.Loader = new OTreeKeyLoader(); this.TreeModel.AddRange(srvcas); }
public PastOrderListViewModel(String id_pat) { this.service = XapServiceMgr.find <ICiorderMDOCrudService>(); this.listCiOrderDo = this.service.find("a0.id_en = '" + id_pat + "'", "id_en", false); this.listCiOrderDo.ToList().ForEach(p => { p.Str_long = p.Fg_long.Value == true ? "长期" : "临时"; }); }
protected override ciordems.d.EmsOrDrug[] Convert2Drugs(iih.ci.ord.dto.d.CiOrAggAndRelInfo info, object viewModel) { if (viewModel == null || !(viewModel is XapDataList <EmsOrDrug>)) { return(null); } CiOrderDO ord = info.OrAggDO.getParentDO(); XapDataList <EmsOrDrug> drugList = viewModel as XapDataList <EmsOrDrug>; List <EmsOrDrug> szDrugs = new List <EmsOrDrug>(); Dictionary <String, object> tmpCacheSrv = new Dictionary <string, object>(); // 处理医嘱带过来的信息 foreach (EmsOrDrug item in drugList) { tmpCacheSrv.Add(item.Id_srv, item); } // 处理附加项 szDrugs.AddRange(ToEmsOrDrugs(info.OrAggDO, tmpCacheSrv, info.OrSrvMmMap, info.BlSrvMap)); return(szDrugs.ToArray()); }
/// <summary> /// 构造医保审核,临床路径审核左侧的导航页签 /// </summary> /// <param name="dataDic"></param> private void addLeftLabel(Dictionary <int, object> dataDic) { int StartY = 0; SetMenunrender Menurender; foreach (KeyValuePair <int, object> pair in dataDic) { int key = pair.Key; string labelValue = ""; switch (key) { case ReportCodeDict.HP_REPORT_CODE: XapDataList <OrdSrvDO> dataList = pair.Value as XapDataList <OrdSrvDO>; labelValue = ReportCodeDict.REPORT_DICT[key] + "(" + dataList.Count + ")"; break; case ReportCodeDict.UNCPOR_REPORT_CODE: XapDataList <CiOrderDO> orderList = pair.Value as XapDataList <CiOrderDO>; labelValue = ReportCodeDict.REPORT_DICT[key] + "(" + orderList.Count + ")"; break; } Menurender = new SetMenunrender(); Menurender.MouseClick += new System.Windows.Forms.MouseEventHandler(label2_MouseClick); Menurender.Text = labelValue; Menurender.Font = new System.Drawing.Font("微软雅黑", 14, GraphicsUnit.Pixel); Menurender.DownButtonBrush = new SolidBrush(Color.FromArgb(225, 225, 225)); Menurender.Location = new Point(0, StartY); Menurender.Size = new Size(185, Menurender.Size.Height); StartY += Menurender.Size.Height; labelDic.Add(key, Menurender); this.leftXLayoutPanel.AddRender(Menurender); } leftXLayoutPanel.BackColor = Color.FromArgb(212, 235, 255); }
public XapDataList <OrdApSugViewItemDO> GetSrvLabItemByIdSrv(string id_srv) { string id_srvofs = GetSrvRefIds(id_srv); string id_srvs = GetIdsrvByIdsrvof(id_srvofs); MedSrvLisDO[] labs = new GetSrvLabItemImp().GetSrvLabItem(id_srvs); XapDataList <OrdApSugViewItemDO> btLabitem = new XapDataList <OrdApSugViewItemDO>(); labs.ToList().ForEach(p => { btLabitem.Add(new OrdApSugViewItemDO { // Id_ordbtlabitm //输血检验主键 // Id_or //医嘱服务id Id_srv = p.Id_srv, //检验项目编码 Name_srv = p.Srv_name, //检验项目名称 Val_rstrptla = "", //项目结果值 Val_restrptlab = p.Val_restrptlab, //值域 Sd_restrptlabtp = p.Sd_restrptlabtp, //值类型 Id_unit = p.Id_unit_nuit, //检验项目单位id Name_unit = "xxx" // p.Nuit_name //检验项目单位 }); }); return(btLabitem); }