Пример #1
0
        private void OpenDeathProtocol(object sender, EventArgs e)
        {
            if (getIsNotValid())
            {
                MessageBox.Show("Введены не все данные на форме!", "Предупреждение!", MessageBoxButtons.OK);
                return;
            }

            string templatePath = Directory.GetCurrentDirectory() + "\\Templates\\death_template.doc";

            Dictionary <string, string> values = new Dictionary <string, string>();

            values.Add(@"{date}", deathDateTxt.Value.ToString("MM.dd.yyyy"));

            values.Add(@"{time}", deathTimeCtrl.Text);

            DdvDoctor doc = (DdvDoctor)doctorsBox.SelectedItem;

            values.Add(@"{doctor.who.short}", doc != null ? doc.ShortName: "");
            values.Add(
                "{patient.passport_info}",
                string.Format(CultureInfo.CurrentCulture, "{0} {1}, выдан {2} {3}",
                              patient.PassportSerial, patient.PassportNum,
                              patient.PassportDate.ToShortDateString(), patient.PassportIssuePlace)
                );
            values.Add(@"{doctor.appointment_name}", "");
            values.Add(@"{patient.full_name}", patient.FullName);
            values.Add(@"{patient.birthdate}", patient.Birthdate != null ? patient.Birthdate.ToShortDateString(): "");
            values.Add(@"{patient.sex}", patient.Sex ? "мужской" : "женский");
            values.Add(@"{patient.medcode}", patient.MedCode);
            values.Add(@"{doctor.who}", doc != null ? doc.FullName: "");
            TemplatesUtils.FillTemplateAndShow(templatePath, values, TemplatesUtils.getTempFileName("Констатация смерти", patient.FullName));
        }
Пример #2
0
        private void OpenReanimationProtocol(object sender, EventArgs e)
        {
            if (getIsNotValid())
            {
                MessageBox.Show("Введены не все данные на форме!", "Предупреждение!", MessageBoxButtons.OK);
                return;
            }

            string templatePath = Directory.GetCurrentDirectory() + "\\Templates\\reanim_operations_template.doc";

            Dictionary <string, string> values = new Dictionary <string, string>();

            values.Add(@"{death.date}", deathDateTxt.Text);
            values.Add(@"{death.time}", deathTimeCtrl.Text);

            DdvDoctor doc = (DdvDoctor)doctorsBox.SelectedItem;

            values.Add(@"{doctor.who.short}", doc == null ? "" : doc.ShortName);

            DateTime deathTime = CommonUtils.ConstructDateWIthTime(deathDateTxt.Value, deathTimeCtrl.Value);

            for (int i = 0; i < 10; i++)
            {
                deathTime = deathTime.AddMinutes(-5.0);
                values.Add(@"{time" + i + "}", deathTime.ToShortTimeString());
            }
            TemplatesUtils.FillTemplateAndShow(templatePath, values, TemplatesUtils.getTempFileName("Реанимационные действия", patient.FullName));
        }
Пример #3
0
        private void printBtn_Click(object sender, EventArgs e)
        {
            SaveIssuedMedicine();

            Dictionary <string, string> values  = new Dictionary <string, string>();
            DdtIssuedMedicineList       medList = service.GetDdtIssuedMedicineListService().GetById(issuedMedId);
            DdtHospital hospitalSession         = service.GetDdtHospitalService().GetById(hospitalitySession.ObjectId);

            DdvDoctor  doc      = null;
            DdvDoctor  nurse    = null;
            DdvDoctor  director = null;
            DdvDoctor  pharma   = null;
            DdvPatient patient  = null;

            if (medList != null)
            {
                doc      = service.GetDdvDoctorService().GetById(medList.Doctor);
                nurse    = service.GetDdvDoctorService().GetById(medList.Nurse);
                director = service.GetDdvDoctorService().GetById(medList.Director);
                pharma   = service.GetDdvDoctorService().GetById(medList.Pharmacologist);
                patient  = service.GetDdvPatientService().GetById(medList.Patient);
            }

            values.Add(@"{doctor.who.short}", doc?.ShortName);
            values.Add(@"{patient.diagnosis}", diagnosisTxt.Text);
            values.Add(@"{patient.age}", patient != null? DateTime.Now.Year - patient.Birthdate.Year + "": "");
            values.Add(@"{admission.date}", hospitalSession.AdmissionDate.ToShortDateString());
            values.Add(@"{patient.historycard}", patient?.MedCode);
            values.Add(@"{patient.fullname}", patient?.FullName);
            values.Add(@"{kag}", kagBtn.Checked ? shortlyOperationTxt.Text : "");
            values.Add(@"{nurse}", nurse?.ShortName);
            values.Add(@"{doctor.pharma}", pharma?.ShortName);
            values.Add(@"{doctor.director}", director?.ShortName);
            values.Add(@"{room}", hospitalitySession.RoomCell);
            values.Add(@"{cell}", "");
            values.Add(@"{diet}", "НКД");
            values.Add(@"{date}", DateTime.Now.ToShortDateString());
            //todo переписать,когда будет время. Сделать добавление в таблицу строчек автоматом
            for (int i = 0; i < 19; i++)
            {
                string value = "";
                if (i < medicineList.Count)
                {
                    DdtCure cure = service.GetDdtCureService().GetById(medicineList[i].Cure);
                    value = cure.Name;
                }
                values.Add(@"{issued_medicine_" + i + "}", value);
            }
            string templatePath = Directory.GetCurrentDirectory() + "\\Templates\\issued_medicine_template.doc";

            TemplatesUtils.FillTemplateAndShow(templatePath, values, TemplatesUtils.getTempFileName("Назначения", patient.FullName));
        }
