Iatric Systems M'U'S'E' 2006 International Tuesday Training Intro to Clinical Rule Writing - PowerPoint PPT Presentation

1 / 96
About This Presentation
Title:

Iatric Systems M'U'S'E' 2006 International Tuesday Training Intro to Clinical Rule Writing

Description:

Use of Local Variables. How to apply rules in your application ... You may also check for drug mnemonics using: [lord drug info] LAB Important data fields ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 97
Provided by: iat6
Category:

less

Transcript and Presenter's Notes

Title: Iatric Systems M'U'S'E' 2006 International Tuesday Training Intro to Clinical Rule Writing


1
Iatric SystemsM.U.S.E. 2006 InternationalTuesday
TrainingIntro to Clinical Rule Writing
  • Presented by
  • Jason Medeiros
  • Iatric Systems

2
Rules Course Agenda
  • Basic Rule Syntax
  • Using Data fields, queries
  • IF Statements
  • Use of Local Variables
  • How to apply rules in your application
  • Different types of rules
  • Output
  • Where are rules attached?
  • Important data fields in each application

3
Functions of Clinical Rules
  • Rules allow you to evaluate criteria and perform
    a response
  • Restrict ordering of medications/tests
  • Send notifications to staff via MOX
  • Calculate LAB values for RPh review
  • Change a field value
  • Generate notification of NUR intervention

4
(No Transcript)
5
(No Transcript)
6
(No Transcript)
7
Rule Syntax
  • Basic Guidelines
  • All rules must end with a semi-colon
  • Every line within the Rule editor must end in a
    comma or semi-colon
  • Each line of programming code is limited to the
    visual space provided in the Rule editor.
  • This is my warning message to the Meditech
    user"MSG,
  • IFf pt sex"M" f rx msg(MSG)
  • f rx ok

8
Accessing/Utilizing Data Fields
  • Data Fields reference Permanent and/or Temporary
    information.
  • Data fields may perform action or Calculations
  • Access
  • Use the get key (F4 on PC)
  • Then F space and your lookup key
  • You may seed the lookup to quickly find fields

9
(No Transcript)
10
Data Fields Permanent data
  • Always available in Rules
  • pt admit dr 30 Patient's admitting
    provider's name
  • pt admit dr mne 10 Patient's admitting
    provider
  • pt los 3 Discharged patient's
    length of stay
  • pt name 30 Patient's name
  • pt nok 30 Patient's next of kin
  • pt oe wt kg 6 Patient's oe weight
    in kg
  • pt sex 1 Patient's sex

11
Data Fields Temporary data
  • Data may or may not be entered yet
  • lord col date 8 Lab order collection
    date
  • lord col day 3 Lab order collection
    day of wk
  • rx ord type 10 Rx's order type
  • rx order site 10 Rx's order site
  • rx sig 20 Rx's sig
  • ord ser dt 8 Service date
  • ord ser tm 4 Service time

12
Data Fields - Calculated
  • day of week 3 Current day of week
  • days old 4 Days before today()
  • lord lab test 1 Lab order lab test()
  • lord lab today 1 Lab test already ordered
    today()
  • lord get pt age 3 Patient age
  • today 8 Today's date

13
Data Fields Perform Action
  • rx msg 60 Rx message()
  • rx set billing code 60 Rx set billing
    procedure code to()
  • rx set charge type 60 Rx set charge type
    to()
  • rx set rx comment 60 Rx set rx comment to()
  • ord err msg 60 Order error message()
  • ord msg 60 Order message()
  • ord reject 0 Order REJECT
  • ord yes/no 60 Order ask yes/no()

14
Using Query Values in Rules
  • You may pull Customer Defined Query values into
    Rules to be evaluated.
  • Access
  • Use the get key (F4 on PC)
  • Q space and your lookup key
  • You may seed the lookup to quickly find queries

15
Using Query Values in Rules - Issues
  • Queries may not have a value when the particular
    rule is running
  • If your value does not work as designed, try this
    trick
  • Example
  • f rx msg(Allergy1 _q OE.ALL1)
  • This syntax will display the value of OE.ALL1 in
    a yellow box. You will then be able to determine
    if the rule is getting the query value properly.

