示例#1
0
        public ILResponse UpdateAtlasCaseToGYB([FromBody] IEnumerable <TransferredCaseData> transferredCases)
        {
            ILResponse response = new ILResponse();
            var        context  = new HttpContextWrapper(HttpContext.Current);

            try
            {
                CaseTransferService service = new CaseTransferService();
                service.UpdateAtlasCaseToGYB(transferredCases);

                response.MessageCode  = MessageCodes.REQUEST_SUCCESS;
                response.MessageText  = MSG_SUCCESS;
                response.MessageType  = EnumMessageType.OPERATION_SUCCESS;
                response.HasException = false;
            }
            catch (Exception ex)
            {
                response.MessageCode  = MessageCodes.REQUEST_ERROR;
                response.HasException = true;
                response.MessageText  = ex.Message;
                response.MessageType  = EnumMessageType.OPERATION_APPLICATION_ERROR;
                response.Exception    = ex.ToString();

                log.Error("Error: " + ex.Message + ex.StackTrace);
            }

            return(response);
        }
示例#2
0
        public ILResponse GetReconcillationReport([FromUri] string lawFirmCaseManagerAppName)
        {
            ILResponse response = new ILResponse();

            try
            {
                CaseTransferService service = new CaseTransferService();
                var recon = service.GetReconcillationReport(lawFirmCaseManagerAppName);

                response.MessageCode  = MessageCodes.REQUEST_SUCCESS;
                response.MessageText  = MSG_SUCCESS;
                response.MessageType  = EnumMessageType.OPERATION_SUCCESS;
                response.HasException = false;
                response.Add(recon);
            }
            catch (Exception ex)
            {
                response.MessageCode  = MessageCodes.REQUEST_ERROR;
                response.HasException = true;
                response.MessageText  = ex.Message;
                response.MessageType  = EnumMessageType.OPERATION_APPLICATION_ERROR;
                response.Exception    = ex.ToString();

                log.Error("Error: " + ex.Message + ex.StackTrace);
            }

            return(response);
        }
示例#3
0
        public ILResponse TransferGYBBillsToAtlas([FromBody] IEnumerable <LawFirmID> lstFirms)
        {
            ILResponse response = new ILResponse();
            var        context  = new HttpContextWrapper(HttpContext.Current);

            try
            {
                CaseTransferService     service  = new CaseTransferService();
                IEnumerable <CaseModel> caseList = service.GetTransferredCases(lstFirms);

                response.MessageCode = MessageCodes.REQUEST_SUCCESS;
                response.MessageText = MSG_SUCCESS;
                response.MessageType = EnumMessageType.OPERATION_SUCCESS;
                response.Add(caseList);
                response.HasException = false;
            }
            catch (Exception ex)
            {
                response.MessageCode  = MessageCodes.REQUEST_ERROR;
                response.HasException = true;
                response.MessageText  = ex.Message;
                response.MessageType  = EnumMessageType.OPERATION_APPLICATION_ERROR;
                response.Exception    = ex.ToString();
                log.Error("Error: " + ex.Message + ex.StackTrace);
            }

            return(response);
        }
