Presentation is loading. Please wait.

Presentation is loading. Please wait.

M.U.S.E Tuesday Training Introduction to CDS Attributes

Similar presentations


Presentation on theme: "M.U.S.E Tuesday Training Introduction to CDS Attributes"— Presentation transcript:

1 M.U.S.E. 2007 Tuesday Training Introduction to CDS Attributes
Presented by: Jason Medeiros Iatric Systems

2 Attribute Introduction
What are attributes? What types of attributes are there? When do they work? What do they do? Things to remember… Where do you put them?

3 Attribute Definition Attributes allow hospitals to make Customer Defined Screens more interactive. Skip Queries Default Responses Evaluate Data entered in Queries Attributes require a basic knowledge of Magic programming

4 Attributes are statements that:
Decide when to answer the question Determine valid responses to the question Display messages to the user based on variable criteria Default responses Provide Quality Control

5 What types of attributes are there?
DFT - Default FCL – Field Check IFE – Before you get to a field REQ (and REQI) - Required

6 Where do you put the attribute?
In the MIS Enter/Edit Customer Defined Screen Attributes are assigned to the query detail of the CDS. The same query can have different attributes on different CDSs. To enter/edit an attribute, move the cursor to the Edit A/D column for the query and type in “A”.

7

8 When do attributes work?
DFT and IFE statements work before the user has an opportunity to answer the question. IFE statements are invoked before DFT. As a result, DFT statements may not function if used in combination with IFE statements. FCL and REQ statements work after the user has answered the query .

9 IFE Attribute – What does it do?
Intended: Determine whether or not the user can answer the query. If the expression is false, the cursor will bypass this field so that it cannot be edited. If expression is true, cursor will stop. Optional: Can perform calculations, call NPR reports/macros, manipulate data, send messages, call other CDS’s, etc.

10 IFE attribute - Evaluates At
Evaluated just prior to the cursor arriving at a field. IFE is the first attribute to be evaluated on the screen. The result of an IFE attribute may prevent other attributes from being evaluated on a particular query.

11 IFE – How it works IFE="" IFE = FALSE will cause the query to be skipped IFE=1 IFE = TRUE will allow the user to answer the question. If IFE equals ANY ANSWER, it is TRUE!

12 IFE attribute - Example
If the patient sex is equal to “M”, then the cursor will stop here. If the sex is equal to any other value, this query is skipped

13 IFE attribute - Example
This reads: “If there is a response then IFE = True” The result: If there isn’t a response to the OE.PAT field, the current query will be skipped.

14 Combination IFE examples:
IFE=([ANS,"NA "]|0="N”) Stop if sex is female AND answer to query is N, else skip Note the standard syntax for checking a response to a query on the screen: [ANS,”QUERY”]|0 Stop if sex is F and patient age is greater than 9 and less than 51, else skip Note the call to %Z.age

15 REQ/REQI Attribute- what does it do?
Intended: Make a query required either at time of entry or when screen is filed. Optional: Call a program or perform some operation when the user presses the file key – at the end of the screen!

16 There are two ways to make a query required.
REQ/REQI Attributes There are two ways to make a query required. 1. NO attributes: Answer the question in the CDS dictionary for each query. Answering this question with “Y” makes the query required all of the time.

17

18 How to make a query response required #2
2. Use REQ or REQI attribute. It is often used in conjunction with a matching IFE attribute.

19 REQI – Response required immediately

20 REQ/REQI attribute - Evaluates At
REQI - Evaluated IMMEDIATELY as the user exits the query. If a response is not entered, a warning message is displayed. REQ - Evaluated when the user presses the <file> key or reaches the end of the screen, causing the Meditech “file dialogue”. Example: A response will be required if the REQ or REQI attribute evaluates to true

21 DFT Attribute – What does DFT do?
Intended: Automatically default a response into the current query from a standard or customer defined field

22 DFT Attribute – How does it work?
It works before the user gets to respond to the query It only works if there isn’t a response to the query The response can be edited by the user

23 DFT Attribute –Several types of responses
System fields Text DFT=“Y” Response from previous query DFT=[ANS,”query mnemonic”]|0

24 DFT Attribute – issues The DFT is often difficult to use in practice. If there is an IFE attribute on the query, the cursor may not stop at the query and consequently the DFT attribute is not executed and the value is not defaulted into the query. Resolution: Use the IFE attribute to default the value. We’ll discuss that a bit later.

25 DFT- Examples of Data already in the system
-

26 DFT=@p.ADM.PAT.reason.for.visit

27 DFT - Default Text into the Response
DFT="1. Impaired mobility requiring use of walker/crutches” DFT="Y”

28 DFT=“No overt oral-pharyngeal dysphagia symptoms observed.”

29 DFT- Default response from a prev query
DFT=[ANS,"query mnemonic"]|0

30

31 DFT – Summary The benefit of the DFT format is that it is short and easy to set up. It works well unless you want to prohibit the user from editing the response. If you want to prohibit the user from editing the response, you will need to use an IFE statement instead (described later).

32 FCL1/FCL1A attribute – What does it do?
Intended: To check the user’s response and restrict them from responding with inappropriate values. Optional: Can check the response and display a message to the user (and still allow that response). Can also perform functions after the user responds such as send a MOX message.

33 FCL (Field Check Line) Attributes
When the user exits the field Only if the user edited the response To inform the user that an invalid response was entered. To inform the user of consequences of the response they entered. Reject a user response

34 FCLn and FCLnA - Description
FCLn and FCLnA work in conjunction with one another. Allow you to do error checking on a user’s response to a query. If the expression to the right of FCLn is true, the code in FCLnA will be executed. If the FCLnA attribute is executed, the input will be rejected. It is not required to have a FCLnA for each FCL. In the attribute name, n = an integer

35 FCLn and FCLnA – Evaluates at
FCL attributes are evaluated in sequential order based on the integer as a user leaves the field, after the REQI attribute Example – Notify user that the response is invalid: do not use a .<return>”) The FCL1 evaluates the user’s response and if equal to a “.”, will execute the FCL1A, which will display an error message to the user and reject the response.

