public void GetMultiResult() { _multiresult = new List <string>(); if (_sten == 0) { _multiresult.Add("Расстройств не выявлено."); } else { _multiresult.Add("Контрольные вопросы шкалы: "); testsparam t = _ge.testsparams.First(tp => tp.idt == (int)EnumPTests.Modul2); t.answersparams.Load(); for (int i = 0; i < _ans.Count; i++) { answersparam a = t.answersparams.First(ap => ap.num == _ans[i]); a.cellsparams.Load(); if (_answers[_ans[i] - 1].SelectedCellDescription.Trim() != "") { cellsparam selectedcell = a.cellsparams.First(cell => cell.description == _answers[_ans[i] - 1].SelectedCellDescription); if (selectedcell.mark != 0) { _multiresult.Add(a.buttondescription + ": " + selectedcell.description); } } } } }
public void SendKey(int cellindex) { MDAnswer ka = new MDAnswer(); ka.Time = DateTime.Now; ka.AnswerIndex = (int)_currentaparam.num; ka.AnswerDescription = _currentaparam.buttondescription; ka.SelectedCellIndex = cellindex; string celldescription = "d"; switch (cellindex) { case 0: celldescription = "Нет"; break; case 1: celldescription = "Да"; break; } cellsparam c = _currentaparam.cellsparams.First(cp => cp.description.Trim() == celldescription); ka.SelectedCellDescription = celldescription; ka.SelectedCellButtonDescription = c.buttonsescription; _answers.Add(ka); }
public void GetMultiResult() { _multiresult = new List <string>(); if (_sten == 0) { _multiresult.Add("Расстройств не выявлено."); } else if (_sten == _ans.Count) { _multiresult.Add("Можно предположить, что расстройства преимущественно соответствуют диагностическим критериям рубрик F20–29 по МКБ-10 «Шизотипические и бредовые расстройства»."); } else { _multiresult.Add("Контрольные вопросы шкалы: "); testsparam t = _ge.testsparams.First(tp => tp.idt == (int)EnumPTests.Modul2); t.answersparams.Load(); for (int i = 0; i < _ans.Count; i++) { answersparam a = t.answersparams.First(ap => ap.num == _ans[i]); a.cellsparams.Load(); if (_answers[_ans[i] - 1].SelectedCellDescription.Trim() != "") { cellsparam selectedcell = a.cellsparams.First(cell => cell.description == _answers[_ans[i] - 1].SelectedCellDescription); if (selectedcell.mark != 0) { _multiresult.Add(a.buttondescription + ": " + selectedcell.description); } } } } }
public void GetResult() { if (_mark != 0) { _result = "В анамнезе жизни установлено:"; testsparam t = _ge.testsparams.First(tp => tp.idt == (int)EnumPTests.Modul2); t.answersparams.Load(); for (int i = 0; i < _ans.Count; i++) { answersparam a = t.answersparams.First(ap => ap.num == _ans[i]); a.cellsparams.Load(); if (_answers[_ans[i] - 1].SelectedCellDescription.Trim() != "") { cellsparam selectedcell = a.cellsparams.First(cell => cell.description == _answers[_ans[i] - 1].SelectedCellDescription); if (selectedcell.mark != 0) { _result += a.buttondescription + ": " + selectedcell.description; if (i != _ans.Count - 1) { _result += ", "; } } } } } else { _result = "В анамнезе психопатологических признаков не выявлено."; } }
public void GetMultiResult() { _multiresult = new List <string>(); if (_sten == 0) { _multiresult.Add("Расстройств не выявлено."); } else if (_sten == _ans.Count) { _multiresult.Add("Mожно говорить о соответствии диагностическим критериям рубрик F30-39 «Аффективные расстройства настроения» (группа В)."); } else { _multiresult.Add("Контрольные вопросы шкалы: "); testsparam t = _ge.testsparams.First(tp => tp.idt == (int)EnumPTests.Modul2); t.answersparams.Load(); for (int i = 0; i < _ans.Count; i++) { answersparam a = t.answersparams.First(ap => ap.num == _ans[i]); a.cellsparams.Load(); if (_answers[_ans[i] - 1].SelectedCellDescription.Trim() != "") { cellsparam selectedcell = a.cellsparams.First(cell => cell.description == _answers[_ans[i] - 1].SelectedCellDescription); if (selectedcell.mark != 0) { _multiresult.Add(a.buttondescription + ": " + selectedcell.description); } } } } }
public static int GetMark(pBaseEntities GlobalEntities, KettellAnswers KettellAnswers, List <int> AnswersNums, EnumKettellType KType) { int m = 0; testsparam t; if (KType == EnumKettellType.CForm) { t = GlobalEntities.testsparams.First(tp => tp.idt == (int)EnumPTests.KettellC); } else { t = GlobalEntities.testsparams.First(tp => tp.idt == (int)EnumPTests.KettellA); } t.answersparams.Load(); for (int i = 0; i < AnswersNums.Count; i++) { answersparam a = t.answersparams.First(ap => ap.num == AnswersNums[i]); a.cellsparams.Load(); if (KettellAnswers[(int)a.num - 1].SelectedCellDescription.Trim() != "") { cellsparam c = a.cellsparams.First(cp => cp.description.Trim() == KettellAnswers[(int)a.num - 1].SelectedCellDescription.Trim()); m += c.mark.Value; } } return(m); }
public void GetMultiResult() { _multiresult = new List <string>(); if (_mark == 0) { _multiresult.Add("В анамнезе психопатологических признаков не выявлено."); } { _multiresult.Add("В анамнезе жизни установлено:"); testsparam t = _ge.testsparams.First(tp => tp.idt == (int)EnumPTests.Modul2); t.answersparams.Load(); for (int i = 0; i < _ans.Count; i++) { answersparam a = t.answersparams.First(ap => ap.num == _ans[i]); a.cellsparams.Load(); if (_answers[_ans[i] - 1].SelectedCellDescription.Trim() != "") { cellsparam selectedcell = a.cellsparams.First(cell => cell.description == _answers[_ans[i] - 1].SelectedCellDescription); if (selectedcell.mark != 0) { _multiresult.Add(a.buttondescription + ": " + selectedcell.description); } } } } }
public void Start() { testsparam t = _ge.testsparams.First(tp => tp.idt == (int)EnumPTests.Modul2); t.answersparams.Load(); _currentaparam = t.answersparams.First(ap => ap.num == 1); _ktc.lb_caption.Text = _currentaparam.buttondescription; _currentaparam.cellsparams.Load(); cellsparam c1 = _currentaparam.cellsparams.First(cp => cp.description.Trim() == "Да"); _ktc.lb_1.Text = "1. " + c1.buttonsescription; cellsparam c2 = _currentaparam.cellsparams.First(cp => cp.description.Trim() == "Нет"); _ktc.lb_2.Text = "2. " + c2.buttonsescription; }
public void SetTollTips(AnswerControl control) { answersparam aparam = _testparam.answersparams.First(a => a.num == control.Answer.Id); string label = aparam.buttondescription.Trim(); if (control.Answer.ContentDescription.Trim() != "") { cellsparam c = _ge.cellsparams.First(cp => cp.ida == aparam.ida & cp.description == control.Answer.ContentDescription.Trim()); label += ": \n" + c.buttonsescription; } else { label += ": \n нет ответа"; } RemarkToolTip.SetToolTip(control.btn_ans, label); }
private void button2_Click(object sender, EventArgs e) { pBaseEntities pb = new pBaseEntities(); LData md = new LData(); testsparam tst = pb.testsparams.First(t => t.idt == (int)EnumPTests.NPNA); tst.answersparams.Load(); for (int a = 0; a < tst.answerscount; a++) { answersparam ap = answersparam.Createanswersparam(0, tst.idt, "Вопрос № " + (a + 1), 2); ap.num = a + 1; ap.buttondescription = md.answers[a].text; ap.intercellswidth = 27; ap.cellshight = 25; ap.cellswidth = 25; ap.toplx = 0; ap.toply = 0; ap.toprx = 0; ap.topry = 0; ap.blx = 0; ap.bly = 0; ap.brx = 0; ap.bry = 0; cellsparam cp = cellsparam.Createcellsparam(0, ap.ida); cp.description = "Да"; cp.buttonsescription = "Да"; cp.mark = 1; cellsparam cp1 = cellsparam.Createcellsparam(0, ap.ida); cp1.description = "Нет"; cp1.buttonsescription = "Нет"; cp1.mark = 0; ap.cellsparams.Add(cp); ap.cellsparams.Add(cp1); tst.answersparams.Add(ap); } // pb.testsparams.AddObject(tst); // pb.SaveChanges(); }
public void Next() { if (_currentaparam.num != 88) { testsparam t = _ge.testsparams.First(tp => tp.idt == (int)EnumPTests.Leongard); t.answersparams.Load(); _currentaparam = t.answersparams.First(ap => ap.num == _currentaparam.num + 1); _ktc.lb_caption.Text = _currentaparam.buttondescription; _currentaparam.cellsparams.Load(); cellsparam c1 = _currentaparam.cellsparams.First(cp => cp.description.Trim() == "Да"); _ktc.lb_1.Text = "1. " + c1.buttonsescription; cellsparam c2 = _currentaparam.cellsparams.First(cp => cp.description.Trim() == "Нет"); _ktc.lb_2.Text = "2. " + c2.buttonsescription; } else { this.Stop(); } }
public void SetTollTips() { for (int controlindex = 0; controlindex < answers_grid.AnswersCount; controlindex++) { answersparam aparam = _testparam.answersparams.First(a => a.num == answers_grid[controlindex].Answer.Id); string label = aparam.buttondescription.Trim(); if (answers_grid[controlindex].Answer.ContentDescription.Trim() != "") { string celldescription = answers_grid[controlindex].Answer.ContentDescription.Trim(); cellsparam c = _ge.cellsparams.First(cp => cp.ida == aparam.ida & cp.description == celldescription); label += ": \n" + c.buttonsescription; } else { label += ": \n нет ответа"; } RemarkToolTip.SetToolTip(answers_grid[controlindex].btn_ans, label); } }
public static int GetMark(pBaseEntities GlobalEntities, LAnswers LAnswers, List <int> AnswersYes, List <int> AnswersNo) { int m = 0; testsparam t = GlobalEntities.testsparams.First(tp => tp.idt == (int)EnumPTests.Leongard); t.answersparams.Load(); for (int i = 0; i < AnswersYes.Count; i++) { answersparam a = t.answersparams.First(ap => ap.num == AnswersYes[i]); a.cellsparams.Load(); if (LAnswers[(int)a.num - 1].SelectedCellDescription.Trim() != "") { cellsparam c = a.cellsparams.First(cp => cp.description.Trim() == LAnswers[(int)a.num - 1].SelectedCellDescription.Trim()); if (c.mark == 1) { m++; } } } for (int i = 0; i < AnswersNo.Count; i++) { answersparam a = t.answersparams.First(ap => ap.num == AnswersNo[i]); a.cellsparams.Load(); if (LAnswers[(int)a.num - 1].SelectedCellDescription.Trim() != "") { cellsparam c = a.cellsparams.First(cp => cp.description.Trim() == LAnswers[(int)a.num - 1].SelectedCellDescription.Trim()); if (c.mark == 0) { m++; } } } return(m); }
public static int GetMark(pBaseEntities GlobalEntities, MDAnswers mdAnswers, List <int> answers) { int m = 0; testsparam t = GlobalEntities.testsparams.First(tp => tp.idt == (int)EnumPTests.Modul2); t.answersparams.Load(); for (int i = 0; i < answers.Count; i++) { answersparam a = t.answersparams.First(ap => ap.num == answers[i]); a.cellsparams.Load(); if (mdAnswers[(int)a.num - 1].SelectedCellDescription.Trim() != "") { cellsparam c = a.cellsparams.First(cp => cp.description.Trim() == mdAnswers[(int)a.num - 1].SelectedCellDescription.Trim()); m += (int)c.mark; } } return(m); }
public void GetSten() { testsparam t = _ge.testsparams.First(tp => tp.idt == (int)EnumPTests.Modul2); t.answersparams.Load(); for (int i = 0; i < _ans.Count; i++) { answersparam a = t.answersparams.First(ap => ap.num == _ans[i]); a.cellsparams.Load(); if (_answers[_ans[i] - 1].SelectedCellDescription.Trim() != "") { cellsparam selectedcell = a.cellsparams.First(cell => cell.description == _answers[_ans[i] - 1].SelectedCellDescription); if (selectedcell.mark != 0) { _sten++; } } } }
public void GetResult() { if (_sten == 0) { _result = "Расстройств не выявлено."; } else if (_sten == _ans.Count) { _result = "Можно говорить о соответствии диагностическим критериям рубрике F40.2 «Изолированные фобии»"; } else { _result += " Контрольные вопросы шкалы: "; testsparam t = _ge.testsparams.First(tp => tp.idt == (int)EnumPTests.Modul2); t.answersparams.Load(); for (int i = 0; i < _ans.Count; i++) { answersparam a = t.answersparams.First(ap => ap.num == _ans[i]); a.cellsparams.Load(); if (_answers[_ans[i] - 1].SelectedCellDescription.Trim() != "") { cellsparam selectedcell = a.cellsparams.First(cell => cell.description == _answers[_ans[i] - 1].SelectedCellDescription); if (selectedcell.mark != 0) { _result += a.buttondescription + ": " + selectedcell.description; if (i != _ans.Count - 1) { _result += ", "; } } } } } }
private void pb_formimage_MouseMove(object sender, MouseEventArgs e) { //TODO:центрирование подсказки по центру if (chb_onofdesc.Checked == true) { try { int i = ag_answers.Answers.GetAnswerIndex(new Point(e.X, e.Y)); int ci = ag_answers.Answers.GetCellIndex(new Point(e.X, e.Y)); string f = ag_answers.Answers.GetCellDescription(new Point(e.X, e.Y)); if (i != -1) { if (i != _toolaindex || ci != _toolcindex) { _toolaindex = i; _toolcindex = ci; answersparam a = _ge.answersparams.First(ap => ap.idt == _testid & ap.num == i + 1); cellsparam c = _ge.cellsparams.First(cp => cp.ida == a.ida & cp.description == f.Trim()); RemarkToolTip.SetToolTip(this.pb_formimage, a.buttondescription + "\nОтвет:" + c.buttonsescription); } } else { RemarkToolTip.Hide(this.pb_formimage); } } catch { RemarkToolTip.SetToolTip(this.pb_formimage, "Не удалось получить описание вопроса"); } } else { RemarkToolTip.Hide(this.pb_formimage); } }