Пример #1
0
        public void GiveEETSession(BE_Patient patientIn, BE_Cycle cycleIn, BE_State[] statesIn, Random rand)
        {
            if (patientIn.CountEET == 0)
            {
                patientIn.Status                   = BE_PatientStatus.EET;
                patientIn.PreEETState              = patientIn.ConfirmedState;
                patientIn.RealPreEETState          = patientIn.CurrentState;
                patientIn.ActiveNaturalProgression = false;
            }
            patientIn.CountEET++;   //  Assumption: Patient compliance is 100%.

            //  Intervention history is added to the patient's records.
            patientIn.interventionHistory.Add(cycleIn.ID, BE_InterventionType.EET);

            //  Cost is recorded on the patient, the EET modality, and the cycle.
            patientIn.UpdateCost(costPerSession);
            this.UpdateCost(costPerSession);
            cycleIn.UpdateCost(costPerSession);

            //  EET-related mortality.
            if (rand.NextDouble() <= mortality)
            {
                patientIn.Die("EET_Mortality");
                return; // If the patient dies, the execution of this function is terminated.
            }

            //  EET-related adverse events.
            if (rand.NextDouble() <= adverseEvent.Probability)
            {
                patientIn.adverseEventHistory.Add(cycleIn.ID, BE_AdverseEventType.EET);

                patientIn.UpdateCost(adverseEvent.Cost);
                this.UpdateCost(adverseEvent.Cost);
                cycleIn.UpdateCost(adverseEvent.Cost);
            }

            if (patientIn.CountEET == sessionCount)
            {
                int nextStateID = FindEfficacyState(patientIn.RealPreEETState.ID, rand);
                patientIn.MoveEETEfficacy(statesIn[nextStateID], cycleIn);
            }
            else
            {
                patientIn.NextTreatment = cycleIn.ID + 2;   //  Assumption: EET sessions are held at six-month intervals.
            }
        }
Пример #2
0
        public void GiveTouchUpRFA(BE_Patient patientIn, BE_Cycle cycleIn, BE_State[] statesIn, Random rand)
        {
            patientIn.CountRFA++;   // Assumption: Patient compliance is 100 %.
            if (patientIn.CountRFA == maxTouchUpRFA)
            {
                patientIn.CompletedMaxRFA = true;
            }

            patientIn.CountFollowUp = 0;    //  The patient's follow-up intervals are reset.

            patientIn.PreEETState              = patientIn.ConfirmedState;
            patientIn.RealPreEETState          = patientIn.CurrentState;
            patientIn.ActiveNaturalProgression = false;

            //  Intervention history is added to the patient's records.
            patientIn.interventionHistory.Add(cycleIn.ID, BE_InterventionType.RFA);

            //  Cost is recorded on the patient, the EET modality, and the cycle.
            patientIn.UpdateCost(costRFA);
            this.UpdateCost(costRFA);
            cycleIn.UpdateCost(costRFA);

            //  EET-related mortality.
            if (rand.NextDouble() <= mortality)
            {
                patientIn.Die("RFA_Mortality");
                return; // If the patient dies, the execution of this function is terminated.
            }

            //  EET-related adverse events.
            if (rand.NextDouble() <= adverseEvent.Probability)
            {
                patientIn.adverseEventHistory.Add(cycleIn.ID, BE_AdverseEventType.RFA);

                patientIn.UpdateCost(adverseEvent.Cost);
                this.UpdateCost(adverseEvent.Cost);
                cycleIn.UpdateCost(adverseEvent.Cost);
            }

            int nextStateID = FindEfficacyState(patientIn.RealPreEETState.ID, rand);

            patientIn.MoveEETEfficacy(statesIn[nextStateID], cycleIn);
        }