Post Reply 
(41C) Basic EKG Calculations
11-30-2019, 02:43 PM
Post: #1
(41C) Basic EKG Calculations
Introduction

The program calculates the following:

* Lead II magnification, in mm
* The mean axis deviation
* The mean axis magnitude

Given:

* Lead I positive deflection, in mm
* Lead III negative deflection, in mm

The mean axis deviation and magnitude are calculated by a rectangular conversion by the following coordinates:

X: Lead I positive deflection - Lead I negative deflection
Y: Net Lead I deflection * 0.5774 + Net Lead III deflection * 1.1547
Mean axis deviation: θ - 57°

The program also:

* Converts between the heart rate (rpm) and the R-R interval
* Use either parameter to calculate the Q-T interval, in seconds

heart rate = 60/R-R
Q-T interval = √(R-R)*0.39

The program is a translation of HP 67/HP 97 Basic EKG Determination, which itself is a translation of Steven A. Conrad's HP-65 program (HP-65 Users' Library Program). See the source listed below.

Notes:

1. Clear the assignments of keys A (Σ+) through E (LN) before running the program. This must be done outside the programming environment. Clear assignments to keys by ASN (blank) (designated key).

Example: Clear assignment from A: [ shift ] (ASN) [ALPHA] [ALPHA] [ Σ+ ]

2. Running EKG will turn the User Keyboard on.

3. The program will set the calculator to degrees mode.

4. This program was entered on an HP 41C, and it should work on any simulator and Swiss Micros DM41.

Instructions:

1. Run EKG.

2. Determine Lead I net deviation and store it to register 01:
(in User's Mode) positive deviation Lead I [ENTER] negative deviation Lead I ( A )

3. Determine Lead II net deviation, storing net Lead III net deviation to register 03 and Lead II net deviation to register 02:
(in User's Mode) positive deviation Lead III [ENTER] negative deviation Lead III ( B )
Result: Lead II net deviation

4. Compute Mean Axis:
(in User's Mode) ( C ) deviation is displayed [ R/S ] magnitude is displayed

5a. Convert heart rate to R-R:
(in User's Mode) heart rate (bpm) ( D )
-or-
5b. Convert R-R to heart rate:
(in User's Mode) R-R ( D )

6. Compute Q-T.
(in User's Mode) ( E )

HP 41C/DM41 Program: EKG
Code:

01 LBL T^EKG
02 SF 27
03 GTO 00
04 LBL A
05 - 
06 STO 01
07 ^T III:_ 
08 ARCL X
09 AVIEW
10 RTN
11 LBL B
12 -
13 STO 03
14 RCL 01
15 +
16 STO 02
17 ^T II:_ 
18 ARCL X
19 AVIEW
20 RTN
21 LBL C
22 RCL 01
23 ENTER↑
24 0.5774
25 *
26 RCL 03
27 ENTER↑
28 1.1547
29 *
30 +
31 ENTER↑
32 RCL 01
33 R-P
34 X<>Y
35 57
36 -
37 ^T DEV=
38 ARCL X
39 AVIEW 
40 STOP
41 X<>Y
42 ABS
43 ^T MAG=
44 ARCL X
45 AVIEW
46 RTN
47 LBL D
48 ENTER↑
49 ENTER↑
50 60
51 X<>Y
52 /
53 X<=Y?
54 GTO 05
55 ^T RATE=
56 ARCL X
57 AVIEW
58 RTN
59 LBL 05
60 ^T R-R=
61 ARCL X
62 AVIEW
63 RTN
64 LBL E
65 X>Y?
66 X<>Y
67 SQRT
68 0.39
69 *
70 ^T Q-T=
71 ARCL X
72 AVIEW 
73 RTN
74 LBL 00
75 RTN
76 END

Example

I+ = 2.8 mm, I- = 1.1 mm
III+ = 2.5 mm, III- = 1.4 mm
Heart Rate = 86 bpm

Keystrokes:

XEQ "EKG"
(User Mode is On)
2.8 [ENTER] 1.1 ( A )
Display: III: 1.7000

2.5 [ENTER] 1.4 ( B )
Display: II: 2.8000

( C )
Display: DEV=-4.0516
[ R/S ]
Display: MAG=2.8214

86 (D)
Display: R-R=0.6977

(E)
Display: Q-T=0.3258

Source:

"Basic EKG Determinations" HP-67/97 User's Library Solutions: Cardiac. Hewlett Packard. Corvallis, OR. (no date given, but I estimate this to be circa 1974)

Blog Link: http://edspi31415.blogspot.com/2019/11/h...tions.html
Visit this user's website Find all posts by this user
Quote this message in a reply
01-18-2020, 01:31 AM
Post: #2
RE: (41C) Basic EKG Calculations
Hi...

Could you answer me: The Deviation is the QRS axis?

Best Regards

Nelson Dinamarco
Find all posts by this user
Quote this message in a reply
01-18-2020, 11:52 PM
Post: #3
RE: (41C) Basic EKG Calculations
According to the program notes, the axis deviation is in reference of the mean electric axis of the QRS complex.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-19-2020, 01:55 AM
Post: #4
RE: (41C) Basic EKG Calculations
HI,
Thanks for the answer and the post!
I'll program my CALC and try some EKG.
Let you know when done

Regards.

Nelson Dinamarco

Nelson Dinamarco
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)