Difference between revisions of "LBV Forms"

From OpenEMR Project Wiki
 
 
(122 intermediate revisions by 10 users not shown)
Line 1: Line 1:
'''Layout-Based Visit Forms and how to make use of this feature.'''
__TOC__


This OpenEMR EXTRA was created to be used for personal forms. Extra Forms you missed but still want to have and were not found implemented in OpenEMR.'''
==Layout Based Visit Forms==
LBV-Forms are not like usual type of forms, these LBV's are stored in, and created by the use of these tables (list_options and layout_options tables).


----
----


'''''With a little perseverance and this hand-out we go step by step, through the process of creation.'''''
==Step by step creation==


First create an ADEQUATE DESCRIPTIVE FORM NAME:
This page will go through the process of creating a Layout Based Form for an epileptic attack encounter.


Go to Administration => Lists and in "Edit List:" choose=> Layout-Based Visit forms. Create your Form ID (left side of the table) does not accept special characters or spaces. Right side gives you the opportunity to give a real understandable name. Your created name will be shown in "This Encounter" right panel menu view.  
'''Go to:''' Administration => Forms => Layouts and click the "New Layout" button.


Create a Layout ID. It does not accept special characters or spaces.  A visit type of Layout Form must start with LBF. A transaction type of layout form must start with LBT.  Give it the title: "Epileptic Attack" and click the "Submit" button.


'''Quick Guide: How to make use of these Forms'''
Once finished and back in your daily workflow, your created form will be accessed via the "Clinical" drop down element in the Encounter view.


Want to include e.a:
----


How often, How severe, Any bodily harm encountered, Please give short description, What medication used, When is next visit planned,  
==Quick Guide to making use of these Forms==
 
You want to include for example: How often, How severe, Any bodily harm encountered, Please give short description, What medication used, When is next visit planned,  
What provider has your preference, What Pharmacy did provide medication, Skipped some daily advised medications, Reason for skipping the necessary dose, What did observers tell you happened
What provider has your preference, What Pharmacy did provide medication, Skipped some daily advised medications, Reason for skipping the necessary dose, What did observers tell you happened


Put Fields in correct order or leave this for later, you can always change the sort order through Administration => Forms => Layouts "put them in right order" => SAVE


Put Fields in correct order or leave this for later, you can always change the sort order through Administration => Layouts "put them in right order" => SAVE




----
----


'''Step by step approach: Create the form Epileptic Attacks'''
==Create an Epileptic Form example==
 
'''Goto:''' Administration => Lists => Create, on first row ID: "Epileptic_Att" (left side of table) give it the name: "Epileptic Attacks" (right side of table) => Save.
 


You see the Form was saved as LBFEpileptic_Att in left column and Epileptic Attacks in Layout-Based Visit Forms, via Layouts you find the form back under Epileptic Attacks.
You see the Form was saved as LBFEpileptic_Att in left column and Epileptic Attacks in Layout-Based Visit Forms, via Layouts you find the form back under Epileptic Attacks.


'''Next goto:''' Administration => Layouts => Edit Layout: Epileptic Attacks and create a group “Epilesia Intake”  and start filling the new Field names with their respective input fields. Give the Label(?) a descriptive name. Let's use “How many attacks”. Add the right options for Label Cols and Data Cols.
'''Next goto:''' Administration => Layouts => Edit Layout: Epileptic Attacks and create a group “Epilesia Intake”  and start filling the new Field names with their respective input fields. Give the Label(?) a descriptive name. Let's use “How many attacks”. Add the right options for Label Cols and Data Cols.


Save the GROUP NAME and FIRST FIELD by Save Changes just below the GROUP input line. '''NOT the one below add extra fields!'''  
Save the GROUP NAME and FIRST FIELD by Save Changes just below the GROUP input line. '''NOT the one below add extra fields!'''  




----
----


'''The different options in the rows might be a bit confusing, but with the next information you can make a choice of what to use and where:'''
==Hints for different fields==


(Or go to Demographics page and see how most of the Labels- and Fields- options are used)
'''Hints for help on laying out fields:'''
:1. Keep first object as '''Label Col 1''' and '''Data Col 6'''
:Keep the '''rest all in the same row as 0 and 0'''
:This will start the new line.'''
:2. Keep last object on the row as '''Label Col 0''' and '''Data Col 6'''
:Add a new field with '''Label as any text or even a period, Data Type as Static Text, Label Col as 1, and Data Col  as 6 leaving comment blank.'''
:Save new field. Then '''delete the Label''' and save the changes.'''
:This will insert a blank line.'''




