/// <summary> /// Gets the global code categories by null facility. /// </summary> /// <returns></returns> public ActionResult GetGlobalCodeCategoriesByNullFacility() { var gccBal = new GlobalCodeCategoryBal(); var globalCodeCategories = gccBal.GetGlobalCodeCategoriesByNullFacility(); return(Json(globalCodeCategories)); }
/// <summary> /// Gets the facility global code categories. /// </summary> /// <param name="FacilityNumber">The facility number.</param> /// <returns></returns> public ActionResult GetFacilityGlobalCodeCategories(string FacilityNumber) { var gccBal = new GlobalCodeCategoryBal(); var globalCodeCategories = gccBal.GetFacilityGlobalCodeCategories(FacilityNumber); return(Json(globalCodeCategories)); }
public JsonResult CheckDuplicateRecord(GlobalCodeCategory model) { using (var bal = new GlobalCodeCategoryBal()) { var isExists = bal.CheckDuplicateCode(model); return(Json(isExists)); } }
//Function to get globalcode list for OrderCategory public ActionResult GetGlobalCodeCatByExternalValue() { using (var bal = new GlobalCodeCategoryBal()) { var list = bal.GetGlobalCodeCategoriesByExternalValue("0"); return(Json(list)); } }
public ActionResult GetOrderSubCategoriesByExternalValue(string startRange, string endRange) { var fn = Convert.ToString(Helpers.GetDefaultFacilityId()); using (var bal = new GlobalCodeCategoryBal()) { var list = bal.GetGlobalCodeCategoriesByExternalValue(fn); return(Json(list)); } }
/// <summary> /// Gets the global code category name by identifier. /// </summary> /// <param name="globalCodeCategoryID">The global code category identifier.</param> /// <returns></returns> private string GetGlobalCodeCategoryNameByID(string globalCodeCategoryID) { var globalCodeCategoryBal = new GlobalCodeCategoryBal(); var info = globalCodeCategoryBal.GetGlobalCodeCategoryByValue(globalCodeCategoryID); if (info != null) { return(info.GlobalCodeCategoryName); } else { return(string.Empty); } }
/// <summary> /// Gets the global code categories. /// </summary> /// <returns></returns> public JsonResult GetRecordById(int id) { using (var bal = new GlobalCodeCategoryBal()) { var current = bal.GetCurrentCategoryById(id); var jsonResult = new { current.GlobalCodeCategoryID, current.GlobalCodeCategoryName, current.GlobalCodeCategoryValue, current.ExternalValue1 }; return(Json(jsonResult)); } }
/// <summary> /// Add / Edit the Current Global Code Category into the database /// </summary> /// <param name="list">The list.</param> /// <returns> /// ID of newly added / updated GlobalCodeCategory /// </returns> public ActionResult SaveCategory(List <GlobalCodeCategory> list) { if (list != null) { using (var gccBal = new GlobalCodeCategoryBal()) { foreach (var item in list) { item.FacilityNumber = item.FacilityNumber; var newId = gccBal.AddUpdateGlobalCodeCategory(item); return(Json(newId)); } } } return(Json(null)); }
/// <summary> /// Add / Edit the Current Global Code Category into the database /// </summary> /// <param name="gccId"></param> /// <returns> /// ID of newly added / updated GlobalCodeCategory /// </returns> public ActionResult DeleteRecord(int gccId) { using (var gccBal = new GlobalCodeCategoryBal()) { var userId = Helpers.GetLoggedInUserId(); var currentDateTime = Helpers.GetInvariantCultureDateTime(); var model = gccBal.GetCurrentCategoryById(gccId); if (model.GlobalCodeCategoryID > 0) { model.DeletedBy = userId; model.DeletedDate = currentDateTime; model.IsDeleted = true; gccBal.AddUpdateGlobalCodeCategory(model); } var list = gccBal.GetListByCategoryValue(model.ExternalValue1); return(PartialView(PartialViews.LabTestOrderSetList, list)); } }
/// <summary> /// Binds the global code categories. /// </summary> /// <returns></returns> public ActionResult BindGlobalCodeCategories() { var list = new List <DropdownListData>(); using (var bal = new GlobalCodeCategoryBal()) { var result = bal.GetGlobalCodeCategories(); if (result.Count > 0) { list.AddRange(result.Select(item => new DropdownListData { Text = item.GlobalCodeCategoryName, Value = item.GlobalCodeCategoryValue, ExternalValue1 = Convert.ToString(item.GlobalCodeCategoryID) })); } } return(Json(list, JsonRequestBehavior.AllowGet)); }
public JsonResult SearchGlobalCodeCategories(string typeId, string text) { if (!string.IsNullOrEmpty(text)) { text = text.ToLower().Trim(); List <GlobalCodeCategory> list; using (var bal = new GlobalCodeCategoryBal()) list = bal.GetSearchedCategories(text, typeId); if (list.Count > 0) { var filteredList = list.Select(item => new { CodeValue = item.GlobalCodeCategoryValue, Name = string.Format("{0} - {1}", item.GlobalCodeCategoryValue, item.GlobalCodeCategoryName), }).ToList(); return(Json(filteredList, JsonRequestBehavior.AllowGet)); } } return(Json(new List <GlobalCodeCategory>(), JsonRequestBehavior.AllowGet)); }
/// <summary> /// Indexes this instance. /// </summary> /// <returns></returns> public ActionResult Index() { // var globalCodeCommunicator = new GlobalCodeCommunicator(); var objGlobalCodeCategoryBal = new GlobalCodeCategoryBal(); var globalCodeCategories = objGlobalCodeCategoryBal.GetGlobalCodeCategoriesWithFacilityName(); List <Facility> facilities; using (var facilityBal = new FacilityBal()) { var cId = Helpers.GetDefaultCorporateId(); facilities = facilityBal.GetFacilities(cId); } var gModel = new GlobalCodeCategoryView { GlobalCodeCategoryList = globalCodeCategories, FacilityList = facilities, SelectedGlobalCodeCategoryOptions = new List <GlobalCodeCategory>(), FacilityNumber = "0", SelectedSourceGlobalCodeCategoryOptions = new List <GlobalCodeCategory>() }; return(View(gModel)); }
/// <summary> /// Labs the test order set view. /// </summary> /// <param name="categoryValue">The category value.</param> /// <returns></returns> public ActionResult LabTestOrderSetView(string categoryValue) { if (!string.IsNullOrEmpty(categoryValue)) { var bal = new GlobalCodeCategoryBal(); var list = bal.GetListByCategoryValue(categoryValue); //var view = new LabTestOrderSetView //{ // //CurrentGlobalCodeCategory = new GlobalCodeCategory { IsActive = true, IsDeleted = false }, // //GCCategoryList = list, // //CategoryValue = categoryValue, // //CurrentLabOrderCode = new GlobalCodeModel { IsActive = true, IsDeleted = false }, // //LabOrderCodesList = new List<GlobalCodeModel>() // CurrentGlobalCodeCategory = new GlobalCodeModel { IsActive = true, IsDeleted = false }, // GCCategoryList = new List<GlobalCodeModel>(), // CategoryValue = categoryValue, //}; return(View("LabTestOrderSetView")); } return(RedirectToAction("PatientSearch", "PatientSearch")); }
/// <summary> /// Add / Edit the Current Lab Order Set into the database /// </summary> /// <param name="gccModel"></param> /// <param name="gcList"></param> /// <returns> /// ID of newly added / updated GlobalCodeCategory /// </returns> public ActionResult SaveLabOrderSet(GlobalCodeCategory gccModel, List <GlobalCodes> gcList) { using (var gccBal = new GlobalCodeCategoryBal()) { var userId = Helpers.GetLoggedInUserId(); var currentDateTime = Helpers.GetInvariantCultureDateTime(); if (gccModel.GlobalCodeCategoryID > 0) { gccModel.CreatedBy = userId; gccModel.CreatedDate = currentDateTime; gccModel.ModifiedBy = userId; gccModel.ModifiedDate = currentDateTime; } else { gccModel.CreatedBy = userId; gccModel.CreatedDate = currentDateTime; } gccBal.AddUpdateGlobalCodeCategory(gccModel); var list = gccBal.GetListByCategoryValue(gccModel.ExternalValue1); return(PartialView(PartialViews.LabTestOrderSetList, list)); } }