Skip to content

Commit

Permalink
fixing merge (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
songa committed Nov 14, 2017
1 parent 6cc2d13 commit de26904
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ public class BirthRule extends NaaccrDataGeneratorRule {
+ "If a state was selected, that state has a 90% chance of being assigned as Birthplace State. The other states have an equal chance of being assigned."
+ "Date of Birth is randomly generated between a minimum and maximum date. The minimum date is always 100 years before the current date to ensure that no patient is older than 100."
+ "The maximum date is 5 years prior to the January 1 of the minimum DX year. If no minimum DX year was provided, the minimum date is 15 years before the current date.";
// random birth state value generator
private DistributedRandomValueGenerator _stateValues;

/**
* Constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,6 @@ public class NameRule extends NaaccrDataGeneratorRule {
+ "Suffix is randomly generated from a list based on Sex. There is a 3% chance that a patient will have a suffix.";
// TODO maiden name, spouse name...why is maiden name = last name

// file to last name frequencies
protected static final String _FREQUENCY_FILE_LAST_WHITE = "frequencies/last_names_white.csv";
protected static final String _FREQUENCY_FILE_LAST_BLACK = "frequencies/last_names_black.csv";
protected static final String _FREQUENCY_FILE_LAST_API = "frequencies/last_names_api.csv";
protected static final String _FREQUENCY_FILE_LAST_HISPANIC = "frequencies/last_names_hispanic.csv";

// file to first names
protected static final String _FILE_FIRST_MALE = "lists/first_names_male.csv";
protected static final String _FILE_FIRST_FEMALE = "lists/first_names_female.csv";

// random name generators
protected static final DistributedRandomValueGenerator _VALUES_WHITE = new DistributedRandomValueGenerator(_FREQUENCY_FILE_LAST_WHITE);
protected static final DistributedRandomValueGenerator _VALUES_BLACK = new DistributedRandomValueGenerator(_FREQUENCY_FILE_LAST_BLACK);
protected static final DistributedRandomValueGenerator _VALUES_API = new DistributedRandomValueGenerator(_FREQUENCY_FILE_LAST_API);
protected static final DistributedRandomValueGenerator _VALUES_HISPANIC = new DistributedRandomValueGenerator(_FREQUENCY_FILE_LAST_HISPANIC);
protected static final UniformRandomValueGenerator _VALUES_NAME_FIRST_MALE = new UniformRandomValueGenerator(_FILE_FIRST_MALE);
protected static final UniformRandomValueGenerator _VALES_NAME_FIRST_FEMALE = new UniformRandomValueGenerator(_FILE_FIRST_FEMALE);

// lists of valid name prefixes and suffixes
private static final String[] _VALUES_PREFIXES_MALE = {"Dr", "Rev", "Mr"};
private static final String[] _VALUES_PREFIXES_FEMALE = {"Dr", "Rev", "Ms", "Mrs"};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ public class RaceRule extends NaaccrDataGeneratorRule {
private static final String _CRITERIA = "Race 1 is randomly generated based on frequency. If Race 1 is set to 99, Race 2-5 are set to 99 also.<br/>"
+ "Otherwise, Race 2-5 are set to 88.";

// file to the frequencies
protected static final String _FREQUENCY_FILE = "frequencies/race.csv";

// random race value generator
protected static final DistributedRandomValueGenerator _VALUES = new DistributedRandomValueGenerator(_FREQUENCY_FILE);

/**
* Constructor.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ public class SiteRule extends NaaccrDataGeneratorRule {
// unique identifier for this rule
public static final String ID = "site";

// file to the female frequencies
private static final String _FILE_FREQUENCY_SITE_FEMALE = "frequencies/sites_sex_female.csv";

// file to the male frequencies
private static final String _FILE_FREQUENCY_SITE_MALE = "frequencies/sites_sex_male.csv";

// random site generator for females
private static final DistributedRandomValueGenerator VALUES_FEMALE = new DistributedRandomValueGenerator(_FILE_FREQUENCY_SITE_FEMALE);

// random site generator for males
private static final DistributedRandomValueGenerator VALUES_MALE = new DistributedRandomValueGenerator(_FILE_FREQUENCY_SITE_MALE);

private static final String _CRITERIA = "Primary Site, Histology, and Behavior are randomly generated based on frequencies. These frequencies depend on Sex.<br/>"
+ "Grade is always set to 9. If Primary Site is C809 (unknown), Laterality is set to 0. Otherwise it is set to 9.";

Expand Down

0 comments on commit de26904

Please sign in to comment.