Attributes and Rules
Reference #: 1
Platform: Magic
Type: Attribute
Title: Time - Display number of hours and minutes elapsed
Description: Display number of hours and minutes elapsed
Attribute / Rule:
IFE=[ANS,"EDA9950072"]|0^/DTA,
IFE=[ANS,"EDA9950074"]|0^/TMA,
IFE=[ANS,"EDA9950076"]|0^/DTB,
IFE=[ANS,"EDA9950078"]|0^/TMB,
IFE=%Z.elapsed.time(/DTB,/TMB,/DTA,/TMA,"hh Hrs mm Mins")^/DIS,
IFE=IF{/DIS /DIS^/[ANS%0,"EDA9950080"]|0,P(R,S,/DIS)^#,1}
Reference #: 2
Platform: Magic
Type: Attribute
Title: Display number of minutes. HMS is the minutes.
Description: Display number of minutes. HMS is the minutes.
Attribute / Rule:
DFT="1"
IFE=[ANS,"EDA9950072"]|0^/DTA,
IFE=[ANS,"EDA9950074"]|0^/TMA,
IFE=[ANS,"EDA9950076"]|0^/DTB,
IFE=[ANS,"EDA9950078"]|0^/TMB,
IFE=%Z.elapsed.time(/DTB,/TMB,/DTA,/TMA,"hh:mm")^/MIN,
IFE=/MIN#"0:"^/HRS,
IFE=/HRS*60^/HMS,
IFE=/MIN#"1:"^/MIN,
IFE=(/MIN+/HMS)^/TMS,
IFE=(/TMS/60)^/BLK:2D
Reference #: 3
Platform: Magic
Type: Attribute
Title: Print a report
Description: Print a report
Attribute / Rule:
IFE=[ANS,"EDD0240272"]|0="Y",
IFE=""^/COUNT,1
FCL1=@.response="Y"&'/COUNT
FCL1A=1^/COUNT,
FCL1A=%EDM.PAT.zcus.pl.trans.S("EDM.PAT.zcus.pl.trans.R")
Reference #: 5
Platform: Magic
Type: Attribute
Title: Display stuff on the screen.
Description: Display stuff on the screen.
Attribute / Rule:
DFT=/BLK
IFE=P(6,45,"DTA: "_/DTA_" TMA: "_/TMA)^#,
IFE=P(7,45,"DTB: "_/DTB_" TMB: "_/TMB)^#,
IFE=P(8,45,"Tot Mins: "_/TMS_" NO BLKS: "_/BLK)^#,
IFE=P(9,45,"DIS: "_/DIS)^#
Reference #: 6
Platform: Magic
Type: Attribute
Title: Mouse trick
Description: Mouse trick
Attribute / Rule:
FCL1=@.response^/B
IFE=IF{/A="Y" ""^/B,"";IF{@Z.lastkey=@Z.mouse.click IF{E(/["buL"]#0)=64 "N";
IFE="Y"}^/[ANS%0,"EDD0240228"]|0,P(R,S,[ANS,"EDD0240228"]|0)^#,1}}
Reference #: 7
Platform: Magic
Type: Attribute
Title: Add minutes to current time
Description: Add minutes to current time
Attribute / Rule:
Query: Call Date:
This is a date type query, DFT=@.today
Query: Call Time:
This is a time type query, DFT=@.now
Query: Minutes for arrival:
This is a number type query. Users will enter 5 10 15 minutes
IFE=[ANS,"NUA9910004"]|0^/DTE,
IFE=[ANS,"NUA9910006"]|0^/TME,
IFE=[ANS,"NUA9910008"]|0^/VAL,
IFE=IF{/VAL %Z.time.add(/DTE,/TME,/VAL)^/DIS,
IFE=%Z.date.out.long(/DIS|0)_" "_/DIS|1^/[ANS%0,"NUA9910010"]|0}
%Z.time.add(A,B,C)
--------------------
A = internal date YYMMDD
B = time HHMM
C = number of minutes to add (may be a negative number *use quotes* ex "-20")
Returns: Q(new.date,new.time) new.date = YYMMDD
new.time = HHMM
Reference #: 8
Platform: Magic
Type: Attribute
Title: Default Y or N based on patient’s age
Description: Default Y or N based on patient’s age
Attribute / Rule:
DFT=IF{@p.ADM.PAT.age'<65 "Y";"N"}
Reference #: 9
Platform: Magic
Type: Attribute
Title: Display documentation if query is answered with N
Description: Display documentation if query is answered with N
Attribute / Rule:
FCL1=IF{@.response="N" %MIS.SCREEN.display.doc("NUI300B1","NUA0012428")}
Reference #: 10
Platform: Magic
Type: Attribute
Title: Display warning message
Description: Display warning message
Attribute / Rule:
FCL1=IF{(@.response^/RATE>12)!(/RATE<8) @W.err
FCL1=(" Infusion rate out of range (8-12 ml/hr), verify if correct ")}
Reference #: 11
Platform: Magic
Type: Attribute
Title: Fahrenheit to Celsius
Description: Fahrenheit to Celsius
Attribute / Rule:
IFE=IF{[ANS,"my-farhrenheit"]|0^/FAR 1,
IFE=((/FAR-32)*.55556):1D^/VAR, IFE=/VAR^/[ANS%0,/S.LAST.QUERY]|0,P(R,S,/VAR)^#,""}
Reference #: 12
Platform: Magic
Type: Attribute
Title: Celsius to Fahrenheit - placed on the Fahrenheit query
Description: Celsius to Fahrenheit - placed on the Fahrenheit query
Attribute / Rule:
IFE=IF{[ANS,"my-celsius"]|0^/CEL 1,
IFE=/CEL*9/5+32^/VAR,
IFE=/VAR^/[ANS%0,/S.LAST.QUERY]|0,P(R,S,/VAR)^#,""}
Reference #: 13
Platform: Magic
Type: Attribute
Title: Body Mass Index - placed on the BMI query
Description: Body Mass Index - placed on the BMI query
Attribute / Rule:
IFE=IF{([ANS,"my-height-in-cm"]|0:3D^/CM)&([ANS,"my-weight-in-kg"]|0:3D^/KG)1,
IFE=(/CM/100)^/MT,/KG:7D/(/MT*/MT)^/VAR:1D,
IFE=/VAR^/[ANS%0,/S.LAST.QUERY]|0,P(R,S,/VAR)^#,""
Reference #: 14
Platform: Magic
Type: Attribute
Title: Ideal Body Weight
Description: Ideal Body Weight - placed on IBW query (Frame sizes; small, medium, large)
Attribute / Rule:
IFE=IF{%MIS.zcus.library.M.ibw([ANS,"my-height-in-ft"]|0,
IFE=[ANS,"my-height-in-in"]|0,[ANS,"my-frame-size"]|0,
IFE=@p.ADM.PAT.sex)^/VAR, IFE=/VAR^/[ANS%0,/S.LAST.QUERY]|0,P(R,S,/VAR)^#,""}
Reference #: 15
Platform: Magic
Type: Attribute
Title: Percent Weight
Description: Percent Weight gain/loss since Birth - placed on the %Gain query
Attribute / Rule:
IFE=IF{(([ANS,"my-wt-query"]|0-(@p.ADM.PAT.ccdqr.response["my-birthwt-query"]^/VAR))
IFE=:8D/(/VAR):4D)*100:0D_"%"^/VAR,
IFE=/VAR,P(R,S,(" ":L))^#, IFE=P(R,S,/VAR^/[ANS%0,/S.LAST.QUERY]|0)^#,""}
Reference #: 16
Platform: Magic
Type: Attribute
Title: Head circumstances
Description: Head circumstances
Attribute / Rule:
IFE=IF{([ANS,"NUI4000131"]|0^/IN) (/IN)^/VAR,
IFE=/VAR:5D*2.54^/VAR,
IFE=/VAR^/[ANS%0,/S.LAST.QUERY]|0,P(R,S,/VAR)^#,""}
Reference #: 17
Platform: Magic
Type: Attribute
Title: Time Calculation – Weaning protocol
Description: Time Calculation – Weaning protocol
Attribute / Rule:
RCI0390150 Weaning Start Date; Attribute: FCL1=%Z.date.in(@.response)^/SD
RCI0390041 Weaning start time; Attribute: FCL1=%Z.time.in(@.response)^/ST
FCL2=%Z.time.out(/ST)^/ST
RCI0390151 Weaning End Date; Attribute: FCL1=%Z.date.in(@.response)^/ED
RCI0390042 Weaning end time; Attribute: FCL1=%Z.time.in(@.response)^/ET
FCL2=%Z.time.out(/ET)^/ET
RCI0390052 Duration;
Attribute: IFE=IF{(%Z.elapsed.time(/ED,/ET,/SD,/ST,"hh.mm"))^/DUR,
IFE=/DUR^/[ANS%0,"RCI0390052"]|0,P(R,S,/DUR)^#,1}
Reference #: 18
Platform: Magic
Type: Rule
Title: Prevent and flag users from entering an order
Description: To prevent and flag users from entering the order on patients with OBS status, SDC status, or SDC location:
Attribute / Rule:
[f pt obs]="Y"^A,
[f pt status]="OBS"^B,
[f pt status]="REG SDC"^C,
[f pt location]="SDC"^D,
"Patient's status is Observation, 'Y'!"^MSG1,
"Patient's status is OBS"^MSG2,
"Patient's status is SDC; must be INPT."^MSG3,
"Patient's location is SDC."^MSG4,
IF{A [f ord err msg](MSG1);
B [f ord err msg](MSG2);
C [f ord err msg](MSG3);
D [f ord err msg](MSG4);[f ord ok]};
Reference #: 19
Platform: Magic
Type: Rule
Title: To prevent and flag users from entering
Description: To prevent and flag users from entering the order on patients in the 3SOUTH location:
Attribute / Rule:
[f pt location]="3SOUTH"^A,
"Patient's location is 3SOUTH."^MSG1,
IF{A [f ord err msg](MSG1);[f ord ok]};
Reference #: 20
Platform: Magic
Type: Rule
Title: To prevent and flag users
Description: To prevent and flag users from entering the order on OBS status patients:
Attribute / Rule:
[f pt obs]="Y"^A,
[f pt status]="OBS"^B,
"Patient's status is Observation, 'Y'!"^MSG1,
"Patient's status is OBS"^MSG2,
IF{A [f ord err msg](MSG1);
B [f ord err msg](MSG2);[f ord ok]};
Reference #: 21
Platform: Magic
Type: Rule
Title: flag a user if the patient has a REG ER status
Description: This rule was written to flag a user if the patient has a REG ER status, and the patient is under 3 years of age, and if a query is answered with a specific response:
Attribute / Rule:
"Patient younger than 3, order UA AND URINE CULTURE"^MSG,
[f pt status]="REG ER"^A,
[q LABURFLX]="URCATH"^B,
[f pt cur age]^X,
X#2="M"^M,
X#6="D"^D,
X#1="Y"^Y,
X#5="M"^W,
X#0<3^V,
IF{(A&B)&(M&D) [f ord err msg](MSG);
(A&B)&(Y&W&V) [f ord err msg](MSG);
[f ord ok]};
(215) 279-5872
(289) 388-7587