'''Order:''' The sort order in which the field appears within its group.


'''ID:''' The field's internal identifier, used both in the database and in
----
the form.
==What to use and where for different Rows==


'''Label:''' The label of the field in the form.
'''The different options in the rows might be a bit confusing, but with the next information you can make a choice of what to use and where:'''


'''UOR:''' Indicates if the field is Unused, Optional or Required.
(For examples of use, go to Demographics page and see how most of the Labels- and Fields- options are used)


'''Data Type:''' The type of field.


'''Size:''' The meaning of this depends on the field type. For data type 2,
:'''Order:''' The sort order in which the field appears within its group.
22, 23 and 25 (text fields) it is the field's width ("size") in the  
:'''ID:''' The field's internal identifier, used both in the database and in the form.
form. Similarly for type 3 (textarea) it is the "cols" value. For 21
:'''Label:''' The label of the field in the form.
and 27 (checkboxes, radio buttons) it is the number of sub-columns that
:'''UOR:''' Indicates if the field is Unused, Optional or Required.
they are arranged into.  For other field types, size is unused.
===Data Types===
:'''Data Type:''' The type of field.
::*List box
::*Textbox
::*Textarea
::*Text-date
::*Providers
::*Providers NPI
::*Pharmacies
::*Squads
::*Organizations
::*Billing codes
::*Checkbox list
::*Textbox list
::*Exam results
::*Patient allergies
::*Checkbox w/text
::*List box w/add
::*Radio buttons
::*Lifestyle status
::*Static Text
::*Smoking Status
::*Race and Ethnicity
::*NationNotes
:::*See [[Nation Notes|Nation Notes Module]] and [[Sample_NationNotes_Form|Sample NationNotes Form]] wiki pages for details.


'''List:''' The ID of the associated list, if applicable.
:'''Size:''' The meaning of this depends on the field type.  For data type Textbox, Textbox list, Exam results and Checkbox w/text it is the field's width ("size") in the form.  Similarly for type Textarea it is the "cols" value.  For Checkbox list and Radio buttons it is the number of sub-columns that they are arranged into.  For other field types, size is unused.
::*Remove the maxlength attribute itself from the line and you can add as much characters you want to a field (set maxlenght attribute = 0 to add as many characters as needed)
:'''List:''' The ID of the associated list, if applicable.
:'''Backup List:''' The ID of the associated user-created list, if applicable, for certain field types: listbox, listbox with ..., and multi select data types.
:'''Label Cols:''' The number of label columns in the form dedicated to the field's label.  Usually this is 1, but might be 0 to indicate that the label (if any) is to appear in the previous column.  Note the labels and data are currently arranged into a total of 4 columns.
:'''Data Cols:''' Similar to Label Cols, but for the field's input area. Usually 1, 2 or 3, sometimes 0 (if you want the next data type to be placed in the forms previous line).


'''Label Cols:''' The number of table columns in the form dedicated to the
field's label.  Usually this is 1, but might be 0 to indicate that the
label (if any) is to appear in the previous column.  Note the labels and
data are currently arranged into a total of 4 columns.


'''Data Cols:''' Similar to Label Cols, but for the field's input area.
Usually 1 or 3, sometimes 0.


'''Default Value:''' A value that may be assigned when the field is left
===Options===
empty.
: Enter any number of letters below for column Options.
::*'''A''' = Age
::*'''B''' = Gestational Age
::*'''C''' = Capitalize first letter of each word (text fields)
::*'''D''' = Check for duplicates in New Patient form
::*'''G''' = Graph-able (for numeric fields in forms supporting historical data)
::*'''H''' = Read-only field copied from static history
::*'''L''' = Lab Order ("ord_lab") types only (address book)
::*'''N''' = Show in New Patient form
::*'''O''' = Procedure Order ("ord_*") types only (address book)
::*'''P''' = Paste (copies data from previous encounter)
::*'''R''' = Distributor types only (address book)
::*'''T''' = Makes the "Description field" a default value for the data (enables static text)
::*'''U''' = Capitalize all letters (text fields)
::*'''V''' = Vendor types only (address book)
::*'''X''' = (NOT DOCUMENTED YET, Unknown can be found in Referral Referrals for referrer_diagnosis fields)
::*'''0''' = Read only (uneditable)
::*'''1''' = Write Once (not editable when not empty) (text fields)
::*'''2''' = Billing codes description
:'''Description:''' This is assigned to the field's "title" attribute (ie. Tooltip) in the form.


