Label text in product definition and macros

If you are setting up a medication product you can put in label text.

This text appears when the clinician generates the invoice.

Since the product label text is a text field, it supports macros.  However, to make best use of the macros, one really wants to delay their expansion until the invoice stage.

ie, for the product label text, one might want to use the @bid macro (whose expression is: concat($dispensingVerb, ' ', $number, ' ', $dispensingUnits, '(s) Twice a Day') ), but if you put this in on the product label text field, it expands immediately to "  (s) Twice a Day".

If you use @bid in the label field at the invoicing stage, then 4@bid expands properly to "Give 4 Unit(s) Twice a Day".

 

Is there any way to insert the macro call on the product label text in such a way that it does not get expanded until the invoicing stage?

I did find a kludge - use the text _@bid for the product label text.  This then gets shown as is at the invoice stage, and you then overtype the _ with the quantity (say 4) - and this then expands as you want.

Are there better methods than this kludge?

Regards, Tim

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Label text in product definition and macros

One would argue that every patients dose should be customised to the wieght.  You cant default a label to a macro any easier because you still need to manually type a 4 or 1.5 or whatever the dose is.  and for cortisone or alternate day reducing drugs its way to complex to create a successful default label.  I would STRONGLY advise you steer clear of doing anything in the system which removes the clinicians instinct to "think" before they click.  I think having to type a label each time using macro's is a failsafe to ensure we dont see over or underdosing.  This goes back to the suggesting of having the patients wieght displayed on the labelling screen and why thats a good idea. 

I  think your kludge is the furthest I would take it.

Re: Label text in product definition and macros

Ben - thanks for your reply.  As you might guess I'm a retired programmer - my son is the vet.

In fact in the case I am dealing with (an implementation in Hong Kong), I now understand that we cannot use macros that expand to include the quantities because the label text needs to be in both english and chinese - and its just not possible to create a dual language equivalent of say the @bid macro.

The existing RxWorks system has label text defined for quantities 1/4, 1/2, 1, 1.5, 2, 2.5, 3, 3.5 and 4 for each of the various intervals - and I have just ported these across to OPV.

So yes, the vets will have to think: a) to select the interval [humm... twice a day = bid] and b) the dose [humm... 2] - so I need bid2 which comes out as:

Two (2) tablets twice a day
每日兩次, 每次兩粒

Thanks for your advice,

Regards, Tim

PS - out of interest I cranked the chinese into Google Translate - it came out at "Twice a day, every time two"

Syndicate content