//2,2,1,3,1,0 //Hib,DTAP,Polio,HepB,MMR,Varicella private List <Immunization> getImmunizationObject(String csvData, ImmunizationFactory immunizationFactoryInstance) { List <Immunization> immunizationRec = new List <Immunization>(); String[] str = csvData.Split(","); immunizationRec.Add(immunizationFactoryInstance.getObject(str[1] + "," + "Hib")); immunizationRec.Add(immunizationFactoryInstance.getObject(str[2] + "," + "DTap")); immunizationRec.Add(immunizationFactoryInstance.getObject(str[3] + "," + "Polio")); immunizationRec.Add(immunizationFactoryInstance.getObject(str[4] + "," + "Hepatitis B")); immunizationRec.Add(immunizationFactoryInstance.getObject(str[5] + "," + "MMR")); immunizationRec.Add(immunizationFactoryInstance.getObject(str[6] + "," + "Varicella")); return(immunizationRec); }
public void setImmunizationFactoryInstance(ImmunizationFactory immunizationFactoryInstance) { this.ImmunizationFactoryInstance = immunizationFactoryInstance; }
public void mapStudentIDToImmunizationData(List <String> csvImmunizationData, List <Student> studentList, ImmunizationFactory immunizationFactoryInstance) { foreach (String csvData in csvImmunizationData) { String[] studentID = csvData.Split(","); List <Immunization> list = getImmunizationObject(csvData, immunizationFactoryInstance); foreach (Student student in studentList) { if (student.StudentId == int.Parse(studentID[0])) { student.ImmunizationRecord = list; } } } // System.out.println("MAPPING DONE\n"); }
public DayCare() { this.ImmunizationFactoryInstance = ImmunizationFactory.getInstance(); }