clinical report datetime support
[openemr.git] / entities / ProductRegistration.php
blob817454060640f63f309afbbe4aeba77468c7f32c
1 <?php
2 /**
3 * Product Registration entity.
5 * Copyright (C) 2017 Sherwin Gaddis <sherwingaddis@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 Sherwin Gaddis <sherwingaddis@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="product_registration")
32 * @Entity(repositoryClass="OpenEMR\Repositories\ProductRegistrationRepository")
34 class ProductRegistration
36 /**
37 * Default constructor.
39 public function __construct()
43 /**
44 * @Id
45 * @Column(name="registration_id"), type="char", length=36 nullable=false, options={"default" : 0})
47 private $registrationId;
49 /**
50 * @Column(name="email"), type="varchar", length=255 nullable=false, options={"default" : 0})
52 private $email;
54 /**
55 * @Column(name="opt_out"), type="tinyint", length=1 nullable=false, options={"default" : 0})
57 private $optOut;
59 /**
60 * Status that can be set/get as a human-readable string for the client. Not stored in the database.
62 private $statusAsString;
64 /**
65 * Getter for registration id.
67 * return registration id
69 public function getRegistrationId()
71 return $this->registrationId;
74 /**
75 * Setter for registration id.
77 * @param registration id
79 public function setRegistrationId($value)
81 $this->registrationId = $value;
84 /**
85 * Getter for email.
87 * return email string
89 public function getEmail()
91 return $this->email;
94 /**
95 * Setter for email.
97 * @param email string
99 public function setEmail($value)
101 $this->email = $value;
105 * Getter for opt out.
107 * return opt out string
109 public function getOptOut()
111 return $this->optOut;
115 * Setter for opt out.
117 * @param opt out number
119 public function setOptOut($value)
121 $this->optOut = $value;
125 * Setter for status that can be set/get as a human-readable string for the client.
126 * Not stored in the database.
128 * return human-readable status.
130 public function getStatusAsString()
132 return $this->statusAsString;
136 * Getter for status that can be set/get as a human-readable string for the client.
137 * Not stored in the database.
139 * @param human-readable status.
141 public function setStatusAsString($value)
143 $this->statusAsString = $value;
147 * ToString of the entire object.
149 * @return object as string
151 public function __toString()
153 return "registrationId: '" . $this->getRegistrationId() . "' " .
154 "email: '" . $this->getEmail() . "' " .
155 "statusAsString: '" . $this->getStatusAsString() . "' " .
156 "optOut" . $this->getOptOut() . "' " ;
160 * ToSerializedObject of the entire object.
162 * @return object as serialized object.
164 public function toSerializedObject()
166 return get_object_vars($this);