Пример #4
0
        private void printBtn_Click(object sender, EventArgs e)
        {
            if (getIsNotValid())
            {
                MessageBox.Show("Введены не все данные на форме!", "Предупреждение!", MessageBoxButtons.OK);
                return;
            }

            string templatePath = Directory.GetCurrentDirectory() + "\\Templates\\eit_template.doc";

            Dictionary <string, string> values = new Dictionary <string, string>();

            values.Add(@"{body}", bodyArea.Text);
            values.Add(@"{doctor.who}", doctorsBox.Text);
            TemplatesUtils.FillTemplateAndShow(templatePath, values, TemplatesUtils.getTempFileName("Протокол ЭИТ", ""));
        }
Пример #5
0
        private void printBtn_Click(object sender, EventArgs e)
        {
            if (getIsNotValid())
            {
                MessageBox.Show("Введены не все данные на форме!", "Предупреждение!", MessageBoxButtons.OK);
                return;
            }

            string templatePath = Directory.GetCurrentDirectory() + "\\Templates\\ekstubacia_template.doc";

            Dictionary <string, string> values = new Dictionary <string, string>();

            values.Add(@"{time}", timeCtrl.Text);
            values.Add(@"{body}", "");
            values.Add(@"{header}", headerArea.Text);
            values.Add(@"{doctor.who}", doctorsBox.Text);
            TemplatesUtils.FillTemplateAndShow(templatePath, values, null);
        }
Пример #6
0
        private void openInWord_Click(object sender, EventArgs e)
        {
            if (getIsNotValid())
            {
                MessageBox.Show("Введены не все данные на форме!", "Предупреждение!", MessageBoxButtons.OK);
                return;
            }

            string templatePath = Directory.GetCurrentDirectory() + "\\Templates\\kateter_template.doc";

            Dictionary <string, string> values = new Dictionary <string, string>();

            values.Add(@"{date}", dateCtrl.Text);
            values.Add(@"{time}", timeCtrl.Text);
            values.Add(@"{vena}", veinTxt.Text);
            values.Add(@"{try_num}", tryNumTxt.Text);
            values.Add(@"{column}", columnTxt.Text);
            values.Add(@"{doctor.who}", doctorsBox.Text);
            TemplatesUtils.FillTemplateAndShow(templatePath, values, null);
        }
Пример #7
0
        private void printBtn_Click(object sender, EventArgs e)
        {
            if (getIsNotValid())
            {
                MessageBox.Show("Введены не все данные на форме!", "Предупреждение!", MessageBoxButtons.OK);
                return;
            }

            string templatePath = Directory.GetCurrentDirectory() + "\\Templates\\torakacentes_template.doc";

            Dictionary <string, string> values = new Dictionary <string, string>();

            values.Add(@"{date}", dateCtrl.Text);
            values.Add(@"{time}", timeCtrl.Text);
            values.Add(@"{arg0}", arg0.Text);
            values.Add(@"{arg1}", arg1.Text);
            values.Add(@"{arg2}", arg2.Text);
            values.Add(@"{arg3}", arg3.Text);
            values.Add(@"{arg4}", arg4.Text);
            values.Add(@"{doctor.who}", doctorsBox.Text);
            TemplatesUtils.FillTemplateAndShow(templatePath, values, null);
        }
Пример #8
0
        private void trombolizisPrintBtn_Click(object sender, EventArgs e)
        {
            if (doctorOkrCB.SelectedIndex < 0)
            {
                MessageBox.Show("Введены не все данные на форме!", "Предупреждение!", MessageBoxButtons.OK);
                return;
            }
            string templatePath = Directory.GetCurrentDirectory() + "\\Templates\\trombolisis_template.doc";

            Dictionary <string, string> values = new Dictionary <string, string>();
            DdvPatient patientView             = DbDataService.GetInstance().GetDdvPatientService().GetById(patient.ObjectId);

            if (patient != null)
            {
                values.Add(@"{patient.full_name}", patientView.FullName);
                values.Add(@"{patient.med_code}", patient.MedCode);
                values.Add(@"{patient.initials}", patientView.ShortName);
            }
            values.Add(@"{date}", dateCtrl.Text);
            values.Add(@"{time}", timeCtrl.Text);
            values.Add(@"{doctor.who}", doctorOkrCB.Text);
            TemplatesUtils.FillTemplateAndShow(templatePath, values, null);
        }