feat: incorporate traits into e2e ci testing (#7757)
[openemr.git] / interface / forms / painmap / C_FormPainMap.class.php
blob889c4911cdae2b4cd43bccb23dad2252dbf79aa8
1 <?php
3 /**
4 * C_FormPainMap.class.php, used to control a clickmap based form.
6 * @package OpenEMR
7 * @link http://www.open-emr.org
8 * @copyright Copyright Medical Information Integration,LLC <info@mi-squared.com>
9 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
12 /* Include the class we're extending. */
13 require_once($GLOBALS['fileroot'] . "/interface/clickmap/C_AbstractClickmap.php");
15 /* included so that we can instantiate FormPainMap in createModel, to model the data contained in this form. */
16 require_once("FormPainMap.php");
18 /**
19 * @class C_FormPainMap
21 * @brief This class extends the C_AbstractClickmap class, to create a form useful for modelling patient pain complaints.
23 class C_FormPainMap extends C_AbstractClickmap
25 /**
26 * The title of the form, used when calling addform().
28 * @var FORM_TITLE
30 static $FORM_TITLE = "Graphical Pain Map";
31 /**
32 * The 'code' of the form, also used when calling addform().
34 * @var FORM_CODE
36 static $FORM_CODE = "painmap";
38 /* initializer, just calls parent's initializer. */
39 public function __construct()
41 parent::__construct();
44 /**
45 * @brief Called by C_AbstractClickmap's members to instantiate a Model object on demand.
47 * @param form_id
48 * optional id of a form in the EMR, to populate data from.
50 public function createModel($form_id = "")
52 if ($form_id != "") {
53 return new FormPainMap($form_id);
54 } else {
55 return new FormPainMap();
59 /**
60 * @brief return the path to the backing image relative to the webroot.
62 function getImage()
64 return $GLOBALS['webroot'] . "/interface/forms/" . C_FormPainMap::$FORM_CODE . "/templates/painmap.png";
67 /**
68 * @brief return a n arra containing the options for the dropdown box.
70 function getOptionList()
72 return array( "0" => "None",
73 "1" => "Level 1",
74 "2" => "Level 2",
75 "3" => "Level 3",
76 "4" => "Level 4",
77 "5" => "Moderate",
78 "6" => "Level 6",
79 "7" => "Level 7",
80 "8" => "Level 8",
81 "9" => "Level 9",
82 "10" => "Worst Possible" );
85 /**
86 * @brief return a label for the dropdown boxes on the form, as a string.
88 function getOptionsLabel()
90 return "Pain Scale";