Example #1
0
        private void Initialize(CWorkersKeeper workersKeeper)
        {
            InitializeComponent();

            _workersKeeper    = workersKeeper;
            _scrubNurseWorker = workersKeeper.ScrubNurseWorker;
        }
Example #2
0
        public OperationViewForm(
            CWorkersKeeper workersKeeper,
            CPatient patientInfo,
            CHospitalization hospitalizationInfo,
            COperation operationInfo,
            HospitalizationViewForm hospitalizationViewForm,
            AddUpdate action)
        {
            _stopSaveParameters = true;
            InitializeComponent();

            _workersKeeper    = workersKeeper;
            _operationWorker  = workersKeeper.OperationWorker;
            _orderlyWorker    = workersKeeper.OrderlyWorker;
            _scrubNurseWorker = workersKeeper.ScrubNurseWorker;

            _patientInfo             = patientInfo;
            _hospitalizationInfo     = hospitalizationInfo;
            _hospitalizationViewForm = hospitalizationViewForm;

            _configurationEngine = workersKeeper.ConfigurationEngine;

            PutObjectsToComboBox(_orderlyWorker.OrderlyList, comboBoxOrderly);
            PutObjectsToComboBox(_scrubNurseWorker.ScrubNurseList, comboBoxScrubNurse);

            _action            = action;
            _operationInfo     = operationInfo;
            _saveOperationInfo = new COperation(_operationInfo);

            textBoxName.Text           = _operationInfo.Name;
            textBoxAssistents.Text     = ListToMultilineString(_operationInfo.Assistents);
            textBoxSurgeons.Text       = ListToMultilineString(_operationInfo.Surgeons);
            textBoxOperationTypes.Text = ListToMultilineString(_operationInfo.OperationTypes);
            comboBoxScrubNurse.Text    = _operationInfo.ScrubNurse;
            textBoxSheAnestethist.Text = _operationInfo.SheAnaesthetist;
            textBoxHeAnestethist.Text  = _operationInfo.HeAnaesthetist;
            comboBoxOrderly.Text       = _operationInfo.Orderly;

            dateTimePickerDateOfOperation.Value      = _operationInfo.DateOfOperation;
            dateTimePickerStartTimeOfOperation.Value = _operationInfo.StartTimeOfOperation;
            dateTimePickerEndTimeOfOperation.Checked = _operationInfo.EndTimeOfOperation.HasValue;
            if (_operationInfo.EndTimeOfOperation.HasValue)
            {
                dateTimePickerEndTimeOfOperation.Value = _operationInfo.EndTimeOfOperation.Value;
            }

            Text = action == AddUpdate.Add
                ? "Добавление операции"
                : "Просмотр данных об операции";
        }
Example #3
0
        public ScrubNurseViewForm(CWorkersKeeper workersKeeper, CScrubNurse scrubNurseInfo)
        {
            InitializeComponent();

            _workersKeeper    = workersKeeper;
            _scrubNurseWorker = _workersKeeper.ScrubNurseWorker;

            if (scrubNurseInfo == null)
            {
                _scrubNurseInfo = new CScrubNurse();
                Text            = "Добавление новой операц. мед. сестры";
            }
            else
            {
                _scrubNurseInfo            = scrubNurseInfo;
                Text                       = "Редактирование операц. мед. сестры";
                textBoxScrubNurseName.Text = _scrubNurseInfo.Name;
            }
        }
Example #4
0
        public CWorkersKeeper(string dataPath, bool isNeedToStoreDbFiles)
        {
            if (!Directory.Exists(dataPath))
            {
                Directory.CreateDirectory(dataPath);
            }

            var dataDirectoryInfo = new DirectoryInfo(dataPath);

            ExecutableDirectoryPath = dataDirectoryInfo.Parent != null
                ? dataDirectoryInfo.Parent.FullName
                : dataDirectoryInfo.FullName;

            if (isNeedToStoreDbFiles)
            {
                try
                {
                    SaveDbFilesToTempFolder(dataPath);
                }
                catch (Exception ex)
                {
                    MessageBox.ShowDialog("Не удалось осуществить резервное копирование файлов с данными. Сообщение об ошибке:\r\n" + ex, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }

            var waitForm = new WaitForm("Загрузка данных...");

            try
            {
                waitForm.Show();
                Application.DoEvents();

                ConfigurationEngine = new CConfigurationEngine();

                waitForm.SetProgress(4);
                _nosologyWorker = new CNosologyWorker(dataPath);
                waitForm.SetProgress(8);
                _operationTypeWorker = new COperationTypeWorker(dataPath);
                waitForm.SetProgress(12);
                _orderlyWorker = new COrderlyWorker(dataPath);
                waitForm.SetProgress(16);
                _scrubNurseWorker = new CScrubNurseWorker(dataPath);
                waitForm.SetProgress(20);
                _surgeonWorker = new CSurgeonWorker(dataPath);

                waitForm.SetProgress(24);
                _patientWorker = new CPatientWorker(this, dataPath);
                waitForm.SetProgress(28);
                _hospitalizationWorker = new CHospitalizationWorker(this, dataPath);
                waitForm.SetProgress(32);
                _visitWorker = new CVisitWorker(this, dataPath);
                waitForm.SetProgress(36);
                _operationWorker = new COperationWorker(this, dataPath);

                waitForm.SetProgress(40);
                _dischargeEpicrisisWorker = new CDischargeEpicrisisWorker(dataPath);
                waitForm.SetProgress(44);
                _lineOfCommunicationEpicrisisWorker = new CLineOfCommunicationEpicrisisWorker(dataPath);
                waitForm.SetProgress(48);
                _medicalInspectionWorker = new CMedicalInspectionWorker(dataPath);
                waitForm.SetProgress(52);
                _operationProtocolWorker = new COperationProtocolWorker(dataPath);
                waitForm.SetProgress(56);
                _transferableEpicrisisWorker = new CTransferableEpicrisisWorker(dataPath);

                waitForm.SetProgress(60);
                _anamneseWorker = new CAnamneseWorker(dataPath);
                waitForm.SetProgress(66);
                _obstetricHistoryWorker = new CObstetricHistoryWorker(dataPath);

                waitForm.SetProgress(72);
                _cardWorker = new CCardWorker(dataPath);
                waitForm.SetProgress(78);
                _brachialPlexusCardWorker = new CBrachialPlexusCardWorker(dataPath);
                waitForm.SetProgress(84);
                _rangeOfMotionCardWorker = new CRangeOfMotionCardWorker(dataPath);
                waitForm.SetProgress(92);
                _obstetricParalysisCardWorker = new CObstetricParalysisCardWorker(dataPath);

                waitForm.SetProgress(100);
                _globalSettings = new CGlobalSettings(dataPath);
            }
            finally
            {
                waitForm.CloseForm();
            }
        }