private string buildBevaUNH(Int64 iProcessNumber, DateTime dtStartDate, DateTime dtEndDate, int iCounterUNHSegments, BillingInfo bi) { string strReturn = ""; DiagnosisInfo diMain = new DiagnosisInfo("H36.0", 'V'); if (bi.lsDiagnosisInfo != null && bi.lsDiagnosisInfo.Count > 0) { diMain = bi.lsDiagnosisInfo[0]; } else { diMain = new DiagnosisInfo("H36.0", 'V'); } strReturn += buildUNHHelperBefore(iProcessNumber, dtStartDate, dtEndDate, iCounterUNHSegments, bi, diMain); string strGpos = STR_GPOS_BEVA; string strValue = gposToValue(strGpos); string strGrossValue = gposToGrossValue(strGpos); strReturn += "ABR++" + strGpos + "+++1+" + strValue + "+++++" + bi.dtTreatment.ToString("yyyyMMdd") + "'\n"; strReturn += "FKI+" + strGrossValue + "++++++" + strValue + "'\n"; strReturn += buildUNHHelperAfter(iProcessNumber, dtStartDate, dtEndDate, iCounterUNHSegments, bi, diMain); lsExcelOutput.Add(new EdifactInterface.ExcelOutput(bi.strTreatmentID, iBillingID, iProcessNumber, bi.strPatientInsuranceState, bi.strPatientInsuranceNumber, bi.strPatientFirstName, bi.strPatientLastName, bi.strDoctorLANR, bi.strPracticeBSNR, "Zusatzposition Bevacizumab", diMain.cDiagnosisState, bi.cTreatmentLocalization, bi.iTreatmentNumber + 1, treatmentMainArticle(bi.lsArticles), false, false, strGpos, strValue, bi.dtTreatment.ToString("MM.dd.yyyy"), bi.strFollowupPractice, bi.strFollowupDoctor, bi.strFollowupStatus, bi.dtFollowup.ToString("MM.dd.yyyy"))); return(strReturn); }
private string buildUNH(Int64 iProcessNumber, DateTime dtStartDate, DateTime dtEndDate, int iCounterUNHSegments, BillingInfo bi) { string strReturn = ""; // data validation if (bi.strPatientInsuranceState.Length > 5 || bi.strPatientInsuranceState.Length < 1) { Console.Error.WriteLine("strPatientInsuranceState value not 5 chars long, value was:" + bi.strPatientInsuranceState); bi.strPatientInsuranceState = "00000"; } /*if (bi.strPatientInsuranceNumber > 999999999999 || bi.strPatientInsuranceNumber < 0) * { * Console.Error.WriteLine("strPatientInsuranceNumber value not between 000000000000 and 999999999999, value was:" + bi.strPatientInsuranceNumber); * bi.strPatientInsuranceNumber = 1; * }*/ if (bi.iPatientSex > 3 || bi.iPatientSex < 1) { Console.Error.WriteLine("iPatientSex value not between 1 and 3, value was:" + bi.iPatientSex); bi.iPatientSex = 3; } if (bi.cTreatmentLocalization != 'R' && bi.cTreatmentLocalization != 'L') { Console.Error.WriteLine("cTreatmentLocalization value is neither R nor L, value was:" + bi.cTreatmentLocalization); bi.cTreatmentLocalization = 'L'; } DiagnosisInfo diMain = new DiagnosisInfo("H36.0", 'V'); if (bi.lsDiagnosisInfo != null && bi.lsDiagnosisInfo.Count > 0) { diMain = bi.lsDiagnosisInfo[0]; } else { Console.Error.WriteLine("No diagnosis was found. Diagnosis H36.0, V is used."); diMain = new DiagnosisInfo("H36.0", 'V'); } strReturn += buildUNHHelperBefore(iProcessNumber, dtStartDate, dtEndDate, iCounterUNHSegments, bi, diMain); string strGpos = treatmentToGpos(bi.bTreatmentIsFollowup, bi.iTreatmentNumber, bi.lsArticles, diMain.strDiagnosisICD10); string strValue = gposToValue(strGpos); string strGrossValue = gposToGrossValue(strGpos); strReturn += "ABR++" + strGpos + "+++1+" + strValue + "+++++" + bi.dtTreatment.ToString("yyyyMMdd") + "'\n"; strReturn += "FKI+" + strGrossValue + "++++++" + strValue + "'\n"; strReturn += buildUNHHelperAfter(iProcessNumber, dtStartDate, dtEndDate, iCounterUNHSegments, bi, diMain); lsExcelOutput.Add(new EdifactInterface.ExcelOutput(bi.strTreatmentID, iBillingID, iProcessNumber, bi.strPatientInsuranceState, bi.strPatientInsuranceNumber, bi.strPatientFirstName, bi.strPatientLastName, bi.strDoctorLANR, bi.strPracticeBSNR, diMain.strDiagnosisICD10, diMain.cDiagnosisState, bi.cTreatmentLocalization, bi.iTreatmentNumber + 1, treatmentMainArticle(bi.lsArticles), treatmentWithOzurdex(bi.lsArticles), treatmentWithBeva(bi.lsArticles), strGpos, strValue, bi.dtTreatment.ToString("MM.dd.yyyy"), bi.strFollowupPractice, bi.strFollowupDoctor, bi.strFollowupStatus, bi.dtFollowup.ToString("MM.dd.yyyy"))); return(strReturn); }
private string buildAdditionalUNH(Int64 iProcessNumber, DateTime dtStartDate, DateTime dtEndDate, int iCounterUNHSegments, BillingInfo bi) { /*// data validation * if (bi.strPatientInsuranceState > 99999 || bi.strPatientInsuranceState < 0) * { * Console.Error.WriteLine("strPatientInsuranceState value not between 00000 and 99999, value was:" + bi.strPatientInsuranceState); * bi.strPatientInsuranceState = 1; * } * if (bi.strPatientInsuranceNumber > 999999999999 || bi.strPatientInsuranceNumber < 0) * { * Console.Error.WriteLine("strPatientInsuranceNumber value not between 000000000000 and 999999999999, value was:" + bi.strPatientInsuranceNumber); * bi.strPatientInsuranceNumber = 1; * } * if (bi.iPatientSex > 3 || bi.iPatientSex < 1) * { * Console.Error.WriteLine("iPatientSex value not between 1 and 3, value was:" + bi.iPatientSex); * bi.iPatientSex = 3; * } * DiagnosisInfo diMain = null; * if (bi.lsDiagnosisInfo.Count > 0) * diMain = bi.lsDiagnosisInfo[0]; * else * Console.Error.WriteLine("No diagnosis was found."); * * * string strReturn = ""; * strReturn += "UNH+99" + iCounterUNHSegments.ToString("D8") + "+DIR73C:3:0:DR'\n"; // DIR73C = single billing, RGS140 = multiple billing * strReturn += "IVK+10+01+" + STR_IK_SENDER + "+" + STR_IK_RECEIVER + "+" + iBillingID.ToString("D12") + "'\n"; * strReturn += "IBH+" + bi.strDoctorLANR + "+" + bi.strPracticeBSNR + "'\n"; * strReturn += "INF+17172100035++0:7'\n"; * strReturn += "INV+" + bi.strPatientInsuranceState.ToString("D5") + "+" + bi.strPatientInsuranceNumber + ":" + STR_IK_RECEIVER + "+" + bi.strPatientLastName + ":" + bi.strPatientFirstName + ":" + STR_IK_RECEIVER + "+" + bi.iPatientSex + "'\n"; * strReturn += "DIA+" + diMain.strDiagnosisICD10 + ":" + diMain.cDiagnosisState + "+" + bi.cTreatmentLocalization + "'\n"; * string strGpos = treatmentToGpos(bi.bTreatmentIsFollowup, bi.iTreatmentNumber, bi.lsArticles, diMain.strDiagnosisICD10); * strReturn += "ABR++" + strGpos + "+++1++++++" + bi.dtTreatment.ToString("yyyyMMdd") + "'\n"; * string strValue = gposToValue(strGpos); * strReturn += "FKI+++++++" + strValue + "'\n"; * strReturn += "RGI+" + dtStartDate.ToString("yyyyMMdd") + ":" + dtEndDate.ToString("yyyyMMdd") + "+1+" + STR_IK_SENDER + "+" + iBillingID.ToString("D12") + "+" + DateTime.Now.ToString("yyyyMMdd") + "++000'\n"; * strReturn += "UNT+10+99" + iCounterUNHSegments.ToString("D8") + "'\n"; * * // lsExcelOutput.Add(new EdifactInterface.ExcelOutput(10001, 124124124, 2, "Max", "Mustermann", "123456", "654321", "H36.0", 'G', 'R', true, true, "869382", 3, DateTime.Now)); * * return strReturn; */ string strReturn = ""; DiagnosisInfo diMain = new DiagnosisInfo("H36.0", 'V'); if (bi.lsDiagnosisInfo != null && bi.lsDiagnosisInfo.Count > 0) { diMain = bi.lsDiagnosisInfo[0]; } else { diMain = new DiagnosisInfo("H36.0", 'V'); } strReturn += buildUNHHelperBefore(iProcessNumber, dtStartDate, dtEndDate, iCounterUNHSegments, bi, diMain); string strGpos = STR_GPOS_VERGUTUNG; string strValue = gposToValue(strGpos); string strGrossValue = gposToGrossValue(strGpos); strReturn += "ABR++" + strGpos + "+++1+" + strValue + "+++++" + bi.dtTreatment.ToString("yyyyMMdd") + "'\n"; strReturn += "FKI+" + strGrossValue + "++++++" + strValue + "'\n"; strReturn += buildUNHHelperAfter(iProcessNumber, dtStartDate, dtEndDate, iCounterUNHSegments, bi, diMain); lsExcelOutput.Add(new EdifactInterface.ExcelOutput(bi.strTreatmentID, iBillingID, iProcessNumber, bi.strPatientInsuranceState, bi.strPatientInsuranceNumber, bi.strPatientFirstName, bi.strPatientLastName, bi.strDoctorLANR, bi.strPracticeBSNR, "Zusatzposition Vergütung", diMain.cDiagnosisState, bi.cTreatmentLocalization, bi.iTreatmentNumber + 1, treatmentMainArticle(bi.lsArticles), false, false, strGpos, strValue, bi.dtTreatment.ToString("MM.dd.yyyy"), bi.strFollowupPractice, bi.strFollowupDoctor, bi.strFollowupStatus, bi.dtFollowup.ToString("MM.dd.yyyy"))); return(strReturn); }
private string buildUNHHelperAfter(Int64 iProcessNumber, DateTime dtStartDate, DateTime dtEndDate, int iCounterUNHSegments, BillingInfo bi, DiagnosisInfo diMain) { string strReturn = ""; strReturn += "RGI+" + dtStartDate.ToString("yyyyMMdd") + ":" + dtEndDate.ToString("yyyyMMdd") + "+1+" + STR_IK_SENDER + "+" + iProcessNumber.ToString("D12") + "+" + DateTime.Now.ToString("yyyyMMdd") + "++000'\n"; strReturn += "UNT+10+99" + iCounterUNHSegments.ToString("D8") + "'\n"; return(strReturn); }
private string buildUNHHelperBefore(Int64 iProcessNumber, DateTime dtStartDate, DateTime dtEndDate, int iCounterUNHSegments, BillingInfo bi, DiagnosisInfo diMain) { string strReturn = ""; strReturn += "UNH+99" + iCounterUNHSegments.ToString("D8") + "+DIR73C:3:0:DR'\n"; // DIR73C = single billing, RGS140 = multiple billing strReturn += "IVK+10+01+" + STR_IK_SENDER + "+" + STR_IK_RECEIVER + "+" + iProcessNumber.ToString("D12") + "'\n"; strReturn += "IBH+" + bi.strDoctorLANR + "+" + bi.strPracticeBSNR + "'\n"; strReturn += "INF+17172100035++0:7'\n"; strReturn += "INV+" + bi.strPatientInsuranceState.Substring(0, 5) + "+" + bi.strPatientInsuranceNumber + ":" + STR_IK_RECEIVER + "+" + bi.strPatientLastName + ":" + bi.strPatientFirstName + ":" + bi.dtPatientBirthDate.ToString("yyyyMMdd") + "+" + bi.iPatientSex + "'\n"; strReturn += "DIA+" + diMain.strDiagnosisICD10 + ":" + diMain.cDiagnosisState + ":" + bi.cTreatmentLocalization + "'\n"; return(strReturn); }