Skip to content

Commit 204f6d2

Browse files
author
songa
committed
cleaning up some descriptions (#9)
1 parent de26904 commit 204f6d2

35 files changed

+125
-120
lines changed

src/main/java/com/imsweb/datagenerator/naaccr/NaaccrDataGeneratorRule.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
package com.imsweb.datagenerator.naaccr;
22

3+
import java.time.LocalDate;
34
import java.util.Collections;
45
import java.util.List;
56
import java.util.Map;
67

7-
import java.time.LocalDate;
8-
98
public abstract class NaaccrDataGeneratorRule {
109

1110
// the unique ID of this rule
@@ -38,7 +37,7 @@ public String getName() {
3837
return _name;
3938
}
4039

41-
public String getCriteria() {
40+
public String getDescription() {
4241
return "No Description Available";
4342
}
4443

src/main/java/com/imsweb/datagenerator/naaccr/rule/patient/AddressCurrentRule.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ public class AddressCurrentRule extends AddressRule {
77
// unique identifier for this rule
88
public static final String ID = "address-current";
99

10+
private static final String _CRTIERIA = "Current Address is randomly generated based on SEER frequencies and the provided state";
11+
1012
/**
1113
* Constructor.
1214
*/
@@ -21,4 +23,9 @@ public AddressCurrentRule() {
2123
"addressCurrentSupplementl",
2224
"addressCurrentCounty");
2325
}
26+
27+
@Override
28+
public String getDescription() {
29+
return _CRTIERIA;
30+
}
2431
}

src/main/java/com/imsweb/datagenerator/naaccr/rule/patient/BirthRule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class BirthRule extends NaaccrDataGeneratorRule {
1414
// unique identifier for this rule
1515
public static final String ID = "birth";
1616

17-
private static final String _CRITERIA = "Birthplace Country is always set to USA. If no state was selected, then all states have an equal chance to be assigned as Birthplace State.<br/>"
17+
private static final String _DESCRIPTION = "Birthplace Country is always set to USA. If no state was selected, then all states have an equal chance to be assigned as Birthplace State.<br/>"
1818
+ "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."
1919
+ "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."
2020
+ "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.";
@@ -27,8 +27,8 @@ public BirthRule() {
2727
}
2828

2929
@Override
30-
public String getCriteria() {
31-
return _CRITERIA;
30+
public String getDescription() {
31+
return _DESCRIPTION;
3232
}
3333

3434
@Override

src/main/java/com/imsweb/datagenerator/naaccr/rule/patient/ComputedEthnicityRule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class ComputedEthnicityRule extends NaaccrDataGeneratorRule {
1818
// unique identifier for this rule
1919
public static final String ID = "computed-ethnicity";
2020

21-
private static final String _CRITERIA = "Computed Ethnicity is calculated based on Sex, Last Name, and Maiden Name.";
21+
private static final String _DESCRIPTION = "Computed Ethnicity is calculated based on Sex, Last Name, and Maiden Name.";
2222

2323
// resource file containing list of spanish surnames
2424
protected static final String _FILE_SPANISH_SURNAMES = "frequencies/spanish_surnames.csv";
@@ -41,8 +41,8 @@ public List<String> getRequiredProperties() {
4141
}
4242

4343
@Override
44-
public String getCriteria() {
45-
return _CRITERIA;
44+
public String getDescription() {
45+
return _DESCRIPTION;
4646
}
4747

4848
@Override

src/main/java/com/imsweb/datagenerator/naaccr/rule/patient/DeathRule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class DeathRule extends NaaccrDataGeneratorRule {
1212
// unique identifier for this rule
1313
public static final String ID = "death";
1414

15-
private static final String _CRITERIA = "If Vital Status was set to 1, Cause of Death will be set to 0000 and ICD Revision Number will be set to 0.<br/>"
15+
private static final String _DESCRIPTION = "If Vital Status was set to 1, Cause of Death will be set to 0000 and ICD Revision Number will be set to 0.<br/>"
1616
+ "Otherwise these fields are not set";
1717

1818
/**
@@ -23,8 +23,8 @@ public DeathRule() {
2323
}
2424

2525
@Override
26-
public String getCriteria() {
27-
return _CRITERIA;
26+
public String getDescription() {
27+
return _DESCRIPTION;
2828
}
2929

3030
@Override

src/main/java/com/imsweb/datagenerator/naaccr/rule/patient/HispanicOriginRule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class HispanicOriginRule extends NaaccrDataGeneratorRule {
1212
// unique identifier for this rule
1313
public static final String ID = "spanish-hispanic-origin";
1414

15-
private static final String _CRITERIA = "Spanish/Hispanic Origin is randomly generated based on frequency";
15+
private static final String _DESCRIPTION = "Spanish/Hispanic Origin is randomly generated based on SEER frequency";
1616

1717
/**
1818
* Constructor.
@@ -22,8 +22,8 @@ public HispanicOriginRule() {
2222
}
2323

2424
@Override
25-
public String getCriteria() {
26-
return _CRITERIA;
25+
public String getDescription() {
26+
return _DESCRIPTION;
2727
}
2828

2929
@Override

src/main/java/com/imsweb/datagenerator/naaccr/rule/patient/IhsRule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class IhsRule extends NaaccrDataGeneratorRule {
1111
// unique identifier for this rule
1212
public static final String ID = "ihs";
1313

14-
private static final String _CRITERIA = "IHS is always left blank.";
14+
private static final String _DESCRIPTION = "IHS is always left blank.";
1515

1616
/**
1717
* Constructor.
@@ -21,8 +21,8 @@ public IhsRule() {
2121
}
2222

2323
@Override
24-
public String getCriteria() {
25-
return _CRITERIA;
24+
public String getDescription() {
25+
return _DESCRIPTION;
2626
}
2727

2828
@Override

src/main/java/com/imsweb/datagenerator/naaccr/rule/patient/NameRule.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ public class NameRule extends NaaccrDataGeneratorRule {
1414
// unique identifier for this rule
1515
public static final String ID = "name";
1616

17-
private static final String _CRITERIA = "Last Name is randomly generated based on frequency. The frequency depends on Spanish/Hispanic Origin and Race 1.<br/>"
17+
private static final String _DESCRIPTION = "Last Name is randomly generated based on SEER frequency, Spanish/Hispanic Origin, and Race 1.<br/>"
1818
+ "First Name is randomly generated from a list based on Sex.<br/>"
19-
+ "Middle Name is randomly generated from a list based on Sex. There is a 5% chance that Middle Name will be an initial.<br/>"
20-
+ "Prefix is randomly generated from a list based on Sex. There is a 2% chance that a patient will have a prefix."
21-
+ "Suffix is randomly generated from a list based on Sex. There is a 3% chance that a patient will have a suffix.";
22-
// TODO maiden name, spouse name...why is maiden name = last name
19+
+ "Middle Name is randomly generated from a list based on Sex.<br/>"
20+
+ "Prefix is randomly generated from a list based on Sex.<br/>"
21+
+ "Suffix is randomly generated from a list based on Sex."
22+
+ "Maiden Name is set randomly if Sex is female. If it is set, it will always be the value of Last Name.";
2323

2424
// lists of valid name prefixes and suffixes
2525
private static final String[] _VALUES_PREFIXES_MALE = {"Dr", "Rev", "Mr"};
@@ -40,8 +40,8 @@ public List<String> getRequiredProperties() {
4040
}
4141

4242
@Override
43-
public String getCriteria() {
44-
return _CRITERIA;
43+
public String getDescription() {
44+
return _DESCRIPTION;
4545
}
4646

4747
@Override

src/main/java/com/imsweb/datagenerator/naaccr/rule/patient/PatientIdRule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class PatientIdRule extends NaaccrDataGeneratorRule {
1111
// unique identifier for this rule
1212
public static final String ID = "patient-id-number";
1313

14-
private static final String _CRITERIA = "Patient ID starts at 00000001 and is incremented by 1 for each new patient. Records for the same patient will have the same Patient ID.";
14+
private static final String _DESCRIPTION = "Patient ID starts at 00000001 and is incremented by 1 for each new patient.";
1515

1616
// current counter value
1717
private int _currentValue;
@@ -25,8 +25,8 @@ public PatientIdRule() {
2525
}
2626

2727
@Override
28-
public String getCriteria() {
29-
return _CRITERIA;
28+
public String getDescription() {
29+
return _DESCRIPTION;
3030
}
3131

3232
@Override

src/main/java/com/imsweb/datagenerator/naaccr/rule/patient/RaceRule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class RaceRule extends NaaccrDataGeneratorRule {
1212
// unique identifier for this rule
1313
public static final String ID = "race";
1414

15-
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/>"
15+
private static final String _DESCRIPTION = "Race 1 is randomly generated based on SEER frequency. If Race 1 is set to 99, Race 2-5 are set to 99 also.<br/>"
1616
+ "Otherwise, Race 2-5 are set to 88.";
1717

1818
/**
@@ -24,8 +24,8 @@ public RaceRule() {
2424

2525

2626
@Override
27-
public String getCriteria() {
28-
return _CRITERIA;
27+
public String getDescription() {
28+
return _DESCRIPTION;
2929
}
3030

3131
@Override

0 commit comments

Comments
 (0)