-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmedicamento.php
250 lines (236 loc) · 9.89 KB
/
medicamento.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<?php
require_once 'web/model/Medicamento.php';
require_once 'web/dao/MedicamentoDAO.php';
session_start();
$ean = $_GET['ean'];
try{
if ($ean == "")
throw new Exception("Produto inválido.");
$dao = new MedicamentoDAO();
$medicamento = $dao->getDadosMedicamento($ean);
unset($_SESSION['consulta']);
}catch(Exception $e){
header('Location: inicial.php?message='.$e->getMessage());
}
?>
<html>
<head>
<title>Detalhes - <?php echo $medicamento->getNome();?></title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="img/icon.png">
<!-- CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/view/scarmed.css" />
<!-- JAVASCRIPT -->
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script src="js/pooper.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</head>
<style>
.medicamentos{
background-color: #43a047;
color: white;
}
.linha{
width: 100%;
color: black;
height: 0.5px;
background-color:black;
}
</style>
<body>
<?php
include("header.php");
?>
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-8 col-sm-8 col-xs-8">
<a href="index.php">
<img src="img/logo2-min.jpeg" class="img-fluid rounded mx-auto d-block"
alt="Responsive image" style="display:block; margin: 0 auto; width: 200; height: 120;"/>
</a>
<br>
</div>
<div class="col-md-2">
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-12 medicamentos">
<?php echo "<h4 class='text-center'>".$medicamento->getNome()."</h4>"; ?>
</div>
</div>
<br>
<div class="row">
<div class="col-12 medicamentos">
<h6 class="text-center">Remédios equivalentes</h6>
</div>
</div>
<div class="row">
<div class="table-responsive">
<table class="table table-bordered">
<thead style="background-color: green; color: white;">
<tr>
<th scope="col">Referência</th>
<th scope="col">Princípio Ativo</th>
<th scope="col">Equivalente intercambiável</th>
<th scope="col">
<a href="intercambialidade.php" style="color: white;">
O que é intercambialidade?
</a>
</th>
</tr>
</thead>
<tr style="background-color:#b2ff59 ;">
<th scope="col">
<?php
if ($medicamento->getOriginal() != null) {
$original = $medicamento->getOriginal();
echo "<a href='medicamento.php?ean=".$original->getEan1()
."'>".$original->getNome()."</a>";
}
?>
</th>
<th scope="col">
<?php
if ($medicamento->getGenerico() != null){
$similar = $medicamento->getGenerico();
echo "<a href='medicamento.php?ean=".$similar->getEan1()
."'>".$similar->getNome()."</a>";
}
?>
</th>
<th scope="col">
<?php
if ($medicamento->getSimilar() != null){
$similar = $medicamento->getSimilar();
echo "<a href='medicamento.php?ean=".$similar->getEan1()
."'>".$similar->getNome()."</a>";
}
?>
</th>
<th scope="col">Listar todos</th>
</tr>
</table>
</div>
</div>
<div class="row">
<div class="col-12 medicamentos">
<h6 class="text-center">Bula</h6>
</div>
</div>
<div class="row">
<div class="col-md-10">
<?php echo "<h4><b>".$medicamento->getNome()."</b></h4>"; ?>
</div>
<div class="col-md-2">
<a href="#" class="btn btn-success">Bula do profissional</a>
</div>
</div>
<hr class="linha">
<div class="row">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">Produto</th>
<th scope="col">Fabricante</th>
<th scope="col">Tipo</th>
<th scope="col">Precisa de Receita</th>
<th scope="col">Tipo de Receita</th>
<th scope="col">Categoria</th>
</tr>
</thead>
<tr>
<th><?php echo $medicamento->getNome(); ?></th>
<th><?php echo $medicamento->getLaboratorio(); ?></th>
<!-- TIPO DE RECEITA -->
<th>
<?php
if ($medicamento->getOriginal() == null){
echo "Referência";
}else if ($medicamento->getSimilar() == null){
echo "Similar";
}else if ($medicamento->getGenerico() == null){
echo "Genérico";
}
?>
</th>
<!-- PRECISA DE RECEITA? -->
<th>
<?php
$grupos = array("A1","A2","A3","B1","B2","C1","C2","C3","C4","C5","D1","D2");
$precisaDeReceita = in_array(strtoupper($medicamento->getGrupoSubstancia()), $grupos);
if ($precisaDeReceita == true){
echo "SIM";
}else{
echo "NÃO";
}
?>
</th>
<!--TIPO DE RECEITA -->
<th>
<?php
$grupo = strtoupper($medicamento->getGrupoSubstancia());
if ($precisaDeReceita == true){
if ($grupo[0] = "A"){
echo "Amarela";
}else if ($grupo == "B1"){
echo "Azul B1";
}else if ($grupo == "B2"){
echo "Azul B2";
}else if ($grupo == "C3"){
echo "Branca C3";
}
}else{
echo "-";
}
?>
</th>
<th>-</th>
</tr>
</table>
</div>
</div>
<hr class="linha">
<div class="row">
<div class="col-12">
<?php echo "<h5><b>".$medicamento->getNome().", para o que é indicado e para que serve?</b></h5>"; ?>
<br>
Informações da bula aqui ...
</div>
</div>
<div class="row">
<div class="col-12" align="justify">
<hr class="linha" />
<h5 class="text-center"><b>SE PERSISTIREM OS SINTOMAS, PROCURE O <br>
MÉDICO E O FARMACÊUTICO. LEIA A BULA.</b></h5><br>
<h6 class="text-center">Todas as informações contidas neste site têm a intenção de informar e educar, não pretendendo, de forma alguma,<br>
substituir as orientações de um profissional médico ou servir como recomendação para qualquer tipo de tratamento.<br>
Decisões relacionadas ao tratamento de pacientes devem ser tomadas por profissionais autorizados, considerando <br>
as características particulares de cada pessoa.</h6><br>
<h6 class="text-center">Farmacêutico responsável: Dr. Antônio Paulo da Nóbrega Neto CRF/PB 5901 | Grupo APPNOBR ME | CNPJ/MF 01.001/0001-01 | <br>
Av. Ministro José Américo de Almeida, nº 1153, Sala 201, 1º Andar, Residencial Manoel Paulo da Costa | CEP 58040-300</h6>
</div>
</div>
<div id="footer" class="row">
<div class="col-5">
<a href="termosECondicoes.php" style="color: white;">Termos de uso e condições gerais</a>
</div>
<div class="col-2" style="text-align: center;">
Scarmed | © 2020
</div>
<div class="col-5" style="text-align: right;">
<a href="politicaPrivacidade.php" style="color: white;">Política de privacidade</a>
</div>
</div>
</div>
</body>
<script>
$(function () {
$('[data-toggle="popover"]').popover()
})
</script>
</html>