Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conditional Logic 2006 By Donald T. Stewart, MD Practice Partner User Group 2006.

Similar presentations


Presentation on theme: "Conditional Logic 2006 By Donald T. Stewart, MD Practice Partner User Group 2006."— Presentation transcript:

1 Conditional Logic 2006 By Donald T. Stewart, MD DonS@PineLakeMed.com Practice Partner User Group 2006

2 GOALS Demonstrate how Conditional Logic works in Practice Partner Demonstrate common errors and problems with using Conditional Logic Demonstrate applications of Conditional Logic in Templates Answer questions on Conditional Logic.

3 Resources Practice Partner Help –Search “conditional logic”,then choose “letter templates” Conditional Logic Tutorial 2006 PDF –On your USB flash drives –At the Practice Partner Web Site (soon) This Slide Show (Conditional Logic 2006.ppt ) –Soon to be on PP Web Site –Email me (DonS@PineLakeMed.com)

4 Conditional Logic and Practice Partner Conditional logic is a powerful tool built into Practice Partner that enables the user to build and design templates and quick text that change based upon patient information. The information can be Age, Sex, Lab Values, Vitals, and by using Lab Values creatively, clinical data.

5 Letters to Patients An obvious use of conditional logic would be to design lab letters that convey different messages to the patient based upon whether a lab value was normal or not. In fact, the Practice Partner “Help” facility has traditionally discussed conditional logic under Letter Templates, and the documentation refers to “letter codes.”

6 How CL Works The most basic statement is in this form: || IF {this happens}|| For example || IF PAT_SEX = “male” {he} || In the above, everything between the two || delimiters will be replaced with the word “he” if the patient is a male, and the phrase will evaluate to nothing if the patient is not a male.

7 IF The is a letter code. PP Help has a list of letter codes, but it is easier to see more examples by going to the Maintenance Menu  Tables  QuickText, then press the letter code radio button You can use values like ||PAT_SEX||, ||PAT_AGE||, and ||LAB ||, as well as ||BODY_MASS_INDEX|| and ||VITAL_HGT||, as well as the other vital signs.

8 is a Logical Operator –=means “equal to” –<>means “not equal to” –<means “less than” –<=means “less than or equal to” –>means “greater than” –>= means “greater than or equal to” Comparisons are done as Strings, not Numbers

9 is a string. The documentation says it can be a letter code, but this does not work (as of 8.2.1) has to be quoted, e.g. –||IF PATIENT_SEX = “male” { } || –||IF LAB > “160” { } || The Quote Marks can’t be curly (“”), must be straight ("") “Nothing” or “No Value Found” = “”

10 {this happens} {this happens} means that whatever is between the curly braces { } is printed or evaluated if the CL statement preceding it evaluates to “TRUE” If the CL statement preceding the { } does not evaluate to “TRUE,” then nothing is done with whatever is between the braces.

11 ELSE You can add an ELSE { } behind the first pair of { } to print an alternative statement or do a new comparison For example: || IF PAT_SEX = “” {he or she} ELSE { IF PAT_SEX = “male” {he} ELSE {she}} ||

12 CL and HM I erroneously wrote that HM did not work with CL in the PDF distributed on your flash drives. The issue is that there may be problems testing || IF HM = “X” { } else { } || The correct way to do this is: –|| IF HM = “” {needs to be done} ELSE { HM } ||

13 Formatting You can use carriage returns and “white space” to make your statements more readable: || IF PAT_SEX = “” {he or she} ELSE { IF PAT_SEX = “male” {he} ELSE {she}} || As opposed to : || IF PAT_SEX = “” {he or she} ELSE { IF PAT_SEX = “male” {he} ELSE {she} } ||

