Package org.pathways.openciss.info.hmis.schema._3_0.hud_hmis

Examples of org.pathways.openciss.info.hmis.schema._3_0.hud_hmis.Destination


        xmlr8.next();
        if (xmlr8.isStartElement()) {
          if (xmlr8.getLocalName().equals("Person")) {
            xmlr8.require(XMLStreamConstants.START_ELEMENT, null, "Person");
            JAXBElement<Person> personJAXB = unmarshaller.unmarshal(xmlr8, Person.class);
            Person person = (Person)personJAXB.getValue();
            //Get only the person with the same id as the head of household's id
            if (person.getPersonID().getIDNum().equals(household.getHeadOfHouseholdID().getIDNum())) {
              ssn = person.getSocialSecurityNumber().getUnhashed().getValue();
              break;
           
          }  
        }
      }
View Full Code Here


    }
    return ssn;
 
 
  Person getPersonFromSiteServiceParticipation(SiteServiceParticipation ssp) {
    Person personReturn = null;
    JAXBContext jc = null;

    InputStream zis = openXMLStream(hudXMLURL);

    XMLStreamReader xmlr9 = null;
    try {
      // set up a StAX reader
      xmlr9 = xmlif.createXMLStreamReader(zis);
    } catch (Exception e) {
      log.info("exception caught creating StAX stream " + e.toString());
    }
   
    BigInteger sspID = ssp.getSiteServiceParticipationID().getIDNum();
    // Use StAX to get Person that possesses that ssp id
    try {
      jc = JAXBContext.newInstance(Person.class);
    } catch (JAXBException e) {
      log.info("JAXB Person.class context problem: " + e.toString());
    }
    try {
      unmarshaller = jc.createUnmarshaller();
    } catch (JAXBException e) {
      log.info("Problem unmarshalling Person context: " + e.toString());
    }
    try {
      while(xmlr9.hasNext()) {
        //Get and check each Person with the right Head of Household ID
        xmlr9.next();
        if (xmlr9.isStartElement()) {
          if (xmlr9.getLocalName().equals("Person")) {
            xmlr9.require(XMLStreamConstants.START_ELEMENT, null, "Person");
            JAXBElement<Person> personJAXB = unmarshaller.unmarshal(xmlr9, Person.class);
            Person person = (Person)personJAXB.getValue();
            //Get only the person with the same id as the head of household's id
            for (SiteServiceParticipation ssp2 : person.getSiteServiceParticipation()) {
              if (ssp2.getSiteServiceParticipationID().getIDNum().equals(sspID)) {
                personReturn = person;
                break;
             
            }
View Full Code Here

    }
    return personReturn;
  }
 
  Person getPersonFromHouseholdMember(Member member) {
    Person personReturn = null;
    JAXBContext jc = null;
    InputStream zis = openXMLStream(hudXMLURL);
    XMLStreamReader xmlr10 = null;
    try {
      // set up a StAX reader
      xmlr10 = xmlif.createXMLStreamReader(zis);
    } catch (Exception e) {
      log.info("exception caught creating StAX stream " + e.toString());
    }
   
    // Use StaX to search for a Person with the same ID as the household member
    try {
      jc = JAXBContext.newInstance(Person.class);
    } catch (JAXBException e) {
      log.info("JAXB Person.class context problem: " + e.toString());
    }
    try {
      unmarshaller = jc.createUnmarshaller();
    } catch (JAXBException e) {
      log.info("Problem unmarshalling Person context: " + e.toString());
    }
    try {
      while(xmlr10.hasNext()) {
        //Get and check each Person with the right Head of Household ID
        xmlr10.next();
        if (xmlr10.isStartElement()) {
          if (xmlr10.getLocalName().equals("Person")) {
            xmlr10.require(XMLStreamConstants.START_ELEMENT, null, "Person");
            JAXBElement<Person> personJAXB = unmarshaller.unmarshal(xmlr10, Person.class);
            Person person = (Person)personJAXB.getValue();
            //Get only the person with the same id as the head of household's id
            if (person.getPersonID().getIDNum().equals(member.getPersonID().getIDNum())) {
                personReturn = person;
                break;
            }
          }  
        }
View Full Code Here

    }
    return headOfHouseholdID;
  }
 
  Person getPersonByID(BigInteger headOfHouseholdID) {
    Person returnPerson = null;
    JAXBContext jc = null;
    InputStream zis = openXMLStream(hudXMLURL);
    XMLStreamReader xmlr15 = null;
    try {
      // set up a StAX reader
      xmlr15 = xmlif.createXMLStreamReader(zis);
    } catch (Exception e) {
      log.info("exception caught creating StAX stream " + e.toString());
      e.printStackTrace();
    }
   
    //Use StAX to look up the head of household's SSN
    try {
      jc = JAXBContext.newInstance(Person.class);
    } catch (JAXBException e) {
      log.info("JAXB Person.class context problem: " + e.toString());
      e.printStackTrace();
    }
    try {
      unmarshaller = jc.createUnmarshaller();
    } catch (JAXBException e) {
      log.info("Problem unmarshalling person context: " + e.toString());
      e.printStackTrace();
    }
    try {
      while(xmlr15.hasNext()) {
        //Get each person
        xmlr15.next();
        if (xmlr15.isStartElement()) {
          if (xmlr15.getLocalName().equals("Person")) {
            xmlr15.require(XMLStreamConstants.START_ELEMENT, null, "Person");
            JAXBElement<Person> personJAXB = unmarshaller.unmarshal(xmlr15, Person.class);
            Person person = (Person)personJAXB.getValue();
            if (person.getPersonID().getIDNum().equals(headOfHouseholdID)) {
              returnPerson = person;
              break;
            }
          }
        }
View Full Code Here

        if (xmlr4.isStartElement()) {
          if (xmlr4.getLocalName().equals("Person")) {
            //log.info("We found a Person element.");
            xmlr4.require(XMLStreamConstants.START_ELEMENT, null, "Person");
            JAXBElement<Person> personJAXB = unmarshaller.unmarshal(xmlr4, Person.class);
            Person person  = (Person)personJAXB.getValue();   
            // if it's not head of household, but a member
            if (o instanceof Member) {
              if (personID.equals(person.getPersonID().getIDNum())) {
                log.info("found a match.");
                processMemberStage2(o, household, person);
                convertSiteServiceParticipationsToRosieCSV1(householdID, household, personID);
                break;
              }
            // if it's the head of household 
            } else if (o instanceof BigInteger) {
              if (((BigInteger)o).equals(person.getPersonID().getIDNum())) {
                csv2Record[5] = String.valueOf(householdMemberCounterCSV2);
           
                //Get the family member's relationship to the head of household
                String   relationshipCodeCSV2 = "0";//self
                  //relationshipCodeCSV2 = xpath.evaluate("RelationshipToHeadOfHousehold/text()", familyMember);
View Full Code Here

      //Integer.valueOf(((NodeList)xpath.evaluate("Veteran/VeteranStatus/text()", personHistorical, XPathConstants.NODESET)).item(0).getTextContent());
    //log.info("Could not find VeteranStatus for this person: " + e.toString());

    // get address of family member
    //Just handling one address per person
    PersonAddress personAddress = null;
    try {
      personAddress = personHistorical.getPersonAddress().get(0);
      processPersonAddress(personAddress);
    catch (Exception e) {
      log.info("Couldn't get personAddress");
View Full Code Here

     
      //write out the Family Income and Expense record to CSV3
      processIncomeAndSources(household, ph, ssp);
     
      try {
        PersonAddress personAddress = ph.getPersonAddress().get(0);
        if (personAddress  != null) {
          //for (PersonAddress personAddress : personAddresses) {
          //Process each address found, either temporary or last permanent
          //log.info("We located " + numberOfAddresses + " total addresses for the head of the household.");       
          // first, for each address in the list, check the lastpermanentzip element to make sure which csv column it goes in
         
          Integer isLastPermanentZIP = ((Long)personAddress.getIsLastPermanentZIP().getValue()).intValue();
          boolean isLastPermanent;
          //isLastPermanentZIP = xpath.evaluate("IsLastPermanentZIP", personAddress);
          //log.info("Problem getting IsLastPermanentZIP: " + e.toString());
          if (isLastPermanentZIP.equals("1")) {
              // put fields in Last Permanent Address columns
View Full Code Here

          processPersonAddressHeadOfHousehold(headOfHouseholdID.toString(), isLastPermanent, personAddress);

          // process PersonPhoneNumber element
          //HUD HMIS XML doesn't differentiate between work and home telephone numbers, so we just get the first match and put it in home
          //String homeTelephoneCSV1= ((Element)personPhoneList.item(0)).getTextContent();                    csvRecord[16] = "";         
          PhoneNumber personPhoneNumber = ph.getPersonPhoneNumber().get(0);
          //"/Sources/Source/Export/Person[PersonID/IDNum/text() = \"" + headOfHouseholdID + "\"]/SiteServiceParticipation/PersonHistorical/PersonPhoneNumber", doc, XPathConstants.NODESET);
          String homeTelephoneCSV1 = "";
          //if (!personPhoneNumbers.isEmpty()) {
          homeTelephoneCSV1 = personPhoneNumber.getValue();
          csv1Record[16] = homeTelephoneCSV1;
          //log.info("Problem getting PersonPhoneNumber: " + e.toString());
       
         
      } catch (Exception e) {
View Full Code Here

    */
   
    // write out program participation to CSV 5, if it is a non-shelter stay and CSV 7
    // get serviceType
    try {
      Service service = getServiceFromServiceKey(serviceKey);
      String serviceType = service.getServiceType().toString();
      if (serviceType != null) {
        if (serviceType.equals("1")) {
          writeOutCSV7(ssp, serviceKeyCSV1,   sSNFamilyHeadCSV1);
        } else {
          writeOutCSV5(ssp, serviceKeyCSV1,   sSNFamilyHeadCSV1);
View Full Code Here

    return returnHousehold;
  }
 
  Service getServiceFromServiceKey(BigInteger serviceKey) {
    JAXBContext jc = null;
    Service retSvc = null;
    //Use StAX to retrieve the Service by ID
    //First, use the Household ID to get the household element.
    InputStream zis = openXMLStream(hudXMLURL);
    XMLStreamReader xmlr14 = null;
    try {
      // set up a StAX reader
      xmlr14 = xmlif.createXMLStreamReader(zis);
    } catch (Exception e) {
      log.info("exception caught creating StAX stream " + e.toString());
      e.printStackTrace();
    }
    try {
      jc = JAXBContext.newInstance(Service.class);
    } catch (JAXBException e) {
      log.info("JAXB Service.class context problem: " + e.toString());
      e.printStackTrace();
    }
    try {
      unmarshaller = jc.createUnmarshaller();
    } catch (JAXBException e) {
      log.info("Problem unmarshalling Service.class context: " + e.toString());
      e.printStackTrace();
    }
    try {
      while(xmlr14.hasNext()) {
        //Get and check each Household with the right Household ID
        xmlr14.next();
        if (xmlr14.isStartElement()) {
          if (xmlr14.getLocalName().equals("Service")) {
            xmlr14.require(XMLStreamConstants.START_ELEMENT, null, "Service");
            JAXBElement<Service> serviceJAXB = unmarshaller.unmarshal(xmlr14, Service.class);
            Service service = (Service)serviceJAXB.getValue();
            if (service.getKey() != null) {
              if (service.getKey().equals(serviceKey)) {
                retSvc = service;
                break;
              }
            }
          }  
View Full Code Here

TOP

Related Classes of org.pathways.openciss.info.hmis.schema._3_0.hud_hmis.Destination

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.