simple fix for hylafax
[openemr.git] / entities / ChartTracker.php
blobcce30816bb93cfa2f9916fdaa43da4123caa6b62
1 <?php
2 /**
3 * Chart tracker entity.
5 * Copyright (C) 2017 Victor Kofia <victor.kofia@gmail.com>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
18 * @package OpenEMR
19 * @author Victor Kofia <victor.kofia@gmail.com>
20 * @link http://www.open-emr.org
23 namespace entities;
25 use Doctrine\ORM\Mapping\Entity;
26 use Doctrine\ORM\Mapping\Table;
27 use Doctrine\ORM\Mapping\Column;
28 use Doctrine\ORM\Mapping\Id;
30 /**
31 * @Table(name="chart_tracker")
32 * @Entity(repositoryClass="repositories\ChartTrackerRepository")
34 class ChartTracker {
36 /**
37 * Default constructor.
39 public function __construct(){
43 /**
44 * @Id
45 * @Column(name="ct_pid"), type="int", length=11, nullable=false, options={"default" : 0})
47 private $pid;
49 /**
50 * @Column(name="ct_when", type="datetime", nullable=false)
52 private $when;
54 /**
55 * @Column(name="ct_userid"), type="bigint", length=20, nullable=false, options={"default" : 0})
57 private $userId;
59 /**
60 * @Column(name="ct_location"), type="varchar", length=31, nullable=false, options={"default" : "")
62 private $location;
65 /**
66 * Getter for pid.
68 * return pid
70 public function getPid() {
71 return $this->pid;
74 /**
75 * Setter for pid.
77 * @param pid
79 public function setPid($value) {
80 $this->pid = $value;
83 /**
84 * Getter for when.
86 * return when datetime
88 public function getWhen() {
89 return $this->when;
92 /**
93 * Setter for when.
95 * @param when datetime
97 public function setWhen($value) {
98 $this->when = $value;
102 * Getter for user id.
104 * return user id number
106 public function getUserId() {
107 return $this->userId;
111 * Setter for user id.
113 * @param user id number
115 public function setUserId($value) {
116 $this->userId = $value;
120 * Getter for location.
122 * return location string
124 public function getLocation() {
125 return $this->location;
129 * Setter for location.
131 * @param location string
133 public function setLocation($value) {
134 $this->location = $value;
138 * ToString of the entire object.
140 * @return object as string
142 public function __toString() {
143 return "pid: '" . $this->getPid() . "' " .
144 "date: '" . $this->getDate() . "' " .
145 "userId: '" . $this->getUserId() . "' " .
146 "location" . $this->getLocation() . "' " ;
150 * ToSerializedObject of the entire object.
152 * @return object as serialized object.
154 public function toSerializedObject() {
155 return get_object_vars($this);