• English
  • Français (French)

General rules for writing patient forms

This page needs review and update.

  • Patient forms are directories containing various XML files. Each file is a precise function and has a fixed name.
  • These forms can be sent from one FreeMedForms user to another with a specific module.
  • Forms updates are transparent to users.
  • The database will automatically adapt to the loaded FreeMedForms form.
  • You can define a generic form for all patients and then decorate this form as needed by adding subforms.

Directory structure

The following files are necessary for a valid form:

  • central.xml: central part of the form

You can complete your forms with:

  • description.xml: the description of the form, as separate file
  • .ui files: QtDesigner created GUIs
  • drugs.xml for the medication page form
  • pmhcategories.xml to define which fields are displayed in the page history
  • [better translation?] all files included in these forms that can either be included in an archive or integrated into subforms

XML structure

Each file must start with a form header like this one:

<?Xml Version="1.0" encoding="UTF-8"?>
<!DOCTYPE FreeMedForms>

Your XML code must be included in a FreeMedForms tag:

 <FreeMedForms> 
   [...] 
 </FreeMedForms>

Forms and items naming

The name you give to forms and items is very important. The database will use these names to store and retrieve records.

If two elements have the same name, the result is unpredictable.
If you change the name of an item between two updates, you must define fieldEquivalence (defined since v0.7.0) to avoid data loss.

We do recommend the use of namespaces using the following rules:

  • Each form has its own namespace.
    For example, the form General Medicine with drugs page has the namespace GP::Basic.
  • The namespace should generally not be in name conflict with any other form, unless you want to ensure inter-correspondent forms.
  • The separator between namespaces can be one of the following symbols: :: , : , . (prefer ::)

To improve the performance of scripts, make sure the correct naming respects encapsulation, for example:

  • MainItem = Spec::MyForm
  • SubItemGroup = Spec::MyForm::GroupA
  • GroupItem = Spec::MyForm::GroupA::FirstElement

Specification of the different form files

central.xml

Contains the central form that appears in the patient form page of FreeMedForms. It can contain embedded forms.
Each form starts its own branch in the forms tree. Detailed information about the content is located on a separate page.

description.xml

Contains the description of the form. Detailed information is located on a separate page.

  • creation date
  • version number (of the form itself)
  • names of its authors, used literature sources
  • license
  • classification elements

drugs.xml

Contains the form(s) to insert into the Drugs page. You can insert subforms if necessary.

pmhcategories.xml

Contains the information needed to construct entries in the patient history [correct translation?]. Each entry can have:

  • a default handler
  • a form
en/manuals/freemedforms/xmlforms/general.txt · Dernière modification: 2012/07/19 23:35 par Christian A. Reiter
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki FreeMedForms © Eric Maeker, MD