if (use != null) { if (use.equals("H") || use.equals("HP") || use.equals("HV")) a.setUse(AddressUse.HOME); else if (use.equals("WP") || use.equals("DIR") || use.equals("PUB")) a.setUse(AddressUse.WORK); else if (use.equals("TMP")) a.setUse(AddressUse.TEMP); else if (use.equals("BAD")) a.setUse(AddressUse.OLD);
public org.hl7.fhir.dstu3.model.Address convertAddress(org.hl7.fhir.instance.model.Address src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Address tgt = new org.hl7.fhir.dstu3.model.Address(); copyElement(src, tgt); tgt.setUse(convertAddressUse(src.getUse())); tgt.setType(convertAddressType(src.getType())); tgt.setText(src.getText()); for (org.hl7.fhir.instance.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.dstu3.model.Address convertAddress(org.hl7.fhir.dstu2016may.model.Address src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Address tgt = new org.hl7.fhir.dstu3.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.dstu2016may.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; }
if (use != null) { if (use.equals("H") || use.equals("HP") || use.equals("HV")) a.setUse(AddressUse.HOME); else if (use.equals("WP") || use.equals("DIR") || use.equals("PUB")) a.setUse(AddressUse.WORK); else if (use.equals("TMP")) a.setUse(AddressUse.TEMP); else if (use.equals("BAD")) a.setUse(AddressUse.OLD);
public org.hl7.fhir.dstu3.model.Address convertAddress(org.hl7.fhir.instance.model.Address src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Address tgt = new org.hl7.fhir.dstu3.model.Address(); copyElement(src, tgt); tgt.setUse(convertAddressUse(src.getUse())); tgt.setType(convertAddressType(src.getType())); tgt.setText(src.getText()); for (org.hl7.fhir.instance.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.dstu3.model.Address convertAddress(org.hl7.fhir.dstu2016may.model.Address src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Address tgt = new org.hl7.fhir.dstu3.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.dstu2016may.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; }