示例#1
0
		public AttachmentSummary(EnumValueInfo category, StaffSummary attachedBy, DateTime attachedTime, AttachedDocumentSummary document)
		{
			this.Category = category;
			this.AttachedBy = attachedBy;
			this.AttachedTime = attachedTime;
			this.Document = document;
		}
        private StaffSummary GetUniqueAssignedInterpreter(Order order)
        {
            StaffSummary uniqueAssignedInterpreter = null;
            var          staffAssembler            = new StaffAssembler();

            // establish whether there is a unique assigned interpreter for all procedures
            var interpreters = new HashedSet <Staff>();

            foreach (var procedure in order.Procedures)
            {
                var pendingInterpretationStep = procedure.GetProcedureStep(
                    ps => ps.Is <InterpretationStep>() && ps.State == ActivityStatus.SC);

                if (pendingInterpretationStep != null && pendingInterpretationStep.AssignedStaff != null)
                {
                    interpreters.Add(pendingInterpretationStep.AssignedStaff);
                }
            }

            if (interpreters.Count == 1)
            {
                uniqueAssignedInterpreter = staffAssembler.CreateStaffSummary(
                    CollectionUtils.FirstElement(interpreters),
                    this.PersistenceContext);
            }

            return(uniqueAssignedInterpreter);
        }
        public ModalityPerformedProcedureStepDetail CreateModalityPerformedProcedureStepDetail(ModalityPerformedProcedureStep mpps, IPersistenceContext context)
        {
            var assembler = new ModalityProcedureStepAssembler();

            // include the details of each MPS in the mpps summary
            var mpsDetails = CollectionUtils.Map(mpps.Activities,
                                                 (ProcedureStep mps) => assembler.CreateProcedureStepSummary(mps.As <ModalityProcedureStep>(), context));

            var dicomSeriesAssembler = new DicomSeriesAssembler();
            var dicomSeries          = dicomSeriesAssembler.GetDicomSeriesDetails(mpps.DicomSeries);

            StaffSummary mppsPerformer = null;
            var          performer     = mpps.Performer as ProcedureStepPerformer;

            if (performer != null)
            {
                var staffAssembler = new StaffAssembler();
                mppsPerformer = staffAssembler.CreateStaffSummary(performer.Staff, context);
            }

            return(new ModalityPerformedProcedureStepDetail(
                       mpps.GetRef(),
                       EnumUtils.GetEnumValueInfo(mpps.State, context),
                       mpps.StartTime,
                       mpps.EndTime,
                       mppsPerformer,
                       mpsDetails,
                       dicomSeries,
                       ExtendedPropertyUtils.Copy(mpps.ExtendedProperties)));
        }
        internal static void UpdateUserAccount(string userName, StaffSummary staff)
        {
            if (!string.IsNullOrEmpty(userName))
            {
                Platform.GetService <IUserAdminService>(
                    delegate(IUserAdminService service)
                {
                    // check if the user account exists
                    ListUsersRequest request = new ListUsersRequest();
                    request.UserName         = userName;
                    request.ExactMatchOnly   = true;
                    UserSummary user         = CollectionUtils.FirstElement(service.ListUsers(request).Users);

                    if (user != null)
                    {
                        // modify the display name on the user account
                        UserDetail detail = service.LoadUserForEdit(
                            new LoadUserForEditRequest(userName)).UserDetail;
                        detail.DisplayName = (staff == null) ? null : staff.Name.ToString();

                        service.UpdateUser(new UpdateUserRequest(detail));
                    }
                });
            }
        }
        /// <summary>
        /// Called by the host to initialize the application component.
        /// </summary>
        public override void Start()
        {
            _staffLookupHandler = new StaffLookupHandler(this.Host.DesktopWindow, this.StaffTypes);
            _staff = !string.IsNullOrEmpty(this.DefaultSupervisorID) ? GetStaffByID(this.DefaultSupervisorID) : null;

            base.Start();
        }
