Пример #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;
            }
        }
Пример #2
0
 private void ExecuteGenerateHL7ProblemCommand( ProblemDto problemDto )
 {
     var relativePath = string.Format (
         "../{0}?{1}={2}&{3}={4}",
         HttpHandlerPaths.PatientModuleHttpHandlerPath,
         HttpUtility.UrlEncode ( HttpHandlerQueryStrings.RequestName ),
         HttpUtility.UrlEncode ( HttpHandlerRequestNames.DownloadHl7SyndromicSurveillanceDocument ),
         HttpUtility.UrlEncode ( HttpHandlerQueryStrings.ProblemKey ),
         problemDto.Key );
     var uri = new Uri ( Application.Current.Host.Source, relativePath );
     HtmlPage.Window.Navigate ( uri, "_blank" );
 }
Пример #3
0
 private void ExecuteEditProblemCommand( ProblemDto problemDto )
 {
     _popupService.ShowPopup (
         "EditCaseProblemView",
         "Create",
         "Problem",
         new[]
             {
                 new KeyValuePair<string, string> ( "ProblemKey", problemDto.Key.ToString () ),
                 new KeyValuePair<string, string> ( "ClinicalCaseKey", _clinicalCaseKey.ToString () )
             },
         false,
         PopupClosed );
 }
Пример #4
0
 private void ExecuteDeleteProblem( ProblemDto problemDto )
 {
     DeleteProblem ( problemDto );
 }
Пример #5
0
 private void DeleteProblem( ProblemDto dto )
 {
     var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher ();
     requestDispatcher.Add ( new DeleteProblemRequest { ProblemKey = dto.Key } );
     IsLoading = true;
     requestDispatcher.ProcessRequests ( HandleDeleteProblemCompleted, HandleDeleteProblemException );
 }
Пример #6
0
 private bool CanExecuteDeleteProblem( ProblemDto arg )
 {
     if ( arg != null )
     {
         return ( arg.AssociatedIndicator.HasValue ? !arg.AssociatedIndicator.Value : true );
     }
     return false;
 }
Пример #7
0
 private void SaveProblem( ProblemDto dto )
 {
     var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher ();
     requestDispatcher.Add ( new SaveDtoRequest<ProblemDto> { DataTransferObject = dto } );
     IsLoading = true;
     requestDispatcher.ProcessRequests ( HandleSaveProblemCompleted, HandleSaveProblemException );
 }
Пример #8
0
 private void ExecuteSaveProblem( ProblemDto problemDto )
 {
     SaveProblem ( Problem );
 }
Пример #9
0
 private void ExecuteDtsSearchSelectionChangedCommand( ProblemDto obj )
 {
     Problem.ProblemCodeCodedConcept = obj.ProblemCodeCodedConcept;
 }
Пример #10
0
        /// <summary>
        /// Navigates to default command.
        /// </summary>
        /// <param name="parameters">The parameters.</param>
        protected override void NavigateToDefaultCommand( KeyValuePair<string, string>[] parameters )
        {
            var key = parameters.GetValue<long> ( "ProblemKey" );
            _clinicalCaseKey = parameters.GetValue<long> ( "ClinicalCaseKey" );
            var dispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher ();
            if ( key == 0 )
            {
                Problem = new ProblemDto { Key = key };
                _isCreate = true;

                dispatcher.Add ( new GetDtoRequest<StaffSummaryDto> { Key = CurrentUserContext.Staff.Key } );
                Problem.ClinicalCaseKey = _clinicalCaseKey;
                Problem.StatusChangedDate = DateTime.Now;
            }
            else
            {
                dispatcher.Add ( new GetProblemByKeyRequest { Key = key } );
            }
            dispatcher
                .AddLookupValuesRequest ( ProblemTypeLookupName )
                .AddLookupValuesRequest ( ProblemStatusLookupName );
            dispatcher.ProcessRequests ( HandleRequestComplete, HandleRequestDispatcherException );
            IsLoading = true;
        }
Пример #11
0
 private void ExecuteDetachProblem( ProblemDto problemDto )
 {
     var requestDispatcher = _asyncRequestDispatcherFactory.CreateAsyncRequestDispatcher ();
     requestDispatcher.Add ( new DetachProblemFromVisitRequest { ProblemDto = problemDto, VisitKey = Visit.Key } );
     IsLoading = true;
     requestDispatcher.ProcessRequests ( HandleDetachProblemFromVisitCompleted, HandleDetachProblemFromVisitException );
 }