public void getReporteFat(int id, string tipo) { this.archivo = new ArchivoModel(); IFATService _fat = new FATService(); this.rutaImagen = ConstantesCache.rutaImagen + "LogoClinicaJCI.png"; string rutaPlantilla = ConstantesCache.rutaArchivos + "FAT_PDF\\"; string rutaPlantillaHeader = string.Empty; string tipoR = (tipo == "R") ? "RM" : (tipo == "X") ? "RAD" : (tipo == "L") ? "LAB" : "FAT"; var fatdto = _fat.getFATReporte(id, tipoR); AtencionTmModel fat = DTOToModel.FatModel(fatdto); fat.dx = DTOToModel.listarDiagnostico(fatdto.diagnosticos); if (tipo == "R") { rutaPlantillaHeader = string.Concat(rutaPlantilla, "FatHeader_PDF.html"); rutaPlantilla += "FatRecetavirtual_PDF.html"; fat.medicinas = DTOToModel.listMedicinas(fatdto.medicinas); FAT_RecetaPDF rmodel = recetaReporte(fat); this.archivo.pdf = generarReporte(rutaPlantilla, rutaPlantillaHeader, rmodel, ""); } else if (tipo == "X") { rutaPlantillaHeader = string.Concat(rutaPlantilla, "FatHeader_PDF.html"); rutaPlantilla += "FatRadiologiaVirtual_PDF.html"; fat.radiologia = DTOToModel.listaServisioFAT(fatdto.radiologia); FAT_RadiologiaPDF rmodel = radReporte(fat); this.archivo.pdf = generarReporte(rutaPlantilla, rutaPlantillaHeader, rmodel, ""); } else if (tipo == "L") { rutaPlantillaHeader = string.Concat(rutaPlantilla, "FatHeader_PDF.html"); rutaPlantilla += "FatLaboratorioVirtual_PDF.html"; fat.laboratorio = DTOToModel.listaServisioFAT(fatdto.laboratorio); FAT_LaboratorioPDF rmodel = labReporte(fat); this.archivo.pdf = generarReporte(rutaPlantilla, rutaPlantillaHeader, rmodel, ""); } else { rutaPlantillaHeader = string.Concat(rutaPlantilla, "FatHeader_PDF.html"); rutaPlantilla += "FatAtencionVirtual_PDF.html"; fat.laboratorio = DTOToModel.listaServisioFAT(fatdto.laboratorio); fat.radiologia = DTOToModel.listaServisioFAT(fatdto.radiologia); fat.medicinas = DTOToModel.listMedicinas(fatdto.medicinas); FAT_AtencionPDF rmodel = fatReporte(fat); this.archivo.pdf = generarReporte(rutaPlantilla, rutaPlantillaHeader, rmodel, ""); } }
public void getFAT(Guid id) { IFATService _fatService = new FATService(); this.atencionTM = new AtencionTmModel(); var videoConferencia = _fatService.getVideoConferencia(id); if (videoConferencia != null) { var fatdto = _fatService.getFAT(videoConferencia.AtencionId); this.atencionTM = DTOToModel.FatModel(fatdto); this.atencionTM.dx = DTOToModel.listarDiagnostico(fatdto.diagnosticos); this.atencionTM.radiologia = DTOToModel.listaServisioFAT(fatdto.radiologia); this.atencionTM.laboratorio = DTOToModel.listaServisioFAT(fatdto.laboratorio); this.atencionTM.medicinas = DTOToModel.listMedicinas(fatdto.medicinas); this.atencionTM.VideoConferencia = DTOToModel.ObtenerVideoConferenciaModelDesdeDTO(fatdto.VideoConferencia); } }