Exemplo n.º 1
0
        public bool guardar(Paciente paciente)
        {
            ConexionBD.getSession().Save(paciente);
            ConexionBD.getSession().Flush();

            return existe(paciente);
        }
Exemplo n.º 2
0
 public Turno()
 {
     tipoTurno = new TipoTurno();
     estadoTurno = new EstadoTurno();
     horarioDet = new HorarioDetalle();
     paciente = new Paciente();
     //usuario = new Usuario();
 }
 public RecordatorioEstudio Buscar(Paciente pac, Estudio est)
 {
     RecordatorioEstudio rec = new RecordatorioEstudio();
     if (ConexionBD.getSession().CreateCriteria(typeof(RecordatorioEstudio)).Add(Expression.Eq("Paciente", pac)).Add(Expression.Eq("Estudio", est)).List<RecordatorioEstudio>().Count > 0)
     {
         rec = ConexionBD.getSession().CreateCriteria(typeof(RecordatorioEstudio)).Add(Expression.Eq("Paciente", pac)).Add(Expression.Eq("Estudio", est)).List<RecordatorioEstudio>().ElementAt<RecordatorioEstudio>(0);
     }
     return rec;
 }
Exemplo n.º 4
0
 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 ABMRecordatorioEstudio(Paciente pac, Estudio est)
 {
     InitializeComponent();
     paciente = new Paciente();
     estudio = new Estudio();
     paciente = pac;
     estudio = est;
     txtEstudio.Text = estudio.Descripcion;
     txtPaciente.Text = paciente.Apellidos + " " + paciente.Nombres;
     dpFecha.Value = DateTime.Now;
 }
