public HttpResponseMessage RetrieveExistingVspAuthorization([FromUri] PatientPmiRequestParameters request) { PatientPmiMemberInfo eligInfo = null; var errorMsg = string.Empty; try { var manager = new PmiIt2IntegrationManager(); eligInfo = manager.RetrieveExistingVspAuthorization(request); if (eligInfo != null && eligInfo.ErrorMessage != null) { errorMsg = FormatErrorMessage(eligInfo.ErrorMessage); eligInfo.ErrorMessage = errorMsg; } } catch (Exception ex) { errorMsg = ex.Message; } if (errorMsg == string.Empty) { this.VerifyAndUpdateMemberId(request.PatientInsuranceId, request.PatientId, request.OfficeNum, eligInfo?.MembershipId); return(this.Request.CreateResponse(HttpStatusCode.OK, eligInfo)); } Logger.Error(request.GetErrorString(errorMsg)); if (eligInfo == null) { eligInfo = new PatientPmiMemberInfo { ErrorMessage = errorMsg }; } return(Request.CreateResponse(HttpStatusCode.OK, eligInfo)); }
public HttpResponseMessage GetPmiMemberInfo(string officeNumber, int patientId, int insuranceId) { try { var errorMsg = string.Empty; var manager = new PmiIt2IntegrationManager(); var pmiMemberInfo = manager.GetPmiMemberInfo(officeNumber, patientId, insuranceId, out errorMsg); if (errorMsg != string.Empty) { errorMsg = FormatErrorMessage(errorMsg); } var arrList = new List <PatientPmiMemberInfo> [2]; arrList[0] = new List <PatientPmiMemberInfo>(); arrList[1] = new List <PatientPmiMemberInfo>(); foreach (var t in pmiMemberInfo) { if (t.IsDefaultAuthorization) { arrList[0].Add(t); } else { arrList[1].Add(t); } } return(errorMsg == string.Empty ? Request.CreateResponse(HttpStatusCode.OK, arrList) : Request.CreateResponse(HttpStatusCode.BadRequest, errorMsg)); } catch (Exception ex) { Logger.Error(string.Format("GetPmiMemberInfo(officeNumber = {0}, patientId = {1}, insuranceId = {2} {3} {4}", officeNumber, patientId, insuranceId, "\n", ex)); return(Request.CreateResponse(HttpStatusCode.BadRequest, ex)); } }
/// <summary> /// Initializes a new instance of the <see cref="CompanyInformationController" /> class. /// </summary> public CompanyInformationController() { this.officeIt2Manager = new OfficeIt2Manager(); this.pmiManager = new PmiIt2IntegrationManager(); }
public byte[] GetRecordReport(string authorizeNumber) { var manager = new PmiIt2IntegrationManager(); return(manager.GetRecordReport(authorizeNumber)); }