Ejemplo n.º 1
0
        public void ECG_Atrial(Patient p, Rhythm.Strip s)
        {
            switch (Value)
            {
            case Values.Asystole: return;

            case Values.Atrial_Fibrillation: return;

            case Values.Atrial_Flutter: return;

            case Values.AV_Block__1st_Degree: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.AV_Block__Wenckebach: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.AV_Block__Mobitz_II: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.AV_Block__3rd_Degree: s.Underwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.Bundle_Branch_Block: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.Idioventricular: return;

            case Values.Junctional: return;

            case Values.Pulseless_Electrical_Activity:
            case Values.Sick_Sinus_Syndrome: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.Sinus_Arrhythmia: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_Arrest: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_Bigeminy: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_Trigeminy: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_PACs: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_PJCs: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_PVCs_Multifocal: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_PVCs_Unifocal: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.Supraventricular_Tachycardia: return;

            case Values.Ventricular_Fibrillation_Coarse: return;

            case Values.Ventricular_Fibrillation_Fine: return;

            case Values.Ventricular_Standstill: s.Overwrite(Rhythm.Waveforms.ECG_Complex__P_Normal(p, s.Lead)); return;

            case Values.Ventricular_Tachycardia_Monomorphic_Pulsed: return;

            case Values.Ventricular_Tachycardia_Monomorphic_Pulseless: return;

            case Values.Ventricular_Tachycardia_Polymorphic: return;
            }
        }
Ejemplo n.º 2
0
        public static void CalculateOffsets(Strip strip, double width, double height,
                                            ref Point drawOffset, ref PointF drawMultiplier)
        {
            drawOffset.X     = 0;
            drawMultiplier.X = (int)width / strip.DisplayLength;

            switch (strip.Offset)
            {
            case Strip.Offsets.Center:
                drawOffset.Y     = (int)(height / 2f);
                drawMultiplier.Y = (-(int)height / 2f) * strip.Amplitude;
                break;

            case Strip.Offsets.Stretch:
                drawOffset.Y     = (int)(height * 0.9f);
                drawMultiplier.Y = -(int)height * 0.8f * strip.Amplitude;
                break;

            case Strip.Offsets.Scaled:
                drawOffset.Y     = (int)(height * 0.9f);
                drawMultiplier.Y = -(int)height;
                break;
            }
        }
