$o->set("int_percentual" , $hos->get("hos_percentual")); $o->set("int_valor_absoluto" , $valor_absoluto); $o->set("int_valor_contraste" , $valor_contraste); $o->set("int_ch" , $ch); $o->set("int_filme" , $filme); $o->set("int_valor_ch" , $valor_ch); $o->set("int_valor_filme" , $valor_filme); $o->set("int_valor_final" , strval(floatval($valor_absoluto) > 0 ? $valor_absoluto : floatval($valor_contraste) + (floatval($ch) * floatval($valor_ch)) + (floatval($filme) * floatval($valor_filme)))); $o->propertiesClearConfig(); if ($new_id = $o->add()){ if ($_POST[mesmo_paciente] != "1") { Js::goto(array("url" => "index.php?s=interpretacao&acao=add")); } else { unset($_POST[form]); unset($_POST[exa_id]); unset($_POST[int_opcional]); Js::goto(array("url" => "index.php?s=interpretacao&acao=add", "post_vars" => $_POST)); } } else { foreach($o->errors as $campo => $erro){ $tpl->assign($campo."_erro", $erro); $tpl->assign($campo, ""); } } } $tpl->assign("mesmo_paciente", $_POST["mesmo_paciente"]); $template_html = $path_tpl."formulario_add_bandalarga.tpl"; ?>
<? Util::VerificaChamada(); if($_GET[id]){ $o = new Exame($_GET[id]); $_POST["med_id"] = $_SESSION["med_id"]; foreach($o->propertiesGetConfig() as $campo => $config){ $tpl->assign($campo, (empty($_POST[$campo]) ? $o->get($campo) : $_POST[$campo])); $o->set($campo, $_POST[$campo]); } if ($_POST[form] == "ok"){ if ($o->update()){ Js::goto(array("url" => "index.php?s=exame")); } else { foreach($o->errors as $campo => $erro){ $tpl->assign($campo."_erro", $erro); $tpl->assign($campo, ""); } } } } else { Js::goto(array("url" => "index.php?s=exame")); } $template_html = $path_tpl."formulario.tpl"; ?>
<? Util::VerificaChamada(); $o = new TextoPadrao(); $_POST["med_id"] = $_SESSION["med_id"]; foreach($o->propertiesGetConfig() as $campo => $config){ $tpl->assign($campo, $_POST[$campo]); $o->set($campo, $_POST[$campo]); } if ($_POST[form] == "ok"){ //$o->propertiesDump(true); if ($new_id = $o->add()){ Js::goto(array("url" => "index.php?s=texto_padrao")); } else { foreach($o->errors as $campo => $erro){ $tpl->assign($campo."_erro", $erro); $tpl->assign($campo, ""); } } } $template_html = $path_tpl."formulario.tpl"; ?>
$o->set("int_paciente_nascimento" , Formatacao::formatData($_POST["datas"][$i])); $o->set("int_paciente_prontuario" , $_POST["prontuarios"][$i]); $o->set("int_opcional" , $_POST["opcionais"][$i]); $o->set("int_tecnico_rx" , $_POST["tecnicos"][$i]); $o->set("int_requisitante" , $_POST["requisitantes"][$i]); $valor_absoluto = $exa->getValorAbsoluto($_POST["convenios"][$i]); $valor_contraste = $exa->getValorContraste($_POST["convenios"][$i]); $ch = $exa->getCh($_POST["convenios"][$i]); $filme = $exa->getFilme($_POST["convenios"][$i]); $valor_ch = $con->get("con_valor_ch"); $valor_filme = $con->get("con_valor_filme"); $o->set("int_percentual" , $hos->get("hos_percentual")); $o->set("int_valor_absoluto" , $valor_absoluto); $o->set("int_valor_contraste" , $valor_contraste); $o->set("int_ch" , $ch); $o->set("int_filme" , $filme); $o->set("int_valor_ch" , $valor_ch); $o->set("int_valor_filme" , $valor_filme); $o->set("int_valor_final" , strval(floatval($valor_absoluto) > 0 ? $valor_absoluto : floatval($valor_contraste) + (floatval($ch) * floatval($valor_ch)) + (floatval($filme) * floatval($valor_filme)))); $o->propertiesClearConfig(); $new_id = $o->add(); } Js::goto(array("url" => "index.php?s=interpretacao")); } $template_html = $path_tpl."formulario_add_discado.tpl"; ?>
if($_GET[id]){ $o = new ValorExame($_GET[id]); //$o->setDependences(); //util::prt("", get_class_methods($o)); foreach($o->propertiesGetConfig() as $campo => $config){ $tpl->assign($campo, $o->get($campo)); } $exa = new Exame($o->get("exa_id")); $tpl->assign("exa_nome", $exa->get("exa_nome")); $con = new Convenio($o->get("con_id")); $tpl->assign("con_nome", $con->get("con_nome")); $hos = new Hospital($con->get("hos_id")); $tpl->assign("hos_nome", $hos->get("hos_nome")); if ($_GET[del] == "1" || $_POST[del] == "1"){ if ($o->delete($_GET[delete_dependences])){ Js::goto(array("url" => "index.php?s=valor_exame")); } else { $dep = $o->getDependences(); if (sizeof($dep)){ $tpl->assign("dependences", $dep); } } } } else { Js::goto(array("url" => "index.php?s=convenio")); } $template_html = $path_tpl."show.tpl"; ?>
<? Util::VerificaChamada(); $o = new Convenio(); foreach($o->propertiesGetConfig() as $campo => $config){ $tpl->assign($campo, $_POST[$campo]); $o->set($campo, $_POST[$campo]); } $tpl->assign("vet_hospitais", Hospital::getOptions()); //util::prt("",$o->exists()); if ($_POST[form] == "ok"){ //$o->propertiesDump(true); if ($new_id = $o->add()){ Js::goto(array( "url" => "index.php?s=convenio&acao=add", "post_vars" => array( "hos_id" => $_POST[hos_id] ) )); } else { foreach($o->errors as $campo => $erro){ $tpl->assign($campo."_erro", $erro); $tpl->assign($campo, ""); } } } $template_html = $path_tpl."formulario.tpl"; ?>
<? Util::VerificaChamada(); $o = new Exame(); $_POST["med_id"] = $_SESSION["med_id"]; foreach($o->propertiesGetConfig() as $campo => $config){ $tpl->assign($campo, $_POST[$campo]); $o->set($campo, $_POST[$campo]); } if ($_POST[form] == "ok"){ if ($new_id = $o->add()){ Js::goto(array( "url" => "index.php?s=exame&acao=add" )); } else { foreach($o->errors as $campo => $erro){ $tpl->assign($campo."_erro", $erro); $tpl->assign($campo, ""); } } } $template_html = $path_tpl."formulario.tpl"; ?>
$o->set($campo, $_POST[$campo]); } $tpl->assign("vet_exames", Exame::getOptions()); $tpl->assign("vet_convenios", Convenio::getOptions()); if ($_POST[con_id]){ $con = new Convenio($_POST[con_id]); $tpl->assign("con_valor_ch", $con->get("con_valor_ch")); $tpl->assign("con_valor_filme", $con->get("con_valor_filme")); } if ($_POST[form] == "ok"){ //$o->propertiesDump(true); if ($new_id = $o->add()){ Js::goto(array( "url" => "index.php?s=valor_exame&acao=add", "post_vars" => array( "exa_id" => $_POST["exa_id"], "con_id" => $_POST["con_id"] ) )); } else { foreach($o->errors as $campo => $erro){ $tpl->assign($campo."_erro", $erro); $tpl->assign($campo, ""); } } } $template_html = $path_tpl."formulario.tpl"; ?>
<? Util::VerificaChamada(); if($_GET[id]){ $o = new Hospital($_GET[id]); $_POST["med_id"] = $_SESSION["med_id"]; foreach($o->propertiesGetConfig() as $campo => $config){ $tpl->assign($campo, (empty($_POST[$campo]) ? $o->get($campo) : $_POST[$campo])); $o->set($campo, $_POST[$campo]); } if ($_POST[form] == "ok"){ //$o->propertiesDump(); if ($o->update()){ Js::goto(array("url" => "index.php?s=hospital")); } else { foreach($o->errors as $campo => $erro){ $tpl->assign($campo."_erro", $erro); $tpl->assign($campo, ""); } } } } else { Js::goto(array("url" => "index.php?s=hospital")); } $template_html = $path_tpl."formulario.tpl"; ?>
<? Util::VerificaChamada(); session_unset(); Js::goto(array("url" => "index.php")); ?>