Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 761c4f285d3afa353219933c4b5717e0 > files > 14

gnumed-doc-1.2.9-1.fc18.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
	<title> Forms &lt; Gnumed &lt; Foswiki</title>
		  
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="robots" content="noindex" /> <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="WebRss.html" />
	<link rel="icon" href="../rsrc/System/ProjectLogos/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="../rsrc/System/ProjectLogos/favicon.ico" type="image/x-icon" />
	<link rel="alternate" href="http://wiki.gnumed.de/bin/edit/Gnumed/Forms?t=1362919413" type="application/x-wiki" title="edit Forms" />
	<meta name="description" content="Forms" />
	 <!--[if IE]></base><![endif]-->
	
	<style type="text/css" media="all">
@import url('../rsrc/System/SkinTemplates/base.css');
</style>
<style type="text/css" media="all">
@import url('../rsrc/System/SkinTemplates/default.css');
</style>
<!--[if IE]><style type="text/css" media="screen">
pre {
	overflow-x:auto;
	padding-bottom:expression(this.scrollWidth > this.offsetWidth ? 16 : 0);
}
</style>
<![endif]-->

<meta name="foswiki.PUBURL" content="http://wiki.gnumed.de/pub" /> <!-- PUBURL -->
<meta name="foswiki.PUBURLPATH" content="/pub" /> <!-- PUBURLPATH -->
<meta name="foswiki.SCRIPTSUFFIX" content="" /> <!-- SCRIPTSUFFIX -->
<meta name="foswiki.SCRIPTURL" content="http://wiki.gnumed.de/bin" /> <!-- SCRIPTURL -->
<meta name="foswiki.SCRIPTURLPATH" content="/bin" /> <!-- SCRIPTURLPATH -->
<meta name="foswiki.SERVERTIME" content="10%20Mar%202013%20-%2013:43" /> <!-- SERVERTIME -->
<meta name="foswiki.SKIN" content="twikinet%2c%20pattern" /> <!-- SKIN -->
<meta name="foswiki.SYSTEMWEB" content="System" /> <!-- SYSTEMWEB -->
<meta name="foswiki.TOPIC" content="Forms" /> <!-- TOPIC -->
<meta name="foswiki.USERNAME" content="KarstenHilbert" /> <!-- USERNAME -->
<meta name="foswiki.USERSWEB" content="Main" /> <!-- USERSWEB -->
<meta name="foswiki.WEB" content="Gnumed" /> <!-- WEB -->
<meta name="foswiki.WIKINAME" content="KarstenHilbert" /> <!-- WIKINAME -->
<meta name="foswiki.WIKIUSERNAME" content="Main.KarstenHilbert" /> <!-- WIKIUSERNAME -->
<meta name="foswiki.NAMEFILTER" content="%5b%5cs%5c*%3f~%5e%5c%24%40%25%60%22'%26%3b%7c%3c%3e%5c%5b%5c%5d%23%5cx00-%5cx1f%5d" /> <!-- NAMEFILTER --><!--JQUERYPLUGIN::FOSWIKI::META-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/jquery-1.4.3.js'></script><!--JQUERYPLUGIN-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/plugins/livequery/jquery.livequery.js'></script><!--JQUERYPLUGIN::LIVEQUERY-->
<script type='text/javascript' src='../rsrc/System/JQueryPlugin/plugins/foswiki/jquery.foswiki.js'></script><!--JQUERYPLUGIN::FOSWIKI-->
<script type='text/javascript' src='../rsrc/System/JSTreeContrib/jquery.jstree.js'></script><!--JQUERYPLUGIN::JSTREE-->
</head>
<body class=""><div class="foswikiPage">
<a name="PageTop"></a> 
<p></p>
<p></p>
<h1><a name="Forms_in_GNUMed"></a>  Forms in GNUMed </h1>
<p></p>
This is a description of a new framework for forms in Gnumed (the old one didn't
really work, and is not flexible enough)
<p></p>
Previously we've been defining forms in the backend. This has several problems: <ul>
<li> to make forms flexible enough, we want use Python structures like for-loops and if-then-else, and access business objects. However putting Python code in the backend is problematic for both conceptual and security reasons.
</li> <li> it's a pain to edit form templates as strings inside SQL INSERT statements.
</li></ul> 
<p></p>
Now I think forms belong in the middleware layer, as descendants of 
abstract 'engine' classes, such as LaTeX or HL7, which define what the
templates look like.
<p></p>
So we would have: (<em>FYI: Karsten's reply to this is on the developer list <a href="http://lists.gnu.org/archive/html/gnumed-devel/2005-02/msg00302.html" target="_top">here</a>)</em>
<pre>

class ScriptForm (LaTeXForm):
    def store (self):
        various SQL commands to store internal state in the backend

    def print (self):
        &#34;&#34;&#34;
No actual code, just a big docstring containing LaTeX which we run through
the templater (this code already written in the old framework),
which can reference the objects internal variables
&#34;&#34;&#34;
       LaTeXForm.print (self)

   def display (self):
       &#34;&#34;&#34;
Descendants under client/wxpython (and elsewhere for other clients)
override this to provide a GUI popup,which asks for the required information
We have to arrange on what internal variables need to be defined for
the various form types (see below)

Using multiple inheritances, form GUIs can be &#34;grafted&#34; onto different
middleware forms (for example, paper and electronic referrals have the same
GUI
&#34;&#34;&#34;


    soap &#61; &#34;p&#34;
    &#34;&#34;&#34;
Where in the soap paragim this form fits 
(most will be &#34;p&#34; of course, but we may want special forms
for &#34;o&#34; for MMSE, NUCOG, &#38;c.)
&#34;&#34;&#34;
    keyword &#61; &#34;script&#34;
    &#34;&#34;&#34;
The keyword in the SOAP widget, which causes us to pop up.
&#34;&#34;&#34;
    menu&#95;name &#61; &#34;&#38;Prescription&#34;
    &#34;&#34;&#34;
A name for a &#34;Forms&#34; menu on the top menubar
&#34;&#34;&#34;

</pre>
<p></p>
To gave some examples, a referral form might use these variables:
<p></p>
<table class="foswikiTable" rules="none" border="1">
	<thead>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/bin/rest/PublishPlugin/publish?validation_key=2099ede39c14a49ea203ff55dff36eeb;topic=Gnumed.PublishManual;ping=10%20Mar%202013%20-%2013:43;sortcol=0;table=4;up=0#sorted_table" title="Sort by this column">variable</a> </th>
			<th class="foswikiTableCol1 foswikiLastCol"> <a rel="nofollow" href="/bin/rest/PublishPlugin/publish?validation_key=2099ede39c14a49ea203ff55dff36eeb;topic=Gnumed.PublishManual;ping=10%20Mar%202013%20-%2013:43;sortcol=1;table=4;up=0#sorted_table" title="Sort by this column">type</a> </th>
		</tr>
	</thead>
	<tbody>
		<tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<td class="foswikiTableCol0 foswikiFirstCol"> request </td>
			<td class="foswikiTableCol1 foswikiLastCol"> string </td>
		</tr>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
			<td class="foswikiTableCol0 foswikiFirstCol"> clinical_notes </td>
			<td class="foswikiTableCol1 foswikiLastCol"> string </td>
		</tr>
		<tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<td class="foswikiTableCol0 foswikiFirstCol"> patient_instructions </td>
			<td class="foswikiTableCol1 foswikiLastCol"> multi-line text </td>
		</tr>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
			<td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> recipient </td>
			<td class="foswikiTableCol1 foswikiLastCol foswikiLast"> gmDemographicRecord.cIdentity </td>
		</tr>
	</tbody></table>
<p></p>
For scripts (AU-style):
<p></p>
<table class="foswikiTable" rules="none" border="1">
	<thead>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/bin/rest/PublishPlugin/publish?validation_key=2099ede39c14a49ea203ff55dff36eeb;topic=Gnumed.PublishManual;ping=10%20Mar%202013%20-%2013:43;sortcol=0;table=5;up=0#sorted_table" title="Sort by this column">variable</a> </th>
			<th class="foswikiTableCol1 foswikiLastCol"> <a rel="nofollow" href="/bin/rest/PublishPlugin/publish?validation_key=2099ede39c14a49ea203ff55dff36eeb;topic=Gnumed.PublishManual;ping=10%20Mar%202013%20-%2013:43;sortcol=1;table=5;up=0#sorted_table" title="Sort by this column">type</a> </th>
		</tr>
	</thead>
	<tbody>
		<tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<td class="foswikiTableCol0 foswikiFirstCol"> drugs </td>
			<td class="foswikiTableCol1 foswikiLastCol"> list of cMedication </td>
		</tr>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
			<td class="foswikiTableCol0 foswikiFirstCol"> brand_only </td>
			<td class="foswikiTableCol1 foswikiLastCol"> boolean </td>
		</tr>
		<tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> RPBS </td>
			<td class="foswikiTableCol1 foswikiLastCol foswikiLast"> boolean </td>
		</tr>
	</tbody></table>
<p></p>
Remember these forms should have <code>user</code> and <code>patient</code> defined automatically,  
<p></p>
For work certificates:
<p></p>
<table class="foswikiTable" rules="none" border="1">
	<thead>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<th class="foswikiTableCol0 foswikiFirstCol"> <a rel="nofollow" href="/bin/rest/PublishPlugin/publish?validation_key=2099ede39c14a49ea203ff55dff36eeb;topic=Gnumed.PublishManual;ping=10%20Mar%202013%20-%2013:43;sortcol=0;table=6;up=0#sorted_table" title="Sort by this column">variable</a> </th>
			<th class="foswikiTableCol1"> <a rel="nofollow" href="/bin/rest/PublishPlugin/publish?validation_key=2099ede39c14a49ea203ff55dff36eeb;topic=Gnumed.PublishManual;ping=10%20Mar%202013%20-%2013:43;sortcol=1;table=6;up=0#sorted_table" title="Sort by this column">type</a> </th>
			<th class="foswikiTableCol2 foswikiLastCol"> <a rel="nofollow" href="/bin/rest/PublishPlugin/publish?validation_key=2099ede39c14a49ea203ff55dff36eeb;topic=Gnumed.PublishManual;ping=10%20Mar%202013%20-%2013:43;sortcol=2;table=6;up=0#sorted_table" title="Sort by this column">comment</a> </th>
		</tr>
	</thead>
	<tbody>
		<tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<td class="foswikiTableCol0 foswikiFirstCol"> date_start </td>
			<td class="foswikiTableCol1"> date </td>
			<td class="foswikiTableCol2 foswikiLastCol"> start of certificate </td>
		</tr>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
			<td class="foswikiTableCol0 foswikiFirstCol"> date_restrict </td>
			<td class="foswikiTableCol1"> date </td>
			<td class="foswikiTableCol2 foswikiLastCol"> date return to work with restrictions </td>
		</tr>
		<tr class="foswikiTableEven foswikiTableRowdataBgSorted0 foswikiTableRowdataBg0">
			<td class="foswikiTableCol0 foswikiFirstCol"> date_return </td>
			<td class="foswikiTableCol1"> date </td>
			<td class="foswikiTableCol2 foswikiLastCol"> date of return to full duties </td>
		</tr>
		<tr class="foswikiTableOdd foswikiTableRowdataBgSorted1 foswikiTableRowdataBg1">
			<td class="foswikiTableCol0 foswikiFirstCol foswikiLast"> restrictions </td>
			<td class="foswikiTableCol1 foswikiLast"> string </td>
			<td class="foswikiTableCol2 foswikiLastCol foswikiLast"> work restrictions </td>
		</tr>
	</tbody></table>
<a name="TopicEnd"></a>
<p></p>
<p></p>
<p></p>
<p></p>
</div>
</body></html>