Updated translation table after fixing script in previous commit
[openemr.git] / contrib / forms / medical_orders / FormMedicalOrders.class.php
blobf8fa2abf072b56eb2a4cef4963d5aec13eb8a99a
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 FormMedicalOrders 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 $orders;
41 /**
42 * Constructor sets all Form attributes to their default value
45 function FormMedicalOrders($id= "", $_prefix = "") {
46 if (is_numeric($id)) {
47 $this->id = $id;
49 else {
50 $id = "";
51 $this->date = date("Y-m-d H:i:s");
54 $this->_table = "form_medical_orders";
55 $this->activity = 1;
56 $this->pid = $GLOBALS['pid'];
57 if ($id != "") {
58 $this->populate();
59 //$this->date = $this->get_date();
62 function populate() {
63 parent::populate();
64 //$this->temp_methods = parent::_load_enum("temp_locations",false);
67 function toString($html = false) {
68 $string .= "\n"
69 ."ID: " . $this->id . "\n";
71 if ($html) {
72 return nl2br($string);
74 else {
75 return $string;
78 function set_id($id) {
79 if (!empty($id) && is_numeric($id)) {
80 $this->id = $id;
83 function get_id() {
84 return $this->id;
86 function set_pid($pid) {
87 if (!empty($pid) && is_numeric($pid)) {
88 $this->pid = $pid;
91 function get_pid() {
92 return $this->pid;
95 function get_date() {
96 return $this->date;
98 function set_date($dt) {
99 if (!empty($dt)) {
100 $this->date = $dt;
103 function get_user() {
104 return $this->user;
106 function set_user($u) {
107 if(!empty($u)){
108 $this->user = $u;
112 function get_orders() {
113 return $this->orders;
115 function set_orders($data) {
116 if(!empty($data)){
117 $this->orders = $data;
121 function set_activity($tf) {
122 if (!empty($tf) && is_numeric($tf)) {
123 $this->activity = $tf;
126 function get_activity() {
127 return $this->activity;
130 function persist() {
131 parent::persist();
133 } // end of Form