French
Nouvelles
Pages à mettre à jour
Documentation à mettre à jour
English
Drafts, concepts
News
Pages to update
Documentation to update
The forms are constructed of items. The form items can be:
Forms are encoded in one or more XML files whose structure must meet specific rules. It is necessary to define at least one form item (see below). The values of these items are automatically saved and restored in/out of the database without additional code.
Forms:
<!-- Form declaration without using attributes --> <MedForm> <type>form</type> <name>Unique::Identifier</name> [...] </MedForm> <!-- Form declaration using attributes --> <MedForm type="form" name="Unique::Identifier"> [...] </MedForm> <!-- Inclusion of XML files --> <file>__subforms__/foo/bar/central.xml</file> <!-- Inclusion of script files --> <file type="script" name="onload">./scripts/xx/script.js</file>
Items:
<!-- Item declaration without using attributes --> <Item> <type>check</type> <name>Unique::Identifier</name> [...] </Item> <!-- Item declaration using attributes --> <Item type="check" name="Unique::Identifier"> [...] </Item>
All form and form items must be identified by a unique identifier. These identifiers must be persistent over time (in case of updating the form). They are used for data storage in the database.
Namespaces can be separated by ::, :, ., __, but preferrable is ::
You can use QtDesigner to create complex presentation forms. Then you have two files (at least):
For more information about this feature, see the creation of form items below.
Options are defined by the options tag: <options>Option1;Option2</option>
Options must be separated by a semicolon;
The form item defines a patient's form. It can contain multiple other items or even a complete other form item (nested forms). It is essential to define at least one item form.
<MedForm name="GP::Basic::IdentityForm" uifilename="v0.6.2+"> <label lang="xx">Identity</label> <label lang="fr">Identité</label> <options>unique</options> <icon>__theme__/identity.png</icon> </MedForm>
Available options:
<column>2</column>
<MedForm name="Form::Test::BlaBla"> <options>UseFormNameAsNameSpace</options> <Item name="One">...</Item> </MedForm>
to be done.
You can group items for improved readability of the form code. Groups have a header and a frame for its sub-items.
You can define country-specific groups using the country tag followed by a list of ISO country codes separated by semicolons. For example, to create a group specific to France, the code would be <country>FR</country>.
Available options (some are not implemented yet):
You can set the number of columns using the column tag
<Column>2</column>
Complete example of the project is here in git.
<Item type="group" name="sampleGroup"> <country>FR</country> <option>Compact</option> <label lang="xx">Title</label> [... SubItems ...] </Item>
A HelpText is a text box that does not interact with user input and can be used to display help, information, etc. There are no values to store in the database and no other interactions with the user interface. It can be omitted when printing using the following options:
<Item name="HelpText" type="helptext"> <label lang="xx">This a simple help text</label> <label lang="fr">Ceci est texte d'aide</label> <options>printable</options> <value> <default>The default value</default> </value> </Item>
Available Options:
<Item name="ShortText" type="shorttext"> <label lang="xx">Example of a line edit</label> <label lang="fr">Exemple de zone de saisie sur une ligne</label> <value> <default lang="xx">Default value</default> <default lang="fr">La valeur par défaut</default> </value> </Item>
Available Options:
<Item name="LongText" type="longtext"> <label lang="xx">This a simple text edit without complex formatting</label> <label lang="fr">Exemple de zone de saisie textuelle brute et multi-ligne</label> <value> <default lang="xx">The default value</default> <default lang="fr">La valeur par défaut</default> </value> </Item>
Represents a multiline text block with ability to include formatted text, tables, images, etc.
Available Options:
<Item name="GP::Basic::SOAP::S" type="texteditor"> <label lang="xx">Subjective</label> <label lang="fr">Subjectif</label> <options>FullEditor</options> </Item>
Represents a spinbox widget with two buttons (up/down) that only allows to enter numeric values. There are two types available:
Available Options:
<Item name="Spin1" type="spin"> <label lang="xx">Spin</label> <min>0</min> <max>10</max> <step>2</step> </Item> <Item name="doublespin1" type="doublespin"> <label lang="xx">Double Spin</label> <min>2.4</min> <max>9.8</max> <step>0.1</step> </Item>
Represent a QCheckBox in the view.
Available Options:
<Item name="CheckBox" type="check"> <label lang="xx">This is a simple scripted checkbox sample</label> <label lang="fr">Exemple de case à cocher simple</label> <tooltip lang="xx">My tooltip</tooltip> <options>printonlychecked</options> <value> <numerical id="0">1</numerical> <numerical id="1">2</numerical> </value> </Item>
<Item name="RadioBoxes" type="radio"> <label lang="xx">There are the radio buttons</label> <label lang="fr">Exemple de cases à cocher multiples auto-exclusives</label> <value> <uuid id="0">first</uuid> <uuid id="1">second</uuid> <uuid id="2">third</uuid> <possible id="0" lang="xx">The first value</possible> <possible id="1" lang="xx">The second value</possible> <possible id="2" lang="xx">The third value</possible> <possible id="0" lang="fr">Première valeur</possible> <possible id="1" lang="fr">Seconde valeur</possible> <possible id="2" lang="fr">Troisième valeur</possible> <numerical id="0">1</numerical> <numerical id="1">2</numerical> <numerical id="2">4</numerical> </value> </Item>
You can set the display format using the XML tag DateFormat. You can see all the available format types in the official Qt documentation
Available Options:
* now: Set the default value to the creation time of the form item (e.g. user creates a new episode) * patientLimits: use patient data (date of birth and date of death) to define the boundaries of the editor (minimum date, maximum date)
<Item name="SampleDateEdit" type="date"> <dateformat>dd MM yyyy</dateformat> <label lang="xx">This a date editor</label> <label lang="fr">Exemple d'éditeur de date et heure</label> <options>now;patientLimits</options> </Item>