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 **************************************************************************/
16 class Patient
extends ORDataObject
27 * Constructor sets all Prescription attributes to their default value
29 function __construct($id = "")
32 $this->_table
= "patient_data";
38 $this->provider
= new Provider();
43 if (!empty($this->id
)) {
44 $res = sqlQuery("SELECT providerID,fname,lname,mname ".
45 ", DATE_FORMAT(DOB,'%m/%d/%Y') as date_of_birth ".
47 " from " . $this->_table
." where pid =". add_escape_custom($this->id
));
49 $this->pubpid
= $res['pubpid'];
50 $this->lname
= $res['lname'];
51 $this->mname
= $res['mname'];
52 $this->fname
= $res['fname'];
53 $this->provider
= new Provider($res['providerID']);
54 $this->date_of_birth
= $res['date_of_birth'];
70 function get_name_display()
72 return $this->fname
. " " . $this->lname
;
74 function get_provider_id()
76 return $this->provider
->id
;
78 function get_provider()
80 return $this->provider
;
84 return $this->date_of_birth
;