public org.hl7.fhir.instance.model.Address convertAddress(org.hl7.fhir.dstu3.model.Address src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Address tgt = new org.hl7.fhir.instance.model.Address(); copyElement(src, tgt); tgt.setUse(convertAddressUse(src.getUse())); tgt.setType(convertAddressType(src.getType())); tgt.setText(src.getText()); for (org.hl7.fhir.dstu3.model.StringType t : src.getLine()) tgt.addLine(t.getValue()); tgt.setCity(src.getCity()); tgt.setDistrict(src.getDistrict()); tgt.setState(src.getState()); tgt.setPostalCode(src.getPostalCode()); tgt.setCountry(src.getCountry()); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
public static org.hl7.fhir.dstu2016may.model.Address convertAddress(org.hl7.fhir.dstu3.model.Address src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Address tgt = new org.hl7.fhir.dstu2016may.model.Address(); copyElement(src, tgt); tgt.setUse(convertAddressUse(src.getUse())); tgt.setType(convertAddressType(src.getType())); if (src.hasText()) tgt.setText(src.getText()); for (org.hl7.fhir.dstu3.model.StringType t : src.getLine()) tgt.addLine(t.getValue()); if (src.hasCity()) tgt.setCity(src.getCity()); if (src.hasDistrict()) tgt.setDistrict(src.getDistrict()); if (src.hasState()) tgt.setState(src.getState()); if (src.hasPostalCode()) tgt.setPostalCode(src.getPostalCode()); if (src.hasCountry()) tgt.setCountry(src.getCountry()); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
line.append(address.getState()).append(" "); line.append(address.getPostalCode()); addDetail(line.toString(), null);
line.append(address.getState()).append(" "); line.append(address.getPostalCode()); addDetail(line.toString(), null);
String state = StringUtils.defaultString(address.getState()); String zip = StringUtils.defaultString(address.getPostalCode()); String sep = city.isEmpty() || state.isEmpty() ? "" : ", ";
public org.hl7.fhir.instance.model.Address convertAddress(org.hl7.fhir.dstu3.model.Address src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Address tgt = new org.hl7.fhir.instance.model.Address(); copyElement(src, tgt); tgt.setUse(convertAddressUse(src.getUse())); tgt.setType(convertAddressType(src.getType())); tgt.setText(src.getText()); for (org.hl7.fhir.dstu3.model.StringType t : src.getLine()) tgt.addLine(t.getValue()); tgt.setCity(src.getCity()); tgt.setDistrict(src.getDistrict()); tgt.setState(src.getState()); tgt.setPostalCode(src.getPostalCode()); tgt.setCountry(src.getCountry()); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
public static org.hl7.fhir.dstu2016may.model.Address convertAddress(org.hl7.fhir.dstu3.model.Address src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Address tgt = new org.hl7.fhir.dstu2016may.model.Address(); copyElement(src, tgt); tgt.setUse(convertAddressUse(src.getUse())); tgt.setType(convertAddressType(src.getType())); if (src.hasText()) tgt.setText(src.getText()); for (org.hl7.fhir.dstu3.model.StringType t : src.getLine()) tgt.addLine(t.getValue()); if (src.hasCity()) tgt.setCity(src.getCity()); if (src.hasDistrict()) tgt.setDistrict(src.getDistrict()); if (src.hasState()) tgt.setState(src.getState()); if (src.hasPostalCode()) tgt.setPostalCode(src.getPostalCode()); if (src.hasCountry()) tgt.setCountry(src.getCountry()); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }