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

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


        xmlr5.next();
        if (xmlr5.isStartElement()) {
          if (xmlr5.getLocalName().equals( "Agency")) {
            xmlr5.require(XMLStreamConstants.START_ELEMENT, null, "Agency");
            JAXBElement<Agency> agencyJAXB = unmarshaller.unmarshal(xmlr5, Agency.class);
            Agency agencyElement = (Agency)agencyJAXB.getValue();
            //iterate through all the sites in this agency
            for (TSite site : agencyElement.getSite()) {
              //Get the Site Key  from this Agency
              //This is tricky, because of JAXB's automated model creator
              for (Serializable content : site.getContent()) {
              //for (JAXBElement<?> content : site.getContent()) {
                if (content instanceof JAXBElement<?>) {
                  //How do I know this is key
                  JAXBElement<?> contentJAXBElement = (JAXBElement<?>)content;
                  if (contentJAXBElement.getName().getLocalPart().equals("Key")) {
                    BigInteger siteKey = (BigInteger) ((JAXBElement<?>)content).getValue();
                    if (siteKey.equals(siteID)) {
                      agencyKeyLong = agencyElement.getKey().longValue();
                      break;
                    }
                  }
                }
              }
View Full Code Here


              p.getRace().add(sevenValDKRef_hcs);
            }
          }
        } catch (Exception e){e.printStackTrace();}
        if (pc.getDateOfBirth() !=null) {
          DOBHashingChoice dobhc = new DOBHashingChoice();
          DateStatic ds = new DateStatic();
          GregorianCalendar c = new GregorianCalendar();
          c.setTime(pc.getDateOfBirth());
          try {
            XMLGregorianCalendar gc = DatatypeFactory.newInstance().newXMLGregorianCalendar(c);
            gc.setTimezone(DatatypeConstants.FIELD_UNDEFINED)
            gc.setTime(DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED)
            ds.setValue(gc);
          } catch (DatatypeConfigurationException e) {e.printStackTrace();
          dobhc.setUnhashed(ds);
          p.setDateOfBirth(dobhc);
       
        Marshaller marshaller = jc.createMarshaller();
        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
        //NamespacePrefixMapper namespacePrefixMapper = new NamespacePrefixMapper();
View Full Code Here

            }
          }
        } catch (Exception e){e.printStackTrace();}
        if (pc.getDateOfBirth() !=null) {
          DOBHashingChoice dobhc = new DOBHashingChoice();
          DateStatic ds = new DateStatic();
          GregorianCalendar c = new GregorianCalendar();
          c.setTime(pc.getDateOfBirth());
          try {
            XMLGregorianCalendar gc = DatatypeFactory.newInstance().newXMLGregorianCalendar(c);
            gc.setTimezone(DatatypeConstants.FIELD_UNDEFINED)
            gc.setTime(DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED)
            ds.setValue(gc);
          } catch (DatatypeConfigurationException e) {e.printStackTrace();
          dobhc.setUnhashed(ds);
          p.setDateOfBirth(dobhc);
       
        Marshaller marshaller = jc.createMarshaller();
View Full Code Here

      //just gets the first destination in the first person historical.  It could scan all ph for the first destination as well.
      try {
        //gets the first destination it can find
        for (PersonHistorical ph : ssp.getPersonHistorical()) {
          try {
            Destination destination = ph.getDestinations().getDestination().get(0);
            String d = String.valueOf(destination.getDestinationCode().getValue());
            if (d != null && !d.isEmpty()) {
              csv5Record[9] = d;
              break;
            }
          } catch (NullPointerException e) {log.info("This destination is null; checking for another destination perhaps.");}
View Full Code Here

    //just gets the first destination in the first person historical.  It could scan all ph for the first destination as well.
    try {
      //gets the first destination it can find
      for (PersonHistorical ph : ssp.getPersonHistorical()) {
        try {
          Destination destination = ph.getDestinations().getDestination().get(0);
          String d = String.valueOf(destination.getDestinationCode().getValue());
          if (d != null && !d.isEmpty()) {
            csv7Record[9] = d;
            break;
          }
        } catch (NullPointerException e) {log.info("This destination is null; checking for another destination perhaps.");}
View Full Code Here

        hcs_mn.setUnhashed(s50_mn);
        p.setLegalMiddleName(hcs_mn);
       
        int eth = pc.getEthnicityCode().intValue();
        if (Integer.valueOf(eth) != null ) {
          FourValDKRefusedHashingChoice fourVal_hc = new FourValDKRefusedHashingChoice();
          FourValDKRefusedStatic fourVal_Static = new FourValDKRefusedStatic();
          eth = EthnicityMap.map(eth);
          if (eth != -1) {
            fourVal_Static.setValue((long)eth);
            fourVal_hc.setUnhashed(fourVal_Static);
            p.setEthnicity(fourVal_hc);
          }
        }
       
        int gen = pc.getGenderCode().intValue();
View Full Code Here

        p.setLegalMiddleName(hcs_mn);
       
        int eth = pc.getEthnicityCode().intValue();
        if (Integer.valueOf(eth) != null ) {
          FourValDKRefusedHashingChoice fourVal_hc = new FourValDKRefusedHashingChoice();
          FourValDKRefusedStatic fourVal_Static = new FourValDKRefusedStatic();
          eth = EthnicityMap.map(eth);
          if (eth != -1) {
            fourVal_Static.setValue((long)eth);
            fourVal_hc.setUnhashed(fourVal_Static);
            p.setEthnicity(fourVal_hc);
          }
        }
       
View Full Code Here

          //  hprp service types (ignore the AIRS code as well as the "other" type free text field values)
         
          // Get the service code from the XML
          String AssistanceProvidedCodeCSV6 = "";
          String AssistanceProvidedDescriptionCSV6 = "";
          HMISServiceEvent serviceEventCodeSet = null;
          Integer hPRPFinancialCodeSet = null;
          Integer hPRPRelocationCodeSet = null;
          Integer serviceEventCode = null;
         
          try {
            serviceEventCodeSet = serviceEvent.getHMISServiceEventCode();
            serviceEventCode = (int)(long)(serviceEventCodeSet.getTypeOfService());
          } catch (Exception e) {log.info("no HMIS Service Event");}
          try {       
            hPRPFinancialCodeSet = (int)(long)serviceEvent.getHPRPFinancialAssistanceServiceEventCode();
          } catch (Exception e) {log.info("no HPRP Financial Code Set");}
          try {
View Full Code Here

      jc = JAXBContext.newInstance(p.getClass());
      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 ) {
          FourValDKRefusedHashingChoice fourVal_hc = new FourValDKRefusedHashingChoice();
View Full Code Here

        if (xmlr0.isStartElement()) {
          //log.info("name is:" + xmlr1.getLocalName());
          if (xmlr0.getLocalName().equals("Household")) {
            xmlr0.require(XMLStreamConstants.START_ELEMENT, null, "Household");
            JAXBElement<Household> householdJAXB = unmarshaller.unmarshal(xmlr0,Household.class);
            Household householdElement = (Household)householdJAXB.getValue();
            if (householdElement.getHouseholdID().getIDStr() != null) {
              if ((householdElement.getHouseholdID().getIDStr()).equals(nextIndex)) {
                log.info("Now converting household: " + householdElement.getHouseholdID().getIDStr());
                try {
                  convertHouseholdToRosieCSV2(householdElement);
                } catch (Exception e) {log.info("Problem converting household: " + householdElement.getHouseholdID().getIDStr() + " " + e.toString()); e.printStackTrace();}
                break;
              }
            }
            else if (householdElement.getHouseholdID().getIDNum() != null) {
              if ((householdElement.getHouseholdID().getIDNum().toString()).equals(nextIndex)) {
                log.info("Now converting household: " + householdElement.getHouseholdID().getIDNum());
                try {
                  convertHouseholdToRosieCSV2(householdElement);
                } catch (Exception e) {log.info("Problem converting household: " + householdElement.getHouseholdID().getIDNum() + " " + e.toString()); e.printStackTrace();}
                break;
              }
            }
            else {log.info("Couldn't get household ID in processNextCSV2");}
          }
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.