Пример #1
0
        private void doStoreVisit(NextScreen nextScreen)
        {
            long visitID = 0;
            if (visit != null){
                visitID = visit.Id;
            }

            NewVisitStoreEventArgs e2 = new NewVisitStoreEventArgs(
                new VisitData(visitID,textBoxCauseOfVisit.Text, textBoxStatusLocalis.Text, textBoxDiagnosis.Text,
                textBoxProcedure.Text,textBoxTherapy.Text,this.currentPatient.Id,DateTime.Now,
                textBoxAnesthesiology.Text, textBoxUltrasound.Text, textBoxBlooddiagnostic.Text,
                textBoxTodo.Text, textBoxRadiodiagnostics.Text), nextScreen);
            Store(this, e2);
            Clear();
        }
Пример #2
0
        private void visitStore(object sender, NewVisitStoreEventArgs e)
        {
            VisitData vdata = e.Visit;
            if (vdata.Id == 0) {   // new Visit
                vdata.PatientId = currentPatient.Id;
                patComp.InsertVisit(e.Visit);
            } else { // change Visit
                patComp.UpdateVisit(e.Visit);
            }
            this.Controls.Remove(newVisit);
            putPatientSearchControl(currentPatient);

            switch (e.NextScreen) {
                case NextScreen.NextAction:
                    //this.preparePatientSearchSubControlChange();
                    this.nextActionControl.Location = getPatientSearchSubMaskLocation();
                    this.Controls.Add(this.nextActionControl);
                    this.nextActionControl.init(currentPatient);
                    break;
                case NextScreen.NextActionAndPlanOP:
                    this.nextActionControl.Location = getPatientSearchSubMaskLocation();
                    this.Controls.Add(this.nextActionControl);
                    this.nextActionControl.init(currentPatient);
                    doPlanOperation(currentPatient);
                    break;
                case NextScreen.ChagePatient:
                    this.newPatientControl.Enabled = true;
                    this.newPatientControl.Location = getPatientSearchSubMaskLocation();
                    this.newPatientControl.Init(currentPatient);
                    this.Controls.Add(this.newPatientControl);
                    this.newPatientControl.TextBoxSurname.Focus();
                    this.newPatientControl.TextBoxSurname.Select(0, 0);
                    break;
                case NextScreen.Undefined:
                    this.patientSearchControl.ListViewPatients.Focus();
                    break;
                case NextScreen.AddWaitingList:
                    PatientData patient = this.patComp.FindPatientById(e.Visit.PatientId);
                    patient.WaitListStartDate = DateTime.Now;
                    this.patComp.UpdatePatient(patient);
                    this.patientSearchControl.ListViewPatients.Focus();
                    break;
                default:
                    break;
            }
        }