use of org.mitre.synthea.export.BB2RIFExporter.StaticFieldConfig in project synthea by synthetichealth.
the class BB2RIFExporterTest method testStaticFieldConfig.
@Test
public void testStaticFieldConfig() throws IOException, NoSuchMethodException {
RandomNumberGenerator rand = new Person(System.currentTimeMillis());
assertEquals("foo", StaticFieldConfig.processCell("foo", rand));
String randomVal = StaticFieldConfig.processCell("1, 2, 3", rand);
assertTrue(randomVal.equalsIgnoreCase("1") || randomVal.equalsIgnoreCase("2") || randomVal.equalsIgnoreCase("3"));
StaticFieldConfig config = new StaticFieldConfig();
assertEquals("INSERT", config.getValue("DML_IND", INPATIENT.class));
assertEquals("82 (DMEPOS)", config.getValue("NCH_CLM_TYPE_CD", DME.class));
assertEquals("71 (local carrier, non-DME)", config.getValue("NCH_CLM_TYPE_CD", CARRIER.class));
HashMap<BENEFICIARY, String> values = new HashMap<>();
config.setValues(values, BENEFICIARY.class, rand);
assertEquals("INSERT", values.get(BENEFICIARY.DML_IND));
String sexIdent = values.get(BENEFICIARY.BENE_SEX_IDENT_CD);
assertTrue(sexIdent.equals("1") || sexIdent.equals("2"));
}
Aggregations