Previous stepUpNext step
Tutorial overviewStep 2

Step 1: Define what a record is

Records in the CDC test set are composed of 14 fields: last name, first name, and so on. These records can be modeled in an obvious way by an interface that follows the Java Bean conventions. Just as simply, the bean interface can be implemented by a class that also overrides the equals(Object) and hashCode() methods inherited from the Object class.

The CDC test data consists of 550 vaccination records. Each record is composed of 14 fields:

  1. LastName: the patient's last name
  2. FirstName: the patient's first name
  3. MiddleName: the patient's middle name
  4. Suffix: any suffix to the patient's last name
  5. DOB: the patient's date of birth
  6. Sex: the patient's gender (M - male, F - female)
  7. MomMaiden: the maiden name of the patient's mother
  8. MomLast: the last name of the patient's mother
  9. MomFirst: the first name of the patient's mother
  10. MomMiddle: the middle of the patient's mother
  11. VacName: the name of the vaccine that was administered
  12. VacCode: the vaccine code (CVX)
  13. VacMfr: the vaccine manufacturer code (MVX)
  14. VacDate: the date the vaccine was administered

Next, we'll define a Java interface for this record layout and then extend the interface to add fields that we need just for record generation.

Previous stepUpNext step
Tutorial overviewStep 2