示例#4
0
        public ILResponse UploadFile([FromBody] FileData fileObject)
        {
            ILResponse response  = new ILResponse();
            DateTime   startTime = DateTime.UtcNow;
            var        context   = new HttpContextWrapper(HttpContext.Current);

            if (fileObject == null ||
                fileObject.FileName == string.Empty || fileObject.FileName == null ||
                fileObject.FilePath == string.Empty || fileObject.FilePath == null ||
                fileObject.FileContent == null || fileObject.FileContent.Length == 0)
            {
                response.MessageCode  = MessageCodes.REQUEST_INCOMPLETE;
                response.HasException = true;
                response.MessageText  = MSG_FAILED;
                response.MessageType  = EnumMessageType.OPERATION_TECHNICAL_ERROR;
                response.Exception    = "Bad request. Request contains no data";

                return(response);
            }

            try
            {
                CaseTransferService service = new CaseTransferService();

                string pyisicalBasePath = service.GetParameterValue("PhysicalBasePath");

                if (!Directory.Exists(pyisicalBasePath + fileObject.FilePath))
                {
                    Directory.CreateDirectory(pyisicalBasePath + fileObject.FilePath);
                }
                File.WriteAllBytes(pyisicalBasePath + fileObject.FilePath + fileObject.FileName, fileObject.FileContent);

                response.MessageCode   = "1";
                response.TransactionID = "900000000000001";
                response.MessageText   = MSG_SUCCESS;
                response.MessageType   = EnumMessageType.OPERATION_SUCCESS;
                response.Add(service.GetParameterValue("BasePathId"));
                response.HasException = false;

                return(response);
            }
            catch (Exception ex)
            {
                response.HasException = true;
                response.MessageText  = ex.Message;
                response.MessageType  = EnumMessageType.OPERATION_APPLICATION_ERROR;
                response.Exception    = ex.ToString();
                log.Error("Error: " + ex.Message + ex.StackTrace);

                return(response);
            }
        }