示例#6
0
 public ReportPartDetail(
     EntityRef reportPartRef,
     int index,
     bool isAddendum,
     EnumValueInfo status,
     DateTime creationTime,
     DateTime? preliminaryTime,
     DateTime? completedTime,
     DateTime? cancelledTime,
     StaffSummary supervisor,
     StaffSummary interpretedBy,
     StaffSummary transcribedBy,
     StaffSummary transcriptionSupervisor,
     StaffSummary verifiedBy,
     EnumValueInfo transcriptionRejectReason,
     Dictionary<string, string> extendedProperties)
 {
     this.ReportPartRef = reportPartRef;
     this.Index = index;
     this.IsAddendum = isAddendum;
     this.Status = status;
     this.CreationTime = creationTime;
     this.PreliminaryTime = preliminaryTime;
     this.CompletedTime = completedTime;
     this.CancelledTime = cancelledTime;
     this.Supervisor = supervisor;
     this.InterpretedBy = interpretedBy;
     this.TranscribedBy = transcribedBy;
     this.TranscriptionSupervisor = transcriptionSupervisor;
     this.VerifiedBy = verifiedBy;
     this.TranscriptionRejectReason = transcriptionRejectReason;
     this.ExtendedProperties = extendedProperties;
 }
示例#7
0
        public ProcedureStepDetail(
            EntityRef procedureStepRef,
            string procedureStepName,
            string stepClassName,
			string description,
            EnumValueInfo state,
			DateTime? creationTime,
            DateTime? scheduledStartTime,
            DateTime? startTime,
            DateTime? endTime,
            StaffSummary scheduledPerformer,
            StaffSummary performer,
			ModalitySummary modality
            )
        {
            this.ProcedureStepRef = procedureStepRef;
            this.ProcedureStepName = procedureStepName;
            this.StepClassName = stepClassName;
        	this.Description = description;
            this.State = state;
        	this.CreationTime = creationTime;
            this.ScheduledStartTime = scheduledStartTime;
            this.StartTime = startTime;
            this.EndTime = endTime;
			this.Modality = modality;
			this.ScheduledPerformer = scheduledPerformer;
            this.Performer = performer;
        }
        public ActionResult DeleteConfirmed(long id)
        {
            StaffSummary staffSummary = db.StaffSummary.Find(id);

            db.StaffSummary.Remove(staffSummary);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#9
0
 private void SetSupervisor(StaffSummary supervisor)
 {
     if (_protocolDetail != null)
     {
         _protocolDetail.Supervisor = supervisor;
         ProtocollingSettings.Default.SupervisorID = supervisor == null ? "" : supervisor.StaffId;
         ProtocollingSettings.Default.Save();
     }
 }
 public ActionResult Edit([Bind(Include = "GrantId,FirstName,LastName,Gender,JobTitle,ContractType")] StaffSummary staffSummary)
 {
     if (ModelState.IsValid)
     {
         db.Entry(staffSummary).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(staffSummary));
 }
        public ActionResult Create([Bind(Include = "GrantId,FirstName,LastName,Gender,JobTitle,ContractType")] StaffSummary staffSummary)
        {
            if (ModelState.IsValid)
            {
                db.StaffSummary.Add(staffSummary);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(staffSummary));
        }
示例#12
0
        public WorklistAdminSummary(
            EntityRef worklistRef,
            string name,
            string description,
            WorklistClassSummary worklistClass,
            StaffSummary ownerStaff,
            StaffGroupSummary ownerGroup)
			: base(worklistRef, name, description, worklistClass.ClassName, worklistClass.CategoryName, worklistClass.DisplayName, ownerStaff, ownerGroup)
        {
            WorklistClass = worklistClass;
        }
示例#13
0
        private StaffSummary GetStaffByID(string id)
        {
            StaffSummary staff = null;

            Platform.GetService <IStaffAdminService>(service =>
            {
                var response = service.ListStaff(new ListStaffRequest(id, null, null, null, null, true));
                staff        = CollectionUtils.FirstElement(response.Staffs);
            });
            return(staff);
        }
示例#14
0
 public WorklistAdminSummary(
     EntityRef worklistRef,
     string name,
     string description,
     WorklistClassSummary worklistClass,
     StaffSummary ownerStaff,
     StaffGroupSummary ownerGroup)
     : base(worklistRef, name, description, worklistClass.ClassName, worklistClass.CategoryName, worklistClass.DisplayName, ownerStaff, ownerGroup)
 {
     WorklistClass = worklistClass;
 }
		public ModalityPerformedProcedureStepDetail(EntityRef modalityPerformendProcedureStepRef, EnumValueInfo state, DateTime startTime, DateTime? endTime, StaffSummary performer, List<ModalityProcedureStepSummary> modalityProcedureSteps, List<DicomSeriesDetail> dicomSeries, Dictionary<string, string> extendedProperties)
		{
			this.ModalityPerformendProcedureStepRef = modalityPerformendProcedureStepRef;
			this.State = state;
			this.StartTime = startTime;
			this.EndTime = endTime;
			this.Performer = performer;
			this.ModalityProcedureSteps = modalityProcedureSteps;
			this.DicomSeries = dicomSeries;
			this.ExtendedProperties = extendedProperties;
		}
 public SaveOrderDocumentationDataRequest(EntityRef orderRef,
                                          Dictionary <string, string> orderExtendedProperties,
                                          List <OrderNoteDetail> orderNotes,
                                          List <ModalityPerformedProcedureStepDetail> modalityPerformedProcedureSteps,
                                          StaffSummary assignedInterpreter)
 {
     this.OrderRef = orderRef;
     this.OrderExtendedProperties = orderExtendedProperties;
     this.OrderNotes = orderNotes;
     this.ModalityPerformedProcedureSteps = modalityPerformedProcedureSteps;
     this.AssignedInterpreter             = assignedInterpreter;
 }
        public SaveOrderDocumentationDataRequest(EntityRef orderRef,
            Dictionary<string, string> orderExtendedProperties,
            List<OrderNoteDetail> orderNotes,
			List<ModalityPerformedProcedureStepDetail> modalityPerformedProcedureSteps,
            StaffSummary assignedInterpreter)
        {
            this.OrderRef = orderRef;
            this.OrderExtendedProperties = orderExtendedProperties;
            this.OrderNotes = orderNotes;
			this.ModalityPerformedProcedureSteps = modalityPerformedProcedureSteps;
            this.AssignedInterpreter = assignedInterpreter;
        }
示例#18
0
        public WorklistSummary(EntityRef worklistRef, string displayName, string description,
			string className, string classCategoryName, string classDisplayName, StaffSummary ownerStaff, StaffGroupSummary ownerGroup)
        {
            WorklistRef = worklistRef;
            DisplayName = displayName;
            Description = description;
            ClassName = className;
			ClassCategoryName = classCategoryName;
			ClassDisplayName = classDisplayName;
			OwnerStaff = ownerStaff;
            OwnerGroup = ownerGroup;
        }
示例#19
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="orderNoteRef"></param>
        /// <param name="category"></param>
        /// <param name="creationTime"></param>
        /// <param name="postTime"></param>
        /// <param name="author"></param>
        /// <param name="onBehalfOfGroup"></param>
        /// <param name="isAcknowledged"></param>
		/// <param name="urgent"></param>
		/// <param name="noteBody"></param>
        public OrderNoteSummary(EntityRef orderNoteRef, string category, DateTime? creationTime, DateTime? postTime,
			StaffSummary author, StaffGroupSummary onBehalfOfGroup, bool isAcknowledged, bool urgent, string noteBody)
        {
            OrderNoteRef = orderNoteRef;
            Category = category;
            CreationTime = creationTime;
            PostTime = postTime;
            Author = author;
        	OnBehalfOfGroup = onBehalfOfGroup;
            IsAcknowledged = isAcknowledged;
        	Urgent = urgent;
            NoteBody = noteBody;
        }
示例#20
0
 public CannedTextSummary(EntityRef cannedTextRef
                          , string name
                          , string category
                          , StaffSummary staff
                          , StaffGroupSummary staffGroup
                          , string textSnippet)
 {
     this.CannedTextRef = cannedTextRef;
     this.Name          = name;
     this.Category      = category;
     this.Staff         = staff;
     this.StaffGroup    = staffGroup;
     this.TextSnippet   = textSnippet.Substring(0, textSnippet.Length < MaxTextLength ? textSnippet.Length : MaxTextLength);
 }
示例#21
0
        private void LoadStaffOnce()
        {
            if (_staffLoaded)
            {
                return;
            }

            Platform.GetService <IStaffAdminService>(
                service => _staff = service.ListStaff(new ListStaffRequest {
                UserName = UserName
            }).Staffs.FirstOrDefault());

            _staffLoaded = true;
        }
        // GET: StaffSummaries/Delete/5
        public ActionResult Delete(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            StaffSummary staffSummary = db.StaffSummary.Find(id);

            if (staffSummary == null)
            {
                return(HttpNotFound());
            }
            return(View(staffSummary));
        }
示例#23
0
		public CannedTextSummary(EntityRef cannedTextRef
			, string name
			, string category
			, StaffSummary staff
			, StaffGroupSummary staffGroup
			, string textSnippet)
		{
			this.CannedTextRef = cannedTextRef;
			this.Name = name;
			this.Category = category;
			this.Staff = staff;
			this.StaffGroup = staffGroup;
			this.TextSnippet = textSnippet.Substring(0, textSnippet.Length < MaxTextLength ? textSnippet.Length : MaxTextLength);
		}
示例#24
0
        public PatientNoteDetail(
			EntityRef patientNoteRef,
			string comment, 
            PatientNoteCategorySummary category, 
            StaffSummary createdBy, 
            DateTime? creationTime,
            DateTime? validRangeFrom,
            DateTime? validRangeUntil,
            bool isExpired)
        {
        	this.PatientNoteRef = patientNoteRef;
            this.Comment = comment;
            this.Category = category;
            this.Author = createdBy;
            this.CreationTime = creationTime;
            this.ValidRangeFrom = validRangeFrom;
            this.ValidRangeUntil = validRangeUntil;
            this.IsExpired = isExpired;
        }
示例#25
0
        private void StartTranscribingWorklistItem()
        {
            ClaimWorklistItem(this.WorklistItem);

            Platform.GetService <ITranscriptionWorkflowService>(service =>
            {
                var enablementResponse = service.GetOperationEnablement(new GetOperationEnablementRequest(this.WorklistItem));
                _canComplete           = enablementResponse.OperationEnablementDictionary["CompleteTranscription"];
                _canReject             = enablementResponse.OperationEnablementDictionary["RejectTranscription"];
                _canSubmitForReview    = enablementResponse.OperationEnablementDictionary["SubmitTranscriptionForReview"];
                _canSaveReport         = enablementResponse.OperationEnablementDictionary["SaveTranscription"];

                var loadTranscriptionForEditResponse = service.LoadTranscriptionForEdit(new LoadTranscriptionForEditRequest(this.WorklistItem.ProcedureStepRef));
                _report = loadTranscriptionForEditResponse.Report;
                _activeReportPartIndex = loadTranscriptionForEditResponse.ReportPartIndex;
                _orderDetail           = loadTranscriptionForEditResponse.Order;

                var activePart = _report.GetPart(_activeReportPartIndex);
                _reportPartExtendedProperties = activePart == null ? null : activePart.ExtendedProperties;

                if (activePart != null && activePart.TranscriptionSupervisor != null)
                {
                    // active part already has a supervisor assigned
                    _supervisor = activePart.TranscriptionSupervisor;
                }
                else if (
                    Thread.CurrentPrincipal.IsInRole(
                        ClearCanvas.Ris.Application.Common.AuthorityTokens.Workflow.Transcription.SubmitForReview))
                {
                    // active part does not have a supervisor assigned
                    // if this user has a default supervisor, retreive it, otherwise leave supervisor as null
                    if (!String.IsNullOrEmpty(TranscriptionSettings.Default.SupervisorID))
                    {
                        _supervisor = GetStaffByID(TranscriptionSettings.Default.SupervisorID);
                    }
                }
            });
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="noteRef"></param>
 /// <param name="orderRef"></param>
 /// <param name="patientRef"></param>
 /// <param name="patientProfileRef"></param>
 /// <param name="mrn"></param>
 /// <param name="patientName"></param>
 /// <param name="dateOfBirth"></param>
 /// <param name="accessionNumber"></param>
 /// <param name="diagnosticServiceName"></param>
 /// <param name="category"></param>
 /// <param name="urgent"></param>
 /// <param name="postTime"></param>
 /// <param name="author"></param>
 /// <param name="onBehalfOfGroup"></param>
 /// <param name="isAcknowledged"></param>
 /// <param name="staffRecipients"></param>
 /// <param name="groupRecipients"></param>
 public OrderNoteboxItemSummary(
     EntityRef noteRef,
     EntityRef orderRef,
     EntityRef patientRef,
     EntityRef patientProfileRef,
     CompositeIdentifierDetail mrn,
     PersonNameDetail patientName,
     DateTime?dateOfBirth,
     string accessionNumber,
     string diagnosticServiceName,
     string category,
     bool urgent,
     DateTime?postTime,
     StaffSummary author,
     StaffGroupSummary onBehalfOfGroup,
     bool isAcknowledged,
     List <StaffSummary> staffRecipients,
     List <StaffGroupSummary> groupRecipients)
 {
     NoteRef           = noteRef;
     OrderRef          = orderRef;
     PatientRef        = patientRef;
     PatientProfileRef = patientProfileRef;
     Mrn                   = mrn;
     PatientName           = patientName;
     DateOfBirth           = dateOfBirth;
     AccessionNumber       = accessionNumber;
     DiagnosticServiceName = diagnosticServiceName;
     Category              = category;
     Urgent                = urgent;
     PostTime              = postTime;
     Author                = author;
     OnBehalfOfGroup       = onBehalfOfGroup;
     IsAcknowledged        = isAcknowledged;
     StaffRecipients       = staffRecipients;
     GroupRecipients       = groupRecipients;
 }
 public ModalityPerformedProcedureStepDetail(EntityRef modalityPerformendProcedureStepRef, EnumValueInfo state, DateTime startTime, DateTime?endTime, StaffSummary performer, List <ModalityProcedureStepSummary> modalityProcedureSteps, List <DicomSeriesDetail> dicomSeries, Dictionary <string, string> extendedProperties)
 {
     this.ModalityPerformendProcedureStepRef = modalityPerformendProcedureStepRef;
     this.State     = state;
     this.StartTime = startTime;
     this.EndTime   = endTime;
     this.Performer = performer;
     this.ModalityProcedureSteps = modalityProcedureSteps;
     this.DicomSeries            = dicomSeries;
     this.ExtendedProperties     = extendedProperties;
 }
示例#28
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="staff"></param>
 /// <param name="isAcknowledged"></param>
 /// <param name="acknowledgedTime"></param>
 public StaffRecipientDetail(StaffSummary staff, bool isAcknowledged, DateTime? acknowledgedTime)
     : base(isAcknowledged, acknowledgedTime)
 {
     Staff = staff;
 }
示例#29
0
 /// <summary>
 /// Constructor for creating detail for an existing order note.
 /// </summary>
 /// <param name="orderNoteRef"></param>
 /// <param name="category"></param>
 /// <param name="creationTime"></param>
 /// <param name="postTime"></param>
 /// <param name="author"></param>
 /// <param name="onBehalfOfGroup"></param>
 /// <param name="urgent"></param>
 /// <param name="staffRecipients"></param>
 /// <param name="groupRecipients"></param>
 /// <param name="noteBody"></param>
 /// <param name="canAcknowledge"></param>
 public OrderNoteDetail(EntityRef orderNoteRef, string category, DateTime creationTime,
     DateTime? postTime, StaffSummary author, StaffGroupSummary onBehalfOfGroup, bool urgent,
     List<StaffRecipientDetail> staffRecipients,
     List<GroupRecipientDetail> groupRecipients, string noteBody, bool canAcknowledge)
 {
     OrderNoteRef = orderNoteRef;
     Category = category;
     CreationTime = creationTime;
     PostTime = postTime;
     Author = author;
     OnBehalfOfGroup = onBehalfOfGroup;
     Urgent = urgent;
     StaffRecipients = staffRecipients;
     GroupRecipients = groupRecipients;
     NoteBody = noteBody;
     CanAcknowledge = canAcknowledge;
 }
示例#30
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="isAcknowledged"></param>
 /// <param name="acknowledgedTime"></param>
 /// <param name="group"></param>
 /// <param name="acknowledgedBy"></param>
 public GroupRecipientDetail(StaffGroupSummary group, bool isAcknowledged, DateTime? acknowledgedTime, StaffSummary acknowledgedBy)
     : base(isAcknowledged, acknowledgedTime)
 {
     Group = group;
     AcknowledgedByStaff = acknowledgedBy;
 }
示例#31
0
 public AddStaffResponse(StaffSummary staff)
 {
     this.Staff = staff;
 }
示例#32
0
 public AddStaffResponse(StaffSummary staff)
 {
     this.Staff = staff;
 }
 /// <summary>
 /// Formats the staff name and role similar to "Test, Name (Role)".  Name is formatted according to the default person name format as
 /// specified in <see cref="FormatSettings"/>
 /// </summary>
 /// <param name="staff"></param>
 /// <returns></returns>
 public static string Format(StaffSummary staff)
 {
     return(Format(staff, FormatSettings.Default.PersonNameDefaultFormat));
 }
示例#34
0
		protected override void SetStaff(StaffSummary staff)
		{
			base.SetStaff(staff);
			ReportingSettings.Default.SupervisorID = staff == null ? "" : staff.StaffId;
			ReportingSettings.Default.Save();
		}
示例#35
0
		private void LoadStaffOnce()
		{
			if (_staffLoaded)
				return;

			Platform.GetService<IStaffAdminService>(
				service => _staff = service.ListStaff(new ListStaffRequest {UserName = UserName}).Staffs.FirstOrDefault());

			_staffLoaded = true;
		}
示例#36
0
		/// <summary>
		/// Formats the staff name and role similar to "Test, Name (Role)".  Name is formatted according to the default person name format as 
		/// specified in <see cref="FormatSettings"/>
		/// </summary>
		/// <param name="staff"></param>
		/// <returns></returns>
		public static string Format(StaffSummary staff)
		{
			return Format(staff, FormatSettings.Default.PersonNameDefaultFormat);
		}
示例#37
0
		/// <summary>
		/// Formats the staff name and role similar to "Test, Name (Role)" with the name formatted according to the specified format string.
		/// </summary>
		/// <remarks>
		/// Valid format specifiers are as follows:
		///     %F - full family name
		///     %f - family name initial
		///     %G - full given name
		///     %g - given name initial
		///     %M - full middle name
		///     %m - middle initial
		/// </remarks>
		/// <param name="staff"></param>
		/// <param name="format"></param>
		/// <returns></returns>
		public static string Format(StaffSummary staff, string format)
		{
			return string.Format("{0} ({1})", PersonNameFormat.Format(staff.Name, format), staff.StaffType.Value);
		}
        public override void Accept()
        {
            if (this.HasValidationErrors)
            {
                this.ShowValidation(true);
                return;
            }

            try
            {
                // give extension pages a chance to save data prior to commit
                _extensionPages.ForEach(delegate(IStaffEditorPage page) { page.Save(); });

                // update non-elective groups
                _staffDetail.Groups = _nonElectiveGroupsEditor != null
                                        ? new List <StaffGroupSummary>(_nonElectiveGroupsEditor.SelectedItems)
                                        : new List <StaffGroupSummary>();

                // update elective groups
                if (_electiveGroupsEditor != null)
                {
                    _staffDetail.Groups.AddRange(_electiveGroupsEditor.SelectedItems);
                }

                // add or update staff
                Platform.GetService <IStaffAdminService>(
                    delegate(IStaffAdminService service)
                {
                    if (_isNew)
                    {
                        AddStaffResponse response = service.AddStaff(new AddStaffRequest(_staffDetail));
                        _staffRef     = response.Staff.StaffRef;
                        _staffSummary = response.Staff;
                    }
                    else
                    {
                        UpdateStaffResponse response = service.UpdateStaff(new UpdateStaffRequest(_staffDetail));
                        _staffRef     = response.Staff.StaffRef;
                        _staffSummary = response.Staff;
                    }
                });

                // if necessary, update associated user account
                if (_originalStaffUserName != _staffDetail.UserName)
                {
                    // clear staff from the existing user
                    UpdateUserAccount(_originalStaffUserName, null);

                    // update the current user with the staff name
                    UpdateUserAccount(_staffDetail.UserName, _staffSummary);
                }

                this.Exit(ApplicationComponentExitCode.Accepted);
            }
            catch (Exception e)
            {
                ExceptionHandler.Report(e, SR.ExceptionSaveStaff, this.Host.DesktopWindow,
                                        delegate
                {
                    this.ExitCode = ApplicationComponentExitCode.Error;
                    this.Host.Exit();
                });
            }
        }
示例#39
0
 public UpdateStaffResponse(StaffSummary staff)
 {
     this.Staff = staff;
 }
 private static bool IsStaffCurrentUser(StaffSummary staff)
 {
     return(string.Equals(staff.StaffId, LoginSession.Current.Staff.StaffId));
 }
示例#41
0
 protected override void SetStaff(StaffSummary staff)
 {
     base.SetStaff(staff);
     ProtocollingSettings.Default.SupervisorID = staff == null ? "" : staff.StaffId;
     ProtocollingSettings.Default.Save();
 }
 protected virtual void SetStaff(StaffSummary staff)
 {
     _staff = staff;
 }
示例#43
0
 private void SetSupervisor(StaffSummary supervisor)
 {
     _supervisor = supervisor;
     TranscriptionSettings.Default.SupervisorID = supervisor == null ? "" : supervisor.StaffId;
     TranscriptionSettings.Default.Save();
 }
 public UpdateStaffResponse(StaffSummary staff)
 {
     this.Staff = staff;
 }
 /// <summary>
 /// Formats the staff name and role similar to "Test, Name (Role)" with the name formatted according to the specified format string.
 /// </summary>
 /// <remarks>
 /// Valid format specifiers are as follows:
 ///     %F - full family name
 ///     %f - family name initial
 ///     %G - full given name
 ///     %g - given name initial
 ///     %M - full middle name
 ///     %m - middle initial
 /// </remarks>
 /// <param name="staff"></param>
 /// <param name="format"></param>
 /// <returns></returns>
 public static string Format(StaffSummary staff, string format)
 {
     return(string.Format("{0} ({1})", PersonNameFormat.Format(staff.Name, format), staff.StaffType.Value));
 }
示例#46
0
 public ProtocolNoteDetail(StaffSummary author, DateTime timeStamp, string text)
 {
     Author = author;
     TimeStamp = timeStamp;
     Text = text;
 }