Ejemplo n.º 1
0
        public static FullPatientJounrney GetApprovedJourney(string CountryId, string BrandId, string Year)
        {
            FullPatientJounrney lstJourney   = new FullPatientJounrney();
            PatientJourneyModel firstresult  = new PatientJourneyModel();
            List <String>       lstCountryId = new List <String>();

            lstCountryId = CountryId.Split(',').ToList();
            List <String> lstBrandId = new List <String>();

            lstBrandId = BrandId.Split(',').ToList();
            try
            {
                Patient_Journey result = new Patient_Journey();
                result = dbPatientJourney.GetApprovedJourney(Convert.ToInt32(lstCountryId[0]), Convert.ToInt32(lstBrandId[0]), Convert.ToInt32(Year));
                PJEntities entity = new PJEntities();
                if (result != null)
                {
                    firstresult.PatientJourneyId = result.Patient_Journey_Id;
                    firstresult.JourneyTitle     = result.Journey_Title;
                    firstresult.StatusID         = Convert.ToInt32(result.Status_Master_Id);
                    List <JourneyStage> stages = bsPatientAdministration.GetJourneyStage(result.Patient_Journey_Id.ToString());
                    lstJourney.Stage   = stages;
                    lstJourney.Journey = firstresult;
                }
            }
            catch (Exception)
            {
            }
            return(lstJourney);
        }
Ejemplo n.º 2
0
        public static StrategicMoment GetAllStrategicMoment(string CountryId, string BrandId, string Year)
        {
            StrategicMoment lstJourney   = new StrategicMoment();
            List <String>   lstCountryId = new List <String>();

            lstCountryId = CountryId.Split(',').ToList();
            List <String> lstBrandId = new List <String>();

            lstBrandId = BrandId.Split(',').ToList();

            try
            {
                Patient_Journey result = new Patient_Journey();
                result = dbPatientJourney.GetApprovedJourney(Convert.ToInt32(lstCountryId[0]), Convert.ToInt32(lstBrandId[0]), Convert.ToInt32(Year));
                PJEntities entity = new PJEntities();
                if (result != null)
                {
                    lstJourney.JourneyId = result.Patient_Journey_Id;
                    List <StrategicMomentModel> strategicMoment = bsStrategicMoment.GetStrategicMoment(result.Patient_Journey_Id.ToString());
                    lstJourney.Strategic_Moment = strategicMoment;
                }
            }
            catch (Exception)
            {
            }
            return(lstJourney);
        }
Ejemplo n.º 3
0
        public static EntirePatientJourney GetApprovedJourneyForPdf(string CountryId, string BrandId, string Year)
        {
            EntirePatientJourney   lstJourney     = new EntirePatientJourney();
            JourneyPdfModel        FirstResult    = new JourneyPdfModel();
            FullJourneyTransaction lstFullJourney = new FullJourneyTransaction();
            List <String>          lstCountryId   = new List <String>();

            lstCountryId = CountryId.Split(',').ToList();
            List <String> lstBrandId = new List <String>();

            lstBrandId = BrandId.Split(',').ToList();
            try
            {
                Patient_Journey result = new Patient_Journey();
                result = dbPatientJourney.GetApprovedJourney(Convert.ToInt32(lstCountryId[0]), Convert.ToInt32(lstBrandId[0]), Convert.ToInt32(Year));
                PJEntities entity = new PJEntities();
                if (result != null)
                {
                    List <JourneyStages> stages = bsPdfJourney.GetJourneyStageNames(result.Patient_Journey_Id.ToString());
                    lstJourney.Stages = stages;

                    lstJourney.StageCount     = stages.Count();
                    lstJourney.IndicationName = result.Journey_Title.Substring(0, result.Journey_Title.IndexOf("-"));

                    List <StrategicMomentAll> strategicAll = bsPdfJourney.GetStrategicMoment(result.Patient_Journey_Id.ToString());
                    lstJourney.StrategicMoment = strategicAll;

                    if (stages != null)
                    {
                        FullJourneyTransaction Full_Transactions = bsPdfJourney.GetAllTransactions(result.Patient_Journey_Id.ToString(), stages);
                        lstFullJourney.Transactions          = Full_Transactions.Transactions;
                        lstFullJourney.ClinicalInterventions = Full_Transactions.ClinicalInterventions;
                        lstFullJourney.AssociatedCosts       = Full_Transactions.AssociatedCosts;
                        lstFullJourney.DesiredOutcomes       = Full_Transactions.DesiredOutcomes;
                    }
                    lstJourney.FullJourneyTransaction = lstFullJourney;

                    FirstResult.PatientJourneyId = result.Patient_Journey_Id;
                    FirstResult.JourneyTitle     = result.Journey_Title;
                    FirstResult.StagesCount      = stages.Count;

                    lstJourney.Journey = FirstResult;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lstJourney);
        }
Ejemplo n.º 4
0
        public static Patient_Journey GetApprovedJourney(int CountryId, int BrandId, int Year)
        {
            Patient_Journey listWithSearch = new Patient_Journey();

            try
            {
                using (PJEntities entity = new PJEntities())
                {
                    listWithSearch = (from journey in entity.Patient_Journey
                                      where journey.Country_Master_Id == CountryId && journey.Brand_Master_Id == BrandId && journey.Year == Year && (journey.Status_Master_Id == 3 || journey.Status_Master_Id == 7)
                                      select journey).FirstOrDefault();
                }
            }
            catch (Exception)
            {
            }
            return(listWithSearch);
        }
Ejemplo n.º 5
0
        public static NewStrategicMoment GetEndStage(string JourneyId, string StageId)
        {
            NewStrategicMoment lstMaster = new NewStrategicMoment();

            try
            {
                Patient_Journey result = new Patient_Journey();
                PJEntities      entity = new PJEntities();
                if (result != null)
                {
                    List <Stages_Moment> stages = bsStrategicMoment.GetEndStages(JourneyId, StageId);
                    lstMaster.Stages_Moment = stages;
                }
            }
            catch (Exception)
            {
            }
            return(lstMaster);
        }