示例#5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            lblMsg.Text = "";
            try
            {
                //string caseId = "";
                string         ProcedureGroupId = "";
                string         url     = ConfigurationManager.AppSettings["UrlOfpdf"].ToString();
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
                request.Method = "POST";
                webapi.doctor.models.AppointmentRequest model = new webapi.doctor.models.AppointmentRequest();
                model.User            = new webapi.doctor.da.gb.model.user.User();
                model.User.ID         = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID;
                model.User.UserName   = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_NAME;
                model.User.Domain     = "GogreenBills.com";
                model.User.Token      = ((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ROLE_NAME;
                model.User.Account    = new webapi.doctor.da.gb.model.account.Account();
                model.User.Account.ID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID.ToString();
                Bill_Sys_Upload_VisitReport GetSpecialty = new Bill_Sys_Upload_VisitReport();
                ProcedureGroupId = GetSpecialty.GetDoctorSpecialty(Request.QueryString["Doc"].ToString(), ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID.ToString());

                model.User.Specialty      = new webapi.doctor.da.gb.model.specialty.Specialty();
                model.User.Specialty.ID   = ProcedureGroupId;
                model.User.Specialty.Code = GetSpecialty.GetDoctorSpecialtyCode(Request.QueryString["Doc"].ToString(), ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID.ToString());
                model.User.Physician      = new webapi.doctor.da.gb.model.physician.Physician();
                model.User.Physician.ID   = Request.QueryString["Doc"].ToString();
                model.Appointment         = new webapi.doctor.da.gb.model.appointment.Appointment();
                model.Appointment.ID      = Convert.ToInt32(Request.QueryString["eid"].ToString());
                request.ContentType       = "application/json";

                JavaScriptSerializer serializer = new JavaScriptSerializer();
                using (var sw = new StreamWriter(request.GetRequestStream()))
                {
                    string json = serializer.Serialize(model);
                    sw.Write(json);
                    sw.Flush();
                }
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                var             sr       = new StreamReader(response.GetResponseStream());
                // read the response stream as Text.
                var xml = sr.ReadToEnd();
                JavaScriptSerializer json_serializer = new JavaScriptSerializer();
                //Object obj =json_serializer.DeserializeObject(xml);
                ILResponse r    = JsonConvert.DeserializeObject <ILResponse>(xml);
                string[]   Path = r.Data[0].ToString().Split(',');
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ViewCHNotes", "<script type='text/javascript'>showpopup(" + Path [1].ToString().Replace("]", "") + "); </script>");
//                this.Page.ClientScript.RegisterClientScriptBlock(base.GetType(), "sandeep", string.Concat("<script type='text/javascript'>window.location.href='", Path[1].ToString(), "'</script>"));
            }
            catch (Exception ex)
            {
                lblMsg.Text    = ex.ToString();
                lblMsg.Visible = true;
            }
        }

        //if (Request.QueryString["cid"] != null)
        //{
        //    caseId = Request.QueryString["cid"].ToString();
        //}
        //string Pid = "";
        //if (Request.QueryString["eid"] != null)
        //{
        //    eventId = Request.QueryString["eid"].ToString();
        //    if (!IsPostBack)
        //    {
        //        Session["UploadReport_VisitType"] = Request.QueryString["Type"].ToString();
        //        Session["UploadReport_DoctorId"] = Request.QueryString["Doc"].ToString();

        //        if (Request.QueryString["pgid"].ToString() == null || Request.QueryString["pgid"].ToString() == "")
        //        {
        //            Pid = "&nbsp";
        //        }
        //        Pid = Request.QueryString["pgid"].ToString();
        //        Bill_Sys_Upload_VisitReport GetSpecialty = new Bill_Sys_Upload_VisitReport();
        //        ProcedureGroupId = GetSpecialty.GetDoctorSpecialty(Session["UploadReport_DoctorId"].ToString(), ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID.ToString());
        //        //if ((Pid.Substring(0, 1) == "&") || (Pid.Substring(0, 1) == "n"))
        //        //    ProcedureGroupId = GetSpecialty.GetDoctorSpecialty(Session["UploadReport_DoctorId"].ToString(), ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID.ToString());
        //        //else
        //        //    ProcedureGroupId = Pid;

        //        Session["UploadReport_ProcedureGroupId"] = ProcedureGroupId;
        //        Session["UploadReport_EventId"] = Request.QueryString["eid"].ToString();
        //    }
        //    procedureGroupCode = ProcedureGroupId;

        //    string OutputFilePath = "";
        //    string strResult = "";
        //    if (Pid == "AC")
        //    {
        //        OutputFilePath = getApplicationSetting("PatientInfoSaveFilePath");
        //        string OpenFilepath = getApplicationSetting("PatientInfoOpenFilePath");
        //        string newPdfFilename = "";
        //        newPdfFilename = "AC_Notes_" + getFileName();

        //        if (!Directory.Exists(OutputFilePath))
        //        {
        //            Directory.CreateDirectory(OutputFilePath);
        //        }

        //        //OutputFilePath = OutputFilePath + newPdfFilename;

        //        OpenFilepath = OpenFilepath + newPdfFilename;
        //        OpenFilepath = OpenFilepath.Replace("\"", "/");

        //        GenerateHp1 objAcNotes = new GenerateHp1();
        //        objAcNotes.GenerateHp1PDF(OutputFilePath + newPdfFilename, eventId);
        //        strResult = SaveNotesDocManager(newPdfFilename, OutputFilePath, eventId);
        //        lblMsg.Text += strResult;
        //        if (strResult == "Success")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ViewACNotes", "<script type='text/javascript'>window.location.href='" + OpenFilepath + "'</script>");
        //        }
        //    }

        //    else if (Pid == "PM")
        //    {
        //        OutputFilePath = getApplicationSetting("PatientInfoSaveFilePath");
        //        string OpenFilepath = getApplicationSetting("PatientInfoOpenFilePath");
        //        string newPdfFilename = "";
        //        newPdfFilename = "PM_Notes_" + getFileName();

        //        if (!Directory.Exists(OutputFilePath))
        //        {
        //            Directory.CreateDirectory(OutputFilePath);
        //        }

        //        //OutputFilePath = OutputFilePath + newPdfFilename;

        //        OpenFilepath = OpenFilepath + newPdfFilename;
        //        OpenFilepath = OpenFilepath.Replace("\"", "/");

        //        PMNotes_PDF objPMNotes_PDF = new PMNotes_PDF();
        //        objPMNotes_PDF.GeneratePMReport(OutputFilePath + newPdfFilename, eventId);
        //        strResult = SaveNotesDocManager(newPdfFilename, OutputFilePath, eventId);
        //        lblMsg.Text += strResult;
        //        if (strResult == "Success")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ViewPMNotes", "<script type='text/javascript'>window.location.href='" + OpenFilepath + "'</script>");
        //        }
        //    }

        //    else if (Pid == "PT")
        //    {
        //        OutputFilePath = getApplicationSetting("PatientInfoSaveFilePath");
        //        string OpenFilepath = getApplicationSetting("PatientInfoOpenFilePath");
        //        string newPdfFilename = "";
        //        newPdfFilename = "PT_Notes_" + getFileName();

        //        if (!Directory.Exists(OutputFilePath))
        //        {
        //            Directory.CreateDirectory(OutputFilePath);
        //        }

        //        //OutputFilePath = OutputFilePath + newPdfFilename;

        //        OpenFilepath = OpenFilepath + newPdfFilename;
        //        OpenFilepath = OpenFilepath.Replace("\"", "/");

        //        PTNotes_PDF objPtNotes_Pdf = new PTNotes_PDF();
        //        objPtNotes_Pdf.GeneratePTReport(OutputFilePath + newPdfFilename, eventId);
        //        strResult = SaveNotesDocManager(newPdfFilename, OutputFilePath, eventId);
        //        lblMsg.Text += strResult;
        //        if (strResult == "Success")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ViewPTNotes", "<script type='text/javascript'>window.location.href='" + OpenFilepath + "'</script>");
        //        }
        //    }

        //    else if (Pid == "CH")
        //    {
        //        OutputFilePath = getApplicationSetting("PatientInfoSaveFilePath");
        //        string OpenFilepath = getApplicationSetting("PatientInfoOpenFilePath");
        //        string newPdfFilename = "";
        //        newPdfFilename = "CH_Notes_" + getFileName();

        //        if (!Directory.Exists(OutputFilePath))
        //        {
        //            Directory.CreateDirectory(OutputFilePath);
        //        }

        //        //OutputFilePath = OutputFilePath + newPdfFilename;

        //        OpenFilepath = OpenFilepath + newPdfFilename;
        //        OpenFilepath = OpenFilepath.Replace("\"", "/");

        //        CHNotes_PDF objCHNotes_Pdf = new CHNotes_PDF();
        //        objCHNotes_Pdf.GenerateCHReport(OutputFilePath + newPdfFilename, eventId);
        //        strResult = SaveNotesDocManager(newPdfFilename, OutputFilePath, eventId);
        //        lblMsg.Text += strResult;
        //        if (strResult == "Success")
        //        {
        //            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "ViewCHNotes", "<script type='text/javascript'>window.location.href='" + OpenFilepath + "'</script>");
        //        }
        //    }
        //}
    }