'''Description:''' This is assigned to the field's "title" attribute in the
form.




----
----


==Add more fields ==




Continue to ADD relevant Fields. Every ID(?) should be unique for this FORM. Make the Fields appear in order of your choice with the field ORDER.
Continue to ADD relevant Fields. Every ID(?) should be unique for this FORM. Make the Fields appear in order of your choice with the field ORDER.


'''Save every field just below the row of field particulars.'''
::'''Save every field just below the row of field particulars.'''
 


After you made all fields SAVE the Changes below all Fields once more with the button SAVE CHANGES.
After you made all fields SAVE the Changes below all Fields once more with the button SAVE CHANGES.


Go to your Client and during an encounter, new or old one, choose the "Epileptic Interventions" Form and start filling particulars as stipulated in your New created Layout-Based Visit Form.
Go to your Client and during an encounter, new or old one, choose the "Layout based Form and pick you LBV-form of choice" and start filling particulars as stipulated in your New created Layout-Based Visit Form.


Or you can add another or second GROUP, so in case the patient comes back from a referred situation or you just want to add other particulars not needed in first encounter, this new group should have some extra information input that is only needed when the first part of the form gives rise to extra information input. Remember to give every field in the same FORM a different ID(?) any New Group in the same FORM must also have different ID(?) for every row of information.
Or you can add another or second GROUP, so in case the patient comes back from a referred situation or you just want to add other particulars not needed in first encounter, this new group should have some extra information input that is only needed when the first part of the form gives rise to extra information input. Remember to give every field in the same FORM a different ID(?) any New Group in the same FORM must also have different ID(?) for every row of information.
Line 96: Line 142:
The Third group should be created if the first group and Second group give rise to even more information specifics for this kind of client.
The Third group should be created if the first group and Second group give rise to even more information specifics for this kind of client.


Make the necessary fields with the input options and save every field after creation. Just on the line under added field. Than save the form and next time you open Epileptic Interventions Form you have the option to click additional info on the Epileptic Information Form.
Make the necessary fields with the input options and save every field after creation. Just on the line under added field. Than save the form at the end of the made form and next time you open your LBV-Form you have the option to click and add additional info for your patients.


This information helps to get started with "Layout-Based Visit Forms" and get your information arranged in a way you always wanted to gather your information. It's not fool proof, but with trial and error you can make use of your own forms.  
This information helps to get started with your "Layout-Based-Visit Forms" and get your information arranged in a way you always wanted to gather your information. It's not fool proof, but with trial and error you can make use of your own forms.  


The results of your input in these Forms can be found back in patient/client => Visits => List.
The results of your input in these Forms can be found back in patient/client => Visits => List.




