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

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


        }
       
        int gen = pc.getGenderCode().intValue();
        if (Integer.valueOf(gen) != null ) {
          SevenValDKRefusedHashingChoice sevenValDKRef_hc = new SevenValDKRefusedHashingChoice();
          SevenValDKRefused sevenValDKRef = new SevenValDKRefused();
          gen = GenderMap.map(gen);
          if (gen != -1) {
            sevenValDKRef.setValue((long)gen);
            sevenValDKRef_hc.setUnhashed(sevenValDKRef);
            p.setGender(sevenValDKRef_hc);
          }
        }
       
View Full Code Here


        }
       
        try {
          int race = pc.getRaceCode().intValue();
          if (Integer.valueOf(race) != null ) {
            SevenValDKRefused2HashingChoiceStatic sevenValDKRef_hcs = new SevenValDKRefused2HashingChoiceStatic();
            SevenValDKRefused2Static sevenValDKRef2S = new SevenValDKRefused2Static();
            race = RaceMap.map(race);
            if (race != -1) {
              sevenValDKRef2S.setValue((long)race);
              sevenValDKRef_hcs.setUnhashed(sevenValDKRef2S);
              p.getRace().add(sevenValDKRef_hcs);
            }
          }
        } catch (Exception e){e.printStackTrace();}
        if (pc.getDateOfBirth() !=null) {
View Full Code Here

       
        try {
          int race = pc.getRaceCode().intValue();
          if (Integer.valueOf(race) != null ) {
            SevenValDKRefused2HashingChoiceStatic sevenValDKRef_hcs = new SevenValDKRefused2HashingChoiceStatic();
            SevenValDKRefused2Static sevenValDKRef2S = new SevenValDKRefused2Static();
            race = RaceMap.map(race);
            if (race != -1) {
              sevenValDKRef2S.setValue((long)race);
              sevenValDKRef_hcs.setUnhashed(sevenValDKRef2S);
              p.getRace().add(sevenValDKRef_hcs);
            }
          }
        } catch (Exception e){e.printStackTrace();}
View Full Code Here

          }
        }
       
        int gen = pc.getGenderCode().intValue();
        if (Integer.valueOf(gen) != null ) {
          SevenValDKRefusedHashingChoice sevenValDKRef_hc = new SevenValDKRefusedHashingChoice();
          SevenValDKRefused sevenValDKRef = new SevenValDKRefused();
          gen = GenderMap.map(gen);
          if (gen != -1) {
            sevenValDKRef.setValue((long)gen);
            sevenValDKRef_hc.setUnhashed(sevenValDKRef);
            p.setGender(sevenValDKRef_hc);
          }
        }
       
        try {
View Full Code Here

        xmlr6.next();
        if (xmlr6.isStartElement()) {
          if (xmlr6.getLocalName().equals("SiteService")) {
            xmlr6.require(XMLStreamConstants.START_ELEMENT, null, "SiteService");
            JAXBElement<SiteService> siteServiceJAXB = unmarshaller.unmarshal(xmlr6, SiteService.class);
            SiteService siteServiceElement = (SiteService)siteServiceJAXB.getValue();
            //Get the ServiceID from this Service
            if (siteServiceElement.getKey().equals(siteServiceID)) {
              serviceKey = siteServiceElement.getServiceID();
              break;
           
          }  
        }
      }
View Full Code Here

        if (xmlr7.isStartElement()) {
          //System.out.println("local name is: " + xmlr.getLocalName());
          if (xmlr7.getLocalName().equals("SiteServiceParticipation")) {
            xmlr7.require(XMLStreamConstants.START_ELEMENT, null, "SiteServiceParticipation");
            JAXBElement<SiteServiceParticipation> siteServiceParticipationJAXB = unmarshaller.unmarshal(xmlr7, SiteServiceParticipation.class);
            SiteServiceParticipation siteServiceParticipationElement = (SiteServiceParticipation)siteServiceParticipationJAXB.getValue();
            //Get only this household's SiteServiceParticipations            
            try {
              String hhid = siteServiceParticipationElement.getHouseholdID().getIDStr();
              if (hhid != null && !hhid.isEmpty()) {
                if (hhid.equals(searchHHID)) {
                  log.info("siteServiceParticipationElement.getHouseholdID().getIDStr is a match for household: " + searchHHID);
                  sspArrayList.add(siteServiceParticipationElement);
                  log.info("Added an ssp with id: " + siteServiceParticipationElement.getSiteServiceParticipationID().getIDNum().toString() + " for household:" + searchHHID);
                } else {
                  log.info("siteServiceParticipationElement's hhid " + hhid + " is not a match for household: " + searchHHID);
                }
              } else {
                log.info("HouseholdID/IDStr was empty or null, so try to get the IDNum instead");
View Full Code Here

 
  SiteServiceParticipation getOneSiteServiceParticipationForHousehold(Household household) {
    // used to ultimately get a program id for the first column of CSV2, not sure if it has any other use
    // makes the assumption that a household ID is bound to a single program.  Big assumption.
    // I think in Rosie, a household is attributed to only one agency.  Not in HUD HMIS XML where IDs link households to agency in a more dynamic way.
    SiteServiceParticipation siteServiceParticipationElement = null;
    JAXBContext jc = null;
    InputStream zis = openXMLStream(hudXMLURL);
    XMLStreamReader xmlr8 = null;
    String searchHHID = household.getHouseholdID().getIDStr();
    log.info("searching for siteserviceparticipations with household ID: " + searchHHID);
    try {
      // set up a StAX reader
      xmlr8 = xmlif.createXMLStreamReader(zis);
    } catch (Exception e) {
      log.info("exception caught creating StAX stream " + e.toString());
    }
   
    //Use StAX to retrieve serviceID (proxy for agencyID) from the SiteService
    try {
      jc = JAXBContext.newInstance(SiteServiceParticipation.class);
    } catch (JAXBException e) {
      log.info("JAXB SiteServiceParticipation.class context problem: " + e.toString());
    }
    try {
      unmarshaller = jc.createUnmarshaller();
    } catch (JAXBException e) {
      log.info("Problem unmarshalling SiteServiceParticipation context: " + e.toString());
    }
    try {
      while(xmlr8.hasNext()) {
        xmlr8.next();
        if (xmlr8.isStartElement()) {
          //System.out.println("local name is: " + xmlr.getLocalName());
          if (xmlr8.getLocalName().equals("SiteServiceParticipation")) {
            xmlr8.require(XMLStreamConstants.START_ELEMENT, null, "SiteServiceParticipation");
            JAXBElement<SiteServiceParticipation> siteServiceParticipationJAXB = unmarshaller.unmarshal(xmlr8, SiteServiceParticipation.class);
            siteServiceParticipationElement = (SiteServiceParticipation)siteServiceParticipationJAXB.getValue();
            //Get only this household's SiteServiceParticipations            
            try {
              String hhid = siteServiceParticipationElement.getHouseholdID().getIDStr();
              if (hhid != null && !hhid.isEmpty()) {
                if (hhid.equals(searchHHID)) {
                  log.info("siteServiceParticipationElement.getHouseholdID().getIDStr is a match for household: " + searchHHID);
                  log.info("Found an ssp with id: " + siteServiceParticipationElement.getSiteServiceParticipationID().getIDNum().toString() + " for household:" + searchHHID);
                  break;
                } else {
                  log.info("siteServiceParticipationElement's hhid " + hhid + " is not a match for household: " + searchHHID);
                }
              } else {
View Full Code Here

      PathClientService pcs = new PathClientService();
      PathClient pc = pcs.getPathClient(clientID);
      if (pc  != null) {
       
        HashingChoiceStamped hcs_fn = new HashingChoiceStamped();
        String50 s50_fn = (new String50());
        s50_fn.setValue(pc.getNameFirst());
        hcs_fn.setUnhashed(s50_fn);
        p.setLegalFirstName(hcs_fn)
       
        HashingChoiceStamped hcs_ln = new HashingChoiceStamped();
        String50 s50_ln = (new String50());
        s50_ln.setValue(pc.getNameLast());
        hcs_ln.setUnhashed(s50_ln);; 
        p.setLegalLastName(hcs_ln)
       
        String50 s50_mn = new String50();
        HashingChoiceStamped hcs_mn = new HashingChoiceStamped();
        s50_mn.setValue(pc.getNameMiddle());
        hcs_mn.setUnhashed(s50_mn);
        p.setLegalMiddleName(hcs_mn);
       
        int eth = pc.getEthnicityCode().intValue();
        if (Integer.valueOf(eth) != null ) {
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.