Do you use or administer OpenEMR? Take the General Satisfaction Survey to help improve the product

Date format on prescription help

Hi,
I hope to inspire you some more to make OpenEMR more “international”.

  • If I make a prescription, it shows the DOB in the wrong format MM/DD/YYYY; the patient summary screen correctly does DD/MM/YYYY (set in globals).
    The code in Precscription.class.php says:

line 735 $this->patient->date_of_birth

how do I change that so it will show the correct DOB 07/12/2014 instead of 12/07/2014 on the Rx

Roland :paw_prints:

I can also do this in the development demo 5.02 : the patient’s date of birth on file and the one on the prescription are not the same (when globals set to DD/MM/YYYY). Could someone help me with this to at least get this right? seems to be in C_Prescription.class.php.

To change the DOB on the prescription, change the following in this file:
/openemr/library/classes/Patient.class.php, change the order in DOB:

function populate() {
if (!empty($this->id)) {
$res = sqlQuery("SELECT providerID,fname,lname,mname ".
", DATE_FORMAT(DOB,’%d/%m/%Y’) as date_of_birth ".
“, pubpid “.
" from " . $this->_table .” where pid =”. add_escape_custom($this->id));

To change the date of the signature, open file:
/openemr/controllers/C_Prescription.class.php
and change all the mentioned m-d-Y date format in d-m-Y