[Top][All Lists]

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

[Gnumed-devel] forms

From: Ruthard Baudach
Subject: [Gnumed-devel] forms
Date: Fri, 22 Jun 2007 14:34:23 +0200
User-agent: Opera Mail/9.01 (Linux)

Reading but don't understanding all the to me terribly complicated sounding forms stuff in the wiki I allmost don't dare to propose some ideas on forms:

gmForm modules:

* gmFormsDatabaseInterface - responsible for storing and calling the templates and data in the backend, called by all other modules

* gmFormManager - a gmNotebookplugin consisting of
        * cFormTreeCtrl - responsible for sorting and accessing the empty forms
        * cFormFiller - responsible for displaying and filling in the forms

* gmFormEditor - a gmNotebookplugin consisting of
* cFormPropertiesPanel - responsibel for displaying and changing the form and form controls' properties
        * cFormEditDisplay - responsible for displaying and editing the forms
* cFormScanner - to scan the paper originals, just as convenience, as GNUmed is capable of scanning already.

* gmFormDisplay - responsible for displaying completed forms (would be nice to have a button "use this as template")

* gmFormPrinter - a implementation of the wx.Printing framework responsibel for printing out, called by gmFormManager and gmFormEditor

* gmFormControls - a collection of predefined, GNUmed-adapted form controls like TextControls, name displays, date input, or more complicated one's like e.g. a control to compute gestational age or the well's score, from which the gmFormDisplays import the controls they need for the specific form.

Form Definition can be done as I proposed earlier as a dictionary, if dictionaries can be stored in the Postgresql backend. I assume so.

form = {
        'background': '/path/to/file/with/background/image',    
        'form_width': 'x',      # might be necessary for printout and good 
        'form_height': 'y'
        'control_1': {
                'type': 'xx'    # => this is the right place for gimmics and 
                'xpos': 'x',
                'ypos': 'y',
                'width': 'x',   # seems to be best to let wx.Python do the 
                'default': 'default value',
                'tooltip': 'This is a ToolTipText'
        'control_2': {

At the moment I'm trying to avoid real work by coding the first scetch of the form editor, and it works on principle. Form display and layout are possible by absolute positioning of the form controls, I'm just afraid that this will cause problems with changing screen resolutions, and I'm still unhappy with the display of the background image as bitmap - too less control over size and resolution.

I have no experience with the wx.Printing framework - but if I'm not mistaken, wx.Printer constructs a wx.DC specifically for the platform it's working on as wx.PrinterDC for Windows and wx.PostScriptDC for *nix and Mac, on which text, images and whatever graphicla fancy stuff can be positioned by wx.DC.DrawAnyThingYouCanThinkOf - methods. sounds like work to me, but should be doable the (wx)pythonic way.

Filled in forms have to be stored somewhere and have to be reaccessible - how do you want to store them? in my Opinion the best method would be a sort of link in the EMR that calls gmFormDisplay with disaybled editing. If it was possible to introduce free linking in the EMR a lot of possiblilities would be opened.

Happy coding!

.odt - Dokumente gemäß ISO 26300

Erstellt mit Operas revolutionärem E-Mail-Modul:

reply via email to

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