コード例 #1
0
        public void UpdateEligibility()
        {
            if (null != SelectedHIVStatus && !SelectedHIVStatus.ItemId.IsNullOrEmpty() &&
                SelectedHIVStatus.ItemId == new Guid("b25efd8a-852f-11e7-bb31-be2e44b06b34"))  //pos
            {
                EnableBookingDate = EnablePNSApproach = AllowEligibility = true;
            }
            else
            {
                SelectedEligibility = Eligibility.OrderBy(x => x.Rank).FirstOrDefault();
                EnableBookingDate   = EnablePNSApproach = AllowEligibility = false;
            }


            if (AllowScreening)
            {
                MakeEligibile = true;
//                if (null != SelectedPhysicalAssult)
//                {
//                    assulted = null != SelectedPhysicalAssult.Item &&
//                               SelectedPhysicalAssult.Item.Code.ToLower() == "Y".ToLower();
//                }
//
//                if (null != SelectedSexuallyUncomfortable)
//                {
//                    uncomfortable = null != SelectedSexuallyUncomfortable.Item &&
//                                    SelectedSexuallyUncomfortable.Item.Code.ToLower() == "Y".ToLower();
//                }
//
//                if (null != SelectedThreatened)
//                {
//                    threatened = null != SelectedThreatened.Item &&
//                                 SelectedThreatened.Item.Code.ToLower() == "Y".ToLower();
//                }
//
//                MakeEligibile = !assulted && !uncomfortable && !threatened;
            }

            if (null != SelectedHIVStatus)
            {
                var hivpos = null != SelectedHIVStatus.Item && SelectedHIVStatus.Item.Code.ToLower() == "P".ToLower();
                if (hivpos)
                {
                    MakeEligibile = false;
                }
            }
        }
コード例 #2
0
 private void SetEligibilityState()
 {
     if (null != SelectedHIVStatus && !SelectedHIVStatus.ItemId.IsNullOrEmpty() &&
         SelectedHIVStatus.ItemId == new Guid("B25EFD8A-852F-11E7-BB31-BE2E44B06B34"))  //pos
     {
         AllowEligibility = EnableBookingDate = EnablePNSApproach = false;
         try
         {
             SelectedEligibility = Eligibility.FirstOrDefault(x => x.ItemId == new Guid("b25ed04e-852f-11e7-bb31-be2e44b06b34"));
         }
         catch
         {
             SelectedEligibility = Eligibility.OrderBy(x => x.Rank).FirstOrDefault();
         }
     }
     else
     {
         AllowEligibility = EnableBookingDate = EnablePNSApproach = true;
     }
 }