public IActionResult GetDiagnosis(string searchText, int?pageIndex = 1, int?pageSize = 20) { try { var data = _treatSvr.GetDiagnosis(searchText, pageIndex.Value, pageSize.Value); var rlt = MyDynamicResult(data); return(Ok(rlt)); } catch (Exception ex) { return(Ok(MyDynamicResult(ex))); } }
public dynamic JetDiagnosis(string searchText, int?pageIndex = 1, int?pageSize = 30) { try { var items = _treatSvr.GetDiagnosis(searchText, pageIndex.Value, pageSize.Value).Select(m => new { label = m.DiagnoisisName, value = m.DiagnoisisId, itemId = m.DiagnoisisId, itemValue = m.PyCode.Trim(), itemTypeCode = m.DiagTypeCode }); var dd = MyDynamicResult(true, ""); dd.items = items; return(dd); } catch (Exception ex) { return(MyDynamicResult(ex)); } }