Exemplo n.º 1
0
        private void btnInformeMedicoTrabajador_Click(object sender, EventArgs e)
        {
            saveFileDialog1.FileName = string.Format("{0} Informe Resumen", _personFullName);
            saveFileDialog1.Filter   = "Files (*.pdf;)|*.pdf;";

            //try
            //{

            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            {
                using (new LoadingClass.PleaseWait(this.Location, "Generando..."))
                {
                    this.Enabled = false;

                    var filiationData = _pacientBL.GetPacientReportEPS(_serviceId);

                    var personMedicalHistory = _historyBL.GetPersonMedicalHistoryReport(_pacientId);

                    var noxiousHabit = _historyBL.GetNoxiousHabitsReport(_pacientId);

                    var familyMedicalAntecedent = _historyBL.GetFamilyMedicalAntecedentsReport(_pacientId);

                    var anamnesis = _serviceBL.GetAnamnesisReport(_serviceId);

                    var serviceComponents = _serviceBL.GetServiceComponentsReport(_serviceId);

                    var diagnosticRepository = _serviceBL.GetServiceComponentConclusionesDxServiceIdReport(_serviceId);

                    var MedicalCenter = _serviceBL.GetInfoMedicalCenter();

                    ReportPDF.CreateMedicalReportForTheWorker(filiationData,
                                                              personMedicalHistory,
                                                              noxiousHabit,
                                                              familyMedicalAntecedent,
                                                              anamnesis,
                                                              serviceComponents,
                                                              diagnosticRepository,
                                                              _customerOrganizationName,
                                                              MedicalCenter,
                                                              saveFileDialog1.FileName);

                    this.Enabled = true;
                }
            }
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(ex.Message, "ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            //    this.Enabled = true;
            //}
        }
Exemplo n.º 2
0
        private void GenerateInformeMedicoTrabajador(string pathFile, string ServicioId, string PacienteId, string EmpresaCliente)
        {
            var filiationData           = _pacientBL.GetPacientReportEPS(ServicioId);
            var personMedicalHistory    = _historyBL.GetPersonMedicalHistoryReport(PacienteId);
            var noxiousHabit            = _historyBL.GetNoxiousHabitsReport(PacienteId);
            var familyMedicalAntecedent = _historyBL.GetFamilyMedicalAntecedentsReport(PacienteId);
            var anamnesis            = _serviceBL.GetAnamnesisReport(ServicioId);
            var serviceComponents    = _serviceBL.GetServiceComponentsReport(ServicioId);
            var diagnosticRepository = _serviceBL.GetServiceComponentConclusionesDxServiceIdReport(ServicioId);
            var MedicalCenter        = _serviceBL.GetInfoMedicalCenter();

            ReportPDF.CreateMedicalReportForTheWorker(filiationData,
                                                      personMedicalHistory,
                                                      noxiousHabit,
                                                      familyMedicalAntecedent,
                                                      anamnesis,
                                                      serviceComponents,
                                                      diagnosticRepository,
                                                      EmpresaCliente,
                                                      MedicalCenter,
                                                      pathFile);
        }