/** * Show closed medical problems */ echo HTML::section(2, _("Closed Medical Problems List:")); $problemQ = new Query_Page_Problem(); if (!$problemQ->selectProblems($idPatient, true)) { echo Msg::info(_("No closed medical problems defined for this patient.")); echo HTML::rule(); } while ($problem = $problemQ->fetch()) { echo HTML::section(3, _("Order Number")); echo HTML::para($problem->getOrderNumber()); if ($problem->getIdMember()) { $staffQ = new Query_Staff(); if ($staffQ->select($problem->getIdMember())) { $staff = $staffQ->fetch(); if ($staff) { echo HTML::section(3, _("Attending Physician")); echo HTML::para($staff->getSurname1() . ' ' . $staff->getSurname2() . ', ' . $staff->getFirstName()); } $staffQ->freeResult(); } $staffQ->close(); unset($staffQ); unset($staff); } echo HTML::section(3, _("Opening Date")); echo HTML::para(I18n::localDate($problem->getOpeningDate())); echo HTML::section(3, _("Last Update Date")); echo HTML::para(I18n::localDate($problem->getLastUpdateDate())); if ($problem->getClosingDate() != "" && $problem->getClosingDate() != "0000-00-00") {
$tbody[] = $row; $row = Form::label("family_situation", _("Informações complementares") . ":"); $row .= Form::textArea("family_situation", $formVar["family_situation"], array('rows' => 3, 'cols' => 30)); $tbody[] = $row; $row = Form::label("labour_situation", _("Trabalho dos familiares") . ":"); $row .= Form::textArea("labour_situation", $formVar["labour_situation"], array('rows' => 3, 'cols' => 30)); $tbody[] = $row; $row = Form::label("education", _("Procedência do encaminhamento") . ":"); $row .= Form::textArea("education", $formVar["education"], array('rows' => 3, 'cols' => 30)); $tbody[] = $row; $row = Form::label("insurance_company", _("CID") . ":"); $row .= Form::text("insurance_company", isset($formVar["insurance_company"]) ? $formVar["insurance_company"] : null, array('size' => 30, 'error' => isset($formError["insurance_company"]) ? $formError["insurance_company"] : null)); $tbody[] = $row; $staffQ = new Query_Staff(); $array = null; $array[0] = ""; // to permit null value if ($staffQ->selectType('D')) { while ($staff = $staffQ->fetch()) { $array[$staff->getIdMember()] = $staff->getFirstName() . " " . $staff->getSurname1() . " " . $staff->getSurname2(); } $staffQ->freeResult(); } $staffQ->close(); unset($staffQ); $row = Form::label("id_member", _("Atendente") . ":"); $row .= Form::select("id_member", $array, $formVar["id_member"]); unset($array); $tbody[] = $row; $tfoot = array(Form::button("save", _("Gravar dados")) . Form::generateToken()); echo Form::fieldset($title, $tbody, $tfoot);