Difference between revisions of "Lists and Layouts"

From OpenEMR Project Wiki
(Created page with 'These are mechanisms for storage, modification, and output of lists and layouts in OpenEMR. We are standarizing this process with functions to ensure proper translation. '''Fun…')
 
(merge with contents from the forms API.)
Line 1: Line 1:
These are mechanisms for storage, modification, and output of lists and layouts in OpenEMR. We are standarizing this process with functions to ensure proper translation.
OpenEMR has build in mechanisms for storage, modification, and output of lists and layouts.


== Layout API ==
The layout API is usable by forms, who want to have their fields editable through the layouts editor.
{| class="wikitable" border="1" cellpadding="1"
|-
! Function
! Include
! Source
! Reason
! Returns
|-
| display_layout_rows()
| library/api.inc
| library/options.inc.php
| display the given record in the view of the given layout
|-
| generate_form_field()
| library/api.inc
| library/options.inc.php
| draw a field for input in the 'view' view, AKA, the view/edit page.
|-
| generate_display_field()
| library/api.inc
| library/options.inc.php
| draw a field in the 'show' view, AKA, the style of the history page.
|}


'''Functions in the openemr/library/options.inc.php file:'''<br>
'''Functions in the openemr/library/options.inc.php file:'''<br>
* generate_form_field() is to create the input form entry for a selected list.
* generate_display_field() is to generate output for a selected list item.
* display_layout_rows() is to generate output for a selected layout.
* get_layout_form_value() is to collect specific layout form values.
* get_layout_form_value() is to collect specific layout form values.
* generate_layout_validation() is for layout form validation.
* generate_layout_validation() is for layout form validation.

Revision as of 07:44, 21 February 2011

OpenEMR has build in mechanisms for storage, modification, and output of lists and layouts.

Layout API

The layout API is usable by forms, who want to have their fields editable through the layouts editor.

Function Include Source Reason Returns
display_layout_rows() library/api.inc library/options.inc.php display the given record in the view of the given layout
generate_form_field() library/api.inc library/options.inc.php draw a field for input in the 'view' view, AKA, the view/edit page.
generate_display_field() library/api.inc library/options.inc.php draw a field in the 'show' view, AKA, the style of the history page.

Functions in the openemr/library/options.inc.php file:

  • get_layout_form_value() is to collect specific layout form values.
  • generate_layout_validation() is for layout form validation.


Functions in openemr/library/translations.inc.php:

  • xl_list_label() ; Translates via the xl() function only if globals.php is set to translate lists.
  • xl_layout_label() ; Translates via the xl() function only if globals.php is set to translate layouts.


What is missing?

  • A generic method to display the layout input forms.