Пример #1
0
        private void Refresh()
        {
            try
            {
                var result = this.Component.GetMedicalRecordCabinet(PluginContext.Host.SelectedPatient);
                this.Cabinet = TitledMedicalRecordCabinetDto.CreateFrom(result);
                this.Tags    = this.Component.GetTags(TagCategory.MedicalRecord);

                if (this.SelectedRecord != null)
                {
                    var record = this.Component.GetMedicalRecordById(this.SelectedRecord.Id);
                    this.SelectedRecord = (record != null)
                        ? TitledMedicalRecordDto.CreateFrom(record)
                        : null;
                }

                this.RefreshMacroMenu();

                PluginContext.Host.WriteStatus(StatusType.Info, BaseText.Refreshed);
            }
            catch (Exception ex) { this.Handle.Error(ex); }
        }
Пример #2
0
        internal void SelectedFreshRecord(TitledMedicalRecordDto record)
        {
            var freshRecord = this.Component.GetMedicalRecordById(record.Id);

            this.SelectedRecord = Mapper.Map <MedicalRecordDto, TitledMedicalRecordDto>(freshRecord);
        }