} elseif ($patient['sex'] == 'f') {
                echo $txt . '<img src="' . $root_path . 'main/imgcreator/labor-datacurve.php?sid=' . $sid . '&lang=' . $lang . '&cols=' . $cols . '&lo=' . $pName->fields['lo_bound_f'] . '&hi=' . $pName->fields['hi_bound_f'] . '&d=' . $valueBuff . '" border=0>';
            }
            break;
    }
    return $txt;
}
require $root_path . 'include/inc_labor_param_group.php';
if ($nostat) {
    $ret = $root_path . "modules/laboratory/labor_data_patient_such.php?sid={$sid}&lang={$lang}&versand=1&keyword={$pn}";
} else {
    $ret = $root_path . "modules/nursing/nursing-station-patientdaten.php?sid={$sid}&lang={$lang}&station={$station}&pn={$pn}";
}
# Load the date formatter
require_once $root_path . 'include/inc_date_format_functions.php';
$enc_obj->setWhereCondition("encounter_nr='{$encounter_nr}'");
if ($encounter = $enc_obj->getBasic4Data($encounter_nr)) {
    $patient = $encounter->FetchRow();
    $recs =& $lab_obj->getAllResults($encounter_nr);
    if ($rows = $lab_obj->LastRecordCount()) {
        # Merge the records to common date key
        $records = array();
        $dt = array();
        while ($buffer = $recs->FetchRow()) {
            $tmp = array($buffer['paramater_name'] => $buffer['parameter_value']);
            $records[$buffer['job_id']][] = $tmp;
            $tdate[$buffer['job_id']] =& $buffer['test_date'];
            $ttime[$buffer['job_id']] =& $buffer['test_time'];
        }
        //gjergji :
        //reverse date from past to current