Support for larger size codes (such as SNOMED US Extension codes)
[openemr.git] / contrib / forms / nursing_notes / FormNursingNotes.class.php
blob7863ca442c15fa106105f42ecb31aa7248fe898b
1 <?php
2 // Copyright (C) 2009 Aron Racho <aron@mi-squared.com>
3 //
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
8 require_once(dirname(__FILE__) . "/../../../library/classes/ORDataObject.class.php");
10 define("EVENT_VEHICLE",1);
11 define("EVENT_WORK_RELATED",2);
12 define("EVENT_SLIP_FALL",3);
13 define("EVENT_OTHER",4);
16 /**
17 * class FormHpTjePrimary
20 class FormNursingNotes extends ORDataObject {
22 /**
24 * @access public
28 /**
30 * static
32 var $id;
33 var $date;
34 var $pid;
35 var $user;
36 var $groupname;
37 var $activity;
38 var $assessment;
39 var $procedures;
40 var $discharge;
43 /**
44 * Constructor sets all Form attributes to their default value
47 function FormNursingNotes($id= "", $_prefix = "") {
48 if (is_numeric($id)) {
49 $this->id = $id;
51 else {
52 $id = "";
53 $this->date = date("Y-m-d H:i:s");
56 $this->_table = "form_nursing_notes";
57 $this->activity = 1;
58 $this->pid = $GLOBALS['pid'];
59 if ($id != "") {
60 $this->populate();
61 //$this->date = $this->get_date();
64 function populate() {
65 parent::populate();
66 //$this->temp_methods = parent::_load_enum("temp_locations",false);
69 function toString($html = false) {
70 $string .= "\n"
71 ."ID: " . $this->id . "\n";
73 if ($html) {
74 return nl2br($string);
76 else {
77 return $string;
80 function set_id($id) {
81 if (!empty($id) && is_numeric($id)) {
82 $this->id = $id;
85 function get_id() {
86 return $this->id;
88 function set_pid($pid) {
89 if (!empty($pid) && is_numeric($pid)) {
90 $this->pid = $pid;
93 function get_pid() {
94 return $this->pid;
97 function get_date() {
98 return $this->date;
100 function set_date($dt) {
101 if (!empty($dt)) {
102 $this->date = $dt;
105 function get_user() {
106 return $this->user;
108 function set_user($u) {
109 if(!empty($u)){
110 $this->user = $u;
114 function set_activity($tf) {
115 if (!empty($tf) && is_numeric($tf)) {
116 $this->activity = $tf;
119 function get_activity() {
120 return $this->activity;
123 function get_assessment() {
124 return $this->assessment;
126 function set_assessment($data) {
127 if(!empty($data)){
128 $this->assessment = $data;
132 function get_procedures() {
133 return $this->procedures;
135 function set_procedures($data) {
136 if(!empty($data)){
137 $this->procedures = $data;
141 function get_discharge() {
142 return $this->discharge;
144 function set_discharge($data) {
145 if(!empty($data)){
146 $this->discharge = $data;
150 function persist() {
151 parent::persist();
153 } // end of Form