private void DummyAddVisitPractitioner()
        {
            try
            {
                Platform.GetService <IExternalPractitionerAdminService>(
                    delegate(IExternalPractitionerAdminService service)
                {
                    ListExternalPractitionersResponse findResponse = service.ListExternalPractitioners(new ListExternalPractitionersRequest("Who", ""));
                    ExternalPractitionerSummary practitioner       = findResponse.Practitioners[0];

                    VisitPractitionerDetail vp = new VisitPractitionerDetail();

                    vp.Role = CollectionUtils.SelectFirst(_visitPractitionerRoleChoices,
                                                          delegate(EnumValueInfo e) { return(e.Code == "RF"); });
                    vp.Practitioner = practitioner;
                    vp.StartTime    = Platform.Time;

                    _visit.Practitioners.Add(vp);
                });
            }
            catch (Exception e)
            {
                ExceptionHandler.Report(e, SR.ExceptionCannotAddVisitPractitioner, this.Host.DesktopWindow,
                                        delegate
                {
                    this.ExitCode = ApplicationComponentExitCode.Error;
                    this.Host.Exit();
                });
            }
        }
Exemple #2
0
        /// <summary>
        /// Gets the list of items to show in the table, according to the specifed first and max items.
        /// </summary>
        /// <returns></returns>
        protected override IList <ExternalPractitionerSummary> ListItems(ListExternalPractitionersRequest request)
        {
            ListExternalPractitionersResponse listResponse = null;

            Platform.GetService <IExternalPractitionerAdminService>(service =>
            {
                request.QueryItems = true;
                request.FirstName  = _firstName;
                request.LastName   = _lastName;
                listResponse       = service.ListExternalPractitioners(request);
            });

            return(listResponse.Practitioners);
        }