16
What is an Argument?
  • Definition An argument is a value that is passed
    into the data field to be used by that data
    field.
  • An Argument may be
  • Text message
  • Another Rule Mnemonic (CALC Rule)
  • Local Variable

17
Argument Required Parentheses in lookup
18
Some data fields require an argument
  • If parentheses appears in the lookup for the data
    field then an argument is required
  • You will receive an ERROR message from the syntax
    checker if an argument is not utilized
  • If there is a comma in the lookup, then two
    arguments are required

19
What should my argument be?
  • There is no easy way to tell what the argument of
    a data field should be, although it is usually
    possible to discern this from the field
    name/description
  • Consult the Meditech L list
  • Other expert sources?

20
Local Variables
  • Used for the temporary storage of information
    during the processing of the rule
  • Used to
  • Store information for future processing, such as
    calculated values
  • Store large strings into smaller names in order
    to conserve space in the Rule Text Editor
  • Your local variables are created and available
    only during the processing of the current rule

21
Local Variables How to create
  • Example
  • "This is my warning message to the Meditech
    User."MSG,
  • IFf pt sex"M" f rx msg(MSG)
  • f rx ok
  • Use local variable MSG to store the message
  • Refer to MSG in the IF/THEN statement

22
Local Variables- Naming Conventions
  • Use Capital-Alpha-Numeric characters
  • Use at least 3 characters
  • Use short, descriptive, meaningful names
  • Example
  • MSG
  • CREAT
  • NAME
  • LNAME
  • FNAME

23
Local Variables what NOT to use
  • Meditech uses its own local variables while the
    screen is functioning. You should take care not
    to overwrite the following local variables in
    your code
  • X ANS R S
  • A B C
  • Can you think of others?

24
The Assignment Operator (?)
  • Shift-6 on your keyboard
  • Used to
  • Assign a value to a variable
  • Display a value on the screen
  • Erase a value
  • Example
  • Please change inventory to MAINMSG,
  • We read this as Message text goes to local
    variable MSG.
  •  

25
Relational Operators
  • Used to compare values to determine a TRUE/FALSE
    relationship
  • MAGIC Relational Operators
  • Operator Explanation
  • ' Not
  • Equal to
  • Not Equal to
  • gt Greater Than
  • lt Less Than
  • gt Not Greater Than (less than or equal to)
  • lt Not Less Than (greater than or equal to)

26
Relational Operators - Example
  • "Please obtain parental consent.MSG,
  • IFf pt cur agelt18 f lord msg(MSG)
  • f lord ok
  • Store the display text in MSG
  • Check pt current age and if less than 18, display
    the message to user

27
Relational Operators Nil vs. Non-nil
  • In Magic, each operation will maintain a value
  • If the evaluation is true, the value on the LEFT
    side becomes the value of the operation
  • 5gt4 TRUE ....5 is the value
  • If the evaluation is false, nil becomes the value
    of the operation
  • 4gt5 .FALSE is the value

28
Relational Operators - Examples