<span style="color:red;">'''N.B: Don’t forget to make Back-Up ’s, '''YES MAKE BACK-UP’S !!!''' , since what you created is not going to be saved for future new versions in OpenEMR. All self made materials will be lost during reinstall of any official OpenEMR version from scratch. Make use of the Linux, Web and Windows based Back-Up possibilities as offered in OpenEMR. (Administration => Backup => CONTINUE)</span>
 
----
 
==Graph Feature in LBV Forms ==
 
To use the graph feature available in LBV forms, follow the below steps:
 
:1. Create a new LBV form from '''Administration'''->'''Lists'''->'''Layout-Based Visit Forms''' section
:2. Select the LBV form from '''Administration'''->'''Layouts''' section
:3. Add a new group if no group is already created
:4. Use the ''Add Field'' button to create a new input field
:5. Specify all the relevant information for the new field with ''datatype'' option as '''Textbox''' and ''Options'' field as ''''G''''. Also for properly displaying the graph, ''make sure that the value entered for ID is not a numeric value and is a text value''. Then save the field using, '''Save New Field''' button
:6. Then select the newly created LBV form from '''Patient/Client->Visit Forms''' and enter the value for the form fields and save it
:7. On selecting any LBV form that contains a field created with 'G' option, '''Show Graph''' button will be visible in the LBV form
:8. Click on the '''Show Graph''' button from the LBV form and then a list of all the available fields of the LBV form will be displayed
:9. If the user knows which form field is configured with graph (i.e. with option 'G'), then the user can simply click on the specific field from the displayed list of form fields. Also if the user hovers over the available list of fields, the fields that are configured with the graph option will be highlighted with 'Red' text color
:10. On clicking the form field with graph option, the user can view the graph with the date values on the Y-axis and X-axis with numbers based on the values saved in the graph based input field
 
'''Note''': The graph will be visible only if the LBV form is saved at least twice with values provided for the graph based input field, i.e. there should be a minimum of 2 entries of the LBV form for a patient with values available for the graph based input field. Only then the graph can be generated by comparing the two values.
 
 
----
 
==Make copies of LBV-Forms==
 
 
 
'''If you want to make copies of a LBV-Form try to follow these instructions:'''
:* There are just the layout_options and layout_group_properties tables to contend with, if you are not building NationNotes.
 
::# Take a look at the layout_options table, on page 5 (of the dropdown list in the database) beginning page-dropdown list of pages around number 30 and note the last field.
::# Do the same for the layout_group_properties table, page 5 (of the dropdown list in the Database) beginning page-dropdown list around of pages around page 5 and note the last field.
::# You want to know where the existing LBV forms end and your new form begins.
::# Create the first form in 4.1.1. Exclude the fields from the old forms in the new .sql files and export them from phpMyAdmin.
::# Import .sql file into a test copy of OpenEMR.
::# Be certain that the .sql files don't contain information from the other forms; if not, they won't import properly. If you are going to use a production copy, <span style = "color:red;">backup</span> first.
::# Change the name of the new form in Administration/Lists/Layout Based Forms, modify the form and create .sql files for the new form.
 
:* And another advice:
 
::#Find the rows of form 1 that you want to copy in the table Layout_options.
::#Export those selected rows to csv.
::#Modify the csv file to make it as form 2.
::#Import the csv file to table layout_options.
::#Make any further change necessary to the groups/fields of form 2.
 
 
:* Third method
::*[https://www.netfirms.com/support/tutorials/view_tutorial.bml?kbid=5858 Video Tutorial: Copying MySQL database tables with phpMyAdmin].
::*[http://www.electrictoolbox.com/phpmyadmin-copy-mysql-table/ Copy a MySQL table with phpMyAdmin].
::*Remove the structure and data of other forms from the copy before commencing work on that copy.
 
 
 
 
 
----
 
==Additional advice==
 
 
 
<span style="color:red;">'''Make backups of your LBV Form tables! If the OpenEMR database is wiped, such as to install OpenEMR from scratch, then self-made LBV Forms will not be carried over and will need to be imported from backup. OpenEMR offers backup of LBV Forms using Administration => System => Backup => Export Configuration => Layouts, and restore of LBV Forms using Administration => System => Backup => Import Configuration => Browse...</span>
 
 
[[Category:User Guide 4.1.2]][[Category:User Guide 4.1.1]][[Category:User Guide 4.1.0]][[Category:User Guide]][[Category:Configuration Guide]][[Category:Developer Guide]] [[Category:Forms]]

Latest revision as of 16:12, 9 April 2022

Layout Based Visit Forms

LBV-Forms are not like usual type of forms, these LBV's are stored in, and created by the use of these tables (list_options and layout_options tables).


Step by step creation

This page will go through the process of creating a Layout Based Form for an epileptic attack encounter.

Go to: Administration => Forms => Layouts and click the "New Layout" button.

Create a Layout ID. It does not accept special characters or spaces. A visit type of Layout Form must start with LBF. A transaction type of layout form must start with LBT. Give it the title: "Epileptic Attack" and click the "Submit" button.

Once finished and back in your daily workflow, your created form will be accessed via the "Clinical" drop down element in the Encounter view.


Quick Guide to making use of these Forms

You want to include for example: How often, How severe, Any bodily harm encountered, Please give short description, What medication used, When is next visit planned, What provider has your preference, What Pharmacy did provide medication, Skipped some daily advised medications, Reason for skipping the necessary dose, What did observers tell you happened