Exemplo n.º 6
0
 public bool existe(Paciente p)
 {
     if (ConexionBD.getSession().CreateCriteria(typeof(Paciente)).Add(Expression.Eq("NumeroDocumento", p.NumeroDocumento)).Add(Expression.Eq("TipoDocumento.Id", p.TipoDocumento.Id)).List<Paciente>().Count > 0)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Exemplo n.º 7
0
        public ABMVisita(Turno turn, Visita v,Profesional profe)
        {
            InitializeComponent();
            CargarCuestionarios();
            turno = turn;
            profesional = profe;
            paciente = new Paciente();
            paciente = turn.Paciente;

            gbPaciente.Enabled = false;
            Utils.cargarCombo<TipoDocumento>(cmbTipoDoc, "Descripcion");
            CargarDatos();
        }
Exemplo n.º 8
0
        public IList<Turno> buscar(Paciente p,bool esHistorico)
        {
            IList<Turno> turnos = null;
            ICriteria criteria = ConexionBD.getSession().CreateCriteria(typeof(Turno)).Add(Expression.Eq("Paciente", p));
            if (!esHistorico)
            {
                criteria.Add(Expression.Ge("Fecha", DateTime.Today));

            }
            criteria.AddOrder(Order.Asc("Fecha"));
            criteria.AddOrder(Order.Asc("Hora"));
            turnos = ConexionBD.GetPorFiltros<Turno>(criteria);
            return turnos;
        }
        public ABMPedidoEstudioDetalle(PedidoEstudioDetalle det, Paciente pac)
        {
            InitializeComponent();
            detalle = det;
            dpEntregado.Value = DateTime.MinValue.AddYears(1752);
            dpRealizado.Value = DateTime.MinValue.AddYears(1752);
            paciente = new Paciente();
            paciente = pac;

            if (detalle.Id != 0)
            {
                CargarDatos();
            }
        }
        public IList<RecordatorioEstudio> Buscar(Paciente  paciente)
        {
            IList<RecordatorioEstudio> recordatorios = null;

            ICriteria criteria = ConexionBD.getSession().CreateCriteria(typeof(RecordatorioEstudio));

            if (paciente.Id!=0)
            {
                criteria.Add(Expression.Eq("Paciente", paciente));
            }

            recordatorios = ConexionBD.GetPorFiltros<RecordatorioEstudio>(criteria);

            return recordatorios;
        }
        public ConsultarHistoriaClinica(string ori,Paciente pac)
        {
            InitializeComponent();
            gestorHistoria = new GestorHistoriaClinica();

            origen = ori;
            paciente = pac;
            if (origen == "cobro")
            {
                gbBuscarPaciente.Enabled = false;
                CargarDatos();
                btnImprimirIndicaciones.Enabled = false;
                btnImprimirRp.Enabled = false;
            }
        }
        public IList<PedidoEstudio> Buscar(DateTime desde, DateTime hasta, Estudio estudio, Paciente paciente)
        {
            IList<PedidoEstudio> pedidos = null;
            IList<PedidoEstudioDetalle> detalle = null;

            ICriteria criteria = ConexionBD.getSession().CreateCriteria(typeof(PedidoEstudio));

            if (desde != DateTime.MinValue && hasta != DateTime.MinValue)
            {
                criteria.Add(Expression.Between("Solicitado", desde.AddHours(-desde.Hour),hasta.AddHours(24-hasta.Hour)));
            }
            if (desde != DateTime.MinValue && hasta == DateTime.MinValue)
            {
                criteria.Add(Expression.Ge("Solicitado", desde.AddHours(-desde.Hour)));
            }
            if (paciente != null)
            {
                criteria.Add(Expression.Eq("Paciente", paciente));
            }
            pedidos = ConexionBD.GetPorFiltros<PedidoEstudio>(criteria);

            if (estudio != null)
            {
                for (int i = 0; i < pedidos.Count; i++)
                {
                    detalle = pedidos[i].DetallePedido;
                    for (int j = 0; j < detalle.Count; j++)
                    {
                        if (detalle[j].Estudio != estudio)
                        {
                            detalle.RemoveAt(j);
                            if (j != 0)
                            { j--; }
                        }
                    }
                    if (detalle.Count == 0)
                    {
                        pedidos.RemoveAt(i);
                        if (i != 0)
                        { i--; }
                    }
                }
            }

            return pedidos;
        }
 public void EstadoInicial()
 {
     txtPaciente.Text = "";
     txtDoc.Text = "";
     txtAgenda.Text = "";
     txtEspecialidad.Text = "";
     btnBuscarVisita.Enabled = false;
     txtPlan.Text = "";
     dgDetalleAutorizacion.Rows.Clear();
     paciente = null;
     visita = null;
     autorizacion = null;
     listaDetalle = new List<AutorizacionDetalle>();
     gestorAutorizacion = new GestorAutorizacion();
     autorizacion = new Autorizacion();
     dpFechaVisita.Value = DateTime.Today;
     linkOs.Text = "";
 }
 public void CargarGrilla()
 {
     dgEstudios.Rows.Clear();
     for (int i = 0; i < listaPedidos.Count; i++)
     {
         pedido = new PedidoEstudio();
         pac = new Paciente();
         profesional = new Profesional();
         solic = new Profesional();
         est = new EstadoPedidoEstudio();
         pedido=listaPedidos[i];
         pac = pedido.Paciente;
         solic = pedido.Solicitante;
         profesional = pedido.Profesional;
         est = pedido.Estado;
         dgEstudios.Rows.Add(listaPedidos[i].Solicitado.ToShortDateString(), listaPedidos[i].Realizado.ToShortDateString(), pac.Apellidos + " " + pac.Nombres, solic.Apellidos + " " + solic.Nombres, profesional.Apellidos + " " + profesional.Nombres, est.Descripcion);
     }
     Utils.habilitarAccionesGrilla(dgEstudios, "", btnAgregar, btnModificar, btnEliminar);
 }
Exemplo n.º 15
0
        public ABMVisita(Paciente paciente, Visita v)
        {
            InitializeComponent();
            CargarCuestionarios();
            this.paciente = paciente;
            if (v != null)
            {
                visita = new Visita();
                this.visita = v;
                gbCaracteristicas.Enabled = false;
                gbMedicacion.Enabled = false;
                gbVisita.Enabled = false;
            }

            gbPaciente.Enabled = false;
            Utils.cargarCombo<TipoDocumento>(cmbTipoDoc, "Descripcion");
            CargarDatos();
            cargarRespuestasCuestionarios();
            //tener en cuenta el origen para bloqueo de componentes y datos mostrados
        }
Exemplo n.º 16
0
        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";
                }
            }
        }
Exemplo n.º 17
0
        public void buscarPaciente()
        {
            if (txtNroDoc.Text.Replace(".", "") != "")
            {
                if (Utils.hayDatosCargados(cmbTipoDoc, txtNroDoc))
                {
                    paciente = new Paciente();
                    paciente = gpaciente.buscar(int.Parse(txtNroDoc.Text.Replace(".", "")), ((TipoDocumento)cmbTipoDoc.SelectedItem).Id);

                    if (paciente != null)
                    {
                        cmbTipoDoc.SelectedItem = (TipoDocumento)paciente.TipoDocumento;
                        txtPaciente.Text = paciente.Apellidos + " " + paciente.Nombres;
                        txtNroDoc.Text = paciente.NumeroDocumento.ToString();
                    }

                }
                else { MessageBox.Show("Ingrese el tipo y nro de DNI del paciente para realizar la búsqueda", "Informe", MessageBoxButtons.OK, MessageBoxIcon.Information); }
            }
            else { MessageBox.Show("Ingrese el número de documento del paciente", "Atención", MessageBoxButtons.OK, MessageBoxIcon.Information); }
        }
Exemplo n.º 18
0
 public void CargarPedido()
 {
     cmbTipoDoc.SelectedItem = (TipoDocumento)pedido.Paciente.TipoDocumento;
     txtNroDoc.Text = pedido.Paciente.NumeroDocumento.ToString();
     txtPaciente.Text = pedido.Paciente.Apellidos + " " + pedido.Paciente.Nombres;
     txtProfesional.Text = pedido.Profesional.Apellidos + " " + pedido.Profesional.Nombres;
     txtSolicitante.Text = pedido.Solicitante.Apellidos + " " + pedido.Solicitante.Nombres;
     if (pedido.Realizado > DateTime.MinValue.AddYears(1752))
     { dpRealizado.Value = pedido.Realizado; }
     dpSolicitado.Value = pedido.Solicitado;
     cmbEstado.SelectedItem = (EstadoPedidoEstudio)pedido.Estado;
     cmbGrupo.SelectedItem = (GrupoEstudio)pedido.GrupoEstudio;
     profesional = new Profesional();
     paciente = new Paciente();
     solicitante = new Profesional();
     profesional = pedido.Profesional;
     paciente = pedido.Paciente;
     solicitante = pedido.Solicitante;
     detalles = pedido.DetallePedido;
     CargarDetalles();
 }
Exemplo n.º 19
0
 public bool guardarPaciente(Paciente paciente)
 {
     GestorPaciente gp = new GestorPaciente();
        return gp.guardar(paciente);
 }
Exemplo n.º 20
0
 public void estadoInicial()
 {
     paciente = new Paciente();
     domicilios = new List<Domicilio>();
     telefonos = new List<Telefono>();
     emails = new List<Email>();
     afiliaciones = new List<Afiliacion>();
     Utils.habilitar(false, gbDatos, tcPacientes, btnGuardar, btnCancelar);
     Utils.habilitar(true, btnNuevo, btnModificar, btnEliminar);
     limpiarCampos();
     cargarCombos();
     evento = "";
 }
Exemplo n.º 21
0
        public void validarCambios()
        {
            if (evento == "modificar" && txtApellido.Text!="")
            {
                Paciente pacNuevo = new Paciente();
                pacNuevo.Id = paciente.Id;

                pacNuevo.setDatos((TipoDocumento)cmbTipoDoc.SelectedItem, int.Parse(txtNroDoc.Text.Replace(".", "")), txtNombre.Text, txtApellido.Text,
                    dpFechaNac.Value, evento == "eliminar" ? DateTime.MinValue : DateTime.Today, (Pais)cmbNacionalidad.SelectedItem, txtCuil.Text, (TipoSexo)cmbSexo.SelectedItem, (EstadoCivil)cmbEstadoCivil.SelectedItem,
                     evento == "eliminar" ? false : true, domicilios, telefonos, emails, afiliaciones);

                if (!Utils.sonIguales(paciente, pacNuevo))
                {
                    DialogResult v_res = MessageBox.Show("Ha realizado cambios.\nDesea guardar los cambios?", "Guardar cambios", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                    if (v_res == DialogResult.Yes)
                    {
                        guardarDatos();
                    }

                }
            }
        }
 private void btnBuscar_Click(object sender, EventArgs e)
 {
     paciente = new Paciente();
     consulta = new ConsultarPacientes();
     consulta.Origen = "Turno";
     consulta.ShowDialog();
     if (consulta.Pac.Id != 0)
     {
         paciente = consulta.Pac;
         txtPaciente.Text = paciente.Apellidos + ", " + paciente.Nombres;
         txtDoc.Text = paciente.TipoDocumento.Codigo + " " + paciente.NumeroDocumento.ToString();
         if (paciente.Afiliaciones.Count > 0)
         {
             plan = new Plan();
             txtPlan.Text = paciente.Afiliaciones[0].Plan.Descripcion;
             linkOs.Text = paciente.Afiliaciones[0].Plan.ObraSocial.UrlAutorizacionOnline;
             nroAfiliado = paciente.Afiliaciones[0].NroAfiliado;
             plan = paciente.Afiliaciones[0].Plan;
         }
         btnBuscarVisita.Enabled = true;
     }
 }
Exemplo n.º 23
0
        public void buscarPaciente()
        {
            if (Utils.hayDatosCargados(cmbTipoDoc, txtNroDoc))
            {
                paciente = gestor.buscar(int.Parse(txtNroDoc.Text.Replace(".", "")), ((TipoDocumento)cmbTipoDoc.SelectedItem).Id);

                if (paciente != null)
                {
                    cmbTipoDoc.SelectedItem = (TipoDocumento)paciente.TipoDocumento;
                    txtApellido.Text = paciente.Apellidos;
                    txtNroDoc.Text = paciente.NumeroDocumento.ToString();
                    txtCuil.Text = paciente.Cuil;
                    txtNombre.Text = paciente.Nombres;
                    cmbEstadoCivil.SelectedItem = (EstadoCivil)paciente.EstadoCivil;
                    cmbNacionalidad.SelectedItem = (Pais)paciente.Nacionalidad;
                    cmbSexo.SelectedItem = (TipoSexo)paciente.TipoSexo;
                    dpFechaNac.Value = paciente.FechaNacimiento;
                    domicilios = paciente.Domicilios;
                    telefonos = paciente.Telefonos;
                    emails = paciente.Emails;
                    afiliaciones = paciente.Afiliaciones;
                    if (evento == "modificar")
                    { Utils.habilitar(true, txtApellido, txtCuil, txtNombre, cmbEstadoCivil, cmbNacionalidad, cmbSexo, tcPacientes, dpFechaNac); }
                }

            }
            else { MessageBox.Show("Ingrese el tipo y nro de DNI del paciente para realizar la búsqueda", "Informe", MessageBoxButtons.OK, MessageBoxIcon.Information); }
        }
Exemplo n.º 24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ConexionBD.esSICWeb = true;
            ConexionBD.getSession();
            GestorProfesional gestorProfesional = new GestorProfesional();
            string idmatricula = Session["IDMatricula"].ToString();
            Matricula matricula = gestorProfesional.buscarMatricula(int.Parse(idmatricula));

            profesional = (Profesional)Session["Profesional"];
            lblMedico.InnerText = profesional.Apellidos + ", " + profesional.Nombres;
            lblEspecialidad.InnerHtml = matricula.Especialidad.Descripcion;
            if (!Page.IsPostBack)
            {
                listaHorario = matricula.Horarios;
                Session["listaHorario"] = listaHorario;
                horarioAS = new Horario();
                listaDetHo = new List<HorarioDetalle>();
                DateTime fecha = DateTime.Today;

                for (int i = 0; i < listaHorario.Count; i++)
                {
                    if (listaHorario[i].Desde <= fecha && listaHorario[i].Hasta >= fecha)
                    {
                        horarioAS = listaHorario.ElementAt<Horario>(i);
                        listaDetHo = horarioAS.Detalle;
                        Session["horarioAS"] = horarioAS;
                        Session["listaDetHo"] = listaDetHo;
                    }
                }

                if (listaDetHo.Count() > 0)
                {
                    //dpDesde.seleccionarDias(horarioAS);
                }
                Session["turnos"] = turnos;
            }
            else {

                horarioAS = (Horario) Session["horarioAS"];
                listaDetHo = (IList<HorarioDetalle>)Session["listaDetHo"];
                listaHorario = (IList<Horario>) Session["listaHorario"];
                turnos = (IList<Turno>) Session["turnos"];
                horario = (Horario) Session["horario"];
                listaDet = (IList<HorarioDetalle>) Session["listaDet"];
                horarioDet = (HorarioDetalle) Session["horarioDet"];

            }
            paciente = (Paciente) Session["Paciente"];
        }
