public EmployeeModifyQuestionnareForm(Questionnare questionnaire, Employee employee)
        {
            InitializeComponent();
            currentEmployeeInHere      = employee;
            currentQuestionnaireInHere = questionnaire;

            // 판넬에 문진표 작성 내용 출력, 문진표 출력 내용은 CustomerQustionnareControl.cs 참고 <<--- TextBox로 대체함

            // 환자 이름 및 문진표 내용 타이틀 출력
            txbBoard.Text =
                $"환자이름: {currentQuestionnaireInHere.CustomerName}\n\n" +
                $"문진표 내용:\n\n{printQuestionnaires(currentQuestionnaireInHere)}";

            //진단내용 작성기능 사용 권한 부여
            if (currentEmployeeInHere.PositionID == 3) // DocrotID == Employee.PositionID 간호사는 3, 간호사는 진단내용 작성 불가
            {
                txbDiagnosis.Enabled = false;
            }
            else // 병원장(DoctorID = 1) 의사(DoctorID = 2) 는 작성가능
            {
                txbDiagnosis.Enabled = true;
            }

            //기존 작성된 진단 내용이 있을 시, 진단내용 출력
            if (questionnaire.Diagnosis != null)
            {
                txbDiagnosis.Text = questionnaire.Diagnosis;
            }
        }
示例#2
0
        // 상단 패널(툴바) 홈버튼 클릭 이벤트
        private void btnHome_Click(object sender, EventArgs e)
        {
            // 초기 화면으로 돌아가기
            ConnectedCustomer   = null;
            CreatedQuestionnare = new Questionnare();

            CustomerLoginControl customerLoginControl = new CustomerLoginControl();

            OpenLoginControl(customerLoginControl);
        }
示例#3
0
        // CustomerDepartmentChoiceControl에서 CustomerQuestionnareControl 로드하는 이벤트 핸들러
        private void CustomerDepartmentChoiceControl_DepartmentToQuestionnare(object sender, CustomerDepartmentChoiceControl.DepartmentToQuestionnareEventArgs e)
        {
            CreatedQuestionnare = new Questionnare {
                Customer = ConnectedCustomer
            };
            CreatedQuestionnare.DepartmentID = e.DepartmentID;

            // CustomerDepartmentChoiceControl 이벤트 핸들러 등록
            e.CustQuestionnare.QuestionnareConfirm += CustomerQuestionnareControl_QuestionnareConfirm;

            // departmentChoice 불러오기
            CallUserControl(e.CustQuestionnare);
        }
        //문제 출력 함수
        private string printQuestionnaires(Questionnare currentQuestionnare)
        {
            questionnairesForQuery = currentQuestionnare;
            string unionQuestions = "";

            using (var context = DKClinicEntities.Create())
            {
                var query = from x in context.Responses
                            where x.QuestionnareID == questionnairesForQuery.QuestionnareID
                            orderby x.Question.Index
                            select new { questionIndex    = x.Question.Index,
                                         questionItem     = x.Question.Item,
                                         questionChoices  = x.Question.Choices,
                                         questionType     = x.Question.Type,
                                         questionResponse = x };

                var list = query.ToList();

                foreach (var item in list)
                {
                    unionQuestions += $" {item.questionIndex}. {item.questionItem}\n";

                    if (item.questionType != 1)
                    {
                        string[] choices = item.questionChoices.Split(',');
                        for (int i = 0; i < choices.Length; i++)
                        {
                            unionQuestions += $" {i + 1}) {choices[i]}\n";
                        }
                    }
                    unionQuestions += "\n";

                    unionQuestions += $" 답안 => {item.questionResponse.Answer}\n\n";
                }

                return(unionQuestions);
            }
        }
示例#5
0
 void Start()
 {
     questionnare = GetComponentInParent <Questionnare>();
     qText        = this.GetComponentInParent <Question>().QuestionText;
 }
