3 /************************************************************************
4 aptient.php - Copyright duhlman
6 /usr/share/apps/umbrello/headings/heading.php
8 This file was generated on %date% at %time%
9 The original location of this file is /home/duhlman/uml-generated-code/prescription.php
10 **************************************************************************/
17 use OpenEMR\Common\ORDataObject\ORDataObject
;
19 class Patient
extends ORDataObject
31 * Constructor sets all Prescription attributes to their default value
33 function __construct($id = "")
36 $this->_table
= "patient_data";
42 $this->provider
= new Provider();
47 if (!empty($this->id
)) {
48 $res = sqlQuery("SELECT providerID , fname , lname , mname, " .
49 "DATE_FORMAT(DOB,'%m/%d/%Y') as date_of_birth, " .
51 "FROM " . escape_table_name($this->_table
) . " " .
52 "WHERE pid = ?", [$this->id
]);
54 $this->pubpid
= $res['pubpid'];
55 $this->lname
= $res['lname'];
56 $this->mname
= $res['mname'];
57 $this->fname
= $res['fname'];
58 $this->provider
= new Provider($res['providerID']);
59 $this->date_of_birth
= $res['date_of_birth'];
75 function get_name_display()
77 return $this->fname
. " " . $this->lname
;
79 function get_provider_id()
81 return $this->provider
->id
;
83 function get_provider()
85 return $this->provider
;
89 return $this->date_of_birth
;