/// <summary> /// Dispose object. /// </summary> public override void Dispose() { this.Name = null; this.Description = null; this.NextStep = null; this.PreviousStep = null; this.RythmStyle = null; this.CircRestoredStep = null; }
/// <summary> /// Consturct and Initialize algorithm steps. /// </summary> public List <AlgorithmStep> InitializeSteps(StepSize stepSize) { if (steps != null) { throw new Exception("AlgorithmBase - InitiliazeSteps() : Steps already initialized."); } List <AlgorithmStep> result = new List <AlgorithmStep>(); // Initial Step step1 = new AssessmentStep("Vurder Rytmen", "Vurder patientens rytme"); // Exit Step exit1 = new AlgorithmStep("Circulation restored", "Continue with further resuscitation"); switch (stepSize) { case StepSize.Small: // Shockable Steps smallShock1 = new AlgorithmStep("Stød en gang", "Minimer afbrydelser"); smallShock1.RythmStyle = RythmStyle.Shockable; smallShock2 = new AlgorithmStep("HLR 2 Minutter", "Fortsæt HLR for den resterende tid"); smallShock2.RythmStyle = RythmStyle.Shockable; // Non-Shockable Steps smallNShock1 = new AlgorithmStep("Giv 1mg Adrenalin", "Med det samme"); smallNShock1.RythmStyle = RythmStyle.NonShockable; smallNShock2 = new AlgorithmStep("HLR 2 Minutter", "Fortsæt HLR for den resterende tid"); smallNShock2.RythmStyle = RythmStyle.Shockable; // Setup Step Relations step1.PreviousStep = null; step1.CircRestoredStep = exit1; smallShock1.PreviousStep = step1; smallShock1.NextStep = smallShock2; smallShock2.PreviousStep = smallShock1; smallShock2.NextStep = step1; smallNShock1.PreviousStep = step1; smallNShock1.NextStep = smallNShock2; smallNShock2.PreviousStep = smallNShock1; smallNShock2.NextStep = step1; exit1.PreviousStep = step1; // Add everything to the list result.Add(step1); result.Add(smallShock1); result.Add(smallShock2); result.Add(smallNShock1); result.Add(smallNShock2); result.Add(exit1); break; case StepSize.Big: // Shockable Steps smallShock1 = new AlgorithmStep("Stød en gang", "Fortsæt HLR"); smallShock1.RythmStyle = RythmStyle.Shockable; // Non-Shockable Steps smallNShock1 = new AlgorithmStep("Giv 1mg Adrenalin", "Fortsæt HLR"); smallNShock1.RythmStyle = RythmStyle.NonShockable; smallNShock2 = new AlgorithmStep("Fortsæt HLR ", ""); smallNShock2.RythmStyle = RythmStyle.NonShockable; // Setup Step Relations step1.PreviousStep = null; step1.CircRestoredStep = exit1; smallShock1.PreviousStep = step1; smallShock1.NextStep = step1; smallNShock1.PreviousStep = step1; smallNShock1.NextStep = step1; smallNShock2.PreviousStep = step1; smallNShock2.NextStep = step1; exit1.PreviousStep = step1; // Add everything to the list result.Add(step1); result.Add(smallShock1); result.Add(smallNShock1); result.Add(smallNShock2); result.Add(exit1); break; } return(result); }