示例#6
0
        public ILResponse GetBillDocuments([FromBody] BillDetails bills)
        {
            ILResponse response        = new ILResponse();
            string     strBaseFilePath = null;

            byte[]          Filebytes     = null;
            List <FileData> lstActualData = new List <FileData>();

            try
            {
                CaseTransferService    service     = new CaseTransferService();
                IEnumerable <FileData> lstFileData = service.GetBillFiles(bills.billNumber);
                foreach (FileData data in lstFileData)
                {
                    try
                    {
                        strBaseFilePath = null;
                        Filebytes       = null;
                        string[] SplitFilePath = data.FilePath.Replace('\\', '/').Split('/');
                        strBaseFilePath = data.PhysicalBasePath;
                        string NodeType = StringExtensions.GetNodeType(data.NodeType);
                        if (NodeType == "")
                        {
                            NodeType = "UNCATEGORIZED";
                        }


                        if (File.Exists(strBaseFilePath + data.FilePath))
                        {
                            Filebytes = File.ReadAllBytes(strBaseFilePath + data.FilePath);
                        }
                        FileData fileObject = new FileData();
                        fileObject.FileName    = SplitFilePath[SplitFilePath.Length - 1];
                        fileObject.BasePathId  = data.BasePathId;
                        fileObject.FilePath    = data.FilePath.Replace('\\', '/');
                        fileObject.NodeType    = NodeType;
                        fileObject.FileContent = Filebytes;

                        lstActualData.Add(fileObject);
                    }
                    catch (Exception ex)
                    {
                        log.Error("Error: " + ex.Message + ex.StackTrace);
                    }
                }

                service.UpdateBillStatus(bills.companyId, bills.billNumber, bills.LawFirmId);

                response.MessageCode = MessageCodes.REQUEST_SUCCESS;
                response.MessageText = MSG_SUCCESS;
                response.MessageType = EnumMessageType.OPERATION_SUCCESS;
                response.Add(lstActualData);
                response.HasException = false;
            }
            catch (Exception ex)
            {
                response.MessageCode  = MessageCodes.REQUEST_ERROR;
                response.HasException = true;
                response.MessageText  = ex.Message;
                response.MessageType  = EnumMessageType.OPERATION_APPLICATION_ERROR;
                response.Exception    = ex.ToString();
                log.Error("Error: " + ex.Message + ex.StackTrace);
            }
            return(response);
        }
