Highway to PSR2
[openemr.git] / entities / User.php
blobe5510224785a0280f9f2680006ec9993e0e62067
1 <?php
2 /**
3 * User entity.
5 * @package OpenEMR
6 * @link http://www.open-emr.org
7 * @author Matthew Vita <matthewvita48@gmail.com>
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @copyright Copyright (c) 2017 Matthew Vita <matthewvita48@gmail.com>
10 * @copyright Copyright (c) 2017 Brady Miller <brady.g.miller@gmail.com>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
14 namespace entities;
16 use Doctrine\ORM\Mapping\Entity;
17 use Doctrine\ORM\Mapping\Table;
18 use Doctrine\ORM\Mapping\Column;
19 use Doctrine\ORM\Mapping\Id;
20 use Doctrine\ORM\Mapping\Index;
21 use Doctrine\ORM\Mapping\OneToMany;
22 use Doctrine\ORM\Mapping\GeneratedValue;
24 /**
25 * @Table(name="users")
26 * @Entity(repositoryClass="repositories\UserRepository")
28 class User
30 /**
31 * Default constructor.
33 public function __construct()
37 /**
38 * @Column(name="id", type="integer")
39 * @GeneratedValue(strategy="AUTO")
41 private $id;
43 /**
44 * @OneToMany(targetEntity="ONote", mappedBy="user")
46 private $oNotes;
48 /**
49 * @Id
50 * @Column(name="username", type="string")
52 private $username;
54 /**
55 * @Column(name="calendar", type="boolean")
57 private $calendar;
59 /**
60 * @Column(name="irnpool", type="string")
62 private $irnPool;
64 /**
65 * @Column(name="cpoe", type="boolean")
67 private $cpoe;
69 /**
70 * @Column(name="physician_type", type="string")
72 private $physicianType;
74 /**
75 * @Column(name="newcrop_user_role", type="string")
77 private $newCropUserRole;
79 /**
80 * @Column(name="state_license_number", type="string")
82 private $stateLicenseNumber;
84 /**
85 * @Column(name="default_warehouse", type="string")
87 private $defaultWarehouse;
89 /**
90 * @Column(name="pwd_history2", type="text")
92 private $pwdHistory2;
94 /**
95 * @Column(name="pwd_history1", type="text")
97 private $pwdHistory1;
99 /**
100 * @Column(name="pwd_expiration_date", type="string")
102 private $pwdExpirationDate;
105 * @Column(name="abook_type", type="string")
107 private $aBookType;
110 * @Column(name="password", type="text")
112 private $password;
115 * @Column(name="authorized", type="boolean")
117 private $authorized;
120 * @Column(name="info", type="text")
122 private $info;
125 * @Column(name="taxonomy", type="string")
127 private $taxonomy;
130 * @Column(name="cal_ui", type="boolean")
132 private $calUi;
135 * @Column(name="notes", type="text")
137 private $notes;
140 * @Column(name="phonecell", type="string")
142 private $phoneCell;
145 * @Column(name="phonew2", type="string")
147 private $phoneW2;
150 * @Column(name="phonew1", type="string")
152 private $phoneW1;
155 * @Column(name="fax", type="string")
157 private $fax;
160 * @Column(name="phone", type="string")
162 private $phone;
165 * @Column(name="zip2", type="string")
167 private $zip2;
170 * @Column(name="state2", type="string")
172 private $state2;
175 * @Column(name="city2", type="string")
177 private $city2;
180 * @Column(name="streetb2", type="string")
182 private $streetB2;
185 * @Column(name="street2", type="string")
187 private $street2;
190 * @Column(name="zip", type="string")
192 private $zip;
195 * @Column(name="state", type="string")
197 private $state;
200 * @Column(name="city", type="string")
202 private $city;
205 * @Column(name="streetb", type="string")
207 private $streetB;
210 * @Column(name="street", type="string")
212 private $street;
215 * @Column(name="valedictory", type="string")
217 private $valedictory;
220 * @Column(name="organization", type="string")
222 private $organization;
225 * @Column(name="assistant", type="string")
227 private $assistant;
230 * @Column(name="url", type="string")
232 private $url;
235 * @Column(name="email_direct", type="string")
237 private $emailDirect;
240 * @Column(name="email", type="string")
242 private $email;
245 * @Column(name="billname", type="string")
247 private $billName;
250 * @Column(name="specialty", type="string")
252 private $specialty;
255 * @Column(name="title", type="string")
257 private $title;
260 * @Column(name="npi", type="string")
262 private $npi;
265 * @Column(name="active", type="boolean")
267 private $active;
270 * @Column(name="see_auth", type="integer")
272 private $seeAuth;
275 * @Column(name="facility_id", type="integer")
277 private $facilityId;
280 * @Column(name="facility", type="string")
282 private $facility;
285 * @Column(name="upin", type="string")
287 private $upin;
290 * @Column(name="federalDrugId", type="string")
292 private $federalDrugId;
295 * @Column(name="federaltaxid", type="string")
297 private $federalTaxId;
300 * @Column(name="suffix", type="string")
302 private $suffix;
305 * @Column(name="lname", type="string")
307 private $lname;
310 * @Column(name="mname", type="string")
312 private $mname;
315 * @Column(name="fname", type="string")
317 private $fname;
320 * @Column(name="source", type="boolean")
322 private $source;
325 * @Column(name="main_menu_role", type="string")
327 private $mainMenuRole;
329 public function getId()
331 return $this->id;
334 public function setId($value)
336 $this->id = $value;
339 public function getUsername()
341 return $this->username;
344 public function setUsername($value)
346 $this->username = $value;
349 public function getPassword()
351 return $this->password;
354 public function setPassword($value)
356 $this->password = $value;
359 public function getAuthorized()
361 return $this->authorized;
364 public function setAuthorized($value)
366 $this->authorized = $value;
369 public function getInfo()
371 return $this->info;
374 public function setInfo($value)
376 $this->info = $value;
379 public function getSource()
381 return $this->source;
384 public function setSource($value)
386 $this->source = $value;
389 public function getFname()
391 return $this->fname;
394 public function setFname($value)
396 $this->fname = $value;
399 public function getMname()
401 return $this->mname;
404 public function setMname($value)
406 $this->mname = $value;
409 public function getLname()
411 return $this->lname;
414 public function setLname($value)
416 $this->lname = $value;
419 public function getSuffix()
421 return $this->suffix;
424 public function setSuffix($value)
426 $this->suffix = $value;
429 public function getFederalTaxId()
431 return $this->federalTaxId;
434 public function setFederalTaxId($value)
436 $this->federalTaxId = $value;
439 public function getFederalDrugId()
441 return $this->federalDrugId;
444 public function setFederalDrugId($value)
446 $this->federalDrugId = $value;
449 public function getUpin()
451 return $this->upin;
454 public function setUpin($value)
456 $this->upin = $value;
459 public function getFacility()
461 return $this->facility;
464 public function setFacility($value)
466 $this->facility = $value;
469 public function getFacilityId()
471 return $this->facilityId;
474 public function setFacilityId($value)
476 $this->facilityId = $value;
479 public function getSeeAuth()
481 return $this->seeAuth;
484 public function setSeeAuth($value)
486 $this->seeAuth = $value;
489 public function getActive()
491 return $this->active;
494 public function setActive($value)
496 $this->active = $value;
499 public function getNpi()
501 return $this->npi;
504 public function setNpi($value)
506 $this->npi = $value;
509 public function getTitle()
511 return $this->title;
514 public function setTitle($value)
516 $this->title = $value;
519 public function getSpecialty()
521 return $this->specialty;
524 public function setSpecialty($value)
526 $this->specialty = $value;
529 public function getBillName()
531 return $this->billName;
534 public function setBillName($value)
536 $this->billName = $value;
539 public function getEmail()
541 return $this->email;
544 public function setEmail($value)
546 $this->email = $value;
549 public function getEmailDirect()
551 return $this->emailDirect;
554 public function setEmailDirect($value)
556 $this->emailDirect = $value;
559 public function getUrl()
561 return $this->url;
564 public function setUrl($value)
566 $this->url = $value;
569 public function getAssistant()
571 return $this->assistant;
574 public function setAssistant($value)
576 $this->assistant = $value;
579 public function getOrganization()
581 return $this->organization;
584 public function setOrganization($value)
586 $this->organization = $value;
589 public function getValedictory()
591 return $this->valedictory;
594 public function setValedictory($value)
596 $this->valedictory = $value;
599 public function getStreet()
601 return $this->street;
604 public function setStreet($value)
606 $this->street = $value;
609 public function getStreetB()
611 return $this->streetB;
614 public function setStreetB($value)
616 $this->streetB = $value;
619 public function getCity()
621 return $this->city;
624 public function setCity($value)
626 $this->city = $value;
629 public function getState()
631 return $this->state;
634 public function setState($value)
636 $this->state = $value;
639 public function getZip()
641 return $this->zip;
644 public function setZip($value)
646 $this->zip = $value;
649 public function getStreet2()
651 return $this->street2;
654 public function setStreet2($value)
656 $this->street2 = $value;
659 public function getStreetB2()
661 return $this->streetB2;
664 public function setStreetB2($value)
666 $this->streetB2 = $value;
669 public function getCity2()
671 return $this->city2;
674 public function setCity2($value)
676 $this->city2 = $value;
679 public function getState2()
681 return $this->state2;
684 public function setState2($value)
686 $this->state2 = $value;
689 public function getZip2()
691 return $this->zip2;
694 public function setZip2($value)
696 $this->zip2 = $value;
699 public function getPhone()
701 return $this->phone;
704 public function setPhone($value)
706 $this->phone = $value;
709 public function getFax()
711 return $this->fax;
714 public function setFax($value)
716 $this->fax = $value;
719 public function getPhoneW1()
721 return $this->phoneW1;
724 public function setPhoneW1($value)
726 $this->phoneW1 = $value;
729 public function getPhoneW2()
731 return $this->phoneW2;
734 public function setPhoneW2($value)
736 $this->phoneW2 = $value;
739 public function getPhoneCell()
741 return $this->phoneCell;
744 public function setPhoneCell($value)
746 $this->phoneCell = $value;
749 public function getNotes()
751 return $this->notes;
754 public function setNotes($value)
756 $this->notes = $value;
759 public function getCalUi()
761 return $this->calUi;
764 public function setCalUi($value)
766 $this->calUi = $value;
769 public function getTaxonomy()
771 return $this->taxonomy;
774 public function setTaxonomy($value)
776 $this->taxonomy = $value;
779 public function getCalendar()
781 return $this->calendar;
784 public function setCalendar($value)
786 $this->calendar = $value;
789 public function getaBookType()
791 return $this->aBookType;
794 public function setaBookType($value)
796 $this->aBookType = $value;
799 public function getPwdExpirationDate()
801 return $this->pwdExpirationDate;
804 public function setPwdExpirationDate($value)
806 $this->pwdExpirationDate = $value;
809 public function getPwdHistory1()
811 return $this->pwdHistory1;
814 public function setPwdHistory1($value)
816 $this->pwdHistory1 = $value;
819 public function getPwdHistory2()
821 return $this->pwdHistory2;
824 public function setPwdHistory2($value)
826 $this->pwdHistory2 = $value;
829 public function getDefaultWarehouse()
831 return $this->defaultWarehouse;
834 public function setDefaultWarehouse($value)
836 $this->defaultWarehouse = $value;
839 public function getIrnPool()
841 return $this->irnPool;
844 public function setIrnPool($value)
846 $this->irnPool = $value;
849 public function getStateLicenseNumber()
851 return $this->stateLicenseNumber;
854 public function setStateLicenseNumber($value)
856 $this->stateLicenseNumber = $value;
859 public function getNewCropUserRole()
861 return $this->newCropUserRole;
864 public function setNewCropUserRole($value)
866 $this->newCropUserRole = $value;
869 public function getCpoe()
871 return $this->cpoe;
874 public function setCpoe($value)
876 $this->cpoe = $value;
879 public function getPhysicianType()
881 return $this->physicianType;
884 public function setPhysicianType($value)
886 $this->physicianType = $value;
889 public function getMainMenuRole()
891 return $this->mainMenuRole;
894 public function setMainMenuRole($value)
896 $this->mainMenuRole = $value;
900 * ToString of the entire object.
902 * @return object as string
904 public function __toString()
906 return "id: '" . $this->getId() . "' " .
907 "username: '" . $this->getUsername() . "' " .
908 "password: '" . $this->getPassword() . "' " .
909 "authorized: '" . $this->getAuthorized() . "' " .
910 "info: '" . $this->getInfo() . "' " .
911 "source: '" . $this->getSource() . "' " .
912 "fname: '" . $this->getFname() . "' " .
913 "mname: '" . $this->getMname() . "' " .
914 "lname: '" . $this->getLname() . "' " .
915 "suffix: '" . $this->getSuffix() . "' " .
916 "federalTaxId: '" . $this->getFederalTaxId() . "' " .
917 "federalDrugId: '" . $this->getFederalDrugId() . "' " .
918 "upin: '" . $this->getUpin() . "' " .
919 "facility: '" . $this->getFacility() . "' " .
920 "facilityId: '" . $this->getFacilityId() . "' " .
921 "seeAuth: '" . $this->getSeeAuth() . "' " .
922 "active: '" . $this->getActive() . "' " .
923 "npi: '" . $this->getNpi() . "' " .
924 "title: '" . $this->getTitle() . "' " .
925 "specialty: '" . $this->getSpecialty() . "' " .
926 "billName: '" . $this->getBillName() . "' " .
927 "email: '" . $this->getEmail() . "' " .
928 "emailDirect: '" . $this->getEmailDirect() . "' " .
929 "url: '" . $this->getUrl() . "' " .
930 "assistant: '" . $this->getAssistant() . "' " .
931 "organization: '" . $this->getOrganization() . "' " .
932 "valedictory: '" . $this->getValedictory() . "' " .
933 "street: '" . $this->getStreet() . "' " .
934 "streetB: '" . $this->getStreetB() . "' " .
935 "city: '" . $this->getCity() . "' " .
936 "state: '" . $this->getState() . "' " .
937 "zip: '" . $this->getZip() . "' " .
938 "street2: '" . $this->getStreet2() . "' " .
939 "streetB2: '" . $this->getStreetB2() . "' " .
940 "city2: '" . $this->getCity2() . "' " .
941 "state2: '" . $this->getState2() . "' " .
942 "zip2: '" . $this->getZip2() . "' " .
943 "phone: '" . $this->getPhone() . "' " .
944 "fax: '" . $this->getFax() . "' " .
945 "phoneW1: '" . $this->getPhoneW1() . "' " .
946 "phoneW2: '" . $this->getPhoneW2() . "' " .
947 "phoneCell: '" . $this->getPhoneCell() . "' " .
948 "notes: '" . $this->getNotes() . "' " .
949 "calUi: '" . $this->getCalUi() . "' " .
950 "taxonomy: '" . $this->getTaxonomy() . "' " .
951 "calendar: '" . $this->getCalendar() . "' " .
952 "aBookType: '" . $this->getaBookType() . "' " .
953 "pwdExpirationDate: '" . $this->getPwdExpirationDate() . "' " .
954 "pwdHistory1: '" . $this->getPwdHistory1() . "' " .
955 "pwdHistory2: '" . $this->getPwdHistory2() . "' " .
956 "defaultWarehouse: '" . $this->getDefaultWarehouse() . "' " .
957 "irnPool: '" . $this->getIrnPool() . "' " .
958 "stateLicenseNumber: '" . $this->getStateLicenseNumber() . "' " .
959 "newCropUserRole: '" . $this->getNewCropUserRole() . "' " .
960 "cpoe: '" . $this->getCpoe() . "' " .
961 "physicianType: '" . $this->getPhysicianType() . "' " .
962 "mainMenuRole: '" . $this->getMainMenuRole() . "' ";
966 * ToSerializedObject of the entire object.
968 * @return object as serialized object.
970 public function toSerializedObject()
972 return get_object_vars($this);