Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced Calculations

Similar presentations


Presentation on theme: "Advanced Calculations"— Presentation transcript:

1 Advanced Calculations
By Nick Felts

2 Objectives This course will attempt to cram the following subjects into your brain… Variables Functions Preservation of historical results Looping Suggested pre-requisite Calculations for beginners Coffee!

3 Variables $N:=@FISH+10; @FISH>30?@FISH:
$N+ One letter code to represent a calculation Useful in long calculations or when the same expression is used multiple times

4 Variables $C:=@CAT+@DOG; $A:=@LOW+@HIGH; 186*$C*$A Same as…
Pommegrannite

5 Functions Pre-defined commands that are used to perform a designated operation POW GETDBF MATCH Follow the Syntax! Each Function is unique.

6 POW POW(.45*@WT,.425)*POW(2.54*@HT,.725)/139.3 POW( base , exponent )

7 ANY ANY(@TEST) or #@TEST Looking to see if test has been ordered
+ Same as +

8 ANY Turn into Not statement using “!”
+ Same as +

9 STRCOMM STRCOMM("ORD_COM", "Diabetic") PAT_COM STAY_COM ORD_COM
STRCOMM( "STAY_COM", "Platelet clumper")&&

10 GETDBF GETDBF("field") Available fields ->
DBFLD (stop using this on 4.0 lines!) Available fields Sex Race Age Ward Doctor Many more….

11 GETDBF("SEX")=="F"?@TESTO+" @CM":@TESTO

12 $A:=POW(((@CREAT->"AGE")/365.25),0.203)
                               

13 MATCH("*@ADA1*",$@GLUFS)?$@GLUFS:
MATCH( "what" , where ) Can use wild card * @ADA1"

14 MATCH MATCH("Heparin",$@ACOAG)|| MATCH("Coumadin",$@ACOAG)?

15 MATCH MATCH("<100",$@NA)|| MATCH("<150",$@CL)||
? :

16 MATCH MATCH("Negative",$@ULEUC)?$@ULEUC: $@ULEUC+" @UCMD "

17 Preserving Historical Results
2 ways GETDBF GETDBF("ACCDATE")> ? "New MESEXPDATE MESEXPDATE("CMID",GETDBF("ACCDATE"));<<CMID>> MESEXPDATE("NICK",GETDBF("ACCDATE"));<<NICK>>

18 Looping 3 Types 3 solutions Cyclic dependencies Change precision
Absolute Expression Keep adding canned message 3 solutions Build separate test Canned message STRSTR or MATCH function

19 Cyclic dependencies Problem Test HGB contains calculation… @HGB/3

20 Cyclic dependencies Solutions Build a new test Add @L HGBI
HGB (reportable) @HGBI/3 @L"

21 Changing Precision Problem Alphanumeric Test contains calculation
.25 becomes

22 Changing Precision Solution Build the test as Numeric Add @L
@VZV>0.8&&

23 Absolute Expression Problem Numeric Results changed to Alphanumeric
@TST>5?"POSITIVE": "NEGATIVE" Result will always be NEGATIVE

24 Absolute Expression Solutions Build a new test TSTI TST (reportable)
@TSTI>5?"POSITIVE": "NEGATIVE"

25 Continuously Adding Canned Messages
Problem :

26 Continuously Adding Canned Messages
Solution MATCH @COUM": STRSTR ==

27 Complicated Examples!

28 GFR Many variations Setup Create task for assistance
Do you always receive race? Interpretive comments? Setup Canned Messages For extra characters and ease of expiration Create task for assistance

29 One Test – No Comments $F:=GETDBF("SEX")=="F"?0.742:1;
$B:=GETDBF("RACE")=="B"?1.21:1); *$F*$B; $X>60?">60":$X

30 One Test – Adding Comments
$F:=(GETDBF("SEX")=="F"?0.742:1); $B:=(GETDBF("RACE")=="B"?1.21:1); $V:=186* $X:=$V>60?">60":$V; $A<20?$X: (($A>=20 && $A<30) ? $X + : (($A>=30 && $A<40) ? $X + : (($A>=40 && $A<50) ? $X + : (($A>=50 && $A<60) ? $X + : (($A>=60 && $A<70) ? $X + : (($A>=70) ? $X + :$X)))))),$X

31 Tips… Test all possible answers Combat looping
Don’t cut and paste from s or Word Use Notepad

32 Questions?


Download ppt "Advanced Calculations"

Similar presentations


Ads by Google