Esempio n. 1
0
        private void bindingSourceExaminations_CurrentChanged(object sender, EventArgs e)
        {
            examination = bindingSourceExaminations.Current as Examination;

            if (examination.IsNull())
            {
                return;
            }
            bindingSourceMessages.DataSource         = null;
            bindingSourcePastExaminations.DataSource = null;
            if (open)
            {
                Extensions.Extensions.ShowWaitForm(description: "Sayfa yenileniyor...");
            }

            labelControlNameSurname.Text  = examination.Patient.NameSurname;
            lookUpEditDiagnosis.EditValue = examination.DiagnosisId;
            textEditNextDay.Text          = examination.NextTime.IsNull()
                ? String.Empty
                : (Convert.ToDateTime(examination.NextTime) - examination.Time).Days.ToString();
            checkEditCanSendMessage.Checked = examination.CanSendMessage;
            textBoxNote.Text = examination.DoctorNote;

            groupControlCurrentExamination.Text = String.Format("Şuanki Muayene Bilgisi ({0} Muayene)",
                                                                examination.IsActive ? "Açık" : "Kapalı");

            LaboratoryRequestSolClient client = Extensions.Extensions.GetLaboratoryRequest();

            bindingSourceLabResult.DataSource = client.LaboratoryRequests(examination.Id, true);
            client.Close();
            if (open)
            {
                SplashScreenManager.CloseForm(false);
            }
        }
Esempio n. 2
0
        private void barButtonItemSave_ItemClick(object sender, ItemClickEventArgs e)
        {
            int[] selectedRows = gridView1.GetSelectedRows();

            List <int> selectedItems =
                selectedRows.Select(i => (gridView1.GetRow(i) as LaboratoryRequestType).Id).ToList();

            LaboratoryRequestItem[] requestItems = selectedItems.Select(item => new LaboratoryRequestItem
            {
                LaboratoryRequestId     = 0,
                LaboratoryRequestTypeId = item
            }).ToArray();

            Extensions.Extensions.ShowWaitForm(description: "Laboratuvar isteği kaydediliyor...");

            LaboratoryRequestSolClient client  = Extensions.Extensions.GetLaboratoryRequest();
            LaboratoryRequest          request = new LaboratoryRequest
            {
                ExaminationId          = examinationId,
                IsActive               = true,
                LaboratoryRequestItems = requestItems
            };

            Result = client.Insert(request);

            SplashScreenManager.CloseForm(false);

            Extensions.Extensions.ProcessResultMessage("Laboratuvar isteği oluşturma", Result);
            Close();
        }
Esempio n. 3
0
        public XtraFormExamDetails(Examination examination)
        {
            InitializeComponent();
            labelControlDate.Text = examination.Time.ToString("D");
            if (examination.NextTime != null)
            {
                labelControlNextDate.Text = examination.NextTime.IsNotNull()
                    ? examination.NextTime.Value.ToString("D")
                    : String.Empty;
            }
            labelControlDiagnosis.Text = examination.Diagnosis.DisplayName;
            textBoxDoctorNote.Text     = examination.DoctorNote;

            PrescriptionSolClient client = Extensions.Extensions.GetPrescriptionService();

            bindingSourcePrescription.DataSource = client.GetPrescriptionItems(examination.Id);

            LaboratoryRequestSolClient laboratoryRequest = Extensions.Extensions.GetLaboratoryRequest();

            bindingSourceLabRequests.DataSource = laboratoryRequest.LaboratoryRequests(examination.Id, true);

            laboratoryRequest.Close();
            client.Close();
            SplashScreenManager.CloseForm(false);
            opensplash = true;
        }
Esempio n. 4
0
        public static LaboratoryRequestSolClient GetLaboratoryRequest()
        {
            LaboratoryRequestSolClient client;

            try
            {
                client = new LaboratoryRequestSolClient(binding,
                                                        new EndpointAddress(String.Format(GlobalVariables.ServiceRoot + "/{0}", "LaboratoryRequest.svc")));
                client.Select(-1);
            }
            catch (Exception)
            {
                bool b = Program.TestService();
                if (!b)
                {
                    Application.Exit();
                }
                client = new LaboratoryRequestSolClient(binding,
                                                        new EndpointAddress(String.Format(GlobalVariables.ServiceRoot + "/{0}", "LaboratoryRequest.svc")));
            }

            return(client);
        }