14 AND and OR To get more complex, you can use AND or OR after your first comparison and before your first “{“. || IF PAT_SEX = “male” AND PAT_AGE > “50” {he might just need a prostate exam} || IF, ELSE, AND and OR used in conditional logic must be capitalized

15 Logical Statements within Logical Statements You can put a complete logical statement within a pair of { } || IF LAB [-Date] < "40" AND PAT_SEX ="male" { The HDL is too low.} ELSE {IF LAB [-Date] < "50" AND PAT_SEX = "female" {The HDL is too low} ELSE {The HDL is OK} } ||

16 Spaces: the Necessary Nothings Spaces are important in some situations. For example, | |IF PATIENT_AGE >"65" {bill Medicare}|| will not evaluate correctly because there is no space between the > and the "65". You need a space before and after the keywords AND, OR, and ELSE. You need a space after the keyword IF, but it is OK not to have a space in front of it if a curly brace ({) or double bars (||) are in front of it. You need a space between the last set of double bars in one expression and the first set in the next. For example | |IF LAB > "130" {Too High}||||IF LAB > "160" {GOOD}|| Will not evaluate due to lack of a space between the two expressions, but ||IF LAB > "130" {Too High}|| ||IF LAB > "160" {GOOD}|| will evaluate just fine.

17 The Code The code will insert a carriage return when it is inserted between the { } Without a code, no carriage return will be recognized This is necessary if you want to load something within the { } with a dot code, since dot codes must be at the beginning of a line

18 Code Example || IF LAB = "" {Your cardiovascular risk stratification is.L: CV Risk: «*Low» «*Moderate»} «*High» } ELSE {Your cardiovascular risk stratification is LAB [- Date]} ||

19 Uses of Conditional Logic Customize templates for –Sex (discussed earlier) –Disease –Habits –Age or HM Status –Update Problem List automatically based on Vitals –Change font or color of text based on conditions –Modify your Physical Exam template based on Sex and previous findings

20 An Aside: Storing Clinical Data as Lab values Up to about 18 characters of clinical data can be stored as lab data values. To do this, you need to create a Lab data Maintenance-  Templates-  Lab Data Test Names-  then click on the “New” button on the Test Name Screen

21 Customized Clinical Lab Data Names: DiabetesDxDate SmokingStatus Smoke#years PacksPerDay AUA Score HasHomeNebulizer RescueInhalerFreq ThyroidNodule CarotidScar VibrationSense DPPulse ROM Neck Murmur1Location Murmur1Loudness Murmur1Quality Murmur1Location Murmur1Timing EjectionFraction

22 Customize Templates for Disease Assume that the lab value DiabetesDxDate contains something if the patient has diabetes, and is blank if the patient does not. This requires the provider to consider the foot exam if the patient is a diabetic: ||IF LAB <> “” {«REQ» «*FootExam» } ELSE { «*FootExam»} ||

23 Customize for Age and HM Status ||IF PAT_AGE > “49” AND LAB <> “never” {«REQ» «*Colonoscopy» } || The above and previous examples have a carriage return after the line with the «REQ» on it because the editor will not save a template with anything after a «REQ» other than quick text.

24 Update Your Major Problem List Automatically Based on BMI ||IF BODY_MASS_INDEX > "30.0" {.MP: OBESITY} || (PPRnet members can profit from this)

25

26 Flag Abnormal Lab Values «del»||LAB [-Date]|| || IF LAB > "6.5" {«***WARNING Not to Goal of less than 6.6 WARNING***...»} || Because the warning is between the «», it will not show when the note is saved.

27

28 Change Formatting Based on Conditions ||LAB [-Date]|| < "10" {Desirable is less than 10. Patients with an Lp(a) of 10 or above have a 2 - 3 times greater risk of cardiac event than average.} ELSE {Desirable is less than 10. Patients with an Lp(a) of 10 or above have a 2 - 3 times greater risk of cardiac event than average. Elevations in Lp(a) tend to be inherited in an autosomal dominant pattern. This means that it would be wise for you to have your direct relatives ask to be tested for it. LP(a) is not affected by diet or exercise. It has not been proven that lowering Lp(a) will result in lower risk, though many people believe that this may be true. We do know that lowering the total LDL to 70 or below does greatly reduce the risk of an elevated Lp(a). } || (The above is from a lab letter I send explaining the VAP results, where I give more of an explanation and bold the text when a result is abnormal)

29 Conditional Logic in the Physical Exam You can modify your physical exam template so that you are presented with age or sex-appropriate options You can also modify your physical exam template to remind you of previous findings, if you saved those findings as lab values (or as clinical data elements in 9.1)

30 Customizing Exam Based on Previous Physical Findings - CHEST: || IF LAB = "True" { «*ChestAbnormal»} ELSE {Thorax had no significant bony abnormalities «*ExcpChest».} || Ribs & sternum nontender«*ExcpTendr».

31 If Previous Chest Exam Normal:

32 If Previous Chest Exam Abnormal:

33 When You Click “*ChestAbnormal”:

34

35 The Items on the “*Chst…” menu:

36 The Saved Note:

37 Questions?

38 Thank You Feel free to email me for questions at DonS@PineLakeMed.com


Download ppt "Conditional Logic 2006 By Donald T. Stewart, MD Practice Partner User Group 2006."

Similar presentations


Ads by Google