36

37

38 FCL- Share Information
You may want to communicate information to the user based on the response to the query. For example: @W.err FCL1=("THIS FAX WILL PRINT IN MEDICAL RECORDS")} Note how the FCL code breaks on the first line and continues on the second line.

39

40 FCL - Ask the user if they are sure
@W.yes.no.y("Are you FCL1= sure?")} Note: the "y" at the end of defaults a "Y" into the query "Are you sure?". You can to default a "N".

41

42 Let’s DO something with FCL
The FCL can be used to actually DO something as well. For instance, the following attribute will take the user to the Nurses’ Notes section for this patient if the user answers the query with a “Y”. Note there is a <space> between the “Y” and %.

43

44

45 More good stuff with FCL
You can also use the FCL to change the response to another query. ""^/[ANS%0,"NA "]|0} P(4,30,” “:50)^#} Note: “ “:50 will paint 50 blank spaces on the screen

46

47

48 Attributes – System Fields
Response to current query @.response Old Response to current query @.response.old Current User Mnemonic @.user Current Date @.today Current Time @.now Facility @.facility Current Database @.db Current Directory @.dir Current MIS Mnemonic @.mis

49 Permanent vs Temporary fields
When creating is often used in front of a field name to refer to either the temporary file or the permanent file

50 Permanent fields Field has previously been filed into the Meditech database. Example - If you are in NUR and refer to an ADM field: signifies permanent field

51 Temporary fields Entered on the screen the user is currently processing and has not yet been filed into the Meditech database. These types of fields should be referenced using and then the field name. Example: Attribute on the OE Order screen to refer to the Category that the user entered while placing the order:

52 Multiple Type Queries The query is designated as a Multiple in Query Dictionary At least 2 lines of responses are visible on CDS User may enter an UNLIMITED number of responses Multiple query values are stored differently than standard queries

53 Multiple Responses are stored by QUEUE
Multiple Type Queries Multiple Responses are stored by QUEUE To refer to temporary query responses on the current screen: [ANS,”QUERY”,”M”,1]|0 [ANS,”QUERY”,”M”,2]|0

54 Multiple Type Queries (ctd)
To refer to a clinical customer defined query: @p.ADM.PAT.ccdqr.mult.response[“QUERY”,1] @p.ADM.PAT.ccdqr.mult.response[“QUERY”,2] To refer to a multiple type ADM Query @p.ADM.PAT.cdm.response[“QUERY”,1] @p.ADM.PAT.cdm.response[“QUERY”,2]

55 Basic Attribute Syntax
Name of the attribute must appear on each line Break the attribute at any point except a space when going to next line Use up to 255 characters Use proper MAGIC syntax

56 Example - Where to break an attribute
IFE= %Z.rw.fragment(“PHA.PAT.zcus.iat.frag.R,”PHA.TEST”),P(R,S,( IFE=/R.FRAG.VAL[“ALL”]^/[ANS%0,”QUERY”]|0))^#,1}

