public ABMPaciente(Paciente pac, string ev) { InitializeComponent(); estadoInicial(); evento=ev; gestor = new GestorPaciente(); txtNroDoc.Text = pac.NumeroDocumento.ToString(); cmbTipoDoc.SelectedItem = pac.TipoDocumento; buscarPaciente(); Utils.habilitar(true, gbDatos, tcPacientes, btnGuardar, btnCancelar); }
public ABMPedidoEstudio(string o, PedidoEstudio pe, string ev) { InitializeComponent(); estadoInicial(); origen = o; pedido = pe; evento = ev; gpedido = new GestorPedidoEstudio(); gpaciente = new GestorPaciente(); gestorProfesional = new GestorProfesional(); CargarCombos(); if (pedido.Id != 0) { CargarPedido(); habilitarControles(); } }
protected void Ingresar_Click(Object sender, EventArgs e) { int nroDocumento = 0; if(int.TryParse(txtDNI.Value,out nroDocumento)) { GestorGenerico gg = new GestorGenerico(); GestorPaciente gp = new GestorPaciente(); Paciente p = new Paciente(); p.NumeroDocumento = nroDocumento; p.TipoDocumento = gg.getXID<TipoDocumento>(1); if (gp.existe(p)) { Session["LoginCorrecto"] = "SI"; Response.Redirect("TurnosPaciente.aspx"); } else { Session["LoginCorrecto"] = "NO"; } } }
public ConsultarPacientes() { InitializeComponent(); gestorPaciente = new GestorPaciente(); }
protected void Page_Load(object sender, EventArgs e) { ConexionBD.esSICWeb = true; seleccionarTab("liTurnero"); gestorTurno = new GestorTurno(); if (!Page.IsPostBack) { estaLogueado = (Session["LoginCorrecto"] == "SI"); if (!estaLogueado) { Response.Redirect("Login.aspx"); } else { GestorPaciente gPaciente = new GestorPaciente(); GestorEspecialidad gEspecialidad = new GestorEspecialidad(); GestorTurno gTurno = new GestorTurno(); GestorGenerico gg = new GestorGenerico(); Paciente paciente = gPaciente.buscar(33428285, 1); if (paciente != null) { Session["Paciente"] = paciente; txtNombreYApellido.Value = paciente.Nombres + " " + paciente.Apellidos; txtDocumento.Value = paciente.NumeroDocumento.ToString(); //txtObraSocial Afiliacion afiliacionActual = null; if (paciente.Afiliaciones.Count > 0) { foreach (Afiliacion afiliacion in paciente.Afiliaciones) { if (afiliacion.Baja.CompareTo(new DateTime(2000, 1, 1)) < 0) { afiliacionActual = afiliacion; } } } if (afiliacionActual != null) { txtObraSocial.Value = afiliacionActual.Plan.ObraSocial.Descripcion; txtPlan.Value = afiliacionActual.Plan.Descripcion; } DataTable table = new DataTable(); table.Columns.Add("posicion"); table.Columns.Add("fecha"); table.Columns.Add("hora"); table.Columns.Add("medico"); table.Columns.Add("especialidad"); turnos = gTurno.buscar(paciente, false); if (turnos != null) { for (int i = 0; i < turnos.Count; i++) { Turno turno = turnos[i]; if (turno.EstadoTurno.Codigo != "CAN") { Especialidad especialidad = gEspecialidad.buscarEspecialidadXHorarioDet(turno.HorarioDet); table.Rows.Add(i.ToString(), turno.Fecha.ToShortDateString(), turno.Hora.TimeOfDay.ToString(), turno.EntidadTurno.Profesional.Apellidos + " " + turno.EntidadTurno.Profesional.Nombres, especialidad.Descripcion); } } } Session["turnos"] = turnos; dgvTurnosVigentes.Columns[0].Visible = true; dgvTurnosVigentes.DataSource = table; dgvTurnosVigentes.DataBind(); dgvTurnosVigentes.Columns[0].Visible = false; DataTable tableAnteriores = new DataTable(); tableAnteriores.Columns.Add("fecha"); tableAnteriores.Columns.Add("hora"); tableAnteriores.Columns.Add("medico"); tableAnteriores.Columns.Add("especialidad"); tableAnteriores.Columns.Add("asistio"); IList<Turno> turnosHistorico = gTurno.buscar(paciente, true); if (turnosHistorico != null) { foreach (Turno turno in turnosHistorico) { Especialidad especialidad = gEspecialidad.buscarEspecialidadXHorarioDet(turno.HorarioDet); string asistio = ""; if (turno.EstadoTurno.Codigo == "CAN") { asistio = "Canceló"; } tableAnteriores.Rows.Add(turno.Fecha.ToShortDateString(), turno.Hora.TimeOfDay.ToString(), turno.EntidadTurno.Profesional.Apellidos + " " + turno.EntidadTurno.Profesional.Nombres, especialidad.Descripcion, asistio); } } dgvTurnosAnteriores.DataSource = tableAnteriores; dgvTurnosAnteriores.DataBind(); } } } }
public ABMPaciente() { InitializeComponent(); estadoInicial(); gestor = new GestorPaciente(); }
public bool guardarPaciente(Paciente paciente) { GestorPaciente gp = new GestorPaciente(); return gp.guardar(paciente); }
public Paciente getPaciente(TipoDocumento tipoDocumento, string nroDocumento) { GestorPaciente gp = new GestorPaciente(); return gp.buscar(int.Parse(nroDocumento.Replace(".","")), tipoDocumento.Id); }