Exemplo n.º 25
0
 private void btnBuscar_Click(object sender, EventArgs e)
 {
     paciente = gv.getPaciente((TipoDocumento)cmbTipoDoc.SelectedItem, txtNroDoc.Text);
     if (paciente != null)
     {
         txtNombre.Text = paciente.Nombres;
         txtApellido.Text = paciente.Apellidos;
     }
 }
Exemplo n.º 26
0
        public void CargarDatos()
        {
            if (agenda == "Area")
            {
                GestorAreaServicio gestorArea = new GestorAreaServicio();
                AreaServicio area = new AreaServicio();
                area = gestorArea.buscar(idagenda);
                horarios = area.Horarios;
                txtAgenda.Text = area.Descripcion;

                EntidadTurno et = gestor.getEntidadTurno(area, null);
                if (et == null)
                {
                    turno.EntidadTurno = new EntidadTurno();
                }
                else
                {
                    turno.EntidadTurno = et;
                }

                turno.EntidadTurno.TipoEntidadTurno = "AREASERVICIO";
                turno.EntidadTurno.Area = area;
            }
            else
            {
                GestorProfesional gestorProfesional = new GestorProfesional();
                Profesional profesional = new Profesional();
                Matricula matricula = new Matricula();
                profesional = gestorProfesional.buscar(idagenda);
                txtAgenda.Text = profesional.Apellidos + ", " + profesional.Nombres;
                txtEspecialidad.Text = especialidad;
                matricula = gestorProfesional.buscarMatricula(idmatricula);
                horarios = matricula.Horarios;
                EntidadTurno et=gestor.getEntidadTurno(null,profesional);
                if (et == null)
                {
                    turno.EntidadTurno = new EntidadTurno();
                }
                else
                {
                    turno.EntidadTurno = et;
                }

                turno.EntidadTurno.TipoEntidadTurno = "PROFESIONAL";
                turno.EntidadTurno.Profesional = profesional;
            }
            if (evento != "Sobreturno")
            {
                dpFecha.Value = turno.Fecha;
                dpHora.Value = turno.Hora;
            }
            if (turno.Id != 0)
            {
                atencion = new TurnoAtencion();
                cmbEstado.SelectedItem = turno.EstadoTurno;
                cmbTipoTurno.SelectedItem = turno.TipoTurno;
                paciente = new Paciente();
                paciente = turno.Paciente;
                txtDoc.Text = paciente.TipoDocumento.Codigo + " " + paciente.NumeroDocumento.ToString();
                txtPaciente.Text = paciente.Apellidos + ", " + paciente.Nombres;
                btnBuscar.Enabled = false;
                chbSobreTurno.Checked = turno.SobreTurno;
                txtImpAdicional.Text = turno.ImporteAdicional.ToString();
                if (paciente.Afiliaciones.Count > 0)
                {
                    txtObraSocial.Text = paciente.Afiliaciones[0].Plan.ObraSocial.Descripcion;
                    txtPlan.Text = paciente.Afiliaciones[0].Plan.Descripcion;
                    txtNroAfiliado.Text = paciente.Afiliaciones[0].NroAfiliado;
                }
                if (gestor.buscarAtencion(turno) != null)
                {
                    atencion = gestor.buscarAtencion(turno);
                    listaDetalleAtencion = atencion.AtencionDetalle;
                    planElegido = new Plan();
                    planElegido = atencion.Plan;
                    txtOS.Text = atencion.Plan.ObraSocial.Descripcion;
                    txtPlanAtencion.Text = atencion.Plan.Descripcion;
                    txtNroOrden.Text = atencion.NumeroOrden;
                    txtNroAfilAtencion.Text = atencion.NumeroAfiliado;
                    txtNroAuto.Text = atencion.NumeroAutorizacion;
                    CargarGrillaDetalle();
                    panelTurno.Enabled = false;
                }
                txtNroAuto.Enabled = true;
                txtNroOrden.Enabled = true;
                txtImpAdicional.Enabled = true;
                CargarRecordatorios();
            }
            else
            {
                panelAtencion.Enabled = false;
            }
        }
