예제 #1
0
//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);
        }
예제 #2
0
 public void setImmunizationFactoryInstance(ImmunizationFactory immunizationFactoryInstance)
 {
     this.ImmunizationFactoryInstance = immunizationFactoryInstance;
 }
예제 #3
0
        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");
        }
예제 #4
0
 public DayCare()
 {
     this.ImmunizationFactoryInstance = ImmunizationFactory.getInstance();
 }