29
IF/THEN/ELSE Statements -Syntax
  • IF/THEN
  • IFcondition response1response2
  • Example
  • IFf pt sex"M" f rx yes/no(Drug is
    male-specific. Order anyway?")
  • f rx ok
  • There is a space between the condition and
    response. The space represents the THEN"
    portion of the IF/THEN statement.
  • The semi-colon represents the separation between
    the first condition/response pair. The
    semi-colon is the "ELSE" portion of the
    IF/THEN/ELSE statement.

30
Multiple Condition Statements
  • IFcondition1 response1
  • condition2 response2
  • response3
  • Each condition will be evaluated moving from left
    to right
  • If condition 1 is true, then response 1 will be
    performed and no other conditions will be
    evaluated.
  • If condition 1 is false, then condition 2 will be
    evaluated. If condition 2 is true, response 2 is
    performed.
  • If both conditions 1 and 2 are false, then
    response 3 is performed.

31
IF/THEN/ELSE Statements Syntax (ctd)
  • Example
  • IFf pt facility"A" f lord use
    billcode("A1234")
  • f pt facility"B" f lord use
    billcode("B1234")
  • f pt facility"C" f lord use
    billcode("C1234")
  • f lord ok
  •  Note
  • Indentation of the conditions proper
    formatting

32
Boolean Operators
  • Compare using AND and OR relationships.
  • For example
  • Display a message if the patient is male AND
    older than 65.
  • Notify user to order test as STAT if the patient
    is in the location of ICU OR CCU.

33
Boolean Operators (ctd)
  • Operator Boolean Equivalent
  • ! OR
  • AND

34
Boolean Operators - Examples
  • "Ask for date of LMP.MSG,
  • IFf pt sex"F"(f pt cur agegt15) f lord
    msg(MSG)
  • f lord ok
  • If both conditions are TRUE, display message
  • "Cannot order test.MSG,
  • IFf pt sex"M"!(f pt cur agelt10) f lord
    msg)(MSG)
  • f lord ok
  • If either condition is TRUE, display message
  • Note Parentheses used in the expression!

35
Application Specifics Similarities
  • OE/LAB/PHA share some common characteristics
  • Data fields In all apps, there are data fields
    which will perform a function such as display a
    message to a user
  • f lord msg(Please call LAB regarding this
    test!)

36
Application Specifics Similarities
  • Certain fields will allow the user to file or
    reject the order.
  • In general, a rule will allow filing if its FINAL
    VALUE is a non-nil value. If the final value is
    nil, the user is stopped.
  • f ord ok Order is ok, allow filing.
  • f ord reject Order is not ok, do not allow
    filing.
  • f rx err msg(Patient is Male. You may not
    place this order.)
  • Error message- Do not allow filing.

37
Application Specifics Similarities
  • Prompt user to continue
  • Current time is after hours. Order
    anyway?MSG,
  • IF(0700gtf now)!(1500ltf now) f lord
    yes/no(MSG)
  • f lord ok
  • If user answers Y, then allow filing. If user
    answers N, then do not allow filing.

Prompt User
38
Application Specifics - PHA
39
Application Specifics - PHA
  • Types of Rules
  • RX Rules
  • Calc Rules
  • Bill Rules
  • Purge Rules
  • Adj Rules seldom used
  • DUE Rules seldom used

40
PHA RX Rules Evaluate at
41
PHA RX Rules Evaluate at
  • MED - When the medication is identified
  • DOSE - When the dose is specified
  • FILE - When the Rx is filed
  • TXN - During the billing compile before Rx is
    sent to B/AR
  • REFILL When Refill List is run or Check Refill
    Rules routine is run
  • STOP - When you enter a Stop Date and file the
    order

42
PHA POM Enabled
43
PHA- POM Enabled (ctd)
  • POM MED Identify the MED in POM
  • POM DOSE- Enter a DOSE in POM
  • POM FILE Enter a stop date for an order in POM

44
PHA Page 2
45
PHA- Page 3
46
PHA Page 4
47
PHA Rule View
48
PHA RX Rules Where to attach?
  • Global Rules Attached in Customer Defined
    Parameters Page 4
  • Evaluated for ALL orders
  • Drug Specific Rules Attached in the PHA Drug
    Dictionary Page 4
  • Evaluated only for this drug

49
PHA Global RX and Purge Rules
50
PHA- Print Profile routine
51
PHA- CALC Rules
  • Referenced by RX rule using f rx calc

52
PHA BILL Rule
  • Charge Type Dictionary

53
PHA - Important Data Fields
  • Field f rx reject
  • Description Returns a nil value. This field is
    used to return as a result of a condition
    specified in the rule. User may NOT continue
    with the order. Seldom used.

54
PHA - Important Data Fields
  • Field f rx set billing code
  • Syntax f rx set billing code(X)
  • Argument X is the billing procedure code you
    intend to set.
  • Description Use this field to modify the billing
    code for an Rx based on a condition. This
    billing code must exist in B/AR database.

