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 gov.va.med.pbm.ampl.asset.mock;
import java.util.ArrayList;
import java.util.Collection;
import gov.va.med.pbm.ampl.constant.MockDataConstants;
import gov.va.med.pbm.ampl.controller.EnvironmentInternalController;
import gov.va.med.pbm.ampl.model.Provider;
import gov.va.med.pbm.ampl.utility.NumberUtility;
/**
* This class generates mock data for the {@link EnvironmentInternalController} end points .
*
* @author Ian Meinert
* @author Pavani Mukthipudi
*
* @since 1.0
*/
public class ProviderData {
/**
* This method generates a mock {@link Provider} array for a patient.
*
* @param c random int
* @return {@link Provider} array
*/
public Provider[] testProvidersForPatient(int c) {
Collection<Provider> teamPositons = new ArrayList<Provider>();
for (int i = 0; i < c; i++) {
String t = Provider.class.getSimpleName().toUpperCase() + i;
teamPositons.add(this.testProviderForPatient(t));
}
return teamPositons.toArray(new Provider[teamPositons.size()]);
}
/**
* This method generates a mock {@link Provider} for a patient.
*
* @param s string mock value
* @return {@link Provider}
*/
public Provider testProviderForPatient(String s) {
Provider provider = new Provider();
FacilityData fac = new FacilityData();
ContactData con = new ContactData();
provider.setContactDetails(con.testContact());
provider.setFacility(fac.testFacilityForPatient(NumberUtility.randomBetween(0, MockDataConstants.SEVEN)));
provider.setName(s);
provider.setRole(s);
provider.setStatus(s);
return provider;
}
}