public static bool registrarAntecedentes(clsAntecedentes objAntecedentes) { List<SqlParameter> lstParametrosSQL = new List<SqlParameter>(); SqlParameter sqlParametro; lstParametrosSQL = crearLista(objAntecedentes); sqlParametro = new SqlParameter(); sqlParametro.ParameterName = "@Accion"; sqlParametro.Value = 0; sqlParametro.Direction = ParameterDirection.Input; lstParametrosSQL.Add(sqlParametro); sqlParametro = new SqlParameter(); sqlParametro.ParameterName = "@IdGenerado"; sqlParametro.Value = 0; sqlParametro.Direction = ParameterDirection.Output; lstParametrosSQL.Add(sqlParametro); int numResultado = clsGestorBD.ejecutarStoredProcedureInt("up_ManAntecedentes", lstParametrosSQL); if (numResultado != 0) { return true; } else { return false; } }
private void btnContinuar_Click(object sender, EventArgs e) { if (blnExiste) { numAccion = clsComun.MODIFICAR; numIdHistoriaClinica = Int32.Parse(dgvHistoriasClinicas.Rows[dgvHistoriasClinicas.CurrentRow.Index].Cells[0].Value.ToString()); strNumeroHistoriaClinica = dgvHistoriasClinicas.Rows[dgvHistoriasClinicas.CurrentRow.Index].Cells[1].Value.ToString(); numIdPaciente = Int32.Parse(dgvHistoriasClinicas.Rows[dgvHistoriasClinicas.CurrentRow.Index].Cells[9].Value.ToString()); numIdAntecedentes = Int32.Parse(dgvHistoriasClinicas.Rows[dgvHistoriasClinicas.CurrentRow.Index].Cells[10].Value.ToString()); numIdEpisodio = Int32.Parse(dgvEpisodios.Rows[dgvEpisodios.CurrentRow.Index].Cells[0].Value.ToString()); numIdEnfermedad = Int32.Parse(dgvEpisodios.Rows[dgvEpisodios.CurrentRow.Index].Cells[4].Value.ToString()); clsPaciente objPaciente = new clsPaciente(); objPaciente.IdPaciente = numIdPaciente; objPaciente = ctrPaciente.seleccionarPaciente(objPaciente); clsAntecedentes objAntecedentes = new clsAntecedentes(); objAntecedentes.IdAntecedentes = numIdAntecedentes; objAntecedentes = ctrAntecedentes.seleccionarAntecedentes(objAntecedentes); objEpisodio = new clsEpisodio(); objEpisodio.IdEpisodio = numIdEpisodio; objEpisodio = ctrEpisodio.seleccionarEpisodio(objEpisodio); mostrarInformacion(objPaciente, objAntecedentes, objEpisodio, numAccion); txtPaterno.Focus(); } else { MessageBox.Show("No hay episodios para continuar el día de hoy", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void btnVer_Click(object sender, EventArgs e) { if (dgvHistoriasClinicas.SelectedRows.Count > 0) { numAccion = clsComun.VER; numIdHistoriaClinica = Int32.Parse(dgvHistoriasClinicas.Rows[dgvHistoriasClinicas.CurrentRow.Index].Cells[0].Value.ToString()); strNumeroHistoriaClinica = dgvHistoriasClinicas.Rows[dgvHistoriasClinicas.CurrentRow.Index].Cells[1].Value.ToString(); numIdPaciente = Int32.Parse(dgvHistoriasClinicas.Rows[dgvHistoriasClinicas.CurrentRow.Index].Cells[9].Value.ToString()); numIdAntecedentes = Int32.Parse(dgvHistoriasClinicas.Rows[dgvHistoriasClinicas.CurrentRow.Index].Cells[10].Value.ToString()); numIdEpisodio = Int32.Parse(dgvEpisodios.Rows[dgvEpisodios.CurrentRow.Index].Cells[0].Value.ToString()); clsPaciente objPaciente = new clsPaciente(); objPaciente.IdPaciente = numIdPaciente; objPaciente = ctrPaciente.seleccionarPaciente(objPaciente); clsAntecedentes objAntecedentes = new clsAntecedentes(); objAntecedentes.IdAntecedentes = numIdAntecedentes; objAntecedentes = ctrAntecedentes.seleccionarAntecedentes(objAntecedentes); objEpisodio = new clsEpisodio(); objEpisodio.IdEpisodio = numIdEpisodio; objEpisodio = ctrEpisodio.seleccionarEpisodio(objEpisodio); mostrarInformacion(objPaciente, objAntecedentes, objEpisodio, numAccion); txtPaterno.Focus(); } else { MessageBox.Show("Debe seleccionar un paciente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void btnGuardarFiliacion_Click(object sender, EventArgs e) { if (validarPaciente()) { clsPaciente objPaciente = new clsPaciente(); objPaciente.IdPaciente = numIdPaciente; objPaciente.Paterno = txtPaterno.Text; objPaciente.Materno = txtMaterno.Text; objPaciente.Nombres = txtNombres.Text; objPaciente.Sexo = clsComun.seleccionarToVacio(cboSexo.Text); objPaciente.FechaNacimiento = dtpFechaNacimiento.Value.Date; objPaciente.IdReligion = ((clsReligion)cboReligion.SelectedItem).IdReligion; objPaciente.IdEtnia = ((clsEtnia)cboEtnia.SelectedItem).IdEtnia; objPaciente.IdOcupacion = ((clsOcupacion)cboOcupacion.SelectedItem).IdOcupacion; objPaciente.IdIdioma = ((clsIdioma)cboIdioma.SelectedItem).IdIdioma; objPaciente.EstadoCivil = clsComun.seleccionarToVacio(cboEstadoCivil.Text); objPaciente.Pais = clsComun.seleccionarToVacio(cboPais.Text); objPaciente.DepartamentoNacimiento = cboDepartamento.Text; objPaciente.ProvinciaNacimiento = cboProvincia.Text; objPaciente.DistritoNacimiento = cboDistrito.Text; objPaciente.DepartamentoDomicilio = clsComun.seleccionarToVacio(cboDepartamentoDomicilio.Text); objPaciente.ProvinciaDomicilio = cboProvinciaDomicilio.Text; objPaciente.DistritoDomicilio = cboDistritoDomicilio.Text; objPaciente.Direccion = txtDireccion.Text; objPaciente.NumeroHistoriaClinica = txtNumeroHistoriaClinica.Text; objPaciente.IdEmpleado = numIdEmpleado; if (cboGrupoSanguineo.SelectedIndex > 0) { objPaciente.GrupoSanguineo = cboGrupoSanguineo.Text; } if (cboFactorSanguineo.SelectedIndex > 0) { objPaciente.FactorSanguineo = cboFactorSanguineo.Text; } if (numAccion == clsComun.INSERTAR) { objPaciente.IdEpisodio = 0; objPaciente.IdModoIngreso = 0; numIdPaciente = ctrEpisodio.registrarPaciente(objPaciente); if (numIdPaciente > 0) { objPaciente = new clsPaciente(); objPaciente.IdPaciente = numIdPaciente; MessageBox.Show("El paciente se registró exitosamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { if (MessageBox.Show("Ocurrió un error mientras se intentaba registrar el paciente", "Mensaje", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error) != DialogResult.Cancel) { btnGuardarFiliacion_Click(sender, e); } } objPaciente = ctrPaciente.seleccionarPaciente(objPaciente); clsTriaje objTriaje = new clsTriaje(); objTriaje.IdEmpleado = numIdEmpleado; objTriaje.IdPaciente = objPaciente.IdPaciente; objTriaje.IdHistoriaClinica = objPaciente._IdHistoriaClinica; objTriaje.GrupoSanguineo = objPaciente.GrupoSanguineo; objTriaje.FactorSanguineo = objPaciente.FactorSanguineo; objTriaje.IdModoIngreso = objPaciente.IdModoIngreso; numIdEpisodio = ctrEpisodio.registrarTriaje(objTriaje); numIdHistoriaClinica = objPaciente._IdHistoriaClinica; strNumeroHistoriaClinica = objPaciente.NumeroHistoriaClinica; numIdAntecedentes = ctrEpisodio.seleccionarIdAntecedentes(numIdHistoriaClinica); clsAntecedentes objAntecedentes = new clsAntecedentes(); objAntecedentes.IdAntecedentes = numIdAntecedentes; objAntecedentes = ctrAntecedentes.seleccionarAntecedentes(objAntecedentes); objEpisodio = new clsEpisodio(); objEpisodio.IdEpisodio = numIdEpisodio; objEpisodio = ctrEpisodio.seleccionarEpisodio(objEpisodio); numAccion = clsComun.MODIFICAR; mostrarInformacion(objPaciente, objAntecedentes, objEpisodio, numAccion); txtPaterno.Focus(); } else if (numAccion == clsComun.MODIFICAR) { objPaciente.IdEpisodio = numIdEpisodio; if (cboModoIngreso.SelectedIndex > 0) { objPaciente.IdModoIngreso = ((clsModoIngreso)cboModoIngreso.SelectedItem).IdModoIngreso; } if (ctrPaciente.modificarPaciente(objPaciente)) { MessageBox.Show("El paciente se registró exitosamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { if (MessageBox.Show("Ocurrió un error mientras se intentaba modificar el paciente", "Mensaje", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error) != DialogResult.Cancel) { btnGuardarFiliacion_Click(sender, e); } } } } }
private void mostrarInformacion(clsPaciente objPaciente, clsAntecedentes objAntecedentes, clsEpisodio objEpisodio, int numAccion) { if (numAccion != clsComun.INSERTAR) { txtNumeroHistoriaClinica.Text = strNumeroHistoriaClinica; int numIdModoIngreso = 0; if (objPaciente != null) { txtPaterno.Text = objPaciente.Paterno; txtMaterno.Text = objPaciente.Materno; txtNombres.Text = objPaciente.Nombres; if (blnExiste) { numIdModoIngreso = ctrModoIngreso.seleccionarModoIngreso(numIdEpisodio).IdModoIngreso; for (int i = 0; i < cboModoIngreso.Items.Count; i++) { if (numIdModoIngreso == ((clsModoIngreso)cboModoIngreso.Items[i]).IdModoIngreso) { cboModoIngreso.SelectedIndex = i; break; } } } cboSexo.Text = objPaciente.Sexo; dtpFechaNacimiento.Value = objPaciente.FechaNacimiento; cboEtnia.Text = objPaciente._Etnia; cboReligion.Text = objPaciente._Religion; cboOcupacion.Text = objPaciente._Ocupacion; cboIdioma.Text = objPaciente._Idioma; cboEstadoCivil.Text = objPaciente.EstadoCivil; dtpFechaNacimiento.Value = objPaciente.FechaNacimiento; txtEdad.Text = objPaciente._NumEdad.ToString(); cboGrupoSanguineo.Text = objPaciente.GrupoSanguineo; cboFactorSanguineo.Text = objPaciente.FactorSanguineo; cboPais.Text = objPaciente.Pais; cboDepartamento.Text = objPaciente.DepartamentoNacimiento; cboProvincia.Text = objPaciente.ProvinciaNacimiento; cboDistrito.Text = objPaciente.DistritoNacimiento; cboDepartamentoDomicilio.Text = objPaciente.DepartamentoDomicilio; cboProvinciaDomicilio.Text = objPaciente.ProvinciaDomicilio; cboDistritoDomicilio.Text = objPaciente.DistritoDomicilio; txtDireccion.Text = objPaciente.Direccion; } if (objAntecedentes != null) { if (objAntecedentes.IndTabaco.CompareTo("X") == 0) { cbxTabaco.Checked = true; } if (objAntecedentes.IndAlcohol.CompareTo("X") == 0) { cbxAlcohol.Checked = true; } if (objAntecedentes.IndCafe.CompareTo("X") == 0) { cbxCafe.Checked = true; } if (objAntecedentes.IndTe.CompareTo("X") == 0) { cbxTe.Checked = true; } if (objAntecedentes.IndDrogas.CompareTo("X") == 0) { cbxDrogas.Checked = true; } if (objAntecedentes.IndDiabetes.CompareTo("X") == 0) { cbxDiabetes.Checked = true; } txtDiabetes.Text = objAntecedentes.DescDiabetes; if (objAntecedentes.IndHipertension.CompareTo("X") == 0) { cbxHipertensionArterial.Checked = true; } txtHipertensionArterial.Text = objAntecedentes.DescHipertension; if (objAntecedentes.IndCoronariopatia.CompareTo("X") == 0) { cbxCoronariopatia.Checked = true; } txtCoronariopatia.Text = objAntecedentes.DescCoronariopatia; if (objAntecedentes.IndDislipidemia.CompareTo("X") == 0) { cbxDislipidemia.Checked = true; } txtDislipidemia.Text = objAntecedentes.DescDislipidemia; if (objAntecedentes.IndAsma.CompareTo("X") == 0) { cbxAsma.Checked = true; } txtAsma.Text = objAntecedentes.DescAsma; if (objAntecedentes.IndPsicopatia.CompareTo("X") == 0) { cbxPsicopatia.Checked = true; } txtPsicopatia.Text = objAntecedentes.DescPsicopatia; if (objAntecedentes.IndAlergias.CompareTo("X") == 0) { cbxAlergias.Checked = true; } txtAlergias.Text = objAntecedentes.DescAlergias; if (objAntecedentes.IndTuberculosis.CompareTo("X") == 0) { cbxTuberculosis.Checked = true; } txtTuberculosis.Text = objAntecedentes.DescTuberculosis; if (objAntecedentes.IndAtipia.CompareTo("X") == 0) { cbxAtipia.Checked = true; } txtAtipia.Text = objAntecedentes.DescAtipia; if (objAntecedentes.IndGota.CompareTo("X") == 0) { cbxGota.Checked = true; } txtGota.Text = objAntecedentes.DescGota; //if (objAntecedentes.IndAfeccionBroncopulmonar.CompareTo("X") == 0) //{ //} //objAntecedentes.DescAfeccionBroncopulmonar = ""; if (objAntecedentes.IndEndocrinopatia.CompareTo("X") == 0) { cbxEndocrinopatia.Checked = true; } txtEndocrinopatia.Text = objAntecedentes.DescEndocrinopatia; if (objAntecedentes.IndNefropatia.CompareTo("X") == 0) { cbxNefropatia.Checked = true; } txtNefropatia.Text = objAntecedentes.DescNefropatia; if (objAntecedentes.IndUropatia.CompareTo("X") == 0) { cbxUropatia.Checked = true; } txtUropatia.Text = objAntecedentes.DescUropatia; if (objAntecedentes.IndHemopatia.CompareTo("X") == 0) { cbxHemopatia.Checked = true; } txtHemopatia.Text = objAntecedentes.DescHemopatia; if (objAntecedentes.IndETS.CompareTo("X") == 0) { cbxETS.Checked = true; } txtETS.Text = objAntecedentes.DescETS; if (objAntecedentes.IndUlcera.CompareTo("X") == 0) { cbxUlcera.Checked = true; } txtUlcera.Text = objAntecedentes.DescUlcera; if (objAntecedentes.IndColecistopatia.CompareTo("X") == 0) { cbxColecistopatia.Checked = true; } txtColecistopatia.Text = objAntecedentes.DescColecistopatia; if (objAntecedentes.IndHepatitis.CompareTo("X") == 0) { cbxHepatitis.Checked = true; } txtHepatitis.Text = objAntecedentes.DescHepatitis; if (objAntecedentes.IndEnfermedadesNeurologicas.CompareTo("X") == 0) { cbxEnfermedadesNeurologicas.Checked = true; } txtEnfermedadesNeurologicas.Text = objAntecedentes.DescEnfermedadesNeurologicas; if (objAntecedentes.IndFiebresProlongadas.CompareTo("X") == 0) { cbxFiebresProlongadas.Checked = true; } txtFiebresProlongadas.Text = objAntecedentes.DescFiebresProlongadas; if (objAntecedentes.IndColagenopatia.CompareTo("X") == 0) { cbxColagenopatia.Checked = true; } txtColagenopatia.Text = objAntecedentes.DescColagenopatia; rtxtOtrosAntecedentes.Text = objAntecedentes.Otros; } if (objEpisodio != null) { txtTiempoEnfermedad.Text = objEpisodio.Tiempo; txtInicioEnfermedad.Text = objEpisodio.Inicio; txtCursoEnfermedad.Text = objEpisodio.Curso; rtxtSintomasEnfermedad.Text = objEpisodio.Sintomas; rtxtRelatoCronologico.Text = objEpisodio.RelatoCronologico; rtxtEctoscopiaAnterior.Text = ctrEpisodio.seleccionarEctoscopia(objPaciente._IdHistoriaClinica); rtxtEctoscopiaActual.Text = objEpisodio.Ectoscopia; txtTemperatura.Text = objEpisodio.Temperatura; txtFrecuenciaCardiaca.Text = objEpisodio.FrecuenciaCardiaca; txtFrecuenciaRespiratoria.Text = objEpisodio.FrecuenciaRespiratoria; txtPresionArterial.Text = objEpisodio.PresionArterial; txtPeso.Text = objEpisodio.Peso; txtTalla.Text = objEpisodio.Talla; rtxtOtrosExamenes.Text = objEpisodio.Otros; rtxtApetito.Text = objEpisodio.Apetito; rtxtSed.Text = objEpisodio.Sed; rtxtOrina.Text = objEpisodio.Orina; rtxtDeposiciones.Text = objEpisodio.Deposiciones; for (int i = 0; i < objEpisodio._Diagnosticos.Count; i++) { dgvDiagnosticos.Rows.Add(new String[] { objEpisodio._Diagnosticos[i].IdCie10.ToString(), objEpisodio._Diagnosticos[i].Codigo, objEpisodio._Diagnosticos[i].Descripcion }); dgvDiagnosticos.ClearSelection(); } } } if (numAccion == clsComun.VER) { txtNumeroHistoriaClinica.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; txtPaterno.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; txtMaterno.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; txtNombres.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cboModoIngreso.Enabled = false; cboSexo.Enabled = false; cboEtnia.Enabled = false; cboReligion.Enabled = false; cboOcupacion.Enabled = false; cboIdioma.Enabled = false; cboEstadoCivil.Enabled = false; dtpFechaNacimiento.Enabled = false; cboGrupoSanguineo.Enabled = false; cboFactorSanguineo.Enabled = false; cboPais.Enabled = false; cboDepartamento.Enabled = false; cboProvincia.Enabled = false; cboDistrito.Enabled = false; cboDepartamentoDomicilio.Enabled = false; cboProvinciaDomicilio.Enabled = false; cboDistritoDomicilio.Enabled = false; txtDireccion.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; btnGuardarFiliacion.Visible = false; btnCancelarFiliacion.Visible = false; cboModoIngreso.Visible = true; cbxTabaco.Enabled = false; cbxAlcohol.Enabled = false; cbxCafe.Enabled = false; cbxTe.Enabled = false; cbxDrogas.Enabled = false; cbxDiabetes.Enabled = false; txtDiabetes.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxHipertensionArterial.Enabled = false; txtHipertensionArterial.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxCoronariopatia.Enabled = false; txtCoronariopatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxDislipidemia.Enabled = false; txtDislipidemia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxAsma.Enabled = false; txtAsma.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxPsicopatia.Enabled = false; txtPsicopatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxAlergias.Enabled = false; txtAlergias.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxTuberculosis.Enabled = false; txtTuberculosis.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxAtipia.Enabled = false; txtAtipia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxGota.Enabled = false; txtGota.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxEndocrinopatia.Enabled = false; txtEndocrinopatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxNefropatia.Enabled = false; txtNefropatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxUropatia.Enabled = false; txtUropatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxHemopatia.Enabled = false; txtHemopatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxETS.Enabled = false; txtETS.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxUlcera.Enabled = false; txtUlcera.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxColecistopatia.Enabled = false; txtColecistopatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxHepatitis.Enabled = false; txtHepatitis.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxEnfermedadesNeurologicas.Enabled = false; txtEnfermedadesNeurologicas.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxFiebresProlongadas.Enabled = false; txtFiebresProlongadas.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; cbxColagenopatia.Enabled = false; txtColagenopatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; rtxtOtrosAntecedentes.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.verdadero; btnGuardarAntecedentes.Visible = false; rtxtEctoscopiaActual.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.verdadero; txtTiempoEnfermedad.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; txtInicioEnfermedad.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; txtCursoEnfermedad.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; rtxtSintomasEnfermedad.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.verdadero; rtxtRelatoCronologico.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.verdadero; txtTemperatura.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; txtFrecuenciaRespiratoria.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; txtFrecuenciaCardiaca.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; txtPresionArterial.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; txtPeso.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; txtTalla.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.verdadero; rtxtApetito.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.verdadero; rtxtSed.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.verdadero; rtxtOrina.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.verdadero; rtxtDeposiciones.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.verdadero; rtxtOtrosExamenes.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.verdadero; cboDiagnostico.Enabled = false; rtxtDiagnosticoActual.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.verdadero; btnBuscar.Visible = false; btnAgregar.Visible = false; btnQuitar.Visible = false; btnCancelar.Visible = false; btnGuardar.Text = "Volver"; } else { txtNumeroHistoriaClinica.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; txtPaterno.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; txtMaterno.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; txtNombres.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cboModoIngreso.Enabled = true; cboSexo.Enabled = true; cboEtnia.Enabled = true; cboReligion.Enabled = true; cboOcupacion.Enabled = true; cboIdioma.Enabled = true; cboEstadoCivil.Enabled = true; dtpFechaNacimiento.Enabled = true; cboGrupoSanguineo.Enabled = true; cboFactorSanguineo.Enabled = true; cboPais.Enabled = true; cboDepartamento.Enabled = true; cboProvincia.Enabled = true; cboDistrito.Enabled = true; cboDepartamentoDomicilio.Enabled = true; cboProvinciaDomicilio.Enabled = true; cboDistritoDomicilio.Enabled = true; txtDireccion.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; btnGuardarFiliacion.Visible = true; if (numAccion == clsComun.INSERTAR) { lblModoIngreso.Visible = false; cboModoIngreso.Visible = false; btnCancelarFiliacion.Visible = true; tbpFiliacion.Enabled = true; tbpAntecedentes.Enabled = false; tbpEnfermedadActual.Enabled = false; tbpEctoscopia.Enabled = false; tbpExamenFisico.Enabled = false; tbpDiagnostico.Enabled = false; tbcAnamnesisPartes.SelectedTab = tbpFiliacion; } else { lblModoIngreso.Visible = true; cboModoIngreso.Visible = true; btnCancelarFiliacion.Visible = false; tbpFiliacion.Enabled = true; tbpAntecedentes.Enabled = true; tbpEnfermedadActual.Enabled = true; tbpEctoscopia.Enabled = true; tbpExamenFisico.Enabled = true; tbpDiagnostico.Enabled = true; } cbxTabaco.Enabled = true; cbxAlcohol.Enabled = true; cbxCafe.Enabled = true; cbxTe.Enabled = true; cbxDrogas.Enabled = true; cbxDiabetes.Enabled = true; txtDiabetes.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxHipertensionArterial.Enabled = true; txtHipertensionArterial.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxCoronariopatia.Enabled = true; txtCoronariopatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxDislipidemia.Enabled = true; txtDislipidemia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxAsma.Enabled = true; txtAsma.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxPsicopatia.Enabled = true; txtPsicopatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxAlergias.Enabled = true; txtAlergias.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxTuberculosis.Enabled = true; txtTuberculosis.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxAtipia.Enabled = true; txtAtipia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxGota.Enabled = true; txtGota.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxEndocrinopatia.Enabled = true; txtEndocrinopatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxNefropatia.Enabled = true; txtNefropatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxUropatia.Enabled = true; txtUropatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxHemopatia.Enabled = true; txtHemopatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxETS.Enabled = true; txtETS.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxUlcera.Enabled = true; txtUlcera.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxColecistopatia.Enabled = true; txtColecistopatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxHepatitis.Enabled = true; txtHepatitis.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxEnfermedadesNeurologicas.Enabled = true; txtEnfermedadesNeurologicas.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxFiebresProlongadas.Enabled = true; txtFiebresProlongadas.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; cbxColagenopatia.Enabled = true; txtColagenopatia.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; rtxtOtrosAntecedentes.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.falso; btnGuardarAntecedentes.Visible = true; rtxtEctoscopiaActual.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.falso; txtTiempoEnfermedad.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; txtInicioEnfermedad.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; txtCursoEnfermedad.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; rtxtSintomasEnfermedad.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.falso; rtxtRelatoCronologico.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.falso; txtTemperatura.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; txtFrecuenciaRespiratoria.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; txtFrecuenciaCardiaca.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; txtPresionArterial.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; txtPeso.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; txtTalla.Solo_Lectura = SistemaCentroSalud.Controles.cuTextBox.SoloLectura.falso; rtxtApetito.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.falso; rtxtSed.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.falso; rtxtOrina.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.falso; rtxtDeposiciones.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.falso; rtxtOtrosExamenes.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.falso; cboDiagnostico.Enabled = true; rtxtDiagnosticoActual.Solo_Lectura = SistemaCentroSalud.Controles.cuRichTextBox.SoloLectura.falso; btnBuscar.Visible = true; btnAgregar.Visible = true; btnQuitar.Visible = true; btnCancelar.Visible = true; btnGuardar.Text = "Guardar"; } clsComun.tabSiguiente(tbcHistoriaClinica, tbpBuscar, tbpDetalle); tbcAnamnesisPartes.SelectedTab = tbpFiliacion; tbcHistoriaClinicaPartes.SelectedTab = tbpAnamnesis; }
private void btnGuardarAntecedentes_Click(object sender, EventArgs e) { clsAntecedentes objAntecedentes = new clsAntecedentes(); objAntecedentes.IdAntecedentes = numIdAntecedentes; if (cbxTabaco.Checked) { objAntecedentes.IndTabaco = "X"; } if (cbxAlcohol.Checked) { objAntecedentes.IndAlcohol = "X"; } if (cbxCafe.Checked) { objAntecedentes.IndCafe = "X"; } if (cbxTe.Checked) { objAntecedentes.IndTe = "X"; } if (cbxDrogas.Checked) { objAntecedentes.IndDrogas = ""; } if (cbxDiabetes.Checked) { objAntecedentes.IndDiabetes = "X"; } objAntecedentes.DescDiabetes = txtDiabetes.Text; if (cbxHipertensionArterial.Checked) { objAntecedentes.IndHipertension = "X"; } objAntecedentes.DescHipertension = txtHipertensionArterial.Text; if (cbxCoronariopatia.Checked) { objAntecedentes.IndCoronariopatia = "X"; } objAntecedentes.DescCoronariopatia = txtCoronariopatia.Text; if (cbxDislipidemia.Checked) { objAntecedentes.IndDislipidemia = "X"; } objAntecedentes.DescDislipidemia = txtDislipidemia.Text; if (cbxAsma.Checked) { objAntecedentes.IndAsma = "X"; } objAntecedentes.DescAsma = txtAsma.Text; if (cbxPsicopatia.Checked) { objAntecedentes.IndPsicopatia = "X"; } objAntecedentes.DescPsicopatia = txtPsicopatia.Text; if (cbxAlergias.Checked) { objAntecedentes.IndAlergias = "X"; } objAntecedentes.DescAlergias = txtAlergias.Text; if (cbxTuberculosis.Checked) { objAntecedentes.IndTuberculosis = "X"; } objAntecedentes.DescTuberculosis = txtTuberculosis.Text; if (cbxAtipia.Checked) { objAntecedentes.IndAtipia = "X"; } objAntecedentes.DescAtipia = txtAtipia.Text; if (cbxGota.Checked) { objAntecedentes.IndGota = "X"; } objAntecedentes.DescGota = txtGota.Text; //objAntecedentes.IndAfeccionBroncopulmonar = ""; //objAntecedentes.DescAfeccionBroncopulmonar = ""; if (cbxEndocrinopatia.Checked) { objAntecedentes.IndEndocrinopatia = "X"; } objAntecedentes.DescEndocrinopatia = txtEndocrinopatia.Text; if (cbxNefropatia.Checked) { objAntecedentes.IndNefropatia = "X"; } objAntecedentes.DescNefropatia = txtNefropatia.Text; if (cbxUropatia.Checked) { objAntecedentes.IndUropatia = "X"; } objAntecedentes.DescUropatia = txtUropatia.Text; if (cbxHemopatia.Checked) { objAntecedentes.IndHemopatia = "X"; } objAntecedentes.DescHemopatia = txtHemopatia.Text; if (cbxETS.Checked) { objAntecedentes.IndETS = "X"; } objAntecedentes.DescETS = txtETS.Text; if (cbxUlcera.Checked) { objAntecedentes.IndUlcera = "X"; } objAntecedentes.DescUlcera = txtUlcera.Text; if (cbxColecistopatia.Checked) { objAntecedentes.IndColecistopatia = "X"; } objAntecedentes.DescColecistopatia = txtColecistopatia.Text; if (cbxHepatitis.Checked) { objAntecedentes.IndHepatitis = "X"; } objAntecedentes.DescHepatitis = txtHepatitis.Text; if (cbxEnfermedadesNeurologicas.Checked) { objAntecedentes.IndEnfermedadesNeurologicas = "X"; } objAntecedentes.DescEnfermedadesNeurologicas = txtEnfermedadesNeurologicas.Text; if (cbxFiebresProlongadas.Checked) { objAntecedentes.IndFiebresProlongadas = "X"; } objAntecedentes.DescFiebresProlongadas = txtFiebresProlongadas.Text; if (cbxColagenopatia.Checked) { objAntecedentes.IndColagenopatia = "X"; } objAntecedentes.DescColagenopatia = txtColagenopatia.Text; objAntecedentes.Otros = rtxtOtrosAntecedentes.Text; if (ctrAntecedentes.modificarAntecedentes(objAntecedentes)) { MessageBox.Show("Los Antecedentes se guardaron exitosamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { if (MessageBox.Show("Ocurrió un error mientras se intentaba guardar los antecedentes", "Mensaje", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error) != DialogResult.Cancel) { btnGuardarAntecedentes_Click(sender, e); } } }
public static clsAntecedentes seleccionarAntecedentes(clsAntecedentes objAntecedentes) { List<SqlParameter> lstParametrosSQL = new List<SqlParameter>(); SqlParameter sqlParametro; lstParametrosSQL = crearLista(objAntecedentes); sqlParametro = new SqlParameter(); sqlParametro.ParameterName = "@Accion"; sqlParametro.Value = 4; sqlParametro.Direction = ParameterDirection.Input; lstParametrosSQL.Add(sqlParametro); sqlParametro = new SqlParameter(); sqlParametro.ParameterName = "@IdGenerado"; sqlParametro.Value = 0; sqlParametro.Direction = ParameterDirection.Output; lstParametrosSQL.Add(sqlParametro); DataTable dtResultado = clsGestorBD.ejecutarStoredProcedureDataTable("up_ManAntecedentes", lstParametrosSQL); objAntecedentes.IndTabaco = dtResultado.Rows[0]["IndTabaco"].ToString(); objAntecedentes.IndAlcohol = dtResultado.Rows[0]["IndAlcohol"].ToString(); objAntecedentes.IndCafe = dtResultado.Rows[0]["IndCafe"].ToString(); objAntecedentes.IndTe = dtResultado.Rows[0]["IndTe"].ToString(); objAntecedentes.IndDrogas = dtResultado.Rows[0]["IndDrogas"].ToString(); objAntecedentes.IndDiabetes = dtResultado.Rows[0]["IndDiabetes"].ToString(); objAntecedentes.DescDiabetes = dtResultado.Rows[0]["DescripcionDiabetes"].ToString(); objAntecedentes.IndHipertension = dtResultado.Rows[0]["IndHipertension"].ToString(); objAntecedentes.DescHipertension = dtResultado.Rows[0]["DescripcionHipertension"].ToString(); objAntecedentes.IndCoronariopatia = dtResultado.Rows[0]["IndCoronariopatia"].ToString(); objAntecedentes.DescCoronariopatia = dtResultado.Rows[0]["DescripcionCoronariopatia"].ToString(); objAntecedentes.IndDislipidemia = dtResultado.Rows[0]["IndDislipidemia"].ToString(); objAntecedentes.DescDislipidemia = dtResultado.Rows[0]["DescripcionDislipidemia"].ToString(); objAntecedentes.IndAsma = dtResultado.Rows[0]["IndAsma"].ToString(); objAntecedentes.DescAsma = dtResultado.Rows[0]["DescripcionAsma"].ToString(); objAntecedentes.IndPsicopatia = dtResultado.Rows[0]["IndPsicopatia"].ToString(); objAntecedentes.DescPsicopatia = dtResultado.Rows[0]["DescripcionPsicopatia"].ToString(); objAntecedentes.IndAlergias = dtResultado.Rows[0]["IndAlergias"].ToString(); objAntecedentes.DescAlergias = dtResultado.Rows[0]["DescripcionAlergias"].ToString(); objAntecedentes.IndTuberculosis = dtResultado.Rows[0]["IndTuberculosis"].ToString(); objAntecedentes.DescTuberculosis = dtResultado.Rows[0]["DescripcionTuberculosis"].ToString(); objAntecedentes.IndAtipia = dtResultado.Rows[0]["IndAtipia"].ToString(); objAntecedentes.DescAtipia = dtResultado.Rows[0]["DescripcionAtipia"].ToString(); objAntecedentes.IndGota = dtResultado.Rows[0]["IndGota"].ToString(); objAntecedentes.DescGota = dtResultado.Rows[0]["DescripcionGota"].ToString(); objAntecedentes.IndAfeccionBroncopulmonar = dtResultado.Rows[0]["IndAfeccionBroncopulmonar"].ToString(); objAntecedentes.DescAfeccionBroncopulmonar = dtResultado.Rows[0]["DescripcionAfeccionBroncopulmonar"].ToString(); objAntecedentes.IndEndocrinopatia = dtResultado.Rows[0]["IndEndocrinopatia"].ToString(); objAntecedentes.DescEndocrinopatia = dtResultado.Rows[0]["DescripcionEndocrinopatia"].ToString(); objAntecedentes.IndNefropatia = dtResultado.Rows[0]["IndNefropatia"].ToString(); objAntecedentes.DescNefropatia = dtResultado.Rows[0]["DescripcionNefropatia"].ToString(); objAntecedentes.IndUropatia = dtResultado.Rows[0]["IndUropatia"].ToString(); objAntecedentes.DescUropatia = dtResultado.Rows[0]["DescripcionUropatia"].ToString(); objAntecedentes.IndHemopatia = dtResultado.Rows[0]["IndHemopatia"].ToString(); objAntecedentes.DescHemopatia = dtResultado.Rows[0]["DescripcionHemopatia"].ToString(); objAntecedentes.IndETS = dtResultado.Rows[0]["IndETS"].ToString(); objAntecedentes.DescETS = dtResultado.Rows[0]["DescripcionETS"].ToString(); objAntecedentes.IndUlcera = dtResultado.Rows[0]["IndUlcera"].ToString(); objAntecedentes.DescUlcera = dtResultado.Rows[0]["DescripcionUlcera"].ToString(); objAntecedentes.IndColecistopatia = dtResultado.Rows[0]["IndColecistopatia"].ToString(); objAntecedentes.DescColecistopatia = dtResultado.Rows[0]["DescripcionColecistopatia"].ToString(); objAntecedentes.IndHepatitis = dtResultado.Rows[0]["IndHepatitis"].ToString(); objAntecedentes.DescHepatitis = dtResultado.Rows[0]["DescripcionHepatitis"].ToString(); objAntecedentes.IndEnfermedadesNeurologicas = dtResultado.Rows[0]["IndEnfermedadesNeurologicas"].ToString(); objAntecedentes.DescEnfermedadesNeurologicas = dtResultado.Rows[0]["DescripcionEnfermedadesNeurologicas"].ToString(); objAntecedentes.IndFiebresProlongadas = dtResultado.Rows[0]["IndFiebresProlongadas"].ToString(); objAntecedentes.DescFiebresProlongadas = dtResultado.Rows[0]["DescripcionFiebresProlongadas"].ToString(); objAntecedentes.IndColagenopatia = dtResultado.Rows[0]["IndColagenopatia"].ToString(); objAntecedentes.DescColagenopatia = dtResultado.Rows[0]["DescripcionColagenopatia"].ToString(); objAntecedentes.Otros = dtResultado.Rows[0]["Otros"].ToString(); return objAntecedentes; }
private static List<SqlParameter> crearLista(clsAntecedentes objAntecedentes) { List<SqlParameter> lstParametrosSQL = new List<SqlParameter>(); SqlParameter sqlParametro; foreach (PropertyInfo pi in objAntecedentes.GetType().GetProperties()) { if (pi.CanRead) { sqlParametro = new SqlParameter(); sqlParametro.ParameterName = "@" + pi.Name; sqlParametro.Value = pi.GetValue(objAntecedentes, null); sqlParametro.Direction = ParameterDirection.Input; lstParametrosSQL.Add(sqlParametro); } } return lstParametrosSQL; }