Minor improvement to fee sheet to show code set Labels rather than ids and changed...
[openemr.git] / interface / forms / painmap / C_FormPainMap.class.php
blob19a787b8f9243b7c9fa025b29b044f72aa4ed2a1
1 <?php
2 /**
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");
20 /**
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 {
26 /**
27 * The title of the form, used when calling addform().
29 * @var FORM_TITLE
31 static $FORM_TITLE = "Graphical Pain Map";
32 /**
33 * The 'code' of the form, also used when calling addform().
35 * @var FORM_CODE
37 static $FORM_CODE = "painmap";
39 /* initializer, just calls parent's initializer. */
40 public function C_FormPainMap() {
41 parent::C_AbstractClickmap();
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 = "") {
51 if ( $form_id != "" ) {
52 return new FormPainMap($form_id);
53 } else {
54 return new FormPainMap();
58 /**
59 * @brief return the path to the backing image relative to the webroot.
61 function getImage() {
62 return $GLOBALS['webroot'] . "/interface/forms/" . C_FormPainMap::$FORM_CODE ."/templates/painmap.png";
65 /**
66 * @brief return a n arra containing the options for the dropdown box.
68 function getOptionList() {
69 return array( "0" => "None",
70 "1" => "Level 1",
71 "2" => "Level 2",
72 "3" => "Level 3",
73 "4" => "Level 4",
74 "5" => "Moderate",
75 "6" => "Level 6",
76 "7" => "Level 7",
77 "8" => "Level 8",
78 "9" => "Level 9",
79 "10" => "Worst Possible" );
82 /**
83 * @brief return a label for the dropdown boxes on the form, as a string.
85 function getOptionsLabel() {
86 return "Pain Scale";