示例#1
0
function fntProcessaDadosExameFisico()
{
    if ($_SESSION['caso'] > 0) {
        $codcaso = $_SESSION['caso'];
        $cabeca = $_POST['txtExaFisCabeca'];
        $pescoco = $_POST['txtExaFisPescoco'];
        $auspulmonar = $_POST['txtExaFisAusPulmonar'];
        $auscardiaca = $_POST['txtExaFisAusCardiaca'];
        $sinvit = $_POST['txtExaFisSinVit'];
        $abdomen = $_POST['txtExaFisAbdomen'];
        $pele = $_POST['txtExaFisPele'];
        $extrem = $_POST['txtExaFisExtrem'];
        $geral = $_POST['txtExaFisGeral'];
        $midcabeca = $_POST['midCabeca'];
        $midpescoco = $_POST['midPescoco'];
        $midauspulmonar = $_POST['midAusPulmonar'];
        $midauscardiaca = $_POST['midAusCardiaca'];
        $midabdomen = $_POST['midAbdomen'];
        $midextrem = $_POST['midExtrem'];
        $midpele = $_POST['midPele'];
        $midsinvit = $_POST['midSinVit'];
        $midgeral = $_POST['midGeral'];
        $ef = new ExameFisico();
        if (trim($cabeca) != "") {
            $ef->setCabeca($cabeca);
        }
        if (trim($pescoco) != "") {
            $ef->setPescoco($pescoco);
        }
        if (trim($auspulmonar) != "") {
            $ef->setAuscultapulmonar($auspulmonar);
        }
        if (trim($auscardiaca) != "") {
            $ef->setAuscultacardiaca($auscardiaca);
        }
        if (trim($sinvit) != "") {
            $ef->setSinaisvitais($sinvit);
        }
        if (trim($abdomen) != "") {
            $ef->setAbdomen($abdomen);
        }
        if (trim($pele) != "") {
            $ef->setPele($pele);
        }
        if (trim($extrem) != "") {
            $ef->setExtremidades($extrem);
        }
        if (trim($geral) != "") {
            $ef->setEstadoGeral($geral);
        }
        if (trim($midcabeca) != "") {
            $ef->setMidiasCabeca($midcabeca);
        }
        if (trim($midpescoco) != "") {
            $ef->setMidiasPescoco($midpescoco);
        }
        if (trim($midauspulmonar) != "") {
            $ef->setMidiasAuscultaPulmonar($midauspulmonar);
        }
        if (trim($midauscardiaca) != "") {
            $ef->setMidiasAuscultaCardiaca($midauscardiaca);
        }
        if (trim($midabdomen) != "") {
            $ef->setMidiasAbdomen($midabdomen);
        }
        if (trim($midextrem) != "") {
            $ef->setMidiasExtremidades($midextrem);
        }
        if (trim($midpele) != "") {
            $ef->setMidiasPele($midpele);
        }
        if (trim($midsinvit) != "") {
            $ef->setMidiasSinaisVitais($midsinvit);
        }
        if (trim($midgeral) != "") {
            $ef->setMidiasEstadoGeral($midgeral);
        }
        $ret = "";
        $ef->setCodcaso($codcaso);
        if ($ef->VerificaCodigo() == false) {
            $ret = $ef->Insere();
        } else {
            $ret = $ef->Atualiza();
        }
        if ($ret == true) {
            echo "OK";
        } else {
            echo $ef->getErro();
        }
    } else {
        $msg = base64_encode("@lng[Nenhum caso clínico vinculado]");
        header("Location:vwcaso.php?m=" . $msg);
    }
}
示例#2
0
function Main()
{
    header('Content-Type: text/html; charset=iso-8859-1');
    if (isset($_SESSION['casores']) && $_SESSION['casores'] > 0) {
        try {
            $ef = new ExameFisico();
            //unset($_SESSION['examefisicoaluno']);
            if (!isset($_SESSION['examefisicoaluno'])) {
                $ef->Carrega($_SESSION['casores']);
                $_SESSION['ef_cab'] = nl2br($ef->getCabeca());
                $_SESSION['ef_pes'] = nl2br($ef->getPescoco());
                $_SESSION['ef_cor'] = nl2br($ef->getAuscultacardiaca());
                $_SESSION['ef_pul'] = nl2br($ef->getAuscultapulmonar());
                $_SESSION['ef_abd'] = nl2br($ef->getAbdomen());
                $_SESSION['ef_sin'] = nl2br($ef->getSinaisvitais());
                $_SESSION['ef_pel'] = nl2br($ef->getPele());
                $_SESSION['ef_ext'] = nl2br($ef->getExtremidades());
                $_SESSION['ef_ger'] = nl2br($ef->getEstadoGeral());
                $_SESSION['ef_mid_cab'] = $ef->getMidiasCabeca();
                $_SESSION['ef_mid_pes'] = $ef->getMidiasPescoco();
                $_SESSION['ef_mid_cor'] = $ef->getMidiasAuscultaCardiaca();
                $_SESSION['ef_mid_pul'] = $ef->getMidiasAuscultaPulmonar();
                $_SESSION['ef_mid_abd'] = $ef->getMidiasAbdomen();
                $_SESSION['ef_mid_sin'] = $ef->getMidiasSinaisVitais();
                $_SESSION['ef_mid_pel'] = $ef->getMidiasPele();
                $_SESSION['ef_mid_ext'] = $ef->getMidiasExtremidades();
                $_SESSION['ef_mid_ger'] = $ef->getMidiasEstadoGeral();
                $_SESSION['examefisicoaluno'] = "sim";
            }
            switch ($_POST['p']) {
                case "cab":
                    $html = '<strong>@lng[Cabeça]</strong><br /><span>' . $_SESSION['ef_cab'] . '</span>';
                    $html .= $_SESSION['ef_mid_cab'] > 0 ? '<br /><div class="cont-multimidia"><a href="javascript:void(0);" onclick="javascript:fntCarregaMidias(\'' . base64_encode($_SESSION['ef_mid_cab']) . '\');">' . Comuns::IMG_MIDIA_MULTIMIDIA . '</a></div>' : '';
                    break;
                case "pes":
                    $html = '<strong>@lng[Pescoço]</strong><br /><span>' . $_SESSION['ef_pes'] . '</span>';
                    $html .= $_SESSION['ef_mid_pes'] > 0 ? '<br /><div class="cont-multimidia"><a href="javascript:void(0);" onclick="javascript:fntCarregaMidias(\'' . base64_encode($_SESSION['ef_mid_pes']) . '\');">' . Comuns::IMG_MIDIA_MULTIMIDIA . '</a></div>' : '';
                    break;
                case "cor":
                    $html = '<strong>@lng[Ausculta cardiaca]</strong><br /><span>' . $_SESSION['ef_cor'] . '</span>';
                    $html .= $_SESSION['ef_mid_cor'] > 0 ? '<br /><div class="cont-multimidia"><a href="javascript:void(0);" onclick="javascript:fntCarregaMidias(\'' . base64_encode($_SESSION['ef_mid_cor']) . '\');">' . Comuns::IMG_MIDIA_MULTIMIDIA . '</a></div>' : '';
                    break;
                case "pul":
                    $html = '<strong>@lng[Ausculta pulmonar]</strong><br /><span>' . $_SESSION['ef_pul'] . '</span>';
                    $html .= $_SESSION['ef_mid_pul'] > 0 ? '<br /><div class="cont-multimidia"><a href="javascript:void(0);" onclick="javascript:fntCarregaMidias(\'' . base64_encode($_SESSION['ef_mid_pul']) . '\');">' . Comuns::IMG_MIDIA_MULTIMIDIA . '</a></div>' : '';
                    break;
                case "abd":
                    $html = '<strong>@lng[Abdomen]</strong><br /><span>' . $_SESSION['ef_abd'] . '</span>';
                    $html .= $_SESSION['ef_mid_abd'] > 0 ? '<br /><div class="cont-multimidia"><a href="javascript:void(0);" onclick="javascript:fntCarregaMidias(\'' . base64_encode($_SESSION['ef_mid_abd']) . '\');">' . Comuns::IMG_MIDIA_MULTIMIDIA . '</a></div>' : '';
                    break;
                case "ext":
                    $html = '<strong>@lng[Extremidades]</strong><br /><span>' . $_SESSION['ef_ext'] . '</span>';
                    $html .= $_SESSION['ef_mid_ext'] > 0 ? '<br /><div class="cont-multimidia"><a href="javascript:void(0);" onclick="javascript:fntCarregaMidias(\'' . base64_encode($_SESSION['ef_mid_ext']) . '\');">' . Comuns::IMG_MIDIA_MULTIMIDIA . '</a></div>' : '';
                    break;
                case "pel":
                    $html = '<strong>@lng[Pele]</strong><br /><span>' . $_SESSION['ef_pel'] . '</span>';
                    $html .= $_SESSION['ef_mid_pel'] > 0 ? '<br /><div class="cont-multimidia"><a href="javascript:void(0);" onclick="javascript:fntCarregaMidias(\'' . base64_encode($_SESSION['ef_mid_pel']) . '\');">' . Comuns::IMG_MIDIA_MULTIMIDIA . '</a></div>' : '';
                    break;
                case "sin":
                    $html = '<strong>@lng[Sinais vitais]</strong><br /><span>' . $_SESSION['ef_sin'] . '</span>';
                    $html .= $_SESSION['ef_mid_sin'] > 0 ? '<br /><div class="cont-multimidia"><a href="javascript:void(0);" onclick="javascript:fntCarregaMidias(\'' . base64_encode($_SESSION['ef_mid_sin']) . '\');">' . Comuns::IMG_MIDIA_MULTIMIDIA . '</a></div>' : '';
                    break;
                case "ger":
                    $html = '<strong>@lng[Estado geral]</strong><br /><span>' . $_SESSION['ef_ger'] . '</span>';
                    $html .= $_SESSION['ef_mid_ger'] > 0 ? '<br /><div class="cont-multimidia"><a href="javascript:void(0);" onclick="javascript:fntCarregaMidias(\'' . base64_encode($_SESSION['ef_mid_ger']) . '\');">' . Comuns::IMG_MIDIA_MULTIMIDIA . '</a></div>' : '';
                    break;
            }
        } catch (Exception $e) {
            $html = "ERRO: " . $e->getMessage();
        }
    } else {
        $html = "ERRO: @lng[Não foi informado o caso clínico]";
    }
    echo Comuns::Idioma($html);
}
示例#3
0
function TratarDadosExameFisico($template)
{
    if (isset($_SESSION['caso']) && $_SESSION['caso'] != 0) {
        $ef = new ExameFisico();
        $mid = new Midia();
        $ef->Carrega($_SESSION['caso']);
        $template = str_replace("<!--txtExaFisCabeca-->", $ef->getCabeca(), $template);
        $template = str_replace("<!--txtExaFisPescoco-->", $ef->getPescoco(), $template);
        $template = str_replace("<!--txtExaFisAusPulmonar-->", $ef->getAuscultapulmonar(), $template);
        $template = str_replace("<!--txtExaFisAusCardiaca-->", $ef->getAuscultacardiaca(), $template);
        $template = str_replace("<!--txtExaFisSinVit-->", $ef->getSinaisvitais(), $template);
        $template = str_replace("<!--txtExaFisAbdomen-->", $ef->getAbdomen(), $template);
        $template = str_replace("<!--txtExaFisPele-->", $ef->getPele(), $template);
        $template = str_replace("<!--txtExaFisExtrem-->", $ef->getExtremidades(), $template);
        $template = str_replace("<!--txtExaFisGeral-->", $ef->getEstadoGeral(), $template);
        $template = str_replace("<!--midCabeca-->", $ef->getMidiasCabeca(), $template);
        $template = str_replace("<!--midPescoco-->", $ef->getMidiasPescoco(), $template);
        $template = str_replace("<!--midAusPulmonar-->", $ef->getMidiasAuscultaPulmonar(), $template);
        $template = str_replace("<!--midAusCardiaca-->", $ef->getMidiasAuscultaCardiaca(), $template);
        $template = str_replace("<!--midAbdomen-->", $ef->getMidiasAbdomen(), $template);
        $template = str_replace("<!--midExtrem-->", $ef->getMidiasExtremidades(), $template);
        $template = str_replace("<!--midPele-->", $ef->getMidiasPele(), $template);
        $template = str_replace("<!--midSinVit-->", $ef->getMidiasSinaisVitais(), $template);
        $template = str_replace("<!--midGeral-->", $ef->getMidiasEstadoGeral(), $template);
        $mid->setCodCaso($_SESSION['caso']);
        $lista_midias = $mid->ListaRecordSet();
        if ($lista_midias) {
            $tabmidias = Comuns::TopoTabelaListagem("", "tabMidias", array('&nbsp;', 'Mídia', 'Tipo'));
            foreach ($lista_midias as $midia) {
                $tabmidias .= '<tr>';
                $tabmidias .= '<td><input type="checkbox" name="chkMidia[]" id="chkMidia_' . $midia->CodMidia . '" value="' . $midia->CodMidia . '" class="chkmidias"></td>';
                $tabmidias .= '<td>' . $midia->Descricao . '</td>';
                $tabmidias .= '<td>' . ($midia->CodTipo == 1 ? Comuns::IMG_MIDIA_IMAGEM : ($midia->CodTipo == 2 ? Comuns::IMG_MIDIA_VIDEO : Comuns::IMG_MIDIA_AUDIO)) . '</td>';
                $tabmidias .= '</tr>';
            }
            $tabmidias .= '</body></table>';
            $template = str_replace("<!--midias-->", $tabmidias, $template);
        } else {
            $template = str_replace("<!--midias-->", $mid->getErro(), $template);
        }
    } else {
        $template = str_replace("<!--txtExaFisCabeca-->", "", $template);
        $template = str_replace("<!--txtExaFisPescoco-->", "", $template);
        $template = str_replace("<!--txtExaFisAusPulmonar-->", "", $template);
        $template = str_replace("<!--txtExaFisAusCardiaca-->", "", $template);
        $template = str_replace("<!--txtExaFisSinVit-->", "", $template);
        $template = str_replace("<!--txtExaFisAbdomen-->", "", $template);
        $template = str_replace("<!--txtExaFisPele-->", "", $template);
        $template = str_replace("<!--txtExaFisExtrem-->", "", $template);
        $template = str_replace("<!--txtExaFisGeral-->", "", $template);
        $template = str_replace("<!--midCabeca-->", "0", $template);
        $template = str_replace("<!--midPescoco-->", "0", $template);
        $template = str_replace("<!--midAusPulmonar-->", "0", $template);
        $template = str_replace("<!--midAusCardiaca-->", "0", $template);
        $template = str_replace("<!--midAbdomen-->", "0", $template);
        $template = str_replace("<!--midExtrem-->", "0", $template);
        $template = str_replace("<!--midPele-->", "0", $template);
        $template = str_replace("<!--midSinVit-->", "0", $template);
        $template = str_replace("<!--midGeral-->", "0", $template);
    }
    return $template;
}