Merge pull request #1417 from priya-anand/patch-5
[openemr.git] / entities / ChartTracker.php
blobb1b28c2712b4b691e1319ec6ba8b8d9fd1d246b3
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 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;
30 /**
31 * @Table(name="chart_tracker")
32 * @Entity(repositoryClass="OpenEMR\Repositories\ChartTrackerRepository")
34 class ChartTracker
37 /**
38 * Default constructor.
40 public function __construct()
44 /**
45 * @Id
46 * @Column(name="ct_pid"), type="int", length=11, nullable=false, options={"default" : 0})
48 private $pid;
50 /**
51 * @Column(name="ct_when", type="datetime", nullable=false)
53 private $when;
55 /**
56 * @Column(name="ct_userid"), type="bigint", length=20, nullable=false, options={"default" : 0})
58 private $userId;
60 /**
61 * @Column(name="ct_location"), type="varchar", length=31, nullable=false, options={"default" : "")
63 private $location;
66 /**
67 * Getter for pid.
69 * return pid
71 public function getPid()
73 return $this->pid;
76 /**
77 * Setter for pid.
79 * @param pid
81 public function setPid($value)
83 $this->pid = $value;
86 /**
87 * Getter for when.
89 * return when datetime
91 public function getWhen()
93 return $this->when;
96 /**
97 * Setter for when.
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);