Exemplo n.º 1
0
		public static string Run(int scriptNum,string responseExpected,Claim claim) {
			string retVal="";
			InsPlan insPlan=InsPlans.GetPlan(claim.PlanNum,null);
			InsSub insSub=InsSubs.GetOne(claim.InsSubNum);
			long etransNum=CanadianOutput.SendClaimReversal(claim,insPlan,insSub);
			Etrans etrans=Etranss.GetEtrans(etransNum);
			string message=EtransMessageTexts.GetMessageText(etrans.EtransMessageTextNum);
			CCDFieldInputter formData=new CCDFieldInputter(message);
			string responseStatus=formData.GetValue("G05");
			if(responseStatus!=responseExpected) {
			  return "G05 should be "+responseExpected+"\r\n";
			}
			retVal+="Reversal #"+scriptNum.ToString()+" successful.\r\n";
			return retVal;
		}
Exemplo n.º 2
0
		public static string RunThree(bool showForms) {
			string retVal="";
			long provNum=ProviderC.ListShort[0].ProvNum;//dentist #1
			Patient pat=Patients.GetPat(PatientTC.PatNum6);//patient#6
			if(pat.PriProv!=provNum){
				Patient oldPat=pat.Copy();
				pat.PriProv=provNum;//this script uses the primary provider for the patient
				Patients.Update(pat,oldPat);
			}
			PatPlan patplan=PatPlans.GetPatPlan(pat.PatNum,2);
			InsSub sub=InsSubs.GetOne(patplan.InsSubNum);
			InsPlan plan=InsPlans.GetPlan(sub.PlanNum,new List<InsPlan>());
			long etransNum=CanadianOutput.SendElegibility(pat.PatNum,plan,new DateTime(1999,1,1),patplan.Relationship,patplan.PatID,showForms,sub);
			Etrans etrans=Etranss.GetEtrans(etransNum);
			string message=EtransMessageTexts.GetMessageText(etrans.EtransMessageTextNum);
			CCDFieldInputter formData=new CCDFieldInputter(message);
			string responseStatus=formData.GetValue("G05");
			if(responseStatus!="R") {
				throw new Exception("Should be R");
			}
			retVal+="Eligibility #3 successful.\r\n";
			return retVal;
		}
		public static string Run(int scriptNum,string responseExpected,string responseTypeExpected,Claim claim,bool showForms,int pageNumber,int lastPageNumber,double firstExamFee,double diagnosticPhaseFee) {
		  string retVal="";
		  ClaimSendQueueItem queueItem=Claims.GetQueueList(claim.ClaimNum,claim.ClinicNum,0)[0];
		  Eclaims.GetMissingData(queueItem);//,out warnings);
			if(queueItem.MissingData!="") {
				return "Cannot send predetermination until missing data is fixed:\r\n"+queueItem.MissingData+"\r\n";
		  }
#if DEBUG
			Canadian.testNumber=scriptNum;
			claim.PreAuthString=""+pageNumber+","+lastPageNumber+","+firstExamFee+","+diagnosticPhaseFee;
#endif
		  long etransNum=Canadian.SendClaim(queueItem,showForms);
		  Etrans etrans=Etranss.GetEtrans(etransNum);
		  string message=EtransMessageTexts.GetMessageText(etrans.EtransMessageTextNum);
		  CCDFieldInputter formData=new CCDFieldInputter(message);
		  string responseType=formData.GetValue("A04");
		  if(responseType!=responseTypeExpected) {
		    return "Form type is '"+responseType+"' but should be '"+responseTypeExpected+"'\r\n";
		  }
		  string responseStatus=formData.GetValue("G05");
		  if(responseStatus!=responseExpected) {
		    return "G05 is '"+responseStatus+"' but should be '"+responseExpected+"'\r\n";
		  }
		  if(responseExpected=="R" && responseTypeExpected=="11") {
		    //so far, only for #6.  We need some other way to test if successful transaction
		    string errorMsgCount=formData.GetValue("G06");
		    if(errorMsgCount=="00") {
		      return "Wrong message count.\r\n";
		    }
		  }
		  retVal+="Predetermination #"+scriptNum+" page "+pageNumber+" of "+lastPageNumber+" successful.\r\n";
		  return retVal;
		}
Exemplo n.º 4
0
Arquivo: ClaimTC.cs Projeto: mnisl/OD
		public static string Run(int scriptNum,string responseExpected,string responseTypeExpected,Claim claim,bool showForms) {
			string retVal="";
			ClaimSendQueueItem queueItem=Claims.GetQueueList(claim.ClaimNum,claim.ClinicNum,0)[0];
			Eclaims.GetMissingData(queueItem);//,out warnings);
			if(queueItem.MissingData!="") {
				return "Cannot send claim until missing data is fixed:\r\n"+queueItem.MissingData+"\r\n";
			}
#if DEBUG
			Canadian.testNumber=scriptNum;
#endif
			long etransNum=Canadian.SendClaim(queueItem,showForms);
			Etrans etrans=Etranss.GetEtrans(etransNum);
			string message=EtransMessageTexts.GetMessageText(etrans.EtransMessageTextNum);
			CCDFieldInputter formData=new CCDFieldInputter(message);
			string responseType=formData.GetValue("A04");
			if(responseType!=responseTypeExpected) {
				return "Form type should be "+responseTypeExpected+"\r\n";
			}
			string responseStatus=formData.GetValue("G05");
			if(responseStatus!=responseExpected) {
				return "G05 should be "+responseExpected+"\r\n";
			}
			if(responseExpected=="R" && responseTypeExpected=="11") {
				//so far, only for #6.  We need some other way to test if successful transaction
				string errorMsgCount=formData.GetValue("G06");
				if(errorMsgCount=="00") {
					return "Wrong message count.\r\n";
				}
			}
			retVal+="Claim #"+scriptNum.ToString()+" successful.\r\n";
			return retVal;
		}