2 /************************************************************************
3 aptient.php - Copyright duhlman
5 /usr/share/apps/umbrello/headings/heading.php
7 This file was generated on %date% at %time%
8 The original location of this file is /home/duhlman/uml-generated-code/prescription.php
9 **************************************************************************/
11 require_once("ORDataObject.class.php");
12 require_once("Provider.class.php");
18 class Patient
extends ORDataObject
{
27 * Constructor sets all Prescription attributes to their default value
29 function Patient($id = "") {
31 $this->_table
= "patient_data";
36 $this->provider
= new Provider();
42 if (!empty($this->id
)) {
43 $res = sqlQuery("SELECT providerID,fname,lname,mname, DATE_FORMAT(DOB,'%m/%d/%Y') as date_of_birth from " . $this->_table
." where pid =". mysql_real_escape_string($this->id
));
45 $this->lname
= $res['lname'];
46 $this->mname
= $res['mname'];
47 $this->fname
= $res['fname'];
48 $this->provider
= new Provider($res['providerID']);
49 $this->date_of_birth
= $res['date_of_birth'];
56 function get_lname() {
59 function get_name_display() {
60 return $this->fname
. " " . $this->lname
;
62 function get_provider_id() {
63 return $this->provider
->id
;
65 function get_provider() {
66 return $this->provider
;
69 return $this->date_of_birth
;