55
PHA - Important Data Fields
  • Field f rx set charge type
  • Syntax f rx set charge type(X)
  • Argument X is the charge type you would like to
    default for this Rx.
  • Description This field will set the charge type
    for this Rx. The charge type must be valid in
    the Charge Type Dictionary.

56
PHA - Important Data Fields
  • Field f txn qry resp
  • Syntax f txn qry resp(X,Y)
  • Arguments There are two arguments required for
    this field. X is the value you are sending. Y
    is the MIS query mnemonic you have setup to store
    the value you are sending. This query is used on
    the B/AR side and is attached to a CDS of type
    BAR TXNS
  • Description This field is used to send
    additional query information to B/AR in an Rx
    rule evaluated at the TXN level.

57
PHA - Important Data Fields
  • Field refill rule msg()
  • Syntax refill rule msg(X)
  • Argument X message to display on the Refill List
  • Description Will print on the Refill List
    printout if the rule fails and generates a
    message

58
PHA - Important Data Fields
  • Field f rx last ver result
  • Syntax f rx last ver result(X)
  • Argument X is the lab test mnemonic that you are
    querying.
  • Description Returns the last verified result
    stored in LAB for this patient and test.

59
PHA - Important Data Fields
  • f rx nth ver Res-COL(PSA",1)
  • Returns result, collection date and collection
    time of the most recent PSA TEST.
  • A argument LAB TEST Mnemonic/print number
  • B argument Which LAB result to retrieve. 1 is
    most recent, 2 is next recent, 3 is third most
    recent

60
PHA - Important Data Fields
  • f rx nth ver Res-RES(PSA",1)
  • Returns result, result date and result time of
    the most recent PSA TEST.
  • A argument LAB TEST Mnemonic/print number
  • B argument Which LAB result to retrieve. 1 is
    most recent, 2 is next recent, 3 is third most
    recent

61
PHA - Important Data Fields
  • You can parse out the data from these keywords
  • Use String Extraction
  • Example
  • TEST"0,"RES RESULT
  • TEST"1,"DATE DATE
  • TEST"2,"TIME TIME

62
PHA - Important Data Fields
  • Field f pur do purge
  • Syntax f pur do purge
  • Description This field is used to return as a
    result of a condition specified in the rule. Use
    this field to purge the record.

63
PHA - Important Data Fields
  • Field f pur do not purge
  • Syntax f pur do not purge
  • Description This field is used to return 1 as a
    result of a condition specified in the rule. Use
    this field to prevent the purge of the record.
  •  

64
PHA Custom Keywords
  • Meditech allows PHA users to create your own
    Custom Keywords. Use this feature to
  • Access fields not available in lookup
  • Call custom NPR macros to
  • Search pt profile for a Generic
  • Send a MOX message
  • Perform complex calculations

65
PHA Custom Keywords
66
Custom Keywords in other Apps
  • The E/E Custom Keywords routine is ONLY available
    in PHA
  • For OE/LAB/SCH, you may request custom keywords
    from Meditech.
  • When doing so, BE SPECIFIC in your request.

67
Application Specifics LAB
68
Application Specifics - LAB Rule Types
  • BBUNIT - Check format of BBK Unit numbers.
    Assigned in the BBK Source/Destination Dictionary
  • BBASSN BBK Assignment/Issue rules may allow or
    disallow the assign/issue of blood units.
  • BCCHK Check bar code formats
  • CHG Add miscellaneous charges to certain tests

69
Application Specifics - LAB Rule Types
  • ORD Order rules restrict ordering of LAB Tests
  • BSP/LSP/MSP/PSP Control the selection of
    specimens that use Selection Profiles
  • LBCAST Control download of specs to analyzers
  • PQL Customize Pathology Questionnaire Logic

70
Application Specifics - LAB Rule Types
  • PTID Verify PT ID formats for external LABS
  • PURGE Control purging of LAB records
  • REFLEX Control reflex ordering of tests
  • SITE Assign LAB Site to a requisition
  • VERIFY Control results notification

71
POM Enabled?
72
POM Enabled? Provide user options
Online help
73
LAB Rules Where to Attach?
  • Test Dictionary ORD/CHG/Site Rules
  • BBK Test/Product/Source/Destination Dictionary
    All BBK Rules
  • Micro- Procedure, Organism dictionary

74
LAB Rules Where to Attach?
  • Order Group Dictionary RFLX Rules
  • Pathology Questionnaire Dictionary PQL Rules
  • Analyzer Dictionary LBCAST Rule
  • LIS Client Dictionary PT ID Rule

75
Attach multiple rules per TEST
New!
76
LAB Important data fields
  • Field f lord lab test
  • Syntax f lord lab test(X)
  • Argument X is the LAB Test Mnemonic you are
    checking for
  • Description Returns a (Y)es if the Lab test has
    been ordered during the same
    requisitioning session.

77
LAB Important data fields
  • Field f lord lab today
  • Syntax f lord lab today(X)
  • Argument X is the LAB Test Mnemonic you are
    checking for
  • Description Returns a (Y)es if the Lab test has
    been ordered today.

78
LAB Important data fields
  • Field f lsp last ver result
  • Syntax f lsp last ver result(X)
  • Argument X is the LAB Test Mnemonic you are
    checking for
  • Description Will return the last verified test
    result for the test mnemonic in the argument.

79
LAB Important data fields
  • Field f lord gen info
  • Syntax f lord gen info(X)
  • Argument X is the Generic drug you are
    checking for
  • Description Returns the status of an RX that
    contains the generic - AC/UNV/DC
  • You may also check for drug mnemonics using
  • lord drug info

80
LAB Important data fields
  • Field f psp view rel find
  • Syntax f psp view rel find
  • Description This field will display the Related
    Findings screen in Pathology. This would
    typically be used with a POST rule.

81
LAB Important data fields
  • Field f ppr set response
  • Syntax f ppr set response(Mnemonic,Text)
  • Arguments Mnemonic of the prompt you want to
    set, TEXT to default into the prompt
  • Description This field will set the response for
    another prompt response within the questionnaire.
    This field will typically be used with a POST
    rule.

82
Application Specifics - OE
83
Application Specifics - OE
  • Types of Rules
  • ORD Evaluated when user FILES order
  • OUTPUT Control printing of reqs
  • PTDATA Evaluates entry of Patient Data in E/E
    Administrative Data routine. seldom used

84
POM Enabled?
85
POM Provide options to user
86
OE Rules Where to attach?
  • ORD- Attached Page 1 Procedure Dictionary.
  • OUTPUT Attached Page 2 Procedure Dictionary
  • PTDATA - Linked via a query attached in the OE
    Parameters

87
Attach multiple rules
New!
88
OE Important data fields
  • Field f do not print
  • Syntax f do not print
  • Description This data field will suppress the
    printing of a requisition when used as the last
    value of a rule.

89
OE Important data fields
  • Field f do print
  • Syntax f do print
  • Description This data field will allow the
    printing of a requisition when used as the last
    value of a rule.

90
OE Output Rules
  • Do Not print REQ if on a Weekend

91
Output Rule Attach to Procedure
92
Application Specifics NUR
New!
  • Generate Clinical Alerts when Interventions are
    documented
  • Attached in Intervention Dictionary

93
NUR Intervention dictionary
94
NUR Rule Old school dictionary
MIS Notification Mnemonic, Level, Detail
95
NUR Important data field
  • Field f pt notification(ca,lev,det)
  • Syntax f pt notification(ALERT,Med,MSG)
  • Description This field generate an MIS Clinical
    notification, as specified in the MIS
    Notification dictionary.
  • Arguments
  • ALERT MIS Notification mnemonic
  • Med Level
  • MSG Detail to include on notification

96
For more information..
  • Our I-Online Learning courses are a great way to
    present this
  • material to your entire staff simultaneously
    for a fraction of
  • the cost of On-site training.
  • See our website for our Summer Course Schedule!
  • Iatric Systems
  • www.iatric.com
  • 978 805 4100
  • Enjoy the Conference!
Write a Comment
User Comments (0)
About PowerShow.com