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 po;

import java.util.ArrayList;
import java.util.List;


import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

public class EDIWebViewerProfPO {
WebDriver driver;


public EDIWebViewerProfPO(WebDriver driver){
this.driver = driver;
PageFactory.initElements(driver, this);
}

@FindBy(tagName = "h1")
private WebElement title;

@FindBy(xpath="//h1[@id='HDG_ediWebViewer_ewv_1']/span")
private WebElement pdiNumber;

@FindBy(xpath="/html/body/app-root/app-ewv/div/div[2]/section/div[3]/div/div/table/tbody/tr/th")
private List<WebElement> cardGeneralInfoHeaders; // General Info Card Headers;

@FindBy(xpath="/html/body/app-root/app-ewv/div/div[2]/section/div[3]/div/div/table/tbody/tr/td")
private List<WebElement> cardGeneralInfoData; // General Info Card Data;

@FindBy(xpath= "/html/body/app-root/app-ewv/div/div[2]/section/div[3]/div/div/table/tbody/tr[1]/td[1]")
private WebElement submissionType; //Claim type: Dent, Prof, Inst

@FindBy(id = "TAB_qvTab_ewvMaster_1")
private WebElement tabQuickView;

@FindBy(id = "ACC_patientInfo_1")
private WebElement patientInfo;


//Patient Info field names
@FindBy(xpath = "/html/body/app-root/app-ewv/div/div[2]/article/div[2]/div/section/div[1]/app-patient-info/div/div[2]/div[2]/div/div/table/tbody/tr/th")
private List<WebElement> patientInfoFields;

//Patient Info field data
@FindBy(xpath = "/html/body/app-root/app-ewv/div/div[2]/article/div[2]/div/section/div[1]/app-patient-info/div/div[2]/div[2]/div/div/table/tbody/tr/td")
private List<WebElement> patientInfoData;


//Vendor Info accordion
@FindBy(id = "ACC_vendorInfo_ewv_1")
private WebElement vendorInfo;

@FindBy(xpath= "/html/body/app-root/app-ewv/div/div[2]/article/div[2]/div/section/div[1]/app-vendor-info/div/div/div[2]/div/div[1]/h4")
private WebElement lblServiceLocationInfo;

@FindBy(xpath =
"(//table[@id='TBL_infoColumn_vendorInfo_2']/tbody/tr/th)[position()<10]")
//*[@id="TBL_infoColumn_vendorInfo_2"]
private List<WebElement> serviceLocationInfoFields;

@FindBy(xpath =
"(//*[@id='TBL_infoColumn_vendorInfo_1'])[1]/tbody/tr/td")
private List<WebElement> serviceLocationInfoData;

@FindBy(xpath= "/html/body/app-root/app-ewv/div/div[2]/article/div[2]/div/section/div[1]/app-vendor-info/div/div/div[2]/div/div[2]/h4")
private WebElement lblBillingProviderInfo;

@FindBy(xpath =
"(//table[@id='TBL_infoColumn_vendorInfo_2']/tbody/tr/th)[position()<10]")
private List<WebElement> billingProviderInfoFields;

@FindBy(xpath =
"(//table[@id='TBL_infoColumn_vendorInfo_2']/tbody/tr/td)[position()<10]")
private List<WebElement> billingProviderInfoData;

@FindBy(id = "TAB_detailTab_ewvMaster_1")
private WebElement tabDetailView;

//Billing Info
@FindBy(xpath="/html/body/app-root/app-ewv/div/div[2]/article/div[2]/div/section/div[1]/app-billing-info/div/h5")
private WebElement posAndFreq; //POS and Frequency

@FindBy(xpath="/html/body/app-root/app-ewv/div/div[2]/article/div[2]/div/section/div[1]/app-billing-info/div/div[1]/div[1]/div/div/span[1]")
private List<WebElement> lblDX; //Dx Line

@FindBy(xpath= "/html/body/app-root/app-ewv/div/div[2]/article/div[2]/div/section/div[1]/app-billing-info/div/div[1]/div[1]/div/div/span[2]")
private List<WebElement> dataDX; //DX line data

//Service Lines
@FindBy(xpath=
"/html/body/app-root/app-ewv/div/div[2]/article/div[2]/div/section/div[1]/app-billing-info/div/div[1]/div[2]/app-table/div/div/table/thead/tr/th/label")
private List<WebElement> serviceLinesHeaders; //Service Lines Headers

@FindBy(xpath= "/html/body/app-root/app-ewv/div/div[2]/article/div[2]/div/section/div[1]/app-billing-info/div/div[1]/div[2]/app-table/div/div/table/tbody/tr/td")
private List<WebElement> serviceLinesData; //Service Lines Data

@FindBy(xpath=
"/html/body/app-root/app-ewv/div/div[2]/article/div[2]/div/section/div[1]/app-billing-info/div/div[1]/div[2]/p")
private WebElement serviceLinesTotalCharges; //Service Lines Total Charges


//Other Health Information (OHI)
@FindBy(xpath="//*[@id='otherHealthInfo']")
WebElement lblOHI;

@FindBy(xpath=
"/html/body/app-root/app-ewv/div/div[2]/article/div[2]/div/section/div[1]/app-ohi-info/div/h5/span")
private List<WebElement> OHIPrimSecTert; //Primary, Secondary, Tertiary

@FindBy(xpath= "//table[@class='ewv-table']/tbody[1]/tr/td")
private List<WebElement> OHITableData1; //OHI Table data

@FindBy(xpath= "//table[@class='ewv-table']/thead[2]/tr/th")
private List<WebElement> OHITableHeader; //OHI Table lower header

@FindBy(xpath= "//table[@class='ewv-table']/tbody[2]/tr[1]/td")
private List<WebElement> OHITableData2; //OHI Table data 2

@FindBy(xpath= "//table[@class='ewv-table']/tbody[2]/tr[2]/td")
private List<WebElement> OHITableData3; //OHI Table data 3


//Miscellaneous
@FindBy(xpath= "//label[@alt='Miscellaneous Information']")
private WebElement lblMiscellaneous;

@FindBy(xpath= "//label[@alt='Miscellaneous Information']/../h5/span")
private List<WebElement> dataMiscellaneous;



/***Patient Info********************************************************************/
public String getTitle() {
WebDriverWait wait = new WebDriverWait(driver, 15);
wait.until(ExpectedConditions.visibilityOf(pdiNumber));
return title.getText();
}

public char getClaimType(){
return submissionType.getText().charAt(0); //get the first char of type :I, P, D
}

//Get General Info Card Headers
public ArrayList<String> getGeneralInfoCardHeaders(){
ArrayList<String> array = new ArrayList<String>();
for(WebElement item: cardGeneralInfoHeaders) {
array.add(item.getText());
} return array;
}

//Get General Info Card Data
public ArrayList<String> getGeneralInfoCardData(){
ArrayList<String> array = new ArrayList<String>();
for(WebElement item: cardGeneralInfoData) {
array.add(item.getText());
} return array;
}

public void patientInfoClick(){
WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(ExpectedConditions.visibilityOf(patientInfo));
if(!patientInfo.isSelected())
patientInfo.click();
}


public ArrayList<String> patientInfoFields() {
WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(ExpectedConditions.visibilityOfAllElements(patientInfoFields));
ArrayList<String> array = new ArrayList<String>();
for(WebElement item: patientInfoFields) {
array.add(item.getText()); }
//System.out.println(item.getText()); }
return array;
}

public ArrayList<String> patientInfoData() {
WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(ExpectedConditions.visibilityOfAllElements(patientInfoData));
ArrayList<String> array = new ArrayList<String>();
for(WebElement item: patientInfoData) {
array.add(item.getText()); }

return array;
}



/*****Vendor Info ********************************************************************/

public void vendorInfoClick(){
WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(ExpectedConditions.visibilityOf(vendorInfo));
if(!vendorInfo.isSelected())
vendorInfo.click();
}


public String getServiceLocationHeader(){
return lblServiceLocationInfo.getText();
}

public ArrayList<String> serviceLocationInfoFields() {
ArrayList<String> array = new ArrayList<String>();
for(WebElement item: serviceLocationInfoFields) {
array.add(item.getText());
}
return array;
}

public ArrayList<String> serviceLocationInfoData() {
ArrayList<String> array = new ArrayList<String>();
for(WebElement item: serviceLocationInfoData) {
array.add(item.getText());
}
return array;
}

public String getBillingProviderHeader(){
return lblBillingProviderInfo.getText();
}

public ArrayList<String> billingProviderInfoData() {
ArrayList<String> array = new ArrayList<String>();
for(WebElement item: billingProviderInfoData) {
array.add(item.getText());
}
return array;
}



/***Billing Info ******************************************************************/

//POS and Frequency
public String getPOSandFreq(){
return posAndFreq.getText(); }

// DX line
public List<String> getDx(){
List<String> array = new ArrayList<String>();
for(WebElement item: lblDX) {
array.add(item.getText()); }
return array;
}

public List<String> getDxData(){
List<String> array = new ArrayList<String>();
for(WebElement item: dataDX) {
array.add(item.getText()); }
return array;
}

public List<String> getServiceLinesHeaders() {
List<String> array = new ArrayList<String>();
for(WebElement item: serviceLinesHeaders) {
array.add(item.getText()); }
return array;
}

public List<String> getServiceLinesData() {
List<String> array = new ArrayList<String>();
for(WebElement item: serviceLinesData) {
array.add(item.getText()); }
return array;
}

public String getServiceLinesTotalCharges(){
return serviceLinesTotalCharges.getText();
}

/****Other Health Information (OHI)****************************************************/
public void clickOHI(){
if(!lblOHI.isSelected())
lblOHI.click();
}

public List<String> getPrimarySecondaryTert(){
List<String> array = new ArrayList<String>();
for(WebElement item: OHIPrimSecTert) {
array.add(item.getText()); }
return array;
}

public List<String> getOHITableData1(){
List<String> array = new ArrayList<String>();
for(WebElement item: OHITableData1) {
array.add(item.getText());}
return array;
}

public List<String> getOHITableHeader(){
List<String> array = new ArrayList<String>();
for(WebElement item: OHITableHeader) {
array.add(item.getText());
}
return array;
}

public List<String> getOHITableData2(){
List<String> array = new ArrayList<String>();
for(WebElement item: OHITableData2) {
array.add(item.getText());
}
return array;
}

public List<String> getOHITableData3(){
List<String> array = new ArrayList<String>();
for(WebElement item: OHITableData3) {
array.add(item.getText());}
return array;
}


/********Miscellaneous*********************************************************/

public String getMiscellaneousLabel(){
return lblMiscellaneous.getText();
}

public List<String>getMiscellaneousData(){
List<String> array = new ArrayList<String>();
for(WebElement item: dataMiscellaneous) {
array.add(item.getText());
}
return array;
}


}