From fe74a83bcba652a524ac2dde0ecb9dad8e07eac7 Mon Sep 17 00:00:00 2001 From: cfapress Date: Wed, 18 Feb 2009 17:45:13 +0000 Subject: [PATCH] new variable for pubpid --- library/classes/Patient.class.php | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/library/classes/Patient.class.php b/library/classes/Patient.class.php index aaaa92983..589149d00 100644 --- a/library/classes/Patient.class.php +++ b/library/classes/Patient.class.php @@ -17,6 +17,7 @@ require_once("Provider.class.php"); class Patient extends ORDataObject{ var $id; + var $pubpid; var $lname; var $mname; var $fname; @@ -29,6 +30,7 @@ class Patient extends ORDataObject{ function Patient($id = "") { $this->id = $id; $this->_table = "patient_data"; + $this->pubpid = ""; $this->lname = ""; $this->mname = ""; $this->fname = ""; @@ -40,8 +42,12 @@ class Patient extends ORDataObject{ } function populate() { if (!empty($this->id)) { - $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)); + $res = sqlQuery("SELECT providerID,fname,lname,mname ". + ", DATE_FORMAT(DOB,'%m/%d/%Y') as date_of_birth ". + ", pubpid ". + " from " . $this->_table ." where pid =". mysql_real_escape_string($this->id)); if (is_array($res)) { + $this->pubpid = $res['pubpid']; $this->lname = $res['lname']; $this->mname = $res['mname']; $this->fname = $res['fname']; @@ -50,24 +56,13 @@ class Patient extends ORDataObject{ } } } - function get_id() { - return $this->id; - } - function get_lname() { - return $this->lname; - } - function get_name_display() { - return $this->fname . " " . $this->lname; - } - function get_provider_id() { - return $this->provider->id; - } - function get_provider() { - return $this->provider; - } - function get_dob () { - return $this->date_of_birth; - } + function get_id() { return $this->id; } + function get_pubpid() { return $this->pubpid; } + function get_lname() { return $this->lname; } + function get_name_display() { return $this->fname . " " . $this->lname; } + function get_provider_id() { return $this->provider->id; } + function get_provider() { return $this->provider; } + function get_dob () { return $this->date_of_birth; } } // end of Patient ?> -- 2.11.4.GIT