<div class="modal fade" id="box_incluir_atendimentoextra" style="z-index: 8888;" data-backdrop="static">
	<div class="modal-dialog">
		<div class="modal-content" id="modal-comunicacao">
			<div class="modal-header modal-header-gsaude">
				<div class="titulo_box_informa">
					&nbsp;<i class="icofont icofont-medical-sign" style='font-size:14pt'></i><b>&nbsp;&nbsp;Adicionar Atendimento Extra</b>
				</div>
			</div>
			<div class="modal-body" style="font-weight: bold; padding:0px !important">
				<div id="box_alterasenha_body">
					<div class="card-content collapse show">
						<div class="card-body">
							<form class="form">
								<div class="form-body">
									<div class="row">
										<div class="col-md-12" style="margin-top:-10px">
											<div class="form-group">
												<fieldset id='field-cpf'>
													<label for="documentoPacienteAdd">CPF/CNS do Paciente:</label>
													<div class="input-group">
														<input type="text" id="documentoPacienteAdd" class="form-control" onkeypress='return somenteNumero()'>
														<div class="input-group-prepend">
															<button class="btn btn-blue" type="button" onclick="buscarPaciente()">
																<i class="icofont icofont-document-search"></i>
															</button>
														</div>
													</div>
												</fieldset>
											</div>
										</div>
									</div>
									<div class="row">
										<div class="col-md-12" style="margin-top:-10px">
											<div class="form-group">
												<input type="hidden" id="idPacienteAdd" class="form-control" readonly>
												<label for="nomePacienteAdd">Nome do Paciente:</label>
												<input type="text" id="nomePacienteAdd" class="form-control" readonly>
											</div>
										</div>
									</div>
									<div class="row">
										<div class="col-md-6" style="margin-top:-10px">
											<div class="form-group">
												<label for="dataNascPacienteAdd">Data de Nascimento:</label>
												<input type="date" id="dataNascPacienteAdd" class="form-control" readonly>
											</div>
										</div>
										<div class="col-md-6" style="margin-top:-10px">
											<div class="form-group">
												<label for="sexoPacienteAdd">Sexo do Paciente:</label>
												<input type="text" id="sexoPacienteAdd" class="form-control" readonly>
											</div>
										</div>
									</div>									
									<div class="row">
										<div class="col-md-12" style="margin-top:-15px">
											<div class="form-group">
												<label for="profissionalAtendimentoExtra">Profissional:</label>
												<select class="form-control" id="profissionalAtendimentoExtra" disabled>
													<option value=''>SELECIONE...</option>
													<?php
													$unidadeLogada = $_SESSION['unidadeLogada'];
													$sqlProfissionalExtra  = "SELECT tb_profissional.nome_profissional,
													tb_profissional.codigoprofissional_cnes
													FROM tb_profissional_vinculo
													INNER JOIN tb_profissional ON (tb_profissional_vinculo.codigoprofissional_cnes = tb_profissional.codigoprofissional_cnes)
													WHERE tb_profissional_vinculo.codigoestabelecimento_cnes='$unidadeLogada'
													GROUP BY tb_profissional.nome_profissional";
													$stmProfissionalExtra  = $rsConexao->prepare($sqlProfissionalExtra);
													$stmProfissionalExtra->execute();
													if ($stmProfissionalExtra->rowCount() > 0) {
														$rsProfissionalExtra = $stmProfissionalExtra->fetchAll(PDO::FETCH_ASSOC);
														foreach ($rsProfissionalExtra as $fieldProfissionalExtra) {
															$idProfissionalExtra		= $fieldProfissionalExtra['codigoprofissional_cnes'];
															$nomeProfissionalExtra = $fieldProfissionalExtra['nome_profissional'];
															echo "<option value='$idProfissionalExtra'>$nomeProfissionalExtra</option>";
														}
													}
													?>
												</select>
											</div>
										</div>
									</div>
									<div class="row">
										<div class="col-md-12" style="margin-top:-15px">
											<div class="form-group">
												<label for="procedimentoAtendimentoExtra">Procedimento:</label>
												<select class="form-control" id="procedimentoAtendimentoExtra" disabled>
													<option value=''>SELECIONE...</option>
												</select>
											</div>
										</div>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
			<div class="modal-footer" style="border-top: 1px dotted #5e5e5e; height:55px; margin-top:-30px">
				<table align="center">
					<tr>
						<td width="75px">
							<button type="button" class="btn btn-info" onclick="IncluirAtendimento()">
								<i class="fa fa-check-square-o botaoOk"></i><b>&nbsp;Confirmar</b>
							</button>
						</td>
						<td></td>
						<td width="75px">
							<button type="button" class="btn btn-danger" id="botao_modal_info" data-dismiss="modal">
								<i class="ft-log-out botaoOk"></i><b>&nbsp;Fechar</b>
							</button>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</div>