コード例 #1
0
        public int CreateDiagnosisCategory(SupplementalDiagnosisCategoryModel model)
        {
            var repo = new SupplementalDiagnosisCategoryRepository();
            var dataModel = new HealthInformationProgram.Data.Tables.lkup_splmtl_diag_cat();

            // dataModel.splmtl_diag_cat_id = Convert.ToDecimal(model.SupplementalDiagnosisCategoryId);
            dataModel.splmtl_diag_cat_stat = model.Status;
            dataModel.splmtl_diag_cat = model.SupplementalDiagnosisCategoryType;
            dataModel.user_intrfc_sort_ord = Convert.ToDecimal(model.SortOrder);
            dataModel.splmtl_diag_cat_strt_eff_dt = Convert.ToDateTime(model.SupplementalDiagnosisCategoryEffectiveStartDate);
            dataModel.splmtl_diag_cat_end_eff_dt = Convert.ToDateTime(model.SupplementalDiagnosisCategoryEffectiveEndDate);
            dataModel.rec_creat_dt = DateTime.Now;
            dataModel.rec_creat_user_id_cd = model.CreatedBy;
            dataModel.rec_updt_dt = DateTime.Now;
            dataModel.rec_updt_user_id_cd = model.UpdatedBy;

            try
            {

                var returnCode = repo.CreateSupplementalDiagnosisCat(dataModel);
                return returnCode;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
        public SupplementalDiagnosisCategoryModel GetSupplementalCategoryByCategory(string category)
        {
            var repo = new HealthInformationProgram.Data.Repositories.SupplementalDiagnosisCategoryRepository();
            var cat = new SupplementalDiagnosisCategoryModel();
            var dataItem = repo.GetSupplementalDiagnosisCat(category);

            cat.SupplementalDiagnosisCategoryId = GetDataValue(dataItem.splmtl_diag_cat_id);
            cat.SupplementalDiagnosisCategoryType = GetDataValue(dataItem.splmtl_diag_cat);
            cat.SortOrder = GetDataValue(dataItem.user_intrfc_sort_ord);
            cat.Status = GetDataValue(dataItem.splmtl_diag_cat_stat);
            cat.SupplementalDiagnosisCategoryEffectiveStartDate = GetDataValue(dataItem.splmtl_diag_cat_strt_eff_dt);
            cat.SupplementalDiagnosisCategoryEffectiveEndDate = GetDataValue(dataItem.splmtl_diag_cat_end_eff_dt);
            cat.UpdatedBy = GetDataValue(dataItem.rec_updt_user_id_cd);
            cat.UpdateDate = GetDataValue(dataItem.rec_updt_dt);
            cat.CreatedBy = GetDataValue(dataItem.rec_creat_user_id_cd);
            cat.CreateDate = GetDataValue(dataItem.rec_creat_dt);

            return cat;
        }
コード例 #3
0
        public List<SupplementalDiagnosisCategoryModel> GetAllSupplementalCategories()
        {
            var categories = new List<SupplementalDiagnosisCategoryModel>();
            var repo = new HealthInformationProgram.Data.Repositories.SupplementalDiagnosisCategoryRepository();

            var dataList = repo.GetAll();
            foreach (var item in dataList)
            {
                var cat = new SupplementalDiagnosisCategoryModel();

                cat.SupplementalDiagnosisCategoryId = GetDataValue(item.splmtl_diag_cat_id);
                cat.SupplementalDiagnosisCategoryType = GetDataValue(item.splmtl_diag_cat);
                cat.SortOrder = GetDataValue(item.user_intrfc_sort_ord);
                cat.Status = GetDataValue(item.splmtl_diag_cat_stat);
                cat.SupplementalDiagnosisCategoryEffectiveStartDate = GetDataValue(item.splmtl_diag_cat_strt_eff_dt);
                cat.SupplementalDiagnosisCategoryEffectiveEndDate = GetDataValue(item.splmtl_diag_cat_end_eff_dt);
                cat.UpdatedBy = GetDataValue(item.rec_updt_user_id_cd);
                cat.UpdateDate = GetDataValue(item.rec_updt_dt);
                cat.CreatedBy = GetDataValue(item.rec_creat_user_id_cd);
                cat.CreateDate = GetDataValue(item.rec_creat_dt);

                categories.Add(cat);
            }
            return categories;
        }