public void MoveEETEfficacy(BE_State nextStateIn, BE_Cycle cycleIn) { status = BE_PatientStatus.Recurrence; completedEET = true; activeRecurrenceProbability = true; postEETState = nextStateIn; confirmedState = nextStateIn; // Assumption popst EET state is always confirmed. currentState.Population--; currentState = nextStateIn; currentState.Population++; needPostEETDecision = true; if (postEETState.ID >= realPreEETState.ID) // Treatment failure. If in reality NoBarretts, it must be switched to naturel progression. { status = BE_PatientStatus.NaturalHistory; activeRecurrenceProbability = false; activeNaturalProgression = true; } if (postEETState.ID >= preEETState.ID) // Treatment failure is observed { concludedAsFailedEET = true; } }
public BE_Patient(int patientIDIn, BE_State stateIn) { id = patientIDIn; gender = "Male"; age = 50; currentState = stateIn; stateHistory.Add(0, currentState.Type); }
public void MoveNaturalProgression(BE_State[] states, BE_Cycle cycleIn, Random rand) { int newIndex = currentState.FindNextStateID(rand); currentState.Population--; currentState = states[newIndex]; stateHistory.Add(cycleIn.ID, currentState.Type); currentState.Population++; }
public void MoveRecurrence(BE_EET EETIn, BE_State[] states, BE_Cycle cycleIn, Random rand) { if (rand.NextDouble() <= EETIn.recurrence[preEETState.ID]) { status = BE_PatientStatus.NaturalHistory; activeRecurrenceProbability = false; activeNaturalProgression = true; int newIndex = EETIn.FindRecurrenceState(preEETState.ID, rand); currentState.Population--; currentState = states[newIndex]; stateHistory.Add(cycleIn.ID, currentState.Type); currentState.Population++; } else { stateHistory.Add(cycleIn.ID, currentState.Type); } }