private function RenderAnamnese($parte = 1) { $an = new Anamnese(); if ($an->Carrega($this->codcaso)) { $hash = new HashTable(); $ca = new Caso(); $ca->setCodigo($this->codcaso); $ca->CarregarCaso(); if ($parte == 1) { if (!is_null($ca->getImagemPaciente())) { $html .= '<img src="img/pe_' . $ca->getImagemPaciente() . '.png" class="img-paciente" alt="@lng[Imagem: Paciente]" title="@lng[Imagem: Paciente]" />'; } $html .= '<div class="item-cont">@lng[Identificação]</div>'; $html .= nl2br($an->getIdentificacao()); $html .= '<div class="item-cont">@lng[Queixa principal]</div>'; $html .= nl2br($an->getQueixapri()); $html .= '<div class="item-cont">@lng[História atual]</div>'; $html .= nl2br($an->getHistatual()); $comandos = $this->BuscaMenusItem('an'); } else { if ($parte == 2) { $html .= '<div class="item-cont">@lng[História pregressa]</div>'; $html .= nl2br($an->getHistpregressa()); $html .= '<div class="item-cont">@lng[História familiar]</div>'; $html .= nl2br($an->getHistfamiliar()); if (strip_tags($an->getPerfilpsicosocial()) != '') { $html .= '<div class="item-cont">@lng[Perfil psicosocial]</div>'; $html .= nl2br($an->getPerfilpsicosocial()); } $html .= '<div class="item-cont">@lng[Revisão de sistemas]</div>'; $html .= nl2br($an->getRevsistemas()); $comandos = $this->BuscaMenusItem('aninv'); } } //$comandos = $this->MontaAcoesVisualizacaoCaso($prefixo, $tipocaso, $chave); $hash->AddItem("titulosecao", $parte == 1 ? "@lng[Anamnese (identificação)]" : "@lng[Anamnese (investigação)]"); $hash->AddItem("conteudo", $html); $hash->AddItem("menu", $comandos); $hash->AddItem("save", 'N'); return $hash; } else { $msg = $cmd->errorInfo(); $this->msg_erro = $msg[2]; return false; } }
function TrataDadosBasicos($template) { header('Content-Type: text/html; charset=iso-8859-1'); if (isset($_SESSION['caso']) && $_SESSION['caso'] != 0) { $c = new Caso(); $c->setCodigo($_SESSION['caso']); $c->CarregarCaso(); $selAreas = AreaConhecimento::MontaSelect($c->getArea()->getCodigo()); $selNiveis = NivelPergunta::MontaSelect($c->getNivelDificuldade()->getCodigo()); $template = str_replace("<!--txtnome-->", $c->getNome(), $template); $template = str_replace("<!--txtdescricao-->", $c->getDescricao(), $template); $template = str_replace("<!--opcoesarea-->", $selAreas, $template); $template = str_replace("<!--opcoesnivel-->", $selNiveis, $template); $template = str_replace("<!--opcoesativo-->", SimNao::SelectSimNao($c->getAtivo()), $template); $template = str_replace("<!--txtidade-->", $c->getIdadePac(), $template); $template = str_replace("<!--opcoessexo-->", Sexo::SelectSexo($c->getSexoPac()), $template); $template = str_replace("<!--txtidpaciente-->", $c->getIdPac(), $template); $template = str_replace("<!--opcoesetnia-->", Etnia::SelectEtnia($c->getEtnia()), $template); $template = str_replace("<!--txtNomePac-->", $c->getNomePaciente(), $template); $template = str_replace("<!--opcoesimagem-->", ImgPaciente::SelectImagem($c->getImagemPaciente()), $template); $template = str_replace("<!--txtcid10-->", $c->getCid10(), $template); $template = str_replace("<!--chkPublico-->", $c->getPublico() == "1" ? "checked=\"checked\"" : "", $template); $template = str_replace("<!--chkExigeLogin-->", $c->getExigeLogin() == "0" ? "checked=\"checked\"" : "", $template); } else { $template = str_replace("<!--txtnome-->", "", $template); $template = str_replace("<!--txtdescricao-->", "", $template); $template = str_replace("<!--opcoesarea-->", AreaConhecimento::MontaSelect(), $template); $template = str_replace("<!--opcoesnivel-->", NivelPergunta::MontaSelect(), $template); $template = str_replace("<!--opcoesativo-->", SimNao::SelectSimNao(), $template); $template = str_replace("<!--txtidade-->", "", $template); $template = str_replace("<!--opcoessexo-->", Sexo::SelectSexo(), $template); $template = str_replace("<!--txtidpaciente-->", "", $template); $template = str_replace("<!--opcoesetnia-->", Etnia::SelectEtnia(), $template); $template = str_replace("<!--txtNomePac-->", "", $template); $template = str_replace("<!--opcoesimagem-->", ImgPaciente::SelectImagem(), $template); $template = str_replace("<!--txtcid10-->", "", $template); $template = str_replace("<!--chkPublico-->", "", $template); $template = str_replace("<!--chkExigeLogin-->", "", $template); } return $template; }