Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
package automation.Pages;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.junit.Assert;
import automation.ExplorerSuite;
import automation.SharedCodeClass;
import po.EDI_Dental_Quick_PO;
import po.EDI_PDILookupPO;
import po.EDI_WebViewerDentalPO;
import po.LoginPO;
/***
*
* @author EKutsenko,
* @version 1.2
*/
public class EDI_PDIDental extends ExplorerSuite {
EDI_Dental_Quick_PO dental;
EDI_WebViewerDentalPO ediWebViewer;
EDI_PDILookupPO ediWebViewerLookup;
String description;
public void localRunner() throws IOException, InterruptedException{
String pdiDental = "200617203000952"; //PDI for Dental Claim
dental = new EDI_Dental_Quick_PO(driver);
ediWebViewer = new EDI_WebViewerDentalPO(driver);
ediWebViewerLookup = new EDI_PDILookupPO(driver);
SharedCodeClass.loadEWVPage(pdiDental);
// verifyTitle("Title and a pdi number", pdiDental);
// verifyGeneralInfo("Upper card with general information");
// verifyPatientInfo("Patient Information section");
// verifyVendortInfo("Vendor Information section");
// verifyBillingInfo("Billing Information Section");
// verifyServiceLines("Service Lines Section");
// verifyOHI("OHI section");
// verifyMiscellaneous("Miscellaneous Info section");
verifyModifierOnOHIQuickView("Verify that OHI Mod column is displayed");
}
//Verify a title and a pdi number in the title
public void verifyTitle(String description, String pdiDental) throws IOException {
String expected = "EDI Web Viewer | " + pdiDental ;
try {
String actual = ediWebViewer.getTitle();
Assert.assertEquals(description, expected, actual);
SharedCodeClass.assertPassed(description);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description, e);
}
}
// Verify an upper card with general information
public void verifyGeneralInfo(String description) throws IOException{
List<String> expectedHeaders =
Arrays.asList("Submission Type:", "Patient Name:", "Member:", "PDI:", "Medicare Crossover:",
"Billing NPI:", "TIN:", "PCN:");
List<String> expectedData = Arrays.asList("D(5010)", "CHPVAAAD,AAAA4", "666666664", "2006 172 03 000952",
"N", "1013450014", "473597522", "Y0W0HAOD1052487936S8");
try {
ArrayList<String> actualHeaders = ediWebViewer.getGeneralInfoCardHeaders();
ArrayList<String> actualData = ediWebViewer.getGeneralInfoCardData();
Assert.assertEquals(description, expectedHeaders, actualHeaders);
Assert.assertEquals(description, expectedData, actualData);
SharedCodeClass.assertPassed(description);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description, e);
}
}
//Verify a Patient Information
public void verifyPatientInfo(String description) throws IOException{
ediWebViewer.patientInfoClick();
List<String> expectedFields =
Arrays.asList("Patient ID:", "Last Name:", "First Name:", "Date of Birth:", "Gender:", "Date of Death:",
"Address 1:", "Address 2:", "City:", "State:", "ZIP Code:", "Country:");
List<String> expectedData = Arrays.asList("666666664", "CHPVAAAD", "AAAA4", "03/03/2010", "F", "04/09/2018", "4567 MAPLE",
"DENVER", "DENVER", "CO", "802090000", "USA");
try {
ArrayList<String> actualFields = ediWebViewer.patientInfoFields();
ArrayList<String> actualData = ediWebViewer.patientInfoData();
Assert.assertEquals(description, expectedFields, actualFields);
Assert.assertEquals(description, expectedData, actualData);
SharedCodeClass.assertPassed(description);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description, e); }
}
/*****Vendor Info ********************************************************************/
public void verifyVendortInfo(String description) throws IOException{
ediWebViewer.vendorInfoClick();
List<String> expectedFields =
Arrays.asList("Tax ID:", "Vendor:", "Address 1:", "Address 2:", "City:", "State:", "ZIP Code:", "Country:", "NPI:");
List<String> expectedData =
Arrays.asList("473597522", "MUSKINGUM VALLEY ORAL SURGERY INC", "7297 JOHN GLENN HIGHWAY","CAMBRIDGE", "CAMBRIDGE", "OH", "437259998", "USA", "1013450014");
try {
Assert.assertEquals("Service Location Information", ediWebViewer.getServiceLocationHeader());
Assert.assertEquals("Billing Provider Information", ediWebViewer.getBillingProviderHeader());
ArrayList<String> actualFields = ediWebViewer.serviceLocationInfoFields();
Assert.assertEquals(description, expectedFields, actualFields);
ArrayList<String> actualData = ediWebViewer.serviceLocationInfoData();
Assert.assertEquals(description, expectedData, actualData);
actualData = ediWebViewer.billingProviderInfoData();
Assert.assertEquals(description, expectedData, actualData);
SharedCodeClass.assertPassed(description);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description, e); }
}
/***Billing Information *********************************************************/
private void verifyBillingInfo(String description) throws IOException {
String expectedFields = "POS: 11 Frequency: 1";
List<String> expectedDx =
Arrays.asList("DX:", "1:", "2:", "3:", "4:", "5:", "6:", "7:", "8:", "9:", "10:");
List<String> expectedDxData = Arrays.asList("1", "A12", "B56", "C56", "D56", "E56", "F56", "G56", "", "");
try {
String actualFields = ediWebViewer.getPOSandFreq();
List<String> actualDx = ediWebViewer.getDx();
List<String> actualDxData = ediWebViewer.getDxData();
//List<String> actualDxData = ediWebViewer.getDxData();
Assert.assertEquals(description, expectedFields, actualFields);
Assert.assertEquals(description, expectedDx, actualDx);
Assert.assertEquals(description, expectedDxData, actualDxData);
SharedCodeClass.assertPassed(description);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description, e); }
}
private void verifyServiceLines(String description) throws IOException{
String expectedTotalCharges = "Total Charges: $95.00";
List<String> expectedServiceLinesHeaders =
Arrays.asList("Line #", "Service From", "Service To", "POS", "DX Pointer", "PROC/NDC", "Modifiers", "Qty. / Type", "Amount");
List<String> expectedServiceLinesData = Arrays.asList("1", "01/22/18", "01/22/18", "", "p1, p2, p3", "D9310", "", "1", "95.00");
try {
List<String> actualServiceLinesHeaders = ediWebViewer.getServiceLinesHeaders();
List<String> actualServiceLinesData = ediWebViewer.getServiceLinesData();
Assert.assertEquals(description, expectedTotalCharges, ediWebViewer.getServiceLinesTotalCharges());
Assert.assertEquals(description, expectedServiceLinesHeaders, actualServiceLinesHeaders);
Assert.assertEquals(description, expectedServiceLinesData, actualServiceLinesData);
SharedCodeClass.assertPassed(description);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description, e); }
}
private void verifyOHI(String description) throws IOException {
List<String> expectedPrimary = Arrays.asList("Primary: MEDICAID COLORADO HEALTH", "Seconday: MEDICAID COLORADO HEALTH", "Tertiary: Y");
List<String> expectedTableData1 = Arrays.asList(" ", "$1.00", "COA1", "$100.00", "$1.00", "COA1", "$100.00", "$1.00", "[object Object]", "$100.00");
List<String> expectedTableHeader=
Arrays.asList(
"Line #", "Svc. From", "Amount","PROC","Primary Paid","Adj.", "Adj. Amount", "Secondary Paid", "Adj.", "Adj. Amount", "Tertiary Paid", "Adj.","Adj. Amount");
List<String> expectedTableData2 = Arrays.asList("1","01/22/18", "95.00", "", "$", "", "$", "$", "", "$", "", "", "");
List<String> expectedTableData3 = Arrays.asList(
"Remittance Remark Codes:", "REM1, REM2, REM3, REM4, REM5,","REMARK1, REMARK2, REMARK3, REMARK4, REMARK5,", "REM1, REM2, REM3, REM4, REM5,");
try {
List<String> actualPrimary = ediWebViewer.getPrimarySecondaryTert();
List<String> actualOHITableData1 = ediWebViewer.getOHITableData1();
List<String> actualOHITableData2 = ediWebViewer.getOHITableData2();
List<String> actualOHITableData3 = ediWebViewer.getOHITableData3();
List<String> actualOHITableHeaders= ediWebViewer.getOHITableHeader();
Assert.assertEquals(description, expectedPrimary, actualPrimary);
Assert.assertEquals(description, expectedTableData1, actualOHITableData1);
Assert.assertEquals(description, expectedTableData2, actualOHITableData2);
Assert.assertEquals(description, expectedTableData3, actualOHITableData3);
Assert.assertEquals(description, expectedTableHeader, actualOHITableHeaders);
SharedCodeClass.assertPassed(description);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description, e); }
}
/***Miscellaneous *********************************************************/
private void verifyMiscellaneous(String description) throws IOException {
String expected = "Miscellaneous";
List<String> expectedData =
Arrays.asList("Provider Accepted Assignment: C", "Patient Paid: $ 1.00");
try {
String actual = ediWebViewer.getMiscellaneousLabel();
List<String> actualData = ediWebViewer.getMiscellaneousData();
Assert.assertEquals(description, expected, actual);
Assert.assertEquals(description, expectedData, actualData);
SharedCodeClass.assertPassed(description);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description, e); }
}
/************* Story 01.11.27: The EWV system will have the capability to display up to four modifiers per adjustment line in the OHI segment.(2.15)**********/
/***Added 07/17/2018 by EKutsenko
* @throws IOException *************/
private void verifyModifierOnOHIQuickView(String description) throws IOException {
try {
Assert.assertEquals(description, "Mod.", dental.ohiModColumnHeader());
Assert.assertEquals(description, "A, B, C, D", dental.ohiModData());
SharedCodeClass.assertPassed(description);
} catch (AssertionError | Exception e) {
SharedCodeClass.assertFailed(description, e); }
}
}