57 Local Variables Example:
Used for the temporary storage of information during the processing of the current screen Most important local variable is ANS ANS (short for answer) is the location where Meditech stores query responses prior to filing Example: [ANS,”EVERPREG”]|0 Represents the user’s response to the query called EVERPREG

58 Local Variables – Naming Conventions
Use Capital-Alpha-Numeric characters XXX, A12, NAME, and NAME1 are all valid Use at least 3 characters Use variable names that are meaningful Keep variable names relatively short and descriptive

59 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 XX XXX ANS R S A B C Can you think of others?

60 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: IFE=IF{[ANS,”EVERPREG”]|0=“Y” “N/A”^PREG} We read this as “N/A goes to Local Variable PREG.”

61 @p.ADM.PAT.location=“ICU” (Greater than or equal to)
Relational Operators Relational Operators are used to compare values to determine a true/false relationship Magic Relational Operators Operator Explanation Example = equals @p.ADM.PAT.location=“ICU” ‘= Not equals @p.ADM.PAT.insurance’=”MCR” > Greater than @p.length.of.stay>3 < Less than @t.age<18 ‘< Not Less than (Greater than or equal to) @.now'<0700 ‘> Not Greater Than (Less than or equal to) @t.age’>18

62 Relational Operators – Nil vs. Non-nil
Each operation will maintain a value If the evaluation is true, the value on the LEFT side becomes the value of the operation If the evaluation is false, nil becomes the value of the operation Nil = Nothing = False Non-nil = Something = True

63 Relational Operators - Examples
Operation Evaluation Value 5>2 True 5 3’>1 False “” STATUS=“ADM IN” ? “”=“” Initially – True Ultimately - False When creating operations, you should always be careful to not set something = to nil. Even if the value is nil, the final value of the operation will become nil and will ultimately be evaluated as false.

64 IF/THEN/ELSE Used to determine appropriate responses based on conditions Example: IF a response to a query is “Y”, then display a large pop-up screen. IF the response to a query is too high, then reject the answer. IF patient LAB RESULTS exist, then display results and skip the query, ELSE just skip the query. Note: Various attributes have inherent IF/THEN properties. In fact, when translated, they are built into an IF/THEN statement.

65 IF/THEN (cont) IF/THEN: ATT=IF{condition response} Example: @W.return(“Notification sent to Dietary.”)} Note: There is a space between the condition and response. The space represents the "then" portion of the IF/THEN statement.   With the simple IF/THEN, if the condition is true, the response is performed. If the condition is false, the response will be ignored.

66 IF/THEN/ELSE IFE=IF{condition response1;response2} Example:
1;””} The cursor will stop only if patient is under 18 years of age. Note: 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.

67 Display Macros – Easy! Single line messages are the easiest Use “W macros” @W.return - display a message in a yellow box and wait for user to press <enter> Example: verify response!”)

68 Displays error message to user Ring bell
Display Macros Displays error message to user Ring bell Wait for user to press <enter> Example: value for Pulse. Please confirm.”) *Note the use of the FCL1A This rejects the user response

69 Positioning the Cursor
Allows you to position the cursor at any location on the screen Syntax: P(R,S,”VALUE”)^# The arguments of this command are: R = Row S = Column “VALUE”= the text or value that you wish to display Comments: Local variables R and S represent the current row/column Do not need to use R,S. You may use actual field location if you choose The C argument can be a text string, a field or a query value

70 The # Prefix The pound (#) Prefix is open to the MT Screen
This syntax is used for displaying a value on the screen and is read “goes to screen”. Example: P(R,S,”N/A”)^# This code will display the text “N/A” on the screen at row R and column S.

71 Default using IFE attribute
Used if there are IFE attributes on a query 3 things we must do Calculate the value to display Store the value into the temp file so Meditech will file it Use the position command to display the value in the proper spot on the screen