Put Fields in correct order or leave this for later, you can always change the sort order through Administration => Forms => Layouts "put them in right order" => SAVE



Create an Epileptic Form example

You see the Form was saved as LBFEpileptic_Att in left column and Epileptic Attacks in Layout-Based Visit Forms, via Layouts you find the form back under Epileptic Attacks.

Next goto: Administration => Layouts => Edit Layout: Epileptic Attacks and create a group “Epilesia Intake” and start filling the new Field names with their respective input fields. Give the Label(?) a descriptive name. Let's use “How many attacks”. Add the right options for Label Cols and Data Cols.

Save the GROUP NAME and FIRST FIELD by Save Changes just below the GROUP input line. NOT the one below add extra fields!



Hints for different fields

Hints for help on laying out fields:

1. Keep first object as Label Col 1 and Data Col 6
Keep the rest all in the same row as 0 and 0
This will start the new line.
2. Keep last object on the row as Label Col 0 and Data Col 6
Add a new field with Label as any text or even a period, Data Type as Static Text, Label Col as 1, and Data Col as 6 leaving comment blank.
Save new field. Then delete the Label and save the changes.
This will insert a blank line.



What to use and where for different Rows

The different options in the rows might be a bit confusing, but with the next information you can make a choice of what to use and where:

(For examples of use, go to Demographics page and see how most of the Labels- and Fields- options are used)


Order: The sort order in which the field appears within its group.
ID: The field's internal identifier, used both in the database and in the form.
Label: The label of the field in the form.
UOR: Indicates if the field is Unused, Optional or Required.

Data Types

Data Type: The type of field.
  • List box
  • Textbox
  • Textarea
  • Text-date
  • Providers
  • Providers NPI
  • Pharmacies
  • Squads
  • Organizations
  • Billing codes
  • Checkbox list
  • Textbox list
  • Exam results
  • Patient allergies
  • Checkbox w/text
  • List box w/add
  • Radio buttons
  • Lifestyle status
  • Static Text
  • Smoking Status
  • Race and Ethnicity
  • NationNotes
Size: The meaning of this depends on the field type. For data type Textbox, Textbox list, Exam results and Checkbox w/text it is the field's width ("size") in the form. Similarly for type Textarea it is the "cols" value. For Checkbox list and Radio buttons it is the number of sub-columns that they are arranged into. For other field types, size is unused.
  • Remove the maxlength attribute itself from the line and you can add as much characters you want to a field (set maxlenght attribute = 0 to add as many characters as needed)
List: The ID of the associated list, if applicable.
Backup List: The ID of the associated user-created list, if applicable, for certain field types: listbox, listbox with ..., and multi select data types.
Label Cols: The number of label columns in the form dedicated to the field's label. Usually this is 1, but might be 0 to indicate that the label (if any) is to appear in the previous column. Note the labels and data are currently arranged into a total of 4 columns.
Data Cols: Similar to Label Cols, but for the field's input area. Usually 1, 2 or 3, sometimes 0 (if you want the next data type to be placed in the forms previous line).


Options

Enter any number of letters below for column Options.
  • A = Age
  • B = Gestational Age
  • C = Capitalize first letter of each word (text fields)
  • D = Check for duplicates in New Patient form
  • G = Graph-able (for numeric fields in forms supporting historical data)
  • H = Read-only field copied from static history
  • L = Lab Order ("ord_lab") types only (address book)
  • N = Show in New Patient form
  • O = Procedure Order ("ord_*") types only (address book)
  • P = Paste (copies data from previous encounter)
  • R = Distributor types only (address book)
  • T = Makes the "Description field" a default value for the data (enables static text)
  • U = Capitalize all letters (text fields)
  • V = Vendor types only (address book)
  • X = (NOT DOCUMENTED YET, Unknown can be found in Referral Referrals for referrer_diagnosis fields)
  • 0 = Read only (uneditable)
  • 1 = Write Once (not editable when not empty) (text fields)
  • 2 = Billing codes description
Description: This is assigned to the field's "title" attribute (ie. Tooltip) in the form.



Add more fields

Continue to ADD relevant Fields. Every ID(?) should be unique for this FORM. Make the Fields appear in order of your choice with the field ORDER.