示例#6
0
    public int insertData()
    {
        try
        {
            vitalusEntities objvt = new vitalusEntities();
            Questionnare    objq  = new Questionnare();

            //firstTab
            objq.Login_id      = Convert.ToInt16(Session["LoginId"].ToString());
            objq.Firstname     = firstn.Value;
            objq.Middlename    = middlen.Value;
            objq.Lastname      = lastn.Value;
            objq.Weight        = Convert.ToInt32(weight.Value);
            objq.Age           = Convert.ToInt32(age.Value);
            objq.Gender        = gender.SelectedItem.Value;
            objq.height_feet   = Convert.ToInt32(heightinfeet.Value);
            objq.height_inches = Convert.ToInt32(heightinches.Value);
            objq.DateofBirth   = DOB.Value;
            ////SecondTab
            objq.HighBloodPressure = HighBlood.SelectedValue;
            objq.HeartDisease      = HeartDisease.SelectedValue;
            objq.Diabetes          = Diabetes.SelectedValue;
            objq.RestLessSyndrome  = RestlessLeg.SelectedValue;
            objq.SleepApnea        = SleepApnea.SelectedValue;
            objq.Insomnia          = Insomni.SelectedValue;
            objq.Narcolepsy        = Narcolepsy.SelectedValue;
            objq.Depression        = Depression.SelectedValue;
            objq.Stroke            = Stroke.SelectedValue;
            objq.AMHeadaches       = Headaches.SelectedValue;
            ////ThirdTab
            objq.SittingandReading = Convert.ToInt32(Sittingandreading.SelectedValue);
            objq.WatchingTV        = Convert.ToInt32(WatchingTV.SelectedValue);
            objq.Sittinginactive   = Convert.ToInt32(Sittinginactive.SelectedValue);
            objq.AsPassenger       = Convert.ToInt32(passenger.SelectedValue);
            objq.LyingDown         = Convert.ToInt32(afternoon.SelectedValue);
            objq.SittingTalking    = Convert.ToInt32(Sittingandtalking.SelectedValue);
            objq.SittingQuietly    = Convert.ToInt32(Sittingquietly.SelectedValue);
            objq.InCar             = Convert.ToInt32(whilestopped.SelectedValue);
            ////FourthTab

            objq.DifficultyFallingaseelp = fallingasleep.SelectedValue;
            objq.DifficultyStayingaseelp = stayingasleep.SelectedValue;
            objq.ProblemWaking           = problemwakingup.SelectedValue;
            objq.SleepProblem            = sleepproblem.SelectedValue;
            objq.DrinkAlcohol            = drinkalcoholic.SelectedValue;
            objq.Beverages = beverage.SelectedValue;

            ////FifthTab
            objq.LegsAtNight    = legsatnight.SelectedValue;
            objq.Vivid          = vivid.SelectedValue;
            objq.Snored         = snored.SelectedValue;
            objq.Choking        = choking.SelectedValue;
            objq.StopBreathing  = stopbreathing.SelectedValue;
            objq.Medication     = medication.SelectedValue;
            objq.OvertheCounter = overthecounter.SelectedValue;

            ////SixthTab
            objq.Ambien            = Ambien.SelectedValue;
            objq.Lunesta           = Lunesta.SelectedValue;
            objq.Halcion           = Halcion.SelectedValue;
            objq.Rozerem           = Rozerem.SelectedValue;
            objq.Sonata            = Sonata.SelectedValue;
            objq.Restoril          = Restoril.SelectedValue;
            objq.Intermezzo        = Intermezzo.SelectedValue;
            objq.Silenor           = Silenor.SelectedValue;
            objq.Xanax             = Xanax.SelectedValue;
            objq.NarcoticForPain   = Narcotic.SelectedValue;
            objq.HighBloodPressure = HighBlood.SelectedValue;
            objq.Steroid           = Steroid.SelectedValue;
            objq.HeartDisease      = HeartDisease.SelectedValue;
            objq.AntiDepressant    = Antidepressant.SelectedValue;
            objq.Parkinson         = Parkinson.SelectedValue;
            objq.Antihistamines    = Antihistamines.SelectedValue;
            objq.Anitanxiety       = anxiety.SelectedValue;
            objq.Simulant          = Stimulant.SelectedValue;

            objvt.Questionnares.Add(objq);
            objvt.SaveChanges();
            string script3 = "alert('Successfully Updated!');";
            ScriptManager.RegisterStartupScript(this, GetType(),
                                                "ServerControlScript", script3, true);
            return(1);
        }
        catch (Exception ex)
        {
            string script3 = "alert('All Fields Are Mandatory');";
            ScriptManager.RegisterStartupScript(this, GetType(),
                                                "ServerControlScript", script3, true);
            return(0);
        }
    }