3 * Copyright Medical Information Integration,LLC info@mi-squared.com
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * @file C_FormPainMap.class.php
11 * @brief This file contains the C_FormPainMap class, used to control a clickmap bassed form.
14 /* Include the class we're extending. */
15 require_once ($GLOBALS['fileroot'] . "/interface/clickmap/C_AbstractClickmap.php");
17 /* included so that we can instantiate FormPainMap in createModel, to model the data contained in this form. */
18 require_once ("FormPainMap.php");
21 * @class C_FormPainMap
23 * @brief This class extends the C_AbstractClickmap class, to create a form useful for modelling patient pain complaints.
25 class C_FormPainMap
extends C_AbstractClickmap
{
27 * The title of the form, used when calling addform().
31 static $FORM_TITLE = "Graphical Pain Map";
33 * The 'code' of the form, also used when calling addform().
37 static $FORM_CODE = "painmap";
39 /* initializer, just calls parent's initializer. */
40 public function C_FormPainMap() {
41 parent
::C_AbstractClickmap();
45 * @brief Called by C_AbstractClickmap's members to instantiate a Model object on demand.
48 * optional id of a form in the EMR, to populate data from.
50 public function createModel($form_id = "") {
51 if ( $form_id != "" ) {
52 return new FormPainMap($form_id);
54 return new FormPainMap();
59 * @brief return the path to the backing image relative to the webroot.
62 return $GLOBALS['webroot'] . "/interface/forms/" . C_FormPainMap
::$FORM_CODE ."/templates/painmap.png";
66 * @brief return a n arra containing the options for the dropdown box.
68 function getOptionList() {
69 return array( "0" => "None",
79 "10" => "Worst Possible" );
83 * @brief return a label for the dropdown boxes on the form, as a string.
85 function getOptionsLabel() {