Advanced Calculations

Slides:



Advertisements
Similar presentations
A Level Computing#BristolMet Session Objectives#U2 S2 MUST describe the steps of an algorithm using a program flowchart SHOULD explain the data types and.
Advertisements

Python Magic Select a Lesson: Why Learn to Code? Basic Python Syntax
Adding and Subtracting Numbers in Scientific Notation
.
Ch 9: Quadratic Equations B) Square Roots Objective: To solve quadratic equations using square roots.
1.2 – Evaluate and Simplify Algebraic Expressions A numerical expression consists of numbers, operations, and grouping symbols. An expression formed by.
Algebra By : Monte. Term The number or an Expression that are added in a sum.
If you had an equation like 7x+4 + 3x +2 you would separate like terms like this. 7x+3x add these together to get 10x + 6 to get your answer.
End of unit assessment Challenge 1 & 2. Course summary So far in this course you have learnt about and used: Syntax Output to screen (PRINT) Variables.
Trinity College Dublin, The University of Dublin GE3M25: Computer Programming for Biologists Python Karsten Hokamp, PhD Genetics TCD, 03/11/2015.
CSE 201 – Elementary Computer Programming 1 Extra Exercises Sourceshttp://
Warm Up Introduction to Polynomials and Adding and Subtracting Polynomials.
POWERS and ORDER of OPERATIONS PRE265 Parentheses (includes brackets) Exponents & Roots Multiplication & Division (left to right) Addition & Subtraction.
11.6 Adding and Subtracting Rational Expressions
Functions Commands Programming Steps Examples Printing Homework Hints.
BUSINESS MATHEMATICS & STATISTICS. LECTURE 4 Review Lecture 3 Calculating simple or weighted averages Using Microsoft Excel.
Scientific Notation.
2.5 Solving Equations Involving Absolute Value
2-7 Variables and Algebraic Expressions Warm Up Problem of the Day
Topics Designing a Program Input, Processing, and Output
Pre-Algebra Review Quiz tomorrow!.
Advanced Calculations
The greatest mathematical tool of all!!
Multiplying Powers With The Same Base.
To solve absolute value equations and inequalities in one variable
Presented by Nick Felts
The Distributive Property
Algebra.
Calculation Basics By Nick Felts.
Lesson 1.1 How do you evaluate and write variable expressions?
MULTIPLICATION OF ALGEBRAIC EXPRESSIONS
Chapter 5.5 Slides 1-19 Math 7.
Calculations - Advanced
Exponents An exponent is the number of times the base is multiplied by itself. Example 27 can also be written as 3 This means 3 X 3 X 3 3.
Algebra Algebra.
Ch 6.5 Absolute Value Equations
Equalities Inequalities < Is less than = Equals- is the same as
Variables In programming, we often need to have places to store data. These receptacles are called variables. They are called that because they can change.
Scientific Notation.
Scientific Notation.
Trace evidence used to create Rules
James R. Pomicter, BS, MLS(ASCP)
INTEGER RULES Positives & negatives.
Week August 2015.
L3 Numeracy Week 4 : Equations and Algebra
Exponents and Radicals review: Chapter 1
3.1 Iteration Loops For … To … Next 18/01/2019.
Computing in COBOL: The Arithmetic Verbs and Intrinsic Functions
Passport to Advanced Mathematics Lessons 1-2
Solving Linear Equations
Adding and Subtracting Polynomials
Unit 4 – Polynomials (Basics)
Topics Designing a Program Input, Processing, and Output
Class 4: Repetition Pretest Posttest Counting Flowchart these!
INTEGER RULES Positives & negatives.
Topics Designing a Program Input, Processing, and Output
Introduction to Repetition
Absolute Value The absolute value of a number is the distance from zero on a number line.
Base.
Introduction An exponent is a quantity that shows the number of times a given number is being multiplied by itself in an exponential expression. In other.
Introduction to Repetition
Heart of Algebra Lessons 1 & 2
The Distributive Property
SCIENTIFIC NOTATION ... a way to express very small or very large numbers that is often used in "scientific" calculations where the analysis must be very.
Solving Compound Inequalities And
§5.2, The Integers; Order of Operations
Double Brackets – Expanding – Without Coefficients – Card Match
Quadratic Factorisation – Without Coefficients – Card Match
Presented by Nicholas Felts
Simplifying Expressions – Multiplication – Card Match
Presentation transcript:

Advanced Calculations By Nick Felts

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!

Variables $N:=@FISH+10; @FISH>30?@FISH: (@FISH<10?$N*2+ " @LIE": $N+ " @LIE“) One letter code to represent a calculation Useful in long calculations or when the same expression is used multiple times

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

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

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

ANY ANY(@TEST) or #@TEST Looking to see if test has been ordered ANY(@AUER)?@BLAST + " @LEUK" :@BLAST Same as #@AUER?@BLAST + " @LEUK" :@BLAST

ANY Turn into Not statement using “!” !ANY(@AUER)?@BLAST :@BLAST + " @LEUK" Same as !#@AUER?@BLAST :@BLAST + " @LEUK"

STRCOMM STRCOMM("ORD_COM", "Diabetic") PAT_COM STAY_COM ORD_COM STRCOMM( "STAY_COM", "Platelet clumper")&& (#@CBCWD||#@CBCND)? "@CLUMP":@PLT

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

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

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

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

MATCH MATCH("Heparin",$@ACOAG)|| MATCH("Coumadin",$@ACOAG)? @PTI+" @PTTR":@PTI+" @PTNR"

MATCH MATCH("<100",$@NA)|| MATCH("<150",$@CL)|| MATCH("<5",$@CO2)|| MATCH(">40",$@CO2) ? "@GAP" : @NA-(@CL+@CO2)

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

Preserving Historical Results 2 ways GETDBF GETDBF("ACCDATE")>20060905? "New Calculation":$@TEST GETDBF("ACCDATE")<20070830?$@VITD*0.41:@VITD*0.04 MESEXPDATE MESEXPDATE("CMID",GETDBF("ACCDATE"));<<CMID>> MESEXPDATE("NICK",GETDBF("ACCDATE"));<<NICK>>

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

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

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

Changing Precision Problem Alphanumeric Test contains calculation @VZV>0.8&& @VZV<1.1?@VZV+"@EQU": @VZV .25 becomes 0.250000

Changing Precision Solution Build the test as Numeric Add @L @VZV>0.8&& @VZV<1.1? @VZV+ " @EQU" +" @L":$@VZV+" @L"

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

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

Continuously Adding Canned Messages Problem $@ACOAG=="COUMADIN"?$@PTI+ "@COUM" : ($@ACOAG== "HEPARIN"?$@PTI+" @HEPA":$@PTI)

Continuously Adding Canned Messages Solution MATCH MATCH(“*@*”,$@PTI)? $@PTI: ($@ACOAG=="COUMADIN"?$@PTI+" @COUM": ($@ACOAG== "HEPARIN"?$@PTI+" @HEPA":$@PTI)) STRSTR STRSTR($@PTI,"@")>0?$@PTI: ($@ACOAG == "COUMADIN"?$@PTI+" @COUM": ($@ACOAG == "HEPARIN"?$@PTI+" @HEPA":$@PTI))

Complicated Examples!

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

One Test – No Comments $F:=GETDBF("SEX")=="F"?0.742:1; $B:=GETDBF("RACE")=="B"?1.21:1); $X:=186*POW(@CREAT,1.154)* POW((@CREAT->"AGE"/365.25),-0.203) *$F*$B; $X>60?">60":$X

One Test – Adding Comments $F:=(GETDBF("SEX")=="F"?0.742:1); $B:=(GETDBF("RACE")=="B"?1.21:1); $A:=(@CREAT->"AGE"/365.25); $V:=186* POW(@CREAT,-1.154)*POW($A,-0.203)*$F*$B; $X:=$V>60?">60":$V; $A<20?$X: (($A>=20 && $A<30) ? $X + " @AV20" : (($A>=30 && $A<40) ? $X + " @AV30" : (($A>=40 && $A<50) ? $X + " @AV40" : (($A>=50 && $A<60) ? $X + " @AV50" : (($A>=60 && $A<70) ? $X + " @AV60" : (($A>=70) ? $X + " @AV70" :$X)))))),$X

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

Questions?