use of org.mitre.synthea.world.geography.Location in project synthea by synthetichealth.
the class PayerTest method before.
/**
* Setup before each test.
*/
@Before
public void before() {
// Clear any Payers that may have already been statically loaded.
Payer.clear();
Config.set("generate.payers.insurance_companies.default_file", "generic/payers/test_payers.csv");
// Load in the .csv list of Payers.
Payer.loadPayers(new Location(testState, null));
// Load the two test payers.
testPrivatePayer1 = Payer.getPrivatePayers().get(0);
testPrivatePayer2 = Payer.getPrivatePayers().get(1);
// Force medicare for test settings
Config.set("generate.payers.insurance_companies.medicare", "Medicare");
Config.set("generate.payers.insurance_companies.medicaid", "Medicaid");
Config.set("generate.payers.insurance_companies.dual_eligible", "Dual Eligible");
HealthInsuranceModule.MEDICARE = "Medicare";
HealthInsuranceModule.MEDICAID = "Medicaid";
HealthInsuranceModule.DUAL_ELIGIBLE = "Dual Eligible";
}
use of org.mitre.synthea.world.geography.Location in project synthea by synthetichealth.
the class PayerTest method nullPayerName.
@Test(expected = RuntimeException.class)
public void nullPayerName() {
Payer.clear();
Config.set("generate.payers.insurance_companies.default_file", "generic/payers/bad_test_payers.csv");
Payer.loadPayers(new Location("Massachusetts", null));
Payer.clear();
}
use of org.mitre.synthea.world.geography.Location in project synthea by synthetichealth.
the class ProviderTest method testNearestEmergencyInDC.
@Ignore("Test requires US data, and fails on international configurations.")
@Test
public void testNearestEmergencyInDC() {
// DC is a good test because it has one city, Washington, with a single
// coordinate. People in the same city have more or less the same
// coordinate as emergency hospitals.
Location capital = new Location("District of Columbia", null);
Provider.loadProviders(capital, 1L);
Person person = new Person(0L);
capital.assignPoint(person, capital.randomCityName(person));
Provider provider = Provider.findService(person, EncounterType.EMERGENCY, 0);
Assert.assertNotNull(provider);
}
use of org.mitre.synthea.world.geography.Location in project synthea by synthetichealth.
the class LossOfCareHealthRecordTest method setup.
/**
* Setup for HealthRecord Tests.
*/
@Before
public void setup() throws Exception {
// Clear any Payers that may have already been statically loaded.
Payer.clear();
TestHelper.loadTestProperties();
String testState = Config.get("test_state.default", "Massachusetts");
Config.set("generate.payers.insurance_companies.default_file", "generic/payers/test_payers.csv");
Config.set("generate.payers.loss_of_care", "true");
Config.set("lifecycle.death_by_loss_of_care", "true");
// Load in the .csv list of Payers for MA.
Payer.loadPayers(new Location(testState, null));
// Load test payers.
testPrivatePayer = Payer.getPrivatePayers().get(0);
// Parse out testPrivatePayer's Copay.
Person person = new Person(0L);
person.setProvider(EncounterType.WELLNESS, new Provider());
person.attributes.put(Person.INCOME, 1);
Encounter encounter = person.encounterStart(time, EncounterType.WELLNESS);
testPrivatePayerCopay = testPrivatePayer.determineCopay(encounter);
// Utilities.convertCalendarYearsToTime(1900);
time = 0L;
}
use of org.mitre.synthea.world.geography.Location in project synthea by synthetichealth.
the class PayerFinderTest method noPayersRandom.
@Test
public void noPayersRandom() {
Config.set("generate.payers.selection_behavior", "random");
Payer.clear();
Payer.loadPayers(new Location((String) person.attributes.get(Person.STATE), null));
PayerFinderRandom finder = new PayerFinderRandom();
List<Payer> options = new ArrayList<Payer>();
Payer payer = finder.find(options, person, null, 0L);
assertNotNull(payer);
assertEquals("NO_INSURANCE", payer.getName());
}
Aggregations