gnumed-devel
[Top][All Lists]
Advanced

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

Re: [Gnumed-devel] forms concept (instead of placeholders)


From: Jerzy Luszawski
Subject: Re: [Gnumed-devel] forms concept (instead of placeholders)
Date: Wed, 21 Oct 2009 01:06:46 +0200
User-agent: KMail/1.9.10

Tuesday 20 October 2009 11:43:10 Karsten Hilbert napisaƂ(a):

> > > 4. The key for implementation is the decission to fetch
> > > data for the template directly from backend using SQL query.
> > > This query is stored together with template (a new field in
> > > ref.paperwork_templates is required, I added
> > > 'sql_query'::text). It may have parameters just like any
> > > other query executed via gmPG2.run_ro_queries.  It returns
> > > all data at once, no need to collect data from multiple
> > > objects.
>
> I am currently integrating your approach into GNUmed.
I'm happy to hear this :)
>
> I am not really fond of adding non-generic fields to the
> paperwork_templates table. 
I don't get what you mean by "non-generic"?
> However, you do need a place to 
> store the SQL query. I've been thinking why don't we make
> the SQL part of the template XML itself ?  We could then
>
>       a) manage the query right inside the XSLT template
>       b) extract the query from the retrieved template
I think it will complicate things. 
Now the template file contains only formatting. I see no advantage of mixing 
formatting with other data.
It is easier to get the SQL from the table in database than extract if after 
parsing the template. 
It is also more fool-proof. The user can easily adjust the format (or 
translate the template), without touching anything.
It can be used independently from formatting (eg. for export). 
Its alteration may be restricted to admins to avoid malicious code.
It does not break any internal database constrains.

>
> Jerzy, can you supply an XSLT template that you have in use ?
Here you are (there are Polish fixed text headings, but the structure is in 
English):
https://www.xythosondemand.com/home/BLZ/Users/jerzy.luszawski/Public/gnumed/application/print.episode.all%20progress%20notes.pl_PL.1-1.xsl
https://www.xythosondemand.com/home/BLZ/Users/jerzy.luszawski/Public/gnumed/application/print.encounter.in%20clinic%20-%20visit.consultation.pl_PL.1-2.xsl


> Could you make a suggestion as to how to store the query in
> the template ? (as in which XML tag etc)
Perhaps
<xsl:param name="sql_query" select="SELECT ..."/>


Jerzy Luszawski





reply via email to

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