72 Example: DFT using IFE attribute
IFE=IF{[ANS,”EVERPREG”]|0=”N” “N/A”^/[ANS%0,”LAST_PREG”]|0, IFE=P(R,S,”N/A”)^#,””;1} Comments: [ANS,”EVERPREG”]|0 refers to the user’s response to the EVERPREG query on the screen. If the response equals “N”, then we will proceed with the default process. “N/A”^/[ANS%0,”PREGDATE”]|0 is how we store “N/A” in the temporary structure so it will be filed into the database. P(R,S,”N/A”)^# does the positioning and displays value on screen. The end value of the IFE attribute is nil. Cursor will SKIP this field if the condition is true and the value defaults. If condition is not true, end in a 1 and allow cursor to stop.

73 Calling Macros You may call an NPR report macro from a Customer Defined Attribute Allows you to: Create a large display window Perform totaling or other calculations Call a fragment report to obtain a result from a patient’s lab tests.

74 Syntax – Calling Macros
IFE=%MIS.USER.zcus.iat.att.M.total(ANS,R,S) Comments: ANS, R and S are called arguments – values that are passed into the program to be used by the program ANS – structure where the query responses are stored R - current row S – current column Note: When you call a macro from an attribute, the final value of the program is returned to the attribute. Typically, users set the value returned to be nil, so that the screen may continue functioning as it was prior to the program call.

75 Displaying a multi-line window
Example: %MIS.USER.zcus.iat.att.M.win(0)} Macro code: @Window.centered(11,60,8)^#, "Warning!!":60C^#, N(D(4,0))^#, N("This test has been known to cause complications")^#, N("with pregnant women.")^#, NN("Please confirm the following:")^#, N(" Physician has documented knowledge of pregnancy.")^#, N(" Patient has been educated about possible risks.")^#, N(" Patient has signed release form.")^#, NN("Press <Enter> to Continue.")^#, #0, @Window.close("")^#;

76

77 Multi–line window comments
This macro commands to open and close the display window Each “^#” is used to send something to the screen The syntax “N(“ is used to create a new line “#0” causes the cursor to wait for user input The code used above may be copied into a macro and easily modified for other uses

78 Send MOX Message MOX Messaging from attributes may be done two ways
Use a message built in the OA Message Dictionary Recipients are taken from the message dictionary Permanent data only May end up with blank fields Build your own message in an NPR Macro and send from the macro Print information from the temporary file

79 Message in OA Message Dictionary
Simplest method - just build the message and send The single argument to the MIS.OA.MSG.auto program is the mnemonic of the message you are sending Example: %MIS.OA.MSG.auto(“OECONSULT”)}

80 Build your own message in an NPR Macro
Build the message and the recipient list yourself Allows more detailed patient/order information See for macro code examples.

81 Using NPR Fragments with Attributes
Retrieve data from other applications while working in ADM, OE, NUR No restriction to “open” modules Requires Knowledge of NPR Report Writer Return values in /R.FRAG.VAL

82 Fragments: Pull results from LAB

83 Using Fragments - Example
IFE= %Z.rw.fragment("LAB.L.SPEC.zcus.iat.frag.R","LAB.HHS"), IFE=P(R,S,(/R.FRAG.VAL["RES"]^/[ANS%0,"IAT.LAB"]|0))^#,"";""} Comments: Assign the ADM.PAT.urn to /R.FRAG.ARG.PT – required by report Call the fragment report with the LAB database Position the cursor and default the value End value is “” – user will not stop at query – NO EDITS! You may pass back several values from the fragment to the screen. Ie: Result, Collection Date/Time

84 Frag report page 1 – Use index file

85 Frag report page 2 – note Selection

86 Frag report - Macro call in Footnote

87 Frag report – Macro detail

88 Quotations in Query Response?
Quotations can be problematic in query responses for interfaces, scripts, etc. You can prevent users from including quotes Example: remove the quotes from response!") remove the quotes from response!") Note: Use the Locate/Length functions D(34) equals“ and D(39) equals ‘

89 Calling Meditech programs in attributes
Attribute to calculate BSA IFE=%Z.square.root(KG*CM*1000/3600)^BSA, IFE=P(R,S,BSA^/[ANS%0,"OE.COMMENT"]|0)^# Note the call to %Z.square.root

90

91 Calling Meditech programs in attributes
Format a date IFE= P(R,S,/DATE)^#,””} Call %Z.date.out as argument Assign value to the temp file Display on screen End in “” so user may not edit

92 Calling other Meditech Routines
You may use attributes to call other Meditech programs from your CDS FCL1=IF{"NUR.NOTE.menu"^PR,1^/ARG1, %MIS.USER.zcus.lib.M.call.rtn(PR,/ARG1)X},1 Pass program to call into PR Pass 1 into /ARG1 Call program using macro

93

94

95 Meditech provides a new program to do this in 5.4+
Pop-Up Screens Meditech provides a new program to do this in 5.4+ Z.zcus.cds – You can request this from your NUR consultant This solution is STRICTLY FOR NUR For other Applications, you can use a custom version of this program. There are various working versions available on the Web.

96 See our website for our Fall/Winter Course Schedule!
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 Fall/Winter Course Schedule! Iatric Systems


Download ppt "M.U.S.E Tuesday Training Introduction to CDS Attributes"

Similar presentations


Ads by Google