Package com.dtrules.samples.chipeligibility.app.dataobjects

Examples of com.dtrules.samples.chipeligibility.app.dataobjects.Client


 
  void addchild(Job job, Client parent, int ageParent){
    ArrayList<Client> sibs = new ArrayList<Client>();
   
    while(job.getCase().getClients().size()<10 && sibs.size()==0 || chance(40)){
      Client child = genClient(job, ageParent-15);
      sibs.add(child);
      Relationship r = new Relationship();
      job.getCase().getRelationships().add(r);
      r.setSource(parent);
      r.setTarget(child);
View Full Code Here


    income.setAmount(randint(1400)+200);
    income.setEarned(earned[i]);
  }
 
  Client genClient(Job job, int ageLimit){
    Client client = new Client();
    job.getCase().getClients().add(client);
    int age = randint(ageLimit);
    String gender = flip()?"male":"female";
    client.setAge(age);
    client.setGender(gender);
    client.setLivesAtResidence(chance(90)?true:false);

    boolean citizen = chance(66);
    client.setValidatedCitizenship(citizen);
    if(!citizen){
      client.setValidatedImmigrationStatus(chance(90));
    }
   
    boolean pregnant = gender.equals("female")&&age>15&&chance(30);
    client.setPregnant(pregnant);
    if(pregnant){
      client.setExpectedChildren(chance(80)?1: chance(80)?2:3);
    }else{
      client.setExpectedChildren(0);
    }
   
    client.setDisabled(chance(10)?true:false);
    client.setApplying(age<20? (chance(90)?true:false):false);
    if(client.getApplying())job.addApplying();
    boolean uninsured = chance(90);
    client.setUninsured(uninsured);
    if(uninsured){
      cal.setTime(currentdate);
      int months = randint(24);
      cal.add(Calendar.MONTH, -months);
      client.setLostInsuranceDate(cal.getTime());
    }
    client.setEligibleForMedicaid(chance(10)?true:false);

    int icnt = randint(4);
    for(int i = 0; age > 18 && i < icnt; i++){
      addIncome(job, client);
    }
View Full Code Here

TOP

Related Classes of com.dtrules.samples.chipeligibility.app.dataobjects.Client

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.