public static bool ShowReconciliationDialog(EntityRef targetProfile, IDesktopWindow window)
        {
            IList<ReconciliationCandidate> candidates = null;
            IList<PatientProfileSummary> reconciledProfiles = null;

            Platform.GetService<IPatientReconciliationService>(
                delegate(IPatientReconciliationService service)
                {
                    ListPatientReconciliationMatchesResponse response =
                        service.ListPatientReconciliationMatches(new ListPatientReconciliationMatchesRequest(targetProfile));

                    candidates = response.MatchCandidates;
                    reconciledProfiles = response.ReconciledProfiles;
                });

            if (candidates.Count > 0)
            {
                ReconciliationComponent component = new ReconciliationComponent(targetProfile, reconciledProfiles, candidates);
                ApplicationComponentExitCode exitCode = ApplicationComponent.LaunchAsDialog(
                    window,
                    component,
                    SR.TitlePatientReconciliation);
                return exitCode == ApplicationComponentExitCode.Accepted;
            }
            else
            {
                window.ShowMessageBox(SR.MessageNoReconciliationCandidate, MessageBoxActions.Ok);
                return false;
            }
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public ReconciliationComponentControl(ReconciliationComponent component)
        {
            InitializeComponent();

            _component = component;

            _targetTableView.Table = _component.TargetProfileTable;
            _reconciliationTableView.Table = _component.ReconciliationProfileTable;

            Control diffView = (Control)_component.DiffComponentView.GuiElement;
            diffView.Dock = DockStyle.Fill;
            _diffViewPanel.Controls.Add(diffView);

            _reconcileButton.DataBindings.Add("Enabled", _component, "ReconcileEnabled");
        }
Example #3
0
        /// <summary>
        /// Constructor
        /// </summary>
        public ReconciliationComponentControl(ReconciliationComponent component)
        {
            InitializeComponent();

            _component = component;

            _targetTableView.Table         = _component.TargetProfileTable;
            _reconciliationTableView.Table = _component.ReconciliationProfileTable;

            Control diffView = (Control)_component.DiffComponentView.GuiElement;

            diffView.Dock = DockStyle.Fill;
            _diffViewPanel.Controls.Add(diffView);

            _reconcileButton.DataBindings.Add("Enabled", _component, "ReconcileEnabled");
        }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ReconciliationComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ReconciliationComponent)component;
 }