[MT-L] Magic 567 pp22 convert cm to feet and inches

22 views
Skip to first unread message

Ann M. Higgins

unread,
Nov 20, 2017, 2:50:35 PM11/20/17
to medit...@mtusers.com

Hello L-ers,

 

I’m wondering if anyone has an attribute that will convert cm to feet and inches?

 

Thanks

 

Ann


This communication, along with any documents, files or attachments, is intended for the use of the named recipient(s), and may contain legally privileged and confidential information. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any information contained in or attached to this communication is strictly prohibited. If you have received this message in error or are not the named recipient, please notify the sender immediately and delete and destroy the original communication and its attachments, without reading, printing or saving in any manner.

Bill Mullins

unread,
Nov 20, 2017, 5:04:11 PM11/20/17
to Ann M. Higgins, Meditech-l
This is from Brian Golden:
 
Subject: RE: (MEDITECH-L) Convert Inches to CM and vice versa
 
Yes, this can be done.

Here are our queries:
 
NUR.HT.FT 1 13 HEIGHT (ft): SAME 26
NUR.HT.IN 1 35 HEIGHT (in): SAME 48
NUR.HT.CM 1 58 HEIGHT (cm): SAME 71
 
And their attributes:
 
NUR.HT.FT
FCL1=@.response^/FT
IFE=R^/ZROW1,S^/ZCOL1,1
 
NUR.HT.IN
FCL1=@.response^/IN
IFE=R^/ZROW2,S^/ZCOL2,1
 
NUR.HT.CM
IFE=IF{(([ANS,"NUR.HT.FT"]|0*12)+[ANS,"NUR.HT.IN"]|0)*2.54^/CM>0.1
IFE=P(R,S,/CM^/[ANS%0,"NUR.HT.CM"]|0)^#,1;1}
FCL1=IF{@.response^/CM,
FCL1=(/CM:4D/2.54:1D)/12.0:0D^/FT
FCL1=P(/ZROW1,/ZCOL1,/FT^/[ANS%0,"NUR.HT.FT"]|0)^#,1}
FCL2=IF{(/CM:8D/2.54:4D-(/CM:4D/2.54:1D/12.0*12):0D)^/IN
FCL2=P(/ZROW2,/ZCOL2,/IN^/[ANS%0,"NUR.HT.IN"]|0)^#,1}
 
Sincerely,

 
William A Mullins RN
Health Care IT Consultant
wmulli...@yahoo.com
Cell (205) 937-0715


On Monday, November 20, 2017 3:00 PM, Bill Mullins <wmulli...@yahoo.com> wrote:


Ann,
 
I do not have that exact attribute, but below if one that converts cm to inches:
 
QUESTION:  Subject: cm to inches, problem with decimal
 
ANSWER 1
 
IFE=P(R,S,IF{([ANS,"my_cm_query ]|0*1.0000^CM) CM/2.54:2D}^/[ANS%0,"my_in_query"]|0)^#
 
ANSWER 2:
 
I would try the following:
 
IFE=P(R,S,IF{([ANS,"my_cm_query"]|0^CM) CM:4D/(2.54:2D)}^/[ANS%0,"my_in_query"]|0)^#
 
Meditech's division function / behaves a little differently than would be expected (and it
is a little difficult to put into words, so please bear with me). 
 
The number of decimal places in the quotient is equal to the number of decimal places in
the dividend minus the number of decimal places in the divisor.  So, in my example, the
centimeters (the dividend) are formatted to have 4 decimal places.  The divisor (2.54) is
formatted to have 2 decimal places.  So 4-2 = 2.  So the quotient will have 2 decimal
places. 
----------------------------------------------------------------------------------
You would need to reverse this logic:
 
Ft and In to Cm
 
Formula - FT*12+IN*2.54
 
IFE=P(R,S,IF{[ANS,"FT_QRY"]|0^FT!([ANS,"IN_QRY"]|0^IN)
IFE= FT*12+IN*2.54}^/[ANS%0,"CM_QRY"]|0)^#
-----------------------------------------------------------------------------------
The attribute below defaults the sum of queries "OEFEET" and "OEINCH".
It converts feet to centimeters and then adds it to the second part, which converts inches
to centimeters.  It then defaults the total of both queries in centimeters
 
DFT=([ANS,"OEFEET"]|0*30.48)+([ANS,"OEINCH"]|0*2.54)
----------------------------------------------------------------------------------
Length
1 ft = 0.3048 m
1 in = 2.54 cm
1 cm = 0.4 in
1 in = 2.54 cm = 0.0254 m = 25.4 mm
1 foot = 30.5 cm = 0.305 m = 305 mm
1 foot = 12 in
----------------------------------------------------------------------------------
 
Sincerely,

 
William A Mullins RN
Health Care IT Consultant
wmulli...@yahoo.com
Cell (205) 937-0715


===###===###===###===###===###===###===
To unsubscribe from the meditech-l, follow the instructions at the URL http://mtusers.com/mailman/options/meditech-l_mtusers.com/

Please do NOT send messages that ask "Please post to the list" or "I'd like to see your answers" or "Send that info to me, too"  These are useless messages that just waste the email server's resources.  Instead, email the original requester and ask that they send you or post the results of their question.

Go to http://MTUsers.net for other information on the list, as well as:
1) reading meditech-l messages online
2) job opportunities
3) vendor products and service


Do NOT send email to meditech...@MTUsers.com.  This is a system email box that is NOT monitored by a human. If you need help or advice on how to use the meditech-l, email  ju...@MTUsers.net.  Julia helps manage the meditech-l, so she is your best resource.

===***===***===***===***===***===***===



Bill Mullins

unread,
Nov 20, 2017, 5:04:20 PM11/20/17
to Ann M. Higgins, Meditech-l
Also from Brian G:
 
CM to FT:
IFE=IF{[ANS,"OE.CM"]|0^/CM,
IFE=P(R,S,(/CM:4D/2.54:1D/12.0:0D^/FT)
IFE=^/[ANS%0,/S.LAST.QUERY]|0)^#,""}

CM to remaining IN:
IFE=IF{[ANS,"OE.CM"]|0^/CM,
IFE=P(R,S,(/CM:8D/2.54:4D-(/CM:4D/2.54:1D/12.0*12):0D^/IN)
IFE=^/[ANS%0,/S.LAST.QUERY]|0)^#,""}
 
Sincerely,

 
William A Mullins RN
Health Care IT Consultant
wmulli...@yahoo.com
Cell (205) 937-0715


Reply all
Reply to author
Forward
0 new messages