Exemplo n.º 27
0
 private void dgPacientes_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgPacientes.SelectedRows.Count > 0)
     {
         if (origen == "Turno")
         {
             pac = new Paciente();
             pac = pacientes.ElementAt<Paciente>(dgPacientes.CurrentRow.Index);
             Close();
         }
         else
         {
             Paciente pac = pacientes.ElementAt<Paciente>(dgPacientes.CurrentRow.Index);
             abmpac = new ABMPaciente(pac, "consulta");
             abmpac.VentanaPrincipal = ventanaPrincipal;
             ventanaPrincipal.agregarOActivarTab(abmpac, "Actualizar Pacientes");
         }
     }
     cargarGrillaPacientes();
 }
 private string buscarEstudios(Paciente p)
 {
     string sql = "Select e.descripcion from estudio e, pedidoestudio pe, paciente p, pedidoestudiodetalle ped where pe.idpedidoestudio=ped.idpedidoestudio and pe.idpaciente='" + p.Id +"'and ped.idestudio=e.idestudio";
     return sql;
 }
Exemplo n.º 29
0
 private void btnBuscar_Click_1(object sender, EventArgs e)
 {
     paciente = new Paciente();
     consulta = new ConsultarPacientes();
     consulta.Origen = "Turno";
     consulta.ShowDialog();
     paciente = consulta.Pac;
     txtPaciente.Text = paciente.Apellidos + ", " + paciente.Nombres;
     txtDoc.Text = paciente.TipoDocumento.Codigo + " " + paciente.NumeroDocumento.ToString();
     if (paciente.Afiliaciones.Count > 0)
     {
         txtObraSocial.Text = paciente.Afiliaciones[0].Plan.ObraSocial.Descripcion;
         txtPlan.Text = paciente.Afiliaciones[0].Plan.Descripcion;
         txtNroAfiliado.Text = paciente.Afiliaciones[0].NroAfiliado;
     }
     CargarRecordatorios();
 }
 private void btnLimpiar_Click(object sender, EventArgs e)
 {
     Utils.cargarCombo<TipoDocumento>(cmbTipoDocumento, "Codigo");
     txtNombre.Text = "";
     txtApellido.Text = "";
     txtNroDoc.Text = "";
     txtNumero.Text = "";
     paciente = new Paciente();
     dgMedicacion.Rows.Clear();
     dgVisitas.Rows.Clear();
     btnBuscar.Enabled = true;
     btnLimpiar.Enabled = false;
 }