Creating Forms
19 min
forms are customizable, fully structured data entry tools unlike unstructured data, such as text entered into an encounter, data entered into forms can be queried and reported on their structured form can also enforce standard record keeping between users, ensuring consistency in the clinic or organization we will use this personality questionnaire as an example to go through building a form electronic use planning forms designed to be used on paper will often require reconsideration when being translated to an electronic system some things to consider is everything on the form still necessary? since the form will be a part of the patient record, some fields may be redundant to what is already stored in profile an exception would be if the form needs to be sent elsewhere, in which case personal details might be necessary in our example above, the fields for name, date of birth, and address are already in the record, but we’ll leave name and date of birth for identification when printed will reporting be required for data entered into the form? form elements can be designed to be reportable see the next section on hris and terms since profile’s forms have a defined structure, is everything on the original form possible? some paper forms have very loose structure, and forms created in other electronic systems may have other functionality, such as repeatable sections, which are not possible in profile are there any calculations that could potentially be automated? calculating scores, based on answered questions or other values, is possible with macros macros are programmed scripts that enable custom functionality should the form enforce certain rules, such as mandatory fields? as with calculations, custom logic of how the form should function can be defined by macros health record items (hris) creation and linking to terms the first step to creating forms is to create all of the necessary hris, which are used to store data every text field, checkbox, radio button, or other control that will save a value requires an hri hris are also linked to codes in the system, known as terms generic terms, such as ‘form text’, can be used if reporting is not required, but where reporting is required, unique terms need to be created for every hri ask your intrahealth contact for more information about creating custom terms, if applicable go to maintain/templates/forms select the folder on the left to categorize the form being created new root folders or sub folders can be created from the toolbar either use the toolbar icon or right click in the right side of the window to create a new collection the term selection window will open if a term has been created specifically for this form, locate it by selecting the termset from the dropdown list ( intrahealth in the screenshot) and use the search field to find the appropriate term for forms that don’t require reporting, the generic term clinical \<z 0k> is generally used double click on the newly created collection to modify it right click on the collection name from the new window to rename the form, if necessary going back to our personality questionnaire example, let’s start creating the hris click the dropdown arrow beside the create a new item icon for name, we will select text as with creating the collection, the term selection window will open since name is a standard demographic, we’ll search for the patient full name \<z 15> term in the intrahealth termset for date of birth, create another hri with the type date search for the term date of birth \<z 04> in the intrahealth termset continue creating hris and linking them to terms use the item types quantity for numeric values, or boolean for checkboxes or other yes/no controls if custom terms have been created, use them, otherwise generic form control terms can be used, such as form text \<zz 1bd> (others shown in the screenshot, on the right), but rename the hri to the control itself (see in screenshot, on the left) use the list below for this example combining and using quantity for the activity preferences will be explained later text – favourite food, dream vacation, cats or dogs boolean south america, europe, asia, africa, australia, antarctica quantity – hiking, running, cycling, swimming visual layout once all of the hris have been created, we can begin building the visual layout of the form click the open form editor icon on the form toolbar theform window, objector inspector, and control palette will appear to use a defined paper size, select the form name, which appears at the top of the object inspector list, and scroll down to the papername property common formats, such as letter , legal , a series , etc , are available alternatively the papername can be left as undefined and the size can be set in millimetres with the properties paperheight and paperwidth commonly these properties will be left at default settings and the form window is adjusted visually to control the size for this example, we will set the papername to a5 with the page selected in the objector inspector list, the property color can be used to change the background colour for this example, we’ll use the light grey colour form background image if the form already has a defined format, such as a pdf document, then this can be used as a background image in the form click the picture icon on the control palette and then click in the form window to place the picture control resize the image control to fill the form area select the image file to use in the picture property in the object inspector note that this must be an image file such as a jpg , png , of gif file there are free online tools to convert pdf documents to an image format form control creation and modification if there isn't a background image defining the field areas, you'll need to create labels for all of the static text of the form, such as the title and all of the questions click the label icon on the control palette and then click in the form window where the label is to be placed with the newly created label selected, use the properties caption and font in the object inspector to change the displayed text and font hot tip if space permits, use a font size larger than the default of 8 for all controls, which can be difficult to read also, controls can be copied and pasted which can be quicker than creating each one from scratch to align multiple controls, select them by clicking and dragging to draw a selection box or by shift clicking individual controls, and then use the left or top properties to entera position in relation to either the left or top edge of the window for the single line text fields, select edit control from the control palette and click in the form window to place the field in this example, we’ll need edit controls for name, date of birth, and favourite food for each of these controls, use the hri property in the object inspector to link them to their respective hris created earlier for fields that will be populated from data already entered in profile, such as name and date of birth in this example, use the property populatevalue to open the populate value property window check the auto populate checkbox and select the appropriate print variable for the date of birth field, use the editkind property to change the field from a standard free text field to one that requires a date format by selecting ekdkdate edit controls can be made to only display information rather than be editable by setting the property readonly to true note for this example, name and date of birth have been created with hris and edit controls if a control is being used only to display information and doesn’t require user input, it is generally better to use labels rather than edit controls labels have the same populatevalue property that can be used to pull data from print variables also, since the data from these controls don’t need to be stored with the form, they also don’t require hris select the multiple line text editor from the control palette to create the field for the dream vacation question, and then link it to its hri in the object inspector select the check box from the control palette to create the checkboxes for the continents question in the object inspector, link each one to its hri and use the caption property to enter the displayed text radio buttons are used when only one selection is permitted create five buttons for the rating of hiking since we don’t need the caption, we can resize the width of the control to hide it select all five buttons and use the object inspector to set all of their hris together enter hiking into the group property so that they know that they are all related hot tip by default, the property checkedvalue of each radio button is true rather than have five separate hris that each store whether or not each radio button is pressed, we can use only one hri, and have each radio button store a different value when it is pressed one by one, set the checkedvalue of each button to their corresponding 1 5 score copy and paste the hiking radio buttons and modify the hri and group for running, cycling, and swimming the final question in the example about cats and dogs was initially designed using checkboxes, but let’s use a combo box from the control palette instead use the items property in the object inspector to enter the available selections for the dropdown list put each option on its own line finally, let’s add a button to this form for printing printing can always be done through file/print but it can be easier to have a button on the form itself resize it to make it larger and change the caption property to print we will add the macro to make it work in the next section macros the macro editor window can be accessed from the form data window toolbar use the toolbar icons to create and save macros, or use the macro name dropdown list to open existing macros to link the macro to an event, use the object inspector to select the appropriate item and select the macro from the appropriate event in the events tab with different objects selected, different events will be available for example, by selecting the form itself at the top of the object inspector, many form events can be used, such as when the form is opened, closed, or saved example macros description example macro script mandatory field prevent the user from saving the form if this field is empty form event onmvalidatesave if form controls ("editmandatoryfield") value = "" then profile variable("cansave") value = false profile variable("errormessage") value = "please enter a value into the mandatory field " end if conditional mandatory field prevent the user from saving the form if this field is empty when another control has a particular value form event onmvalidatesave if form controls ("comboboxyesno") textvalue = "yes" and form controls ("editconditionalmandatoryfield") asvariant = "" then profile variable("cansave") value = false profile variable("errormessage") value = "please enter a value into the conditional mandatory field " end if field format validation prevent the user from saving the form if its value isn't in the expected format form event onmvalidatesave editfivedigitsvalue = form controls ("editfivedigits") value if not isnumeric(editfivedigitsvalue) or not len(editfivedigitsvalue) = 5 then profile variable("cansave") value = false profile variable("errormessage") value = "please enter a five digit number into the five digits field " end if conditional disabled field prevent the user from using the field unless another control has a particular value condition control event (e g on yes and no radio buttons ) onmclick if form controls ("yesradiobutton") checked then form controls ("editconditionaldisabled") enabled = true form controls ("checkboxconditionaldisabled") enabled = true else form controls ("editconditionaldisabled") enabled = false form controls ("checkboxconditionaldisabled") enabled = false end if final touches with all of the controls laid, we can make some final touches before finishing the form firstly, the a5 size that we chose before ended up being too large, so set a custom size by selecting the form name at the top of the object inspector list again, and changing the paperheight and paperwidth to values that decrease the margin it is strongly recommended that you use a form once and review it, and if it is to be printed, print it, to confirm that all fields are working as expected, and that there are no obvious font or other alignment issues forms often need to be adjusted a few times before they are working as intended you will be prompted to save the form when the window is closed you can also save without closing through file/save tab order is the order in which profile will cycle through all of the controls on the form when the \[ tab ] key is hit by default, this is in the order that the controls have been created, but it can be fixed if they are not in the correct order right click in the form area and select tab order profile will display in red font the controls that it guesses are out of order select an item and use the arrows to re order the list form access and use as part of a new encounter, go to the forms view of the actions panel and press the browse button on the right locate the form in the selection window the form will open in a separate window complete the form and close the window, at which point you will be prompted to save the form file/save and file/print are available, or dedicated buttons on the form can be used depending on the form design forms can be reviewed, continued, or modified from the forms view of the patient record attachments