GetOrganization() public method

public GetOrganization ( decimal id ) : OrganizationModel
id decimal
return HealthInformationProgram.Models.OrganizationModel
Ejemplo n.º 1
0
        public FacilityModel GetFacility(string id)
        {
            var repo = new FacilityRepository();
            var facilityView = new FacilityModel();
            var facility = repo.GetFacility(Convert.ToDecimal(id));
            var orgData = new OrganizationData();

                facilityView.FacilityId = GetDataValue(facility.faclty_id);
                facilityView.FacilityStatus = GetDataValue(facility.faclty_stat);
                facilityView.Country = GetDataValue(facility.cntry);
                facilityView.HealthCareFacility = GetDataValue(facility.hlth_care_faclty);
                facilityView.HealthCareFacilityLevel = GetDataValue(facility.hlth_care_faclty_lvl);
                facilityView.HealthCoordinator = GetDataValue(facility.hlth_coordtr);
                facilityView.Latitude = GetDataValue(facility.lattd);
                facilityView.Longitude = GetDataValue(facility.longtd);
                facilityView.OrganizationId = GetDataValue(facility.orgzn_id);
                facilityView.OrganizationName = orgData.GetOrganization(facility.orgzn_id).Organization;
            facilityView.Region = GetDataValue(facility.rgn);
                facilityView.Settlement = GetDataValue(facility.setlmt);
                facilityView.SortOrder = GetDataValue(facility.user_intrfc_sort_ord);
                facilityView.FacilityStartEffectiveDate = GetDataValue(facility.faclty_strt_eff_dt);
                facilityView.FacilityEndEffectiveDate = GetDataValue(facility.faclty_end_eff_dt);

                facilityView.CreateDate = GetDataValue(facility.rec_creat_dt);
                facilityView.CreatedBy = GetDataValue(facility.rec_creat_user_id_cd);
                facilityView.UpdateDate = GetDataValue(facility.rec_updt_dt);
                facilityView.UpdatedBy = GetDataValue(facility.rec_updt_user_id_cd);

            return facilityView;
        }
Ejemplo n.º 2
0
        public List<FacilityModel> GetFacilityList()
        {
            var facilityList = new List<FacilityModel>();
            var repo = new FacilityRepository();
            var orgData = new OrganizationData();
            var facilities = repo.GetAll();
            foreach ( var fac in facilities )
            {
                var facilityView = new FacilityModel();

                facilityView.FacilityId = GetDataValue(fac.faclty_id);
                facilityView.FacilityStatus = GetDataValue(fac.faclty_stat);
                facilityView.Country = GetDataValue(fac.cntry);
                facilityView.HealthCareFacility = GetDataValue(fac.hlth_care_faclty);
                facilityView.HealthCareFacilityLevel = GetDataValue(fac.hlth_care_faclty_lvl);
                facilityView.HealthCoordinator = GetDataValue(fac.hlth_coordtr);
                facilityView.Latitude = GetDataValue(fac.lattd);
                facilityView.Longitude = GetDataValue(fac.longtd);
                facilityView.OrganizationId = GetDataValue(fac.orgzn_id);
                facilityView.OrganizationName = orgData.GetOrganization(fac.orgzn_id).Organization;
                facilityView.Region = GetDataValue(fac.rgn);
                facilityView.Settlement = GetDataValue(fac.setlmt);
                facilityView.SortOrder = GetDataValue(fac.user_intrfc_sort_ord);
                facilityView.FacilityStartEffectiveDate =GetDataValue(fac.faclty_strt_eff_dt);
                facilityView.FacilityEndEffectiveDate = GetDataValue(fac.faclty_end_eff_dt);

                facilityView.CreateDate = GetDataValue(fac.rec_creat_dt);
                facilityView.CreatedBy = GetDataValue(fac.rec_creat_user_id_cd);
                facilityView.UpdateDate = GetDataValue(fac.rec_updt_dt);
                facilityView.UpdatedBy = GetDataValue(fac.rec_updt_user_id_cd);

                facilityList.Add(facilityView);
            }
            return facilityList;
        }