In order to Change the field in prescription as you mentioned.
Open the file C_Prescription.class.php
Search for the field “Medical Record”,you will get two results.Change it as “Social security”
Finally save and check for the change.
And then, in the populate function you’ll need to add the colum ss To the select query and finally in the if statement a couple of lines below add $this->ssn = $res['ss'];
That should allow you to go back to the C_prescription file and replace the call to $p->patient->get_pubpid() with $p->patient->get_ssn()
Sorry I can’t actually test any of that, nothing like writing code from your phone
Let me know if that works. I’ll try to test this later tonight
I tried what you told me but it did not work. I changed the codes in patient class as below
/************************************************************************
/usr/share/apps/umbrello/headings/heading.php
This file was generated on %date% at %time%
The original location of this file is /home/duhlman/uml-generated-code/prescription.php
**************************************************************************/
require_once("ORDataObject.class.php");
require_once("Provider.class.php");
/**
* class Patient
*
*/
class Patient extends ORDataObject{
var $id;
var $pubpid;
var $lname;
var $mname;
var $fname;
var $date_of_birth;
var $provider;
/**
* Constructor sets all Prescription attributes to their default value
*/
function __construct($id = "") {
$this->id = $id;
$this->_table = "patient_data";
$this->pubpid = "";
$this->lname = "";
$this->mname = "";
$this->fname = "";
$this->dob = "";
$this->provider = new Provider();
$this->populate();
}
public function get_ssn()
{return $this->ssn;
}
function populate() {
if (!empty($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 =". add_escape_custom($this->id));
if (is_array($res)) {
$this->pubpid = $res['pubpid'];
$this->lname = $res['lname'];
$this->mname = $res['mname'];
$this->fname = $res['fname'];
$this->provider = new Provider($res['providerID']);
$this->date_of_birth = $res['date_of_birth'];
$this->ssn = $res['ss'];
}
}
}
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
For the codes in C_Prescription.class.php, on lines 410, I change codes as you advised echo ($p->patient->get_ssn());