Here is a VAL routine on a field I have on a label that "peels" off the
00's.  HTH.

[EMAIL PROTECTED]>0 [EMAIL PROTECTED]
VAL=#"1.">0 "(= "[EMAIL PROTECTED]:2D_" ml)";
VAL="(= "[EMAIL PROTECTED]"0."_" ml)"};""} 


Jeff Thompson, R.Ph.
Pharmacy Informatics
Newman Regional Health
Emporia, KS 66801
Direct: 620-340-6150

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rianto, Harry
Sent: Tuesday, October 17, 2006 10:51 AM
To: [email protected]
Subject: [MEDITECH-L] Suppressing decimal zero

All messages should be posted in plain text.  HTML will be converted to
attachments.    The meditech-l web site is MTUsers.com
======================================

We are planning to use KB#16328 (Dose Calculation for Amount to
Administer) for our Pharmacy label but we have an issue as the result of
the printout has decimal zero which can cause read error on the
interpretation fo the label. Anyone know how to suppress this zero?

eg. 3.00 MLS should be 3 MLS
    3.50 MLS should be 3.5 MLS
    3.25 MLS should be 3.25 MLS

Thanks you for all help.
Harry Rianto
Bluewaterheatlh.

The macro and the explanation is as below (from the KB):

Recently, we had a request from a hospital to display the dose
calculation on their MAR (Medical Administration Record) of the amount
of a drug to be given.  For example, Furosemide 10 MG/ML.  If the
patient is to get 40 MG, then the amount to be calculated is to be 4 ML
(that will be displayed on the MAR).  In addition, if we have a drug
(for example Acetazolamide 250 MG Tab) and we order 250 MG, the MAR will
need to display 1 TAB.  Or, for the same drug, if we ordered 500 MG,
then the MAR will need to display 2 TABS.

In 4.9, the standard field "combo.dose.and.unit" can be used to convert
those drugs with the ratio of MG/ML as their strength.  However, this
standard field will not convert for drugs that are not built that way in
the Drug Dictionary (such as Acetazolamide 250 MG Tab).  To carry this
further, we must reproduce the standard program in a macro and add our
own code to do the additional conversion.

In this example, we will call our macro "get".  The code would be setup
as:

A^urn,
@med^MED,
""^CNV,
[EMAIL PROTECTED] @CONVERT.COMBO},
IF{(@order.type's.type="MED")&('CNV) @GET.DOSE}, CNV;

SHOULD.CONVERT.COMBO
[EMAIL PROTECTED]'s.type'="MED" "";
   @NOT.COMBO "";
   @SAME.DISPENSE.FORM "";1}

NOT.COMBO
L(@PHA.DRUG.strength[MED]^XX,"/")=L(XX)

SAME.DISPENSE.FORM
@[EMAIL PROTECTED]

CONVERT.COMBO
(@dose:6D/@[EMAIL PROTECTED]:4D+0
):2D^XX,
(XX_" "[EMAIL PROTECTED]'=1:2D "S"})^CNV

GET.DOSE
(@dose:6D/@PHA.DRUG.strength.amt1[MED]:4D+0):2D^XX,
(XX_" "[EMAIL PROTECTED]'<1.01 "S"})^CNV

Like the standard program, we first check to see if a conversion can be
done in the submacro "SHOULD.CONVERT.COMBO".  If the conversion can be
done, then we perform the calculation in "CONVERT.COMBO" (converting 40
MG/4 ML to 4MLS).  If the conversion cannot be done (i.e., the variable
CNV does not have a value), then we check to see if the order type's
type is set to "MED".  If it is set to "MED" and CNV is set to nill,
then we call the sub-macro "GET.DOSE" to do that conversion (creating 1
TAB or 2 TABS).

We can then call our macro from a computed field.  In this example, our
report's name is "PHA.RX.zcus.npr.example.dose".  The computed field
would be setup as:

DAT=FREE
LEN=10
VAL=%PHA.RX.zcus.npr.example.dose.M.get(urn)


_______________________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l



======================================
All messages should be posted in plain text.  
HTML will be converted to attachments.    

The meditech-l web site is MTUsers.com
______________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l

Reply via email to