public static string inactivarOSPaciente(string idObraPaciente) { ObrasPacientes obraPaciente = new ObrasPacientes(); GestorPacientes gestorPaciente = new GestorPacientes(); try { string mensaje = "OK"; obraPaciente.IdObraPaciente = Convert.ToInt32(idObraPaciente); obraPaciente.UsuarioBaja = 1; obraPaciente.FechaBaja = DateTime.Today; gestorPaciente.inactivarOSPaciente(obraPaciente); return(mensaje); } catch (Exception e) { string error = "Se produjo un error al actualizar los datos del personal " + e.Message; return(error); } }
public static string inactivarPaciente(string idPaciente) { Paciente paciente = new Paciente(); GestorPacientes gestorPacientes = new GestorPacientes(); try { string mensaje = "OK"; paciente.IdPaciente = Convert.ToInt32(idPaciente); paciente.UsuarioBaja = 1; paciente.FechaBaja = DateTime.Today; gestorPacientes.inactivarPaciente(paciente); return(mensaje); } catch (Exception e) { string error = "Se produjo un error al registrar el paciente " + e.Message; return(error); } }
public static string actualizarPaciente(string id, string nombre, string apellido, string dni, string celular, string email1, string email2) { Paciente paciente = new Paciente(); GestorPacientes gestorPaciente = new GestorPacientes(); try { string mensaje = "OK"; #region Completa entidad Paciente if (!string.IsNullOrEmpty(dni)) { paciente.Documento = dni; } if (!string.IsNullOrEmpty(nombre)) { paciente.Nombre = nombre; } if (!string.IsNullOrEmpty(apellido)) { paciente.Apellido = apellido; } if (!string.IsNullOrEmpty(celular)) { paciente.NroContacto = celular; } if ((!string.IsNullOrEmpty(email1)) && (!string.IsNullOrEmpty(email2))) { string email = email1 + "@" + email2; paciente.EmailContacto = email; } paciente.IdPaciente = Convert.ToInt32(id); paciente.UsuarioMod = 1; paciente.FechaMod = DateTime.Today; #endregion gestorPaciente.actualizarPaciente(paciente); return(mensaje); } catch (Exception e) { string error = "Se produjo un error al actualizar los datos del personal " + e.Message; return(error); } }
public static string registrarPaciente(string p_dni, string p_celular, string p_nombre, string p_apellido, string p_email1, string p_email2, string p_obraSocial, string p_plan, string p_nroAfiliado) { Paciente paciente = new Paciente(); GestorPacientes gestorPacientes = new GestorPacientes(); try { string mensaje = "OK"; #region Completa entidad Paciente if (!string.IsNullOrEmpty(p_dni)) { paciente.Documento = p_dni; } if (!string.IsNullOrEmpty(p_nombre)) { paciente.Nombre = p_nombre; } if (!string.IsNullOrEmpty(p_apellido)) { paciente.Apellido = p_apellido; } if (!string.IsNullOrEmpty(p_celular)) { paciente.NroContacto = p_celular; } if ((!string.IsNullOrEmpty(p_email1)) && (!string.IsNullOrEmpty(p_email2))) { string email = p_email1 + "@" + p_email2; paciente.EmailContacto = email; } paciente.UsuarioAlta = 1; paciente.FechaAlta = DateTime.Today; #endregion gestorPacientes.RegistrarPacientes(paciente, p_obraSocial, p_plan, p_nroAfiliado); return(mensaje); } catch (Exception e) { string error = "Se produjo un error al registrar el paciente " + e.Message; return(error); } }
public FormAdmTurno() { tiempo = new Timer(); tiempo.Tick += new EventHandler(eventoReloj); InitializeComponent(); miGestor = new GestorTurnos(); miGestorDGV = new GestorDGV(); miGestorPacientes = new GestorPacientes(); vPacientes = miGestorPacientes.GetPacientes(); vTurnosDelDia = miGestor.GetTurnosExtractorioDelDia(); tiempo.Enabled = true; }
public static string obraSocialPaciente(string idPaciente) { try { GestorPacientes gestorPaciente = new GestorPacientes(); DataTable dt = gestorPaciente.obraSocialPaciente(idPaciente); string col = JsonConvert.SerializeObject(dt); return(col); } catch (Exception e) { throw e; } }
public static string cargarPacientes() { try { GestorPacientes gestorPacientes = new GestorPacientes(); DataTable dt = gestorPacientes.cargarPacientes(); string col = JsonConvert.SerializeObject(dt); return(col); } catch (Exception e) { throw e; } }
public static string buscarPaciente(string dniPaciente) { try { GestorPacientes gPacientes = new GestorPacientes(); Paciente paciente = new Paciente(); paciente = gPacientes.BuscarPaciente(dniPaciente); string col = JsonConvert.SerializeObject(paciente); return(col); } catch (Exception e) { throw e; } }
public static string registrarOSPaciente(string p_idPaciente, string p_obraSocial, string p_plan, string p_nroAfiliado) { ObrasPacientes obrasPaciente = new ObrasPacientes(); GestorPacientes gestorPacientes = new GestorPacientes(); try { string mensaje = "OK"; #region Completa entidad obrasPaciente if (!string.IsNullOrEmpty(p_obraSocial)) { obrasPaciente.IdObraSocial = Convert.ToInt32(p_obraSocial); } if (!string.IsNullOrEmpty(p_plan)) { obrasPaciente.IdPlan = Convert.ToInt32(p_plan); } if (!string.IsNullOrEmpty(p_nroAfiliado)) { obrasPaciente.nroAfiliado = p_nroAfiliado; } obrasPaciente.IdPaciente = Convert.ToInt32(p_idPaciente); obrasPaciente.UsuarioAlta = 1; obrasPaciente.FechaAlta = DateTime.Today; #endregion gestorPacientes.registrarOSPaciente(obrasPaciente); return(mensaje); } catch (Exception e) { string error = "Se produjo un error al registrar el paciente " + e.Message; return(error); } }
private void BtnBuscarPaciente_Click(object sender, EventArgs e) { paciente = GestorPacientes.BuscarPacientePorDNI(TxtBusqueda.ToString()); //agregado if (paciente != null) { if (MessageBox.Show("El DNI ingresado no existe, ¿desea cargar los datos?", "DNI no encontrado", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { Pacientes_Alta pacientes_Alta = new Pacientes_Alta(); Globales.dni = TxtBusqueda.ToString(); pacientes_Alta.Show(); } else { TxtBusqueda.Focus(); } } else { MostrarDatosPaciente datos = new MostrarDatosPaciente(); datos.Show(); } }