Ejemplo n.º 3
0
        public void ECG_Ventricular(Patient p, Rhythm.Strip s)
        {
            // Handle aberrant beats (may be triggered by pacemaker...)
            if (p.Cardiac_Rhythm.AberrantBeat)
            {
                switch (Value)
                {
                default: return;

                case Values.Asystole:
                case Values.Atrial_Flutter:
                case Values.Atrial_Fibrillation:
                case Values.AV_Block__1st_Degree:
                case Values.AV_Block__Wenckebach:
                case Values.AV_Block__Mobitz_II:
                case Values.AV_Block__3rd_Degree:
                case Values.Bundle_Branch_Block:
                case Values.Idioventricular:
                case Values.Junctional:
                case Values.Pulseless_Electrical_Activity:
                case Values.Sick_Sinus_Syndrome:
                case Values.Sinus_Arrhythmia:
                case Values.Sinus_Rhythm:
                case Values.Sinus_Rhythm_with_Arrest:
                case Values.Sinus_Rhythm_with_Bigeminy:
                case Values.Sinus_Rhythm_with_Trigeminy:
                case Values.Sinus_Rhythm_with_PACs:
                case Values.Sinus_Rhythm_with_PJCs:
                case Values.Sinus_Rhythm_with_PVCs_Unifocal:
                case Values.Supraventricular_Tachycardia:
                case Values.Ventricular_Standstill:
                case Values.Ventricular_Tachycardia_Monomorphic_Pulsed:
                case Values.Ventricular_Tachycardia_Monomorphic_Pulseless:
                    s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Aberrant_3(p, s.Lead));
                    return;

                case Values.Sinus_Rhythm_with_PVCs_Multifocal:
                    switch (new Random().Next(0, 3))
                    {
                    default:
                    case 0: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Aberrant_1(p, s.Lead)); break;

                    case 1: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Aberrant_2(p, s.Lead)); break;

                    case 2: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Aberrant_3(p, s.Lead)); break;
                    }
                    return;
                }
            }

            // Handle non-aberrant beats
            switch (Value)
            {
            default: return;

            case Values.Asystole: return;

            case Values.Atrial_Flutter: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.Atrial_Fibrillation: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.AV_Block__1st_Degree: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.AV_Block__Wenckebach: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.AV_Block__Mobitz_II: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.AV_Block__3rd_Degree: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Aberrant_1(p, s.Lead)); return;

            case Values.Bundle_Branch_Block: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_BBB(p, s.Lead)); return;

            case Values.Idioventricular: s.Overwrite(Rhythm.Waveforms.ECG_Complex__Idioventricular(p, s.Lead)); return;

            case Values.Junctional: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.Pulseless_Electrical_Activity: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.Sick_Sinus_Syndrome: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.Sinus_Arrhythmia: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_Arrest: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_Bigeminy: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_Trigeminy: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_PACs: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_PJCs: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_PVCs_Multifocal: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.Sinus_Rhythm_with_PVCs_Unifocal: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_Normal(p, s.Lead)); return;

            case Values.Supraventricular_Tachycardia: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_SVT(p, s.Lead)); return;

            case Values.Ventricular_Fibrillation_Coarse: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_VF(p, s.Lead, 0.7f)); return;

            case Values.Ventricular_Fibrillation_Fine: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_VF(p, s.Lead, 0.1f)); return;

            case Values.Ventricular_Standstill: return;

            case Values.Ventricular_Tachycardia_Monomorphic_Pulsed: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_VT(p, s.Lead)); return;

            case Values.Ventricular_Tachycardia_Monomorphic_Pulseless: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_VT(p, s.Lead)); return;

            case Values.Ventricular_Tachycardia_Polymorphic: s.Overwrite(Rhythm.Waveforms.ECG_Complex__QRST_VF(p, s.Lead, 1f)); return;
            }
        }
Ejemplo n.º 4
0
        public void ECG_Isoelectric(Patient p, Rhythm.Strip s)
        {
            switch (Value)
            {
            case Values.Asystole: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Atrial_Fibrillation: s.Concatenate(Draw.ECG_Isoelectric__Atrial_Fibrillation(p, s.Lead)); return;

            case Values.Atrial_Flutter: s.Concatenate(Draw.ECG_Isoelectric__Atrial_Flutter(p, s.Lead)); return;

            case Values.AV_Block__1st_Degree: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.AV_Block__3rd_Degree: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.AV_Block__Mobitz_II: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.AV_Block__Wenckebach: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Bundle_Branch_Block: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.CPR_Artifact: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Idioventricular: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Junctional: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Pulseless_Electrical_Activity: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Sick_Sinus_Syndrome: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Sinus_Arrhythmia: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Sinus_Rhythm: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Sinus_Rhythm_with_Arrest: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Sinus_Rhythm_with_Bigeminy: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Sinus_Rhythm_with_Trigeminy: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Sinus_Rhythm_with_PACs: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Sinus_Rhythm_with_PJCs: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Sinus_Rhythm_with_PVCs_Multifocal: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Sinus_Rhythm_with_PVCs_Unifocal: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Supraventricular_Tachycardia: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Ventricular_Fibrillation_Coarse: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Ventricular_Fibrillation_Fine: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Ventricular_Standstill: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Ventricular_Tachycardia_Monomorphic_Pulsed: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Ventricular_Tachycardia_Monomorphic_Pulseless: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;

            case Values.Ventricular_Tachycardia_Polymorphic: s.Concatenate(Draw.Flat_Line(p.GetHR_Seconds, 0f)); return;
            }
        }