gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Medicine


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Medicine
Date: Wed, 10 Apr 2013 21:33:57 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Apr 10, 2013 at 08:28:56PM +0200, Karsten Hilbert wrote:

> > The problem that occurs (with
> > combination drugs) is with the following placeholder.
> > 
> > \begin{description}
> > $<current_meds::    \item {}%(substance)s {\footnotesize (%(brand)s)}
> > %(preparation)s %(amount)s%(unit)s: %(schedule)s x %(duration)s >$
> > \end{description}
> 
> I see. I will try to think of a solution.

What you've been asking for cannot be done without more
specialized code than I care for. You seem to be wanting
*both* being free to define a template *and* properly
formatted (and escaped) ingredients' information.

Outputting data by unique brand would require ingredients
information to be an aggregate field inside the brand class
(which is possible) - which field in turn would either need
to be pre-formatted text (which is impractical to do for
each of the now-and-later supported document template
formats) or else require special placeholder code looking
inside the brand class, pulling out ingredients'
information, formatting that according to *yet another*
template defined inside the placeholder definition and
escaping *that*, too.

If all you want is the aforementioned output and NOT need a
say in how exactly it is formatted (or, rather, are content
with it being a LaTeX table) - there's the
current_meds_table for you which does just that.

I will add a $<current_meds_by_brand>$ which will not,
however, allow one to access any ingredients' information.

Karsten
-- 
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

[Prev in Thread] Current Thread [Next in Thread]