Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string examCode = "";
            ExaminationsSearchCriteria examinationSearchCriteria = new ExaminationsSearchCriteria();

            examinationSearchCriteria.setExaminationName(comboBox1.Text);
            var resExa = SQLDoc.GetPhysicalExamination(examinationSearchCriteria);

            foreach (var order in resExa)
            {
                examCode = order.examDictionaryTable.Exam_Code;
            }

            if (examCode != "" && textBox5.Text != "")
            {
                int idAppointment = Int32.Parse(IDVis);
                int idExamination = Int32.Parse(textBox4.Text);
                SQLDoc.updatePhysicalExamination(idExamination, examCode, textBox5.Text);
                Panel P = new Panel();
                P.Controls.Clear();
                this.Hide();
                this.Parent.Controls.Add(new PhysicalExamination(idpat, IDVis, procedure));
            }
            else
            {
                MessageBox.Show("Wymagane dane: rodzaj badania, wynik");
            }
        }
        public ShowPhysicalExamination(int IDPatient, string IDVisit, string IDExamination, int procedure1)  // w zależności czy pokazujemy wizyty czy obsługujemy wizytę
        {
            InitializeComponent();

            IDVis         = IDVisit;
            idpat         = IDPatient;
            procedure     = procedure1;
            textBox4.Text = IDExamination;
            PatientsSearchCriteria searchCriteria = new PatientsSearchCriteria();

            searchCriteria.setPatientId(IDPatient);

            var res = SQLDoc.GetPatient(searchCriteria);

            foreach (var order in res)
            {
                textBox1.Text = order.patientTable.Name;
                textBox2.Text = order.patientTable.Surname;
                textBox3.Text = order.patientTable.PESEL;
            }

            // textBox6 rodzaj badania
            // textBox5 wynik

            ExaminationsSearchCriteria examSearchCriteria = new ExaminationsSearchCriteria();

            examSearchCriteria.setAppointmentId(Int32.Parse(IDVisit));
            examSearchCriteria.setPatientId(IDPatient);
            var a = SQLDoc.GetPhysicalExamination(examSearchCriteria);

            textBox6.Text = a.First().examDictionaryTable.Name;
            textBox5.Text = a.First().physicalExaminationTable.Result;
        }
        public NewPhysicalExaminationcs(int IDP, string IDV, int procedure1) //procedure- ogarnia kiedy pokazujemy wizyte a kiedy obsługujemy - 1 -> pokazujemy
        {
            InitializeComponent();

            IDVis     = IDV;
            idpat     = IDP;
            procedure = procedure1;

            PatientsSearchCriteria searchCriteria = new PatientsSearchCriteria();

            searchCriteria.setPatientId(IDP);

            var res = SQLDoc.GetPatient(searchCriteria);

            foreach (var order in res)
            {
                textBox1.Text = order.patientTable.Name;
                textBox2.Text = order.patientTable.Surname;
                textBox3.Text = order.patientTable.PESEL;
            }

            var result = SQLDoc.GetPhysicalExamination();

            foreach (var order in result)
            {
                comboBox1.Items.Add(order.Name);
            }
        }
        public PhysicalExamination(int IdPatient, string IdVisit, int procedure1)  // procedure informuje o trybie formatki czy edytowalna (zlec badanie i edytuj)- "2" czy tylko pokazujemy badanka - "1"
        {
            InitializeComponent();


            IDVis     = IdVisit;
            idpat     = IdPatient;
            procedure = procedure1;

            PatientsSearchCriteria searchCriteria = new PatientsSearchCriteria();

            searchCriteria.setPatientId(IdPatient);

            var res = SQLDoc.GetPatient(searchCriteria);

            foreach (var order in res)
            {
                textBox1.Text = order.patientTable.Name;
                textBox2.Text = order.patientTable.Surname;
                textBox3.Text = order.patientTable.PESEL;
            }

            Mainlist.FullRowSelect = true;
            Mainlist.GridLines     = true;

            if (procedure == 1)
            {
                button2.Visible = false;
                button3.Visible = false;
            }

            int idVisitInt = int.Parse(IdVisit);

            ExaminationsSearchCriteria examSearchCriteria = new ExaminationsSearchCriteria();

            examSearchCriteria.setAppointmentId(idVisitInt);
            examSearchCriteria.setPatientId(IdPatient);
            var a = SQLDoc.GetPhysicalExamination(examSearchCriteria);

            Mainlist.Items.Clear();

            foreach (var order in a)
            {
                ListViewItem lvi = new ListViewItem(order.physicalExaminationTable.Id_Examination.ToString());
                lvi.SubItems.Add(order.examDictionaryTable.Name);        //typ badania
                lvi.SubItems.Add(order.physicalExaminationTable.Result); //wynik badania

                Mainlist.Items.Add(lvi);
            }
        }
Beispiel #5
0
        public EditPhysicalExamination(int IDP, string IDV, int procedure1, int idexamination) // proce4dura ułatwia ogarniecie kiedy można edytować powiazane formatki - 1 -> oglądamy
        {
            InitializeComponent();
            IDVis         = IDV;
            idpat         = IDP;
            procedure     = procedure1;
            idExamination = idexamination;
            PatientsSearchCriteria searchCriteria = new PatientsSearchCriteria();

            searchCriteria.setPatientId(IDP);

            var res = SQLDoc.GetPatient(searchCriteria);

            foreach (var order in res)
            {
                textBox1.Text = order.patientTable.Name;
                textBox2.Text = order.patientTable.Surname;
                textBox3.Text = order.patientTable.PESEL;
            }

            if (idexamination != -1)
            {
                textBox4.Text = idexamination.ToString();

                ExaminationsSearchCriteria examinationSearchCriteria = new ExaminationsSearchCriteria();
                examinationSearchCriteria.setExaminationId(idexamination);
                var resExa = SQLDoc.GetPhysicalExamination(examinationSearchCriteria);
                foreach (var order in resExa)
                {
                    comboBox1.Text = order.examDictionaryTable.Name;
                    textBox5.Text  = order.physicalExaminationTable.Result;
                }
            }


            var result = SQLDoc.GetPhysicalExamination();

            foreach (var order in result)
            {
                comboBox1.Items.Add(order.Name);
            }
        }