Example #1
0
        private void comboBoxPatientId_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBoxPatientId.SelectedIndex != -1)
            {
                PatientKey key = comboBoxPatientId.SelectedItem as PatientKey;

                textBoxIssuerOfPatientId.Text = key.IssurerOfPatientId;
                GetPatientInformation();
            }
        }
Example #2
0
        public override void OnSetActive(object sender, WizardCancelEventArgs e)
        {
            base.OnSetActive(sender, e);
            GetWizard().Option1Caption = "Clear";
            if (_PatientKeys == null)
            {
                ProgressDialog     dlgProgresss = new ProgressDialog();
                CustomBrokerClient client       = GetWizard().Tag as CustomBrokerClient;
                List <string>      ids          = null;

                dlgProgresss.Title       = "Find";
                dlgProgresss.Description = "Getting list of patient ids";
                dlgProgresss.Action      = () =>
                {
                    ids = client.GetPatientIDs();
                };

                if (dlgProgresss.ShowDialog(this) == DialogResult.OK)
                {
                    _PatientKeys = new List <PatientKey>();
                    foreach (string id in ids)
                    {
                        string[]   info = id.Split(';');
                        PatientKey key  = new PatientKey()
                        {
                            PatientId = info[0], IssurerOfPatientId = info[1]
                        };

                        _PatientKeys.Add(key);
                        comboBoxPatientId.Items.Add(key);
                    }
                }
                if (dlgProgresss.Exception != null)
                {
                    string errorMessage = dlgProgresss.Exception.Message;
                    if (errorMessage.Contains("There was no endpoint listening at"))
                    {
                        string append = string.Format("\n\nThis can happen if the '{0}' listening service is not running.  To start '{0}' listening service:\n* Run 'CSLeadtools.Dicom.Server.Manager_Original.exe'\n* Click the double-green arrow (Start All Servers)", _worklistServer);
                        errorMessage += append;
                    }
                    Messager.ShowError(this, errorMessage);
                }
            }
        }