/// <summary>
        /// Сгенерировать отчёт в Worde
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonDocuments_Click(object sender, EventArgs e)
        {
            var tempPatientInfo = new PatientClass(_patientInfo);

            PutDataToPatient(tempPatientInfo);

            WordExportEngine.ExportLineOfCommunicationEpicrisis(tempPatientInfo, _dbEngine.GlobalSettings);
        }
        /// <summary>
        /// Сгенерировать отчёт в Worde
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonDocuments_Click(object sender, EventArgs e)
        {
            var tempPatientInfo = new PatientClass(_patientInfo);

            PutDataToPatient(tempPatientInfo);

            WordExportEngine.ExportMedicalInspection(tempPatientInfo, _dbEngine.GlobalSettings);
        }
        private void buttonDocuments_Click(object sender, EventArgs e)
        {
            var tempOperationInfo = new OperationClass(_operationInfo);
            var tempPatientInfo   = new PatientClass(_patientInfo);

            PutDataToOperationAndPatient(tempOperationInfo, tempPatientInfo);

            WordExportEngine.ExportOperationProtocol(tempOperationInfo, tempPatientInfo, _dbEngine.GlobalSettings);
        }
Exemple #4
0
        /// <summary>
        /// Сгенерировать выбранный документ
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonAdditionalDocument_Click(object sender, EventArgs e)
        {
            if (comboBoxAdditionalDocuments.Items.Count == 0)
            {
                MessageBox.Show("Сначала добавьте документы в папку " + AdditionalDocumentsFolderName, "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            if (string.IsNullOrEmpty(comboBoxAdditionalDocuments.Text))
            {
                MessageBox.Show("Укажите документ, который надо экпортировать в Word", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            WordExportEngine.ExportAdditionalDocument(
                Path.Combine(_additionalDocumentsFolderPath, comboBoxAdditionalDocuments.Text), _patientInfo, _globalSettings);

            Close();
        }
Exemple #5
0
        /// <summary>
        /// Сгенерировать отчёт в Worde
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonDocuments_Click(object sender, EventArgs e)
        {
            if (IsFormHasEmptyNeededFields())
            {
                MessageBox.Show("Поля, отмеченные звёздочкой, обязательны для заполнения", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            string dischargeEpicrisisHeaderFilePath = Path.Combine(Application.StartupPath, "Headers\\" + _dbEngine.GlobalSettings.DischargeEpicrisisHeaderFileName);

            if (!File.Exists(dischargeEpicrisisHeaderFilePath))
            {
                MessageBox.Show("Файл '" + _dbEngine.GlobalSettings.DischargeEpicrisisHeaderFileName + "' с шапкой для выписного экпикриза не найден в папке Headers", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            var tempPatientInfo = new PatientClass(_patientInfo);

            PutDataToPatient(tempPatientInfo);

            WordExportEngine.ExportDischargeEpicrisisFor8Department(tempPatientInfo, _dbEngine.GlobalSettings, dischargeEpicrisisHeaderFilePath);
        }