public FormASC( bool ensayo, string codigo_paciente, int index, int index1, ImgSet.ImageSet imagen, int bloques, int estimulos, int visualizacion, int ocultamiento, int tecla_reaccion, Color fondo, TypeOf_AS_Test tipo_estimulo ) { this.ensayo = ensayo; this.codigo_paciente = codigo_paciente; this.index = index; this.tecla_reaccion = tecla_reaccion; this.index1 = index1; this.imagen = imagen; this.bloques = bloques; this.estimulos = estimulos; this.visualizacion = visualizacion; this.ocultamiento = ocultamiento; this.tecla_reaccion = tecla_reaccion; this.tipo_estimulo = tipo_estimulo; this.asc = new Atencion_Sostenida_Compleja(null, index, index1, bloques, estimulos, imagen.Count); InitializeComponent(); this.BackColor = fondo; //Dimensiones de la pantalla Rectangle r = Screen.PrimaryScreen.Bounds; //Poniendo las dimensiones de la ventana //del tamaño de la pantalla this.Height = r.Height; this.Width = r.Width; int w = (this.Width - this.panel.Width) / 2; int h = (this.Height - this.panel.Height) / 2; //Posición del panel. this.panel.Top = h; this.panel.Left = w; //Posicion del label Feedback.Top = this.Height - 100; Feedback.Left = 100; Feedback.Font = new Font(FontFamily.GenericSansSerif, 30); Feedback.Hide(); timer.Interval = 1000; timer.Start(); }
private void init(int[] omisiones, int[] equivocaciones, int[] aciertos, int[] aciertos_ext, double[] medias_tr, double[] desviaciones_tr, double media, double desviacion, TypeOf_AS_Test tipo_prueba) { this.Omisiones = omisiones; this.Equivocaciones = equivocaciones; this.Aciertos = aciertos; this.Aciertos_Extrannos = aciertos_ext; this.MediasTR = medias_tr; this.DesiacionesTR = desviaciones_tr; this.Media = media; this.Desviacion = desviacion; this.TipoPrueba = tipo_prueba; }
public int LoadByTypeOfTest(string codigo_paciente, TypeOf_AS_Test type) { int code = this.Connection.Connect(); if (code != 0) { return(code); } string query = string.Format("SELECT * FROM {0} WHERE {0}.{1} = '{2}' AND {0}.{3} = {4} ORDER BY fecha DESC", TN, CodigoPacienteColumnName, codigo_paciente, TipoPruebaColumnName, (int)type); var adapter = new OleDbDataAdapter(query, this.Connection.OleDB_Connection); var ds = new DataSet(); adapter.Fill(ds, TN); this.Connection.Disconnect(); this.Vista_Predeterminada = new DataView(ds.Tables[0]); Rewind(); return(ds.Tables[0].Rows.Count); }
protected Resultado_AS(TypeAS tipo_atencion, string codigo_paciente, DateTime fecha, bool completo, Table_Res ras, TypeOf_AS_Test tipo_prueba) : base(ras, codigo_paciente, fecha, completo) { _Indicadores indicadores = tipo_atencion == TypeAS.Simple ? (_Indicadores) new IndicadoresASS() : new IndicadoresASC(); indicadores.LoadByPacienteAndFecha(codigo_paciente, fecha); var _omisiones = new int[indicadores.RowCount]; var _equivocaciones = new int[indicadores.RowCount]; var _aciertos = new int[indicadores.RowCount]; var _aciertos_ext = new int[indicadores.RowCount]; var _medias_tr = new double[indicadores.RowCount]; var _desv_tr = new double[indicadores.RowCount]; var i = 0; if (indicadores.RowCount > 0) { do { _omisiones[i] = indicadores.Omisiones; _equivocaciones[i] = indicadores.Equivocaciones; _aciertos[i] = indicadores.Aciertos; _aciertos_ext[i] = indicadores.Aciertos_Extrannos; _medias_tr[i] = indicadores.Media_TiempoReaccion; _desv_tr[i++] = indicadores.Desviacion_TiempoReaccion; } while (indicadores.MoveNext()); } double _desv = tipo_atencion == TypeAS.Simple ? ((_ResASS)ras).Desviacion : ((_ResASC)ras).Desviacion; double _media = tipo_atencion == TypeAS.Simple ? ((_ResASS)ras).Media : ((_ResASC)ras).Media; this.TipoAtencion = tipo_atencion; init(_omisiones, _equivocaciones, _aciertos, _aciertos_ext, _medias_tr, _desv_tr, _media, _desv, tipo_prueba); }
protected Resultado_AS(TypeAS tipo_atencion, string codigo_paciente, int[] omisiones, int[] equivocaciones, int[] aciertos, int[] aciertos_ext, double[] medias_tr, double[] desviaciones_tr, double media, double desviacion, DateTime fecha, bool completo, TypeOf_AS_Test tipo_prueba) : base(tipo_atencion == TypeAS.Simple ? new _ResASS() : new _ResASC() as Table, codigo_paciente, fecha, completo) { this.TipoAtencion = tipo_atencion; init(omisiones, equivocaciones, aciertos, aciertos_ext, medias_tr, desviaciones_tr, media, desviacion, tipo_prueba); }
protected Resultado_AS(TypeAS tipo_atencion, string codigo_paciente, int[] omisiones, int[] equivocaciones, int[] aciertos, int[] aciertos_ext, double[] medias_tr, double[] desviaciones_tr, List <int> tiempos, DateTime fecha, bool completo, TypeOf_AS_Test tipo_prueba) : base(tipo_atencion == TypeAS.Simple ? (Table) new _ResASS() : new _ResASC(), codigo_paciente, fecha, completo) { double m = StatFunctionLibrary.media(tiempos); this.TipoAtencion = tipo_atencion; init(omisiones, equivocaciones, aciertos, aciertos_ext, medias_tr, desviaciones_tr, m, StatFunctionLibrary.desv_est(tiempos, m), tipo_prueba); }
protected bool Update(string fecha, string codigo_paciente, double desviacion, double media, TypeOf_AS_Test tipo_prueba, int total_aciertos, int total_aciertos_ext, int total_omisiones, int total_equivocaciones, bool completo) { int code = this.Connection.Connect(); if (code != 0) { return(false); } string query = string.Format("UPDATE {0} SET {1} = {2}, {3} = {4}, {5} = {6}, {7} = {8}, {9} = {10}, {11} = {12}, {13} = {14}, {15} = {16} WHERE {17} = '{18}' AND {19} = '{20}'", TN, MediaColumnName, media, DesviacionColumnName, desviacion, TipoPruebaColumnName, tipo_prueba, CompletoColumnName, completo, TotalAciertosColumnName, total_aciertos, TotalAciertosEXTColumnName, total_aciertos_ext, TotalOmisionesColumnName, total_omisiones, TotalEquivocacionesColumnName, total_equivocaciones, CodigoPacienteColumnName, codigo_paciente, FechaColumnName, fecha); var comm = new OleDbCommand(query, this.Connection.OleDB_Connection); this.Connection.Open(); comm.ExecuteNonQuery(); this.Connection.Disconnect(); return(true); }
public bool Update(DateTime fecha, string codigo_paciente, double desviacion, double media, TypeOf_AS_Test tipo_prueba, int total_aciertos, int total_aciertos_ext, int total_omisiones, int total_equivocaciones, bool completo) { return(this.Update(fecha.ToString(), codigo_paciente, desviacion, media, tipo_prueba, total_aciertos, total_aciertos_ext, total_omisiones, total_equivocaciones, completo)); }
protected bool Insert(string fecha, string codigo_paciente, double desviacion, double media, TypeOf_AS_Test tipo_prueba, int total_aciertos, int total_aciertos_ext, int total_omisiones, int total_equivocaciones, bool completo) { int code = this.Connection.Connect(); if (code != 0) { return(false); } string query = string.Format("INSERT INTO {0} ( {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10} ) VALUES ('{11}','{12}',{13},{14},{15},{16},{17},{18},{19},{20})", TN, FechaColumnName, CodigoPacienteColumnName, DesviacionColumnName, MediaColumnName, TipoPruebaColumnName, TotalAciertosColumnName, TotalAciertosEXTColumnName, TotalOmisionesColumnName, TotalEquivocacionesColumnName, CompletoColumnName, fecha, codigo_paciente, FunctionLibrary.ConvertPointBased(desviacion), FunctionLibrary.ConvertPointBased(media), (int)tipo_prueba, total_aciertos, total_aciertos_ext, total_omisiones, total_equivocaciones, completo); var comm = new OleDbCommand(query, this.Connection.OleDB_Connection); this.Connection.Open(); comm.ExecuteNonQuery(); this.Connection.Disconnect(); return(true); }
public Resultado_ASS(string codigo_paciente, DateTime fecha, bool completo, _ResASS rass, TypeOf_AS_Test tipo_prueba) : base(TypeAS.Simple, codigo_paciente, fecha, completo, rass, tipo_prueba) { }
public Resultado_ASS(string codigo_paciente, int[] omisiones, int[] equivocaciones, int[] aciertos, int[] aciertos_ext, double[] medias_tr, double[] desviaciones_tr, double media, double desviacion, DateTime fecha, bool completo, TypeOf_AS_Test tipo_prueba) : base(TypeAS.Simple, codigo_paciente, omisiones, equivocaciones, aciertos, aciertos_ext, medias_tr, desviaciones_tr, media, desviacion, fecha, completo, tipo_prueba) { }
public Resultado_ASC(string codigo_paciente, DateTime fecha, bool completo, _ResASC rasc, TypeOf_AS_Test tipo_prueba) : base(TypeAS.Compleja, codigo_paciente, fecha, completo, rasc, tipo_prueba) { }
public Resultado_ASC(string codigo_paciente, int[] omisiones, int[] equivocaciones, int[] aciertos, int[] aciertos_ext, double[] medias_tr, double[] desviaciones_tr, List <int> tiempos, DateTime fecha, bool completo, TypeOf_AS_Test tipo_prueba) : base(TypeAS.Compleja, codigo_paciente, omisiones, equivocaciones, aciertos, aciertos_ext, medias_tr, desviaciones_tr, tiempos, fecha, completo, tipo_prueba) { }