forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChartTracker.php
168 lines (149 loc) · 3.49 KB
/
ChartTracker.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?php
/**
* Chart tracker entity.
*
* Copyright (C) 2017 Victor Kofia <[email protected]>
*
* LICENSE: This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://opensource.org/licenses/gpl-license.php>;.
*
* @package OpenEMR
* @author Victor Kofia <[email protected]>
* @link https://www.open-emr.org
*/
namespace OpenEMR\Entities;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\Table;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Id;
/**
* @Table(name="chart_tracker")
* @Entity(repositoryClass="OpenEMR\Repositories\ChartTrackerRepository")
*/
class ChartTracker
{
/**
* Default constructor.
*/
public function __construct()
{
}
/**
* @Id
* @Column(name="ct_pid"), type="int", length=11, nullable=false, options={"default" : 0})
*/
private $pid;
/**
* @Column(name="ct_when", type="datetime", nullable=false)
*/
private $when;
/**
* @Column(name="ct_userid"), type="bigint", length=20, nullable=false, options={"default" : 0})
*/
private $userId;
/**
* @Column(name="ct_location"), type="varchar", length=31, nullable=false, options={"default" : "")
*/
private $location;
/**
* Getter for pid.
*
* return pid
*/
public function getPid()
{
return $this->pid;
}
/**
* Setter for pid.
*
* @param pid
*/
public function setPid($value)
{
$this->pid = $value;
}
/**
* Getter for when.
*
* return when datetime
*/
public function getWhen()
{
return $this->when;
}
/**
* Setter for when.
*
* @param when datetime
*/
public function setWhen($value)
{
$this->when = $value;
}
/**
* Getter for user id.
*
* return user id number
*/
public function getUserId()
{
return $this->userId;
}
/**
* Setter for user id.
*
* @param user id number
*/
public function setUserId($value)
{
$this->userId = $value;
}
/**
* Getter for location.
*
* return location string
*/
public function getLocation()
{
return $this->location;
}
/**
* Setter for location.
*
* @param location string
*/
public function setLocation($value)
{
$this->location = $value;
}
/**
* ToString of the entire object.
*
* @return object as string
*/
public function __toString()
{
return "pid: '" . $this->getPid() . "' " .
"date: '" . $this->getDate() . "' " .
"userId: '" . $this->getUserId() . "' " .
"location" . $this->getLocation() . "' " ;
}
/**
* ToSerializedObject of the entire object.
*
* @return object as serialized object.
*/
public function toSerializedObject()
{
return get_object_vars($this);
}
}