Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
package imc; import java.io.Serializable; import java.text.ParseException; import java.util.ArrayList; import java.util.Date; public class Clinica implements Serializable { private static final long serialVersionUID = 1L; private String nomeClinica = "Clinica ADS"; private String nome; private Paciente selecionado; private ArrayList
pacientes = new ArrayList
(); public Clinica(String nomeClinica) { this.nomeClinica = nomeClinica; pacientes = new ArrayList
(); } public Clinica() { // TODO Auto-generated constructor stub } public void retira(Paciente paciente) { if (paciente != null) { pacientes.remove(paciente); } } public String getNomeClinica() { return nomeClinica; } public void add(Paciente paciente) { pacientes.add(paciente); } public Paciente getSelecionado() { return this.selecionado; } public String getNome() { return (selecionado != null ? selecionado.getNome() : "?"); } public String getDtNascimento() throws ParseException { return (selecionado != null ? selecionado.getDtNascimento() : "?"); } public String getDiagnostico() { return (selecionado != null ? selecionado.getImc().diagnostico() : "?"); } public String getSexo() { return (selecionado != null ? selecionado.getSexo() + "" : "?"); } public void paciente(int idPaciente) { selecionado = null; for (Paciente paciente : pacientes) { if (idPaciente == paciente.getId()) { selecionado = paciente; break; } } } public ArrayList
getPacientes() { return pacientes; } public int pegaMaiorId() { int maior = 0; for (Paciente paciente : pacientes) { if (paciente.getId() > maior) { maior = paciente.getId(); } } return maior; } public String getRelatorio() { String rel = ""; for (Paciente paciente : pacientes) { rel += paciente + "\n"; } return rel; } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)