예제 #1
0
        private void printVICHAggreement_Click(object sender, EventArgs e)
        {
            string templatePath = Directory.GetCurrentDirectory() + "\\Templates\\aid_aggrement_template.docx";

            Console.Write(templatePath);
            DataService service = new DataService();
            DdtPatient  patient = service.queryObject <DdtPatient>(@"Select * from ddt_patient");

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

            values.Add(@"{patient.full_name}", "");
            values.Add(@"{date}", @"23/05/2018");
            values.Add(@"{patient.birthdate}", @"23/05/1919");
            TemplatesUtils.fillTemplate(templatePath, values);
        }
예제 #2
0
        private void printBtn_Click(object sender, EventArgs e)
        {
            if (getIsNotValid())
            {
                MessageBox.Show("Введены не все данные на форме!", "Предупреждение!", MessageBoxButtons.OK);
                return;
            }

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

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

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

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

            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.fillTemplate(templatePath, values);
        }
예제 #4
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (getIsNotValid())
            {
                MessageBox.Show("Введены не все данные на форме!", "Предупреждение!", MessageBoxButtons.OK);
                return;
            }

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

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

            values.Add(@"{time}", timeCtrl.Text);
            values.Add(@"{doctor.appointment_name}", "");
            values.Add(@"{patient.full_name}", patient.DssFullName);
            values.Add(@"{patient.birthdate}", "");
            values.Add(@"{patient.sex}", "");
            values.Add(@"{patient.medcode}", patient.DssMedCode);
            values.Add(@"{doctor.who}", doctorsBox.Text);
            TemplatesUtils.fillTemplate(templatePath, values);
        }
예제 #5
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.docx";

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

            if (patient != null)
            {
                values.Add(@"{patient.full_name}", patient.DssFullName);
                values.Add(@"{patient.med_code}", patient.DssMedCode);
                values.Add(@"{patient.initials}", patient.DssInitials);
            }
            values.Add(@"{date}", dateCtrl.Text);
            values.Add(@"{time}", timeCtrl.Text);
            values.Add(@"{doctor.who}", doctorOkrCB.Text);
            TemplatesUtils.fillTemplate(templatePath, values);
        }
예제 #6
0
        private void printBtn_Click(object sender, EventArgs e)
        {
            if (getIsNotValid())
            {
                MessageBox.Show("Введены не все данные на форме!", "Предупреждение!", MessageBoxButtons.OK);
                return;
            }

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

            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.fillTemplate(templatePath, values);
        }