Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProblemDto"/> class.
        /// </summary>
        /// <param name="problemDto">The problem dto.</param>
        public ProblemDto( ProblemDto problemDto )
            : base(problemDto)
        {
            _clinicalCaseKey = problemDto._clinicalCaseKey;

            if ( problemDto._problemStatus != null )
            {
                _problemStatus = new LookupValueDto ();
                var diagnosisStatus = problemDto._problemStatus;
                _problemStatus.WellKnownName = diagnosisStatus.WellKnownName;
                _problemStatus.Key = diagnosisStatus.Key;
                _problemStatus.Name = diagnosisStatus.Name;
            }

            if ( problemDto._problemCodeCodedConcept != null )
            {
                _problemCodeCodedConcept = new CodedConceptDto ();
                var problemCode = problemDto._problemCodeCodedConcept;
                _problemCodeCodedConcept.CodedConceptCode = problemCode.CodedConceptCode;
                _problemCodeCodedConcept.Key = problemCode.Key;
                _problemCodeCodedConcept.CodeSystemIdentifier = problemCode.CodeSystemIdentifier;
                _problemCodeCodedConcept.CodeSystemName = problemCode.CodeSystemName;
                _problemCodeCodedConcept.CodeSystemVersionNumber = problemCode.CodeSystemVersionNumber;
                _problemCodeCodedConcept.DisplayName = problemCode.DisplayName;
                _problemCodeCodedConcept.NullFlavorIndicator = problemCode.NullFlavorIndicator;
            }

            if ( problemDto._problemType != null )
            {
                _problemType = new LookupValueDto ();
                var diagnosisType = problemDto._problemType;
                _problemType.WellKnownName = diagnosisType.WellKnownName;
                _problemType.Key = diagnosisType.Key;
                _problemType.Name = diagnosisType.Name;
            }
        }
Example #2
0
        private void ExecuteStatusUpdatedCommand( LookupValueDto visitStatus )
        {
            if ( visitStatus != null && visitStatus.WellKnownName != _visit.VisitStatus.WellKnownName )
            {
                var visitStatusUpdateDto = new VisitStatusUpdateDto
                    {
                        VisitKey = Visit.Key,
                        VisitStatus = visitStatus,
                        UpdateDateTime = DateTime.Now
                    };

                var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher ();
                requestDispatcher.Add ( new UpdateVisitStatusRequest { VisitStatusUpdateDto = visitStatusUpdateDto } );
                IsLoading = true;
                requestDispatcher.ProcessRequests ( HandleUpdateVisitStatusCompleted, HandleUpdateVisitStatusException );
            }
        }
Example #3
0
 /// <summary>
 /// Equalses the specified other.
 /// </summary>
 /// <param name="other">
 /// The other.
 /// </param>
 /// <returns>
 /// Returns true if this dto is equal to the given dto.
 /// </returns>
 public bool Equals(LookupValueDto other)
 {
     return(other != null && other.Equals(this));
 }
 /// <summary>
 /// Executes the document type changed command.
 /// </summary>
 /// <param name="lookupValueDto">The lookup value dto.</param>
 public void ExecuteDocumentTypeChangedCommand( LookupValueDto lookupValueDto )
 {
     if ( lookupValueDto.WellKnownName.Equals ( WellKnownNames.PatientModule.PatientDocumentType.Other ) )
     {
         IsOtherTypeReadOnly = false;
     }
     else
     {
         IsOtherTypeReadOnly = true;
         PatientDocumentDto.OtherDocumentTypeName = string.Empty;
     }
 }
Example #5
0
 private bool CanExecuteStatusUpdatedCommand( LookupValueDto visitStatus )
 {
     return _visit != null;
 }
 private void ExecuteClearCommand()
 {
     NewAgencyName = null;
     NewAgencyType = null;
 }
 /// <summary>
 /// Executes the document type changed command.
 /// </summary>
 /// <param name="lookupValueDto">The lookup value dto.</param>
 public void ExecuteDocumentTypeChangedCommand( LookupValueDto lookupValueDto )
 {
     if (lookupValueDto != null && lookupValueDto.WellKnownName == PatientDocumentType.Other)
     {
         IsOtherTypeReadOnly = false;
     }
     else
     {
         IsOtherTypeReadOnly = true;
         if (SelectedDocument != null)
         {
             SelectedDocument.OtherDocumentTypeName = string.Empty;
         }
     }
 }
 private void ExecuteChangeDisenrollReasonSelection( LookupValueDto disenrollReason )
 {
     if ( disenrollReason != null )
     {
         if ( disenrollReason.WellKnownName != DisenrollReason.Other )
         {
             ProgramEnrollment.DisenrollOtherReasonNote = null;
         }
     }
 }
Example #9
0
 /// <summary>
 /// Equalses the specified other.
 /// </summary>
 /// <param name="other">
 /// The other. 
 /// </param>
 /// <returns>
 /// Returns true if this dto is equal to the given dto.
 /// </returns>
 public bool Equals( LookupValueDto other )
 {
     return other != null && other.Equals ( this );
 }
        public PatientAccessHistoryViewModel(
            IAsyncRequestDispatcherFactory asyncRequestDispatcherFactory,
            IUserDialogService userDialogService,
            IAccessControlManager accessControlManager,
            ICommandFactory commandFactory )
            : base(accessControlManager, commandFactory)
        {
            _asyncRequestDispatcherFactory = asyncRequestDispatcherFactory;
            _userDialogService = userDialogService;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            SearchCommand = commandFactoryHelper.BuildDelegateCommand ( () => SearchCommand, ExecuteSearch );

            ResetCommand = commandFactoryHelper.BuildDelegateCommand ( () => ResetCommand, ExecuteReset );

            _defaultAccessType = new LookupValueDto { Name = "None" };
            _accessType = _defaultAccessType;

            PageSizeList = new List<int> { 100, 125, 150, 175, 200 };
            _pageSize = 100;
            _totalItemCount = 0;
            _pageIndex = 0;

            var lookupValueNames = new[] { PatientAccessEventType };
            var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher ();
            foreach ( var lookupValueName in lookupValueNames )
            {
                requestDispatcher.AddLookupValuesRequest ( lookupValueName );
            }
            IsLoading = true;
            requestDispatcher.ProcessRequests ( HandleGetLookupvaluesCompleted, HandleGetLookupValuesException );

            _defaultGroupingDescription = new CustomPropertyGroupDescription ( string.Empty, "None" );
            _groupingDescriptions = new ObservableCollection<CustomPropertyGroupDescription> ();
            _selectedGroupingDescription = _defaultGroupingDescription;
            _groupingDescriptions.Add ( _selectedGroupingDescription );

            InitializeGroupingDescriptions ();
        }