gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] Open Office templates


From: Jerzy Luszawski
Subject: Re: [Gnumed-devel] Open Office templates
Date: Mon, 01 Sep 2008 09:19:57 +0200

Dnia 31-08-2008, nie o godzinie 23:44 +0200, Karsten Hilbert napisaƂ(a):
> > I would prefer storing a list of needed placeholders with
> > template. This way the procedure requesting a template would
> > know what placeholders it must supply, and it would be easy
> > to get the data from backend and feed it to the placeholder
> > handler.
> 
> The template itself IS the list of needed placeholders. The
> template is parsed by the placeholder replacer and when it
> encounters a placeholder it requests the data for that
> placeholder from the client.
That's what I figured out. 
> > All I need is a template and a way to pass data to
> > placeholder handler.
> This is what GNUmed does so I am not sure what you mean ?

> However, the placeholder handler requests the data it needs
> from other parts of the client which may or may not include
> interacting with the user.
I meant making a list of placeholders available to front-end before
opening a template. Then feed the all data at once to the parser (when
opening a template), which would only replace fields with values
without need to fetch values from backend or user or other modules of
GUI. 
This would make template handling independent of calling module.
The calling module has all context information available (current patient, 
encounter, etc.) and IMHO it is
easier and far more efficient to pass data as a parameter to the
parser, than to teach a parser where to look for data.

> > The amount of data is fixed and it can be fetched as one database query.
> No and no.
> 
> > Even better,an SQL query with parameters can be stored
> > with template in the backend (similar to the string in
> > _cmd_fetch_payload for EMR items).
> This would be way to inflexible.
OK, maybe I looked at it from different point of view. I presumed all templates 
would be created by system maintainer, who will have no problem creating 
corresponding SQL query and provide placeholder list. If end-user creates a 
template he/she must not be bothered with backend access. 
But there must be a way to pass parameters to the paser. It's silly to
ask user which encounter he wants to print, when he has this encounter
already displayed. How to do this?

> > > The good news is that recently I found some Python code on the web which 
> > > will
> > > enable us to have way more user-friendly placeholders in the OOo 
> > > templates. 
> > Could you post a link?
> 
> Sure:
> 
>       
> http://lucasmanual.com/mywiki/OpenOffice#head-a6f86c6beea8170c083cd3f45438066e6f20760f
> 
> Given the name Lukasz might be a fellow countryman of yours ?
Looks like he is, but lives in Chicago :-)
I still like the fields better than plain text search&replace.

Jerzy





reply via email to

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