Save every field just below the row of field particulars.

After you made all fields SAVE the Changes below all Fields once more with the button SAVE CHANGES.

Go to your Client and during an encounter, new or old one, choose the "Layout based Form and pick you LBV-form of choice" and start filling particulars as stipulated in your New created Layout-Based Visit Form.

Or you can add another or second GROUP, so in case the patient comes back from a referred situation or you just want to add other particulars not needed in first encounter, this new group should have some extra information input that is only needed when the first part of the form gives rise to extra information input. Remember to give every field in the same FORM a different ID(?) any New Group in the same FORM must also have different ID(?) for every row of information.

The Third group should be created if the first group and Second group give rise to even more information specifics for this kind of client.

Make the necessary fields with the input options and save every field after creation. Just on the line under added field. Than save the form at the end of the made form and next time you open your LBV-Form you have the option to click and add additional info for your patients.

This information helps to get started with your "Layout-Based-Visit Forms" and get your information arranged in a way you always wanted to gather your information. It's not fool proof, but with trial and error you can make use of your own forms.

The results of your input in these Forms can be found back in patient/client => Visits => List.



Graph Feature in LBV Forms

To use the graph feature available in LBV forms, follow the below steps:

1. Create a new LBV form from Administration->Lists->Layout-Based Visit Forms section
2. Select the LBV form from Administration->Layouts section
3. Add a new group if no group is already created
4. Use the Add Field button to create a new input field
5. Specify all the relevant information for the new field with datatype option as Textbox and Options field as 'G'. Also for properly displaying the graph, make sure that the value entered for ID is not a numeric value and is a text value. Then save the field using, Save New Field button
6. Then select the newly created LBV form from Patient/Client->Visit Forms and enter the value for the form fields and save it
7. On selecting any LBV form that contains a field created with 'G' option, Show Graph button will be visible in the LBV form
8. Click on the Show Graph button from the LBV form and then a list of all the available fields of the LBV form will be displayed
9. If the user knows which form field is configured with graph (i.e. with option 'G'), then the user can simply click on the specific field from the displayed list of form fields. Also if the user hovers over the available list of fields, the fields that are configured with the graph option will be highlighted with 'Red' text color
10. On clicking the form field with graph option, the user can view the graph with the date values on the Y-axis and X-axis with numbers based on the values saved in the graph based input field

Note: The graph will be visible only if the LBV form is saved at least twice with values provided for the graph based input field, i.e. there should be a minimum of 2 entries of the LBV form for a patient with values available for the graph based input field. Only then the graph can be generated by comparing the two values.



Make copies of LBV-Forms

If you want to make copies of a LBV-Form try to follow these instructions:

  • There are just the layout_options and layout_group_properties tables to contend with, if you are not building NationNotes.
  1. Take a look at the layout_options table, on page 5 (of the dropdown list in the database) beginning page-dropdown list of pages around number 30 and note the last field.
  2. Do the same for the layout_group_properties table, page 5 (of the dropdown list in the Database) beginning page-dropdown list around of pages around page 5 and note the last field.
  3. You want to know where the existing LBV forms end and your new form begins.
  4. Create the first form in 4.1.1. Exclude the fields from the old forms in the new .sql files and export them from phpMyAdmin.
  5. Import .sql file into a test copy of OpenEMR.
  6. Be certain that the .sql files don't contain information from the other forms; if not, they won't import properly. If you are going to use a production copy, backup first.
  7. Change the name of the new form in Administration/Lists/Layout Based Forms, modify the form and create .sql files for the new form.
  • And another advice:
  1. Find the rows of form 1 that you want to copy in the table Layout_options.
  2. Export those selected rows to csv.
  3. Modify the csv file to make it as form 2.
  4. Import the csv file to table layout_options.
  5. Make any further change necessary to the groups/fields of form 2.


  • Third method





Additional advice

Make backups of your LBV Form tables! If the OpenEMR database is wiped, such as to install OpenEMR from scratch, then self-made LBV Forms will not be carried over and will need to be imported from backup. OpenEMR offers backup of LBV Forms using Administration => System => Backup => Export Configuration => Layouts, and restore of LBV Forms using Administration => System => Backup => Import Configuration => Browse...