public ActionResult NotificationAction(int id) { getNoOfReferralAccordingToProcessLevels(); Editor EditorNote = new Editor(System.Web.HttpContext.Current, GlobalConst.Richtexteditor.EditorNote); EditorNote.ClientFolder = GlobalConst.Richtexteditor.richtexteditor; EditorNote.Width = Unit.Pixel(1050); EditorNote.Height = Unit.Pixel(660); EditorNote.ResizeMode = RTEResizeMode.Disabled; EditorNote.DisabledItems = GlobalConst.Richtexteditor.Save_help; EditorNote.MvcInit(); ViewData[GlobalConst.Richtexteditor.EditorNote] = EditorNote.MvcGetString(); PatientAndRequestModel _patientAndRequestModel = new PatientAndRequestModel(); //int[] filetypeId = { GlobalConst.FileType.UploadInitialNotifications }; //int[] filetypeIdDoc = { GlobalConst.FileType.InitialNotification, GlobalConst.FileType.ProofofService, GlobalConst.FileType.DeterminationLetter, GlobalConst.FileType.IMRApplication }; _patientAndRequestModel = Mapper.Map <PatientAndRequestModel>(_iPreparationService.getPatientAndRequestForNotificationByReferralId(id, GlobalConst.Records.Skip, GlobalConst.Records.Take5)); _patientAndRequestModel.ReferralFile = Mapper.Map <RFAReferralFile>(_intakeService.getReferralFileByRFAReferralIDandFileType(id).FirstOrDefault()); _patientAndRequestModel.ReferralFileNotification = Mapper.Map <IEnumerable <RFAReferralFile> >(_intakeService.getReferralFileByRFAReferralIDandFileType(id)); int _order = 1; foreach (RFAReferralFile _refFile in _patientAndRequestModel.ReferralFileNotification) { _refFile.Order = _order; _order++; } StorageModel _storageModel = new StorageModel(); string toSearched = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString()); string toReplace = System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString(); foreach (RFAReferralFile _refFile in _patientAndRequestModel.ReferralFileNotification) { _storageModel = Mapper.Map <StorageModel>(_iCommonService.GetStorageStuctureByID(_refFile.RFAReferralID, GlobalConst.ConstantChar.Char_R)); _storageModel.path = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString()); _storageModel.FolderName = GlobalConst.FolderName.LegalDocs; _refFile.RFAReferralFileFullPath = (_storageService.GeneateStorage(_storageModel) + GlobalConst.ConstantChar.DoubleBackSlash + _refFile.RFAReferralFileName).Replace(toSearched, toReplace); } //int duplicateRequest = _patientAndRequestModel.RequestDetail.Count(s => s.DecisionID == GlobalConst.Decision.Duplicate); //if (duplicateRequest > 0) //{ // _patientAndRequestModel.ReferralsForDeterminationLetter = Mapper.Map<IEnumerable<PreviousReferralFromCurrentReferral>>(_intakeService.getPreviousReferralIDFromCurrentReferralInDuplicate(id)); //} return(View(_patientAndRequestModel)); }
public ActionResult saveRFARecordSplitting(RFARecordSpliting rfaRecordSpliting) { rfaRecordSpliting.RFAFileName = rfaRecordSpliting.RFARecDocumentName + System.DateTime.Now.ToString().Replace("/", "_").Replace(":", "_").Replace(" ", "_").Trim(); //create path... StorageModel _storageModel = new StorageModel(); _storageModel = Mapper.Map <StorageModel>(_commonService.GetStorageStuctureByID(rfaRecordSpliting.PatientClaimID, 'C')); _storageModel.path = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString()); _storageModel.FolderName = GlobalConst.FolderName.MedicalRecords; string saveToPath = _storageService.GeneateStorage(_storageModel); //end path.. rfaRecordSpliting.RFAFileName = _pdfSplitterService.splitPDFIntake(rfaRecordSpliting.RFARecPageStart, rfaRecordSpliting.RFARecPageEnd, Server.MapPath(System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath]), saveToPath, rfaRecordSpliting.RFAReferralFileName, rfaRecordSpliting.RFAFileName); rfaRecordSpliting.RFAUploadDate = DateTime.Now; rfaRecordSpliting.UserID = MMCUser.UserId; rfaRecordSpliting.RFARecSpltID = _intakeService.addRFARecordSplitting(Mapper.Map <serviceModel.IntakeService.RFARecordSplitting>(rfaRecordSpliting)); rfaRecordSpliting.DocumentUrl = createURLforViewFile(rfaRecordSpliting.RFAFileName, rfaRecordSpliting.PatientID, rfaRecordSpliting.PatientClaimID); return(Json(rfaRecordSpliting, GlobalConst.ContentTypes.TextHtml)); }
public FileResult PrintNotes(int PatientID) { WebClient client = new WebClient(); client.Credentials = CredentialCache.DefaultNetworkCredentials; string reportURL = string.Format(ConfigurationManager.AppSettings[GlobalConst.SSRSReportName.RptPatientsNotes], PatientID, GlobalConst.Extension.PDF); StorageModel _storageModel = new StorageModel(); _storageModel = Mapper.Map <StorageModel>(_iCommonService.GetStorageStuctureByID(PatientID, 'P')); _storageModel.path = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString()); _storageModel.FolderName = GlobalConst.FolderName.PrintNote; string Filename = PatientID.ToString() + GlobalConst.ReportName.PrintNote; string savePath = _storageService.GeneateStorage(_storageModel) + GlobalConst.ConstantChar.DoubleBackSlash + Filename; client.DownloadFile(reportURL, savePath); client.Dispose(); return(File(savePath, GlobalConst.FileDownloadExtension.Application_Pdf, Filename)); }
public ActionResult IMRAction(int id) { getNoOfReferralAccordingToProcessLevels(); Editor EditorNote = new Editor(System.Web.HttpContext.Current, GlobalConst.Richtexteditor.EditorNote); EditorNote.ClientFolder = GlobalConst.Richtexteditor.richtexteditor; EditorNote.Width = Unit.Pixel(1050); EditorNote.Height = Unit.Pixel(660); EditorNote.ResizeMode = RTEResizeMode.Disabled; EditorNote.DisabledItems = "save,help,insertgallery,insertimage,insertdocument,insertyoutube,googlemap,inserttemplate,insertmedia,insertvideo,syntaxhighlighter,html5"; EditorNote.MvcInit(); ViewData[GlobalConst.Richtexteditor.EditorNote] = EditorNote.MvcGetString(); PatientAndRequestModel _patientAndRequestModel = new PatientAndRequestModel(); _patientAndRequestModel = Mapper.Map <PatientAndRequestModel>(_iPreparationService.getPatientAndRequestByReferralId(id)); _patientAndRequestModel.ReferralFileNotification = Mapper.Map <IEnumerable <RFAReferralFile> >(_iIMRService.getMedicalAndLegalDocsByReferralID(id)); _patientAndRequestModel.IMRLetters = Mapper.Map <IEnumerable <RFAReferralFile> >(_iIMRService.GetIMRLetters(id)); StorageModel _storageModel = new StorageModel(); _storageModel = Mapper.Map <StorageModel>(_iCommonService.GetStorageStuctureByID(id, GlobalConst.ConstantChar.Char_R)); _storageModel.path = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString()); _storageModel.ReferralID = id; _storageModel.FolderName = GlobalConst.FolderName.LegalDocs; string toSearched = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString()); string toReplace = System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString(); foreach (RFAReferralFile _rfaLetterFiledetail in _patientAndRequestModel.IMRLetters) { if (_rfaLetterFiledetail.RFAFileTypeID == 16) { _rfaLetterFiledetail.RFAReferralFileFullPath = (_storageService.GeneateStorage(_storageModel) + GlobalConst.ConstantChar.DoubleBackSlash + id + "_IMRResponseLetter.pdf").Replace(toSearched, toReplace); } if (_rfaLetterFiledetail.RFAFileTypeID == 14) { _rfaLetterFiledetail.RFAReferralFileFullPath = (_storageService.GeneateStorage(_storageModel) + GlobalConst.ConstantChar.DoubleBackSlash + id + "_IMRProofOfService.pdf").Replace(toSearched, toReplace); } } return(View(_patientAndRequestModel)); }
public FileResult GeneratePatientMedRecordTemplateByPatientID(int _patientID, int _patientClaimID) { var _PatientMedicalRecordModels = _iPatientService.getPatientMedicalRecordTemplateByPatientID(_patientID); var _PatientMedicalRecordMultipleModels = _iPatientService.GetPatientMedicalRecordMultipleTemplateByPatientID(_patientID).ToList(); string savePath = ""; string Filename = ""; if (_PatientMedicalRecordModels != null) { Filename = GlobalConst.VirtualPathFolders.MedicalRecordPrintTemplate + System.DateTime.Now.ToString().Replace("/", "_").Replace(":", "_").Replace(" ", "_").Trim() + GlobalConst.Extension.pdf; StorageModel _storageModel = new StorageModel(); _storageModel = Mapper.Map <StorageModel>(_iCommonService.GetStorageStuctureByID(_patientClaimID, 'C')); _storageModel.path = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString()); _storageModel.FolderName = GlobalConst.FolderName.MedicalRecords; savePath = _storageService.GeneateStorage(_storageModel) + GlobalConst.ConstantChar.DoubleBackSlash + Filename; WebClient client = new WebClient(); client.Credentials = CredentialCache.DefaultNetworkCredentials; string reportURL = string.Format(ConfigurationManager.AppSettings[GlobalConst.SSRSReportName.RptPatientMediclRecord], _patientID, GlobalConst.Extension.PDF); client.DownloadFile(reportURL, savePath); #region PATIENT MEDICAL RECORD XML FORMAT /* * System.IO.File.Copy(Server.MapPath(GlobalConst.MMCTemplate.MedicalRecordPrintTemplate), savePath, true); * System.IO.File.SetAttributes(savePath, FileAttributes.Normal); * FileStream fs2 = new FileStream(savePath, FileMode.OpenOrCreate, FileAccess.ReadWrite); * StreamReader d = new StreamReader(fs2); * string swrtarget; * string str; * d.BaseStream.Seek(0, SeekOrigin.Begin); * swrtarget = d.ReadToEnd(); * d.Close(); * FileStream fs1 = new FileStream(savePath, FileMode.Create, FileAccess.ReadWrite); * StreamWriter s = new StreamWriter(fs1); * string strstring = @"<w:tbl> * <w:tblPr> * <w:tblStyle w:val='TableGrid'/> * <w:tblW w:w='11340' w:type='dxa'/> * <w:tblInd w:w='-905' w:type='dxa'/> * <w:tblLook w:val='04A0' w:firstRow='1' w:lastRow='0' w:firstColumn='1' w:lastColumn='0' w:noHBand='0' w:noVBand='1'/> * </w:tblPr> * <w:tblGrid> * <w:gridCol w:w='2155'/> * <w:gridCol w:w='9185'/> * </w:tblGrid> * <w:tr w:rsidR='003A361F' w:rsidTr='007958F8'> * <w:tc> * <w:tcPr> * <w:tcW w:w='2155' w:type='dxa'/> * </w:tcPr> * <w:p w:rsidR='003A361F' w:rsidRPr='007D204C' w:rsidRDefault='003A361F' w:rsidP='003A361F'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='007D204C'> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t>Patient</w:t> * </w:r> * </w:p> * </w:tc> * <w:tc> * <w:tcPr> * <w:tcW w:w='9185' w:type='dxa'/> * </w:tcPr> * <w:p w:rsidR='003A361F' w:rsidRPr='007D204C' w:rsidRDefault='004114E6' w:rsidP='004114E6'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t><![CDATA[" + _PatientMedicalRecordModels.PatientName.ToString().Trim() + @"]]></w:t> * </w:r> * </w:p> * </w:tc> * </w:tr> * <w:tr w:rsidR='003A361F' w:rsidTr='007958F8'> * <w:tc> * <w:tcPr> * <w:tcW w:w='2155' w:type='dxa'/> * <w:shd w:val='clear' w:color='auto' w:fill='F2F2F2' w:themeFill='background1' w:themeFillShade='F2'/> * </w:tcPr> * <w:p w:rsidR='003A361F' w:rsidRPr='007D204C' w:rsidRDefault='003A361F'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='007D204C'> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t>Claim</w:t> * </w:r> * </w:p> * </w:tc> * <w:tc> * <w:tcPr> * <w:tcW w:w='9185' w:type='dxa'/> * <w:shd w:val='clear' w:color='auto' w:fill='F2F2F2' w:themeFill='background1' w:themeFillShade='F2'/> * </w:tcPr> * <w:p w:rsidR='003A361F' w:rsidRPr='007D204C' w:rsidRDefault='004114E6' w:rsidP='004114E6'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t><![CDATA[" + _PatientMedicalRecordModels.Claims.ToString().Trim() + @"]]></w:t> * </w:r> * </w:p> * </w:tc> * </w:tr> * <w:tr w:rsidR='003A361F' w:rsidTr='007958F8'> * <w:tc> * <w:tcPr> * <w:tcW w:w='2155' w:type='dxa'/> * </w:tcPr> * <w:p w:rsidR='003A361F' w:rsidRPr='007D204C' w:rsidRDefault='003A361F'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='007D204C'> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t>Diagnosis</w:t> * </w:r> * </w:p> * </w:tc> * <w:tc> * <w:tcPr> * <w:tcW w:w='9185' w:type='dxa'/> * </w:tcPr> * <w:p w:rsidR='003A361F' w:rsidRPr='007D204C' w:rsidRDefault='004114E6' w:rsidP='004114E6'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t><![CDATA[" + _PatientMedicalRecordModels.Diagnosis.ToString().Trim() + @"]]></w:t> * </w:r> * </w:p> * </w:tc> * </w:tr> * <w:tr w:rsidR='003A361F' w:rsidTr='007958F8'> * <w:tc> * <w:tcPr> * <w:tcW w:w='2155' w:type='dxa'/> * <w:shd w:val='clear' w:color='auto' w:fill='F2F2F2' w:themeFill='background1' w:themeFillShade='F2'/> * </w:tcPr> * <w:p w:rsidR='003A361F' w:rsidRPr='007D204C' w:rsidRDefault='003A361F'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='007D204C'> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t>Accepted Body Parts</w:t> * </w:r> * </w:p> * </w:tc> * <w:tc> * <w:tcPr> * <w:tcW w:w='9185' w:type='dxa'/> * <w:shd w:val='clear' w:color='auto' w:fill='F2F2F2' w:themeFill='background1' w:themeFillShade='F2'/> * </w:tcPr> * <w:p w:rsidR='003A361F' w:rsidRPr='007D204C' w:rsidRDefault='004114E6' w:rsidP='004114E6'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t><![CDATA[" + _PatientMedicalRecordModels.AcceptedBodyParts.ToString().Trim() + @"]]></w:t> * </w:r> * </w:p> * </w:tc> * </w:tr> * <w:tr w:rsidR='003A361F' w:rsidTr='007958F8'> * <w:tc> * <w:tcPr> * <w:tcW w:w='2155' w:type='dxa'/> * </w:tcPr> * <w:p w:rsidR='003A361F' w:rsidRPr='007D204C' w:rsidRDefault='003A361F'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='007D204C'> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t>Denied Body Parts</w:t> * </w:r> * </w:p> * </w:tc> * <w:tc> * <w:tcPr> * <w:tcW w:w='9185' w:type='dxa'/> * </w:tcPr> * <w:p w:rsidR='003A361F' w:rsidRPr='007D204C' w:rsidRDefault='004114E6' w:rsidP='004114E6'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t><![CDATA[" + _PatientMedicalRecordModels.DeniedBodyParts.ToString().Trim() + @"]]></w:t> * </w:r> * </w:p> * </w:tc> * </w:tr> * <w:tr w:rsidR='003A361F' w:rsidTr='007958F8'> * <w:tc> * <w:tcPr> * <w:tcW w:w='2155' w:type='dxa'/> * <w:shd w:val='clear' w:color='auto' w:fill='F2F2F2' w:themeFill='background1' w:themeFillShade='F2'/> * </w:tcPr> * <w:p w:rsidR='003A361F' w:rsidRPr='007D204C' w:rsidRDefault='003A361F'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='007D204C'> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t>Discovery Body Parts</w:t> * </w:r> * </w:p> * </w:tc> * <w:tc> * <w:tcPr> * <w:tcW w:w='9185' w:type='dxa'/> * <w:shd w:val='clear' w:color='auto' w:fill='F2F2F2' w:themeFill='background1' w:themeFillShade='F2'/> * </w:tcPr> * <w:p w:rsidR='003A361F' w:rsidRPr='007D204C' w:rsidRDefault='004114E6' w:rsidP='004114E6'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t><![CDATA[" + _PatientMedicalRecordModels.DiscoveryBodyParts.ToString().Trim() + @"]]></w:t> * </w:r> * </w:p> * </w:tc> * </w:tr> * </w:tbl>"; * str = swrtarget.Replace("#PatientMedRect#", strstring.ToString().Trim()); * string str1 = "<w:tbl>"; * for (int i = 0; i < _PatientMedicalRecordMultipleModels.Count; i++) * { #region * str1 += @" * <w:tblPr> * <w:tblStyle w:val='TableGrid'/> * <w:tblW w:w='11340' w:type='dxa'/> * <w:tblInd w:w='-905' w:type='dxa'/> * <w:tblLook w:val='04A0' w:firstRow='1' w:lastRow='0' w:firstColumn='1' w:lastColumn='0' w:noHBand='0' w:noVBand='1'/> * </w:tblPr> * <w:tblGrid> * <w:gridCol w:w='1611'/> * <w:gridCol w:w='1845'/> * <w:gridCol w:w='7884'/> * </w:tblGrid> * <w:tr w:rsidR='007D204C' w:rsidRPr='007958F8' w:rsidTr='00502C2C'> * <w:tc> * <w:tcPr> * <w:tcW w:w='1611' w:type='dxa'/> * <w:shd w:val='clear' w:color='auto' w:fill='7030A0'/> * </w:tcPr> * <w:p w:rsidR='004114E6' w:rsidRPr='007958F8' w:rsidRDefault='007D204C' w:rsidP='00177542'> * <w:pPr> * <w:rPr> * <w:b/> * <w:color w:val='BFBFBF' w:themeColor='background1' w:themeShade='BF'/> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='007958F8'> * <w:rPr> * <w:b/> * <w:color w:val='BFBFBF' w:themeColor='background1' w:themeShade='BF'/> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t>Name</w:t> * </w:r> * </w:p> * </w:tc> * <w:tc> * <w:tcPr> * <w:tcW w:w='1845' w:type='dxa'/> * <w:shd w:val='clear' w:color='auto' w:fill='7030A0'/> * </w:tcPr> * <w:p w:rsidR='007D204C' w:rsidRPr='007958F8' w:rsidRDefault='007D204C' w:rsidP='00177542'> * <w:pPr> * <w:rPr> * <w:b/> * <w:color w:val='BFBFBF' w:themeColor='background1' w:themeShade='BF'/> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='007958F8'> * <w:rPr> * <w:b/> * <w:color w:val='BFBFBF' w:themeColor='background1' w:themeShade='BF'/> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t>Date</w:t> * </w:r> * </w:p> * </w:tc> * <w:tc> * <w:tcPr> * <w:tcW w:w='7884' w:type='dxa'/> * <w:shd w:val='clear' w:color='auto' w:fill='7030A0'/> * </w:tcPr> * <w:p w:rsidR='007D204C' w:rsidRPr='007958F8' w:rsidRDefault='007D204C' w:rsidP='00177542'> * <w:pPr> * <w:rPr> * <w:b/> * <w:color w:val='BFBFBF' w:themeColor='background1' w:themeShade='BF'/> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='007958F8'> * <w:rPr> * <w:b/> * <w:color w:val='BFBFBF' w:themeColor='background1' w:themeShade='BF'/> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t>Physician</w:t> * </w:r> * </w:p> * </w:tc> * </w:tr> * <w:tr w:rsidR='007D204C' w:rsidRPr='007958F8' w:rsidTr='007958F8'> * <w:tc> * <w:tcPr> * <w:tcW w:w='1611' w:type='dxa'/> * </w:tcPr> * <w:p w:rsidR='007D204C' w:rsidRPr='00F601AA' w:rsidRDefault='00DD6770' w:rsidP='00177542'> * <w:pPr> * <w:rPr> * <w:color w:val='000000' w:themeColor='text1'/> * <w:sz w:val='18'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='00F601AA'> * <w:rPr> * <w:color w:val='000000' w:themeColor='text1'/> * <w:sz w:val='18'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t><![CDATA[" + _PatientMedicalRecordMultipleModels[i].PatMRDocumentName.ToString().Replace(".pdf", "").Trim() + @" ]]></w:t> * </w:r> * </w:p> * </w:tc> * <w:tc> * <w:tcPr> * <w:tcW w:w='1845' w:type='dxa'/> * </w:tcPr> * <w:p w:rsidR='007D204C' w:rsidRPr='00F601AA' w:rsidRDefault='00DD6770' w:rsidP='00177542'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='00F601AA'> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t><![CDATA[" + String.Format("{0:MM/dd/yyyy}", _PatientMedicalRecordMultipleModels[i].PatMRDocumentDate) + @"]]></w:t> * </w:r> * </w:p> * </w:tc> * <w:tc> * <w:tcPr> * <w:tcW w:w='7884' w:type='dxa'/> * </w:tcPr> * <w:p w:rsidR='007D204C' w:rsidRPr='00F601AA' w:rsidRDefault='00DD6770' w:rsidP='00177542'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='00F601AA'> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t><![CDATA[" + _PatientMedicalRecordMultipleModels[i].PhysicianName.ToString().Trim() + @"]]></w:t> * </w:r> * </w:p> * </w:tc> * </w:tr> * <w:tr w:rsidR='007D204C' w:rsidRPr='007958F8' w:rsidTr='007958F8'> * <w:tc> * <w:tcPr> * <w:tcW w:w='1611' w:type='dxa'/> * </w:tcPr> * <w:p w:rsidR='007D204C' w:rsidRPr='00F601AA' w:rsidRDefault='00DD6770' w:rsidP='00177542'> * <w:pPr> * <w:rPr> * <w:sz w:val='18'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='00F601AA'> * <w:rPr> * <w:sz w:val='18'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t>Diagnosis</w:t> * </w:r> * </w:p> * </w:tc> * <w:tc> * <w:tcPr> * <w:tcW w:w='9729' w:type='dxa'/> * <w:gridSpan w:val='2'/> * </w:tcPr> * <w:p w:rsidR='007D204C' w:rsidRPr='00F601AA' w:rsidRDefault='00DD6770' w:rsidP='00177542'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='00F601AA'> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t><![CDATA[" + _PatientMedicalRecordMultipleModels[i].Diagnosis.ToString().Trim() + @"]]></w:t> * </w:r> * </w:p> * </w:tc> * </w:tr> * <w:tr w:rsidR='007D204C' w:rsidRPr='007958F8' w:rsidTr='007958F8'> * <w:tc> * <w:tcPr> * <w:tcW w:w='11340' w:type='dxa'/> * <w:gridSpan w:val='3'/> * </w:tcPr> * <w:p w:rsidR='007D204C' w:rsidRPr='00F601AA' w:rsidRDefault='00DD6770' w:rsidP='00177542'> * <w:pPr> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * </w:pPr> * <w:r w:rsidRPr='00F601AA'> * <w:rPr> * <w:sz w:val='20'/> * <w:szCs w:val='20'/> * </w:rPr> * <w:t><![CDATA[" + _PatientMedicalRecordMultipleModels[i].Summary.ToString().Trim() + @"]]></w:t> * </w:r> * </w:p> * </w:tc> * </w:tr> * "; * } #endregion * str1 += " </w:tbl>"; * str = str.Replace("#RecordDesc#", str1.ToString().Trim()); * s.WriteLine(str); * s.Flush(); * s.Close(); * fs1.Close(); * fs2.Close(); */ #endregion } return(File(savePath, GlobalConst.FileDownloadExtension.Application_Pdf, Filename)); }
public ActionResult AddLinkForSendingEmail(IEnumerable <AdditionalDocument> AdditionalDocumentDetails, IEnumerable <PreviousLinks> PreviousAttachmentLinks) { double totalMB = 0; List <string> _urlPathForEmailAttachment = new List <string>(); var _previousAttachmentLinks = PreviousAttachmentLinks; var _listAdditionalRFAReferralIDList = AdditionalDocumentDetails.Where(doc => doc.IsChecked).Select(doc => new { doc.RFAReferralID, doc.PatientClaimID, doc.DocumentName, doc.RFAFileName, doc.TypeName, doc.FileID }).Distinct(); foreach (var _listDoc in _listAdditionalRFAReferralIDList) { string savePath = ""; string saveFullPathWithFileName = ""; StorageModel _storageModel = new StorageModel(); if (_listDoc.TypeName == GlobalConst.ConstantName.URHistory) { var _IsIntakeUpload = _listDoc.RFAFileName.Split('_'); if (_IsIntakeUpload[1].ToString() == GlobalConst.ConstantName.IntakeUploadpdf) { string _virtualPath = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString()); savePath = _virtualPath + GlobalConst.VirtualPathFolders.IntakeUploadFiles + GlobalConst.ConstantChar.DoubleBackSlash + _listDoc.RFAFileName; } else { _storageModel = Mapper.Map <StorageModel>(_iCommonService.GetStorageStuctureByID(_listDoc.RFAReferralID, GlobalConst.ConstantChar.Char_R)); _storageModel.path = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString()); _storageModel.FolderName = GlobalConst.FolderName.LegalDocs; savePath = _storageService.GeneateStorage(_storageModel) + GlobalConst.ConstantChar.DoubleBackSlash + _listDoc.RFAFileName; } } else { _storageModel = Mapper.Map <StorageModel>(_iCommonService.GetStorageStuctureByID(_listDoc.PatientClaimID, GlobalConst.ConstantChar.Char_C)); _storageModel.path = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString()); _storageModel.FolderName = GlobalConst.FolderName.MedicalRecords; savePath = _storageService.GeneateStorage(_storageModel) + GlobalConst.ConstantChar.DoubleBackSlash + _listDoc.RFAFileName; } Tuple <string, string, string> savePathWithFileName = CombinedLinkForAttachement(savePath, _listDoc.RFAFileName); saveFullPathWithFileName = savePathWithFileName.ToString(); saveFullPathWithFileName = Regex.Replace(saveFullPathWithFileName, "[()|{}]", ""); _urlPathForEmailAttachment.Add(saveFullPathWithFileName); totalMB += CalculateAttachmentInMB(savePath); } foreach (var _sessionWithName in _previousAttachmentLinks) { if (_sessionWithName != null) { var fullPath = _sessionWithName.AttachmentLink.Split(','); totalMB += CalculateAttachmentInMB(fullPath[0]); _urlPathForEmailAttachment.Add(_sessionWithName.AttachmentLink); } } if (totalMB < GlobalConst.ConstantChar.TwenetyOne) { return(Json(_urlPathForEmailAttachment, GlobalConst.ContentTypes.TextHtml)); } else { return(Json(GlobalConst.ConstantName.ExceedLimit, GlobalConst.ContentTypes.TextHtml)); } }
public ActionResult CreateInvoice(IEnumerable <Billing> BillingDetails) { string referralIDList = GlobalConst.ConstantChar.StringBlank; int _patClientID = 0; bool CreateStatement = false; List <int> _listInvoiceNum = new List <int>(); List <RFAReferralInvoice> _InvoiceModelList = new List <RFAReferralInvoice>(); RFAReferralAdditionalLink objAdditionalLinkInvoice = new RFAReferralAdditionalLink(); var _listPatientClaimID = BillingDetails.Where(claim => claim.IsChecked).Select(claim => claim.PatientClaimID).Distinct(); //Check Whether to create Statement or not var _clientPrivateLabel = _iClientService.getClientPrivateLabelDetailByClientID(BillingDetails.FirstOrDefault().PatClientID); if (_clientPrivateLabel != null) { if (_clientPrivateLabel.ClientStatementStart != null) { CreateStatement = true; } } //Optimized Removed Foreach....For adding referralID in List and generating the InvoiceTemplate according to InvoiceID foreach (var _patClaimID in _listPatientClaimID) // For adding referralID in List and generating the InvoiceTemplate according to InvoiceID { var _referralIDList = BillingDetails.Where(claim => claim.IsChecked && claim.PatientClaimID == _patClaimID).Select(claim => new { claim.RFAReferralID, claim.PatClientID }).Distinct(); foreach (var refId in _referralIDList) { referralIDList += refId.RFAReferralID.ToString() + ","; _patClientID = refId.PatClientID; } //Optimized Removed Foreach....For Adding PatientClaimID in List StorageModel _storageModel = new StorageModel(); MMCApp.Domain.Models.IntakeModel.RFAReferralFile _rfaReferralFile = new MMCApp.Domain.Models.IntakeModel.RFAReferralFile(); _storageModel = Mapper.Map <StorageModel>(_iCommonService.GetStorageStuctureByID(_patClaimID, GlobalConst.ConstantChar.Char_C)); _storageModel.path = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString()); _storageModel.FolderName = GlobalConst.FolderName.Invoices; RFAReferralInvoice _InvoiceModel = new RFAReferralInvoice(); _InvoiceModel.ClientID = _patClientID; _InvoiceModel.PatientClaimID = _patClaimID; _InvoiceModel.UserID = MMCUser.UserId; _InvoiceModel.CreatedDate = System.DateTime.Now; _InvoiceModel.RFAReferralInvoiceID = 0; string _invoiceNum = _iBillingService.addRFAReferralInvoice(Mapper.Map <MMCService.BillingService.RFAReferralInvoice>(_InvoiceModel)); string Filename = _invoiceNum + GlobalConst.ReportName.Invoice + GlobalConst.Extension.pdf; string savePath = _storageService.GeneateStorage(_storageModel) + GlobalConst.ConstantChar.DoubleBackSlash + Filename; string reportURL = string.Format(ConfigurationManager.AppSettings[GlobalConst.SSRSReportName.RptInvoice], referralIDList, _patClaimID, _invoiceNum, GlobalConst.Extension.PDF); if (System.IO.File.Exists(savePath)) { System.IO.File.Delete(savePath); } using (WebClient client = new WebClient()) { client.Credentials = CredentialCache.DefaultNetworkCredentials; client.DownloadFile(reportURL, savePath); client.Dispose(); referralIDList = ""; } _InvoiceModel.InvoiceNumber = _invoiceNum; _InvoiceModelList.Add(_InvoiceModel); int _invoiceID = 0; _invoiceID = _iBillingService.getInvoiceIDByInvoiceNumber(_invoiceNum); foreach (var _refID in _referralIDList) { objAdditionalLinkInvoice.RFAReferralID = _refID.RFAReferralID; objAdditionalLinkInvoice.RFAReferralInvoiceID = _invoiceID; _intakeService.AddUpdateRFAReferralAdditionalLinkInvoiceIDbyRefID(Mapper.Map <MMCService.IntakeService.RFAReferralAdditionalLink>(objAdditionalLinkInvoice)); if (CreateStatement == false) { _iPreparationService.updateProcessLevel(_refID.RFAReferralID, GlobalConst.ProcessLevel.FileStorage); } } } //..........Statement if (CreateStatement == true) { ClientStatement _ClientStatement = new ClientStatement(); _ClientStatement.ClientID = BillingDetails.FirstOrDefault().PatClientID; _ClientStatement.UserID = MMCUser.UserId; _ClientStatement.CreationDate = DateTime.Now; int _StatementId = _iBillingService.addClientStatement(Mapper.Map <MMCService.BillingService.ClientStatement>(_ClientStatement)); string StmntNum = _iBillingService.getStatementNumberByStatementID(_StatementId); //Add statementID to foreach (var _patClaimID in _listPatientClaimID) // For adding referralID in List and generating the InvoiceTemplate according to InvoiceID { var _referralIDListStatement = BillingDetails.Where(claim => claim.IsChecked && claim.PatientClaimID == _patClaimID).Select(claim => new { claim.RFAReferralID, claim.PatClientID }).Distinct(); foreach (var _refID in _referralIDListStatement) { objAdditionalLinkInvoice.RFAReferralID = _refID.RFAReferralID; objAdditionalLinkInvoice.ClientStatementID = _StatementId; _intakeService.AddUpdateRFAReferralAdditionalLinkStatementIDbyRefID(Mapper.Map <MMCService.IntakeService.RFAReferralAdditionalLink>(objAdditionalLinkInvoice)); _iPreparationService.updateProcessLevel(_refID.RFAReferralID, GlobalConst.ProcessLevel.FileStorage); } } string StateMentFilename = StmntNum + "_" + GlobalConst.FileName.InvoiceStatement + GlobalConst.Extension.pdf; string StatementsavePath = Server.MapPath(System.Configuration.ConfigurationManager.AppSettings[GlobalConst.VirtualDirectoryPath.VirtualPath].ToString()); //+GlobalConst.ConstantChar.DoubleBackSlash + Filename; StatementsavePath += GlobalConst.ConstantChar.DoubleBackSlash + _ClientStatement.ClientID + GlobalConst.ConstantChar.DoubleBackSlash + GlobalConst.FolderName.InvoiceStatement; if (!System.IO.Directory.Exists(StatementsavePath)) { System.IO.Directory.CreateDirectory(StatementsavePath); } StatementsavePath += GlobalConst.ConstantChar.DoubleBackSlash + StateMentFilename; string reportURL = string.Format(ConfigurationManager.AppSettings[GlobalConst.SSRSReportName.RptClientInvoiceStatement], _StatementId, _ClientStatement.ClientID, GlobalConst.Extension.PDF); if (System.IO.File.Exists(StatementsavePath)) { System.IO.File.Delete(StatementsavePath); } using (WebClient client = new WebClient()) { client.Credentials = CredentialCache.DefaultNetworkCredentials; client.DownloadFile(reportURL, StatementsavePath); client.Dispose(); } } // Tuple<string, string> t = DownloadPrintDocumnent(_InvoiceModelList); // return File(t.Item1, GlobalConst.FileDownloadExtension.Application_Pdf, t.Item2); return(Json(GlobalConst.Message.InvoiceCreatedSuccessfully)); }