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>;.
19 * @author Victor Kofia <victor.kofia@gmail.com>
20 * @link http://www.open-emr.org
23 namespace OpenEMR\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
;
31 * @Table(name="chart_tracker")
32 * @Entity(repositoryClass="OpenEMR\Repositories\ChartTrackerRepository")
38 * Default constructor.
40 public function __construct()
46 * @Column(name="ct_pid"), type="int", length=11, nullable=false, options={"default" : 0})
51 * @Column(name="ct_when", type="datetime", nullable=false)
56 * @Column(name="ct_userid"), type="bigint", length=20, nullable=false, options={"default" : 0})
61 * @Column(name="ct_location"), type="varchar", length=31, nullable=false, options={"default" : "")
71 public function getPid()
81 public function setPid($value)
89 * return when datetime
91 public function getWhen()
99 * @param when datetime
101 public function setWhen($value)
103 $this->when
= $value;
107 * Getter for user id.
109 * return user id number
111 public function getUserId()
113 return $this->userId
;
117 * Setter for user id.
119 * @param user id number
121 public function setUserId($value)
123 $this->userId
= $value;
127 * Getter for location.
129 * return location string
131 public function getLocation()
133 return $this->location
;
137 * Setter for location.
139 * @param location string
141 public function setLocation($value)
143 $this->location
= $value;
147 * ToString of the entire object.
149 * @return object as string
151 public function __toString()
153 return "pid: '" . $this->getPid() . "' " .
154 "date: '" . $this->getDate() . "' " .
155 "userId: '" . $this->getUserId() . "' " .
156 "location" . $this->getLocation() . "' " ;
160 * ToSerializedObject of the entire object.
162 * @return object as serialized object.
164 public function toSerializedObject()
166 return get_object_vars($this);