예제 #1
0
        public LabolatoryExaminantion(int IdPatient, string IdVisit, int procedure1) // procedure informuje o trybie formatki czy edytowalna (zlec badanie )- "2" czy tylko pokazujemy badanka - "1"
        {
            InitializeComponent();
            if (procedure1 == 1)
            {
                button2.Visible = false;
                button3.Visible = false;
            }


            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;


            int idVisitInt = int.Parse(IdVisit);

            ExaminationsSearchCriteria examSearchCriteria = new ExaminationsSearchCriteria();

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

            Mainlist.Items.Clear();

            foreach (var order in a)
            {
                ListViewItem lvi = new ListViewItem(order.laboratoryExaminationTable.Id_Examination.ToString());
                lvi.SubItems.Add(order.examDictionaryTable.Name);                            //typ badania
                lvi.SubItems.Add(order.laboratoryExaminationTable.State);                    //stan badania
                lvi.SubItems.Add(order.laboratoryExaminationTable.Comments_Doctor);          //notatka doktora
                lvi.SubItems.Add(order.laboratoryExaminationTable.Date_Of_Order.ToString()); //data wykonania

                Mainlist.Items.Add(lvi);
            }
        }
예제 #2
0
        public ShowLabExamination(int IDPatient, string IDVisit, string IDExamination, int procedure1) // procedura jeśłi 1 - wchodzi dla popatrzenia sobie z "pokaż" wizyty
        {
            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;
            }

            textBox10.Text = IDExamination;

            //if (procedure == 1)
            //{
            //    button1.Visible = true;
            //}
            //else
            //{
            //    button1.Visible = false;
            //}

            int idVisitInt = int.Parse(IDVisit);

            ExaminationsSearchCriteria examSearchCriteria = new ExaminationsSearchCriteria();

            examSearchCriteria.setAppointmentId(idVisitInt);
            examSearchCriteria.setPatientId(IDPatient);
            var a = SQLDoc.GetLaboratoryExamination(examSearchCriteria);

            foreach (var order in a)
            {
                textBox10.Text = order.laboratoryExaminationTable.Id_Examination.ToString();
                textBox6.Text  = order.examDictionaryTable.Name;                    //typ badania
                textBox8.Text  = order.laboratoryExaminationTable.State;            //stan badania
                textBox5.Text  = order.laboratoryExaminationTable.Result;           //wynik badania
                textBox9.Text  = order.laboratoryExaminationTable.Comments_Doctor;  //uwagi doktora
                textBox7.Text  = order.laboratoryExaminationTable.Comments_Man_Lab; //uwagi kierownika
            }
        }
        public NewLabolatoryExaminationcs(int IDP, string IDV, int procedure1, int idexamination) // procedure = 2 -> edytuj, procedure = 1 -> nowe
        {
            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;
            }

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

                ExaminationsSearchCriteria examinationSearchCriteria = new ExaminationsSearchCriteria();
                examinationSearchCriteria.setExaminationId(idexamination);
                var resExa = SQLDoc.GetLaboratoryExamination(examinationSearchCriteria);
                foreach (var order in resExa)
                {
                    comboBox1.Text = order.examDictionaryTable.Name;
                    textBox5.Text  = order.laboratoryExaminationTable.Comments_Doctor;
                }
            }

            var result = SQLDoc.GetLabolatoryExamination();

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