示例#7
0
        public ILResponse GetAllBillDocumentsByCaseIDWithoutContent([FromBody] BillDetails bills)
        {
            ILResponse      response      = new ILResponse();
            DateTime        startTime     = DateTime.UtcNow;
            var             context       = new HttpContextWrapper(HttpContext.Current);
            List <FileData> lstActualData = new List <FileData>();
            string          NodeType      = string.Empty;

            try
            {
                CaseTransferService    service     = new CaseTransferService();
                IEnumerable <FileData> lstFileData = service.GetAllBillDocumentsByCaseID(bills.billNumber);

                foreach (FileData data in lstFileData)
                {
                    try
                    {
                        if (data.DocumentType == "BillDocuments")
                        {
                            NodeType = StringExtensions.GetNodeType(data.NodeType);

                            if (NodeType == "")
                            {
                                NodeType = "UNCATEGORIZED";
                            }
                        }
                        else
                        {
                            NodeType = data.NodeType;
                        }

                        string[] SplitFilePath = data.FilePath.Replace('\\', '/').Split('/');

                        FileData fileObject = new FileData();
                        fileObject.FileName         = SplitFilePath[SplitFilePath.Length - 1];
                        fileObject.FilePath         = data.FilePath.Replace('\\', '/');
                        fileObject.NodeType         = NodeType;
                        fileObject.BasePathId       = data.BasePathId;
                        fileObject.PhysicalBasePath = data.PhysicalBasePath;
                        fileObject.BasePathType     = data.BasePathType;
                        fileObject.DocumentType     = data.DocumentType;
                        lstActualData.Add(fileObject);
                    }
                    catch (Exception ex)
                    {
                        log.Error("Error: " + ex.Message + ex.StackTrace);
                    }
                }

                service.UpdateBillStatus(bills.companyId, bills.billNumber, bills.LawFirmId);

                response.MessageCode = MessageCodes.REQUEST_SUCCESS;
                response.MessageText = MSG_SUCCESS;
                response.MessageType = EnumMessageType.OPERATION_SUCCESS;
                response.Add(lstActualData);
                response.HasException = false;
            }
            catch (Exception ex)
            {
                response.MessageCode  = MessageCodes.REQUEST_ERROR;
                response.HasException = true;
                response.MessageText  = ex.Message;
                response.MessageType  = EnumMessageType.OPERATION_APPLICATION_ERROR;
                response.Exception    = ex.ToString();
                log.Error("Error: " + ex.Message + ex.StackTrace);
            }

            return(response);
        }