public static org.hl7.fhir.dstu2016may.model.Address convertAddress(org.hl7.fhir.r4.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.r4.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; }
public org.hl7.fhir.r4.model.Address convertAddress(org.hl7.fhir.instance.model.Address src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Address tgt = new org.hl7.fhir.r4.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; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 116103: return getUseElement(); case 3575610: return getTypeElement(); case 3556653: return getTextElement(); case 3321844: return addLineElement(); case 3053931: return getCityElement(); case 288961422: return getDistrictElement(); case 109757585: return getStateElement(); case 2011152728: return getPostalCodeElement(); case 957831062: return getCountryElement(); case -991726143: return getPeriod(); default: return super.makeProperty(hash, name); } }
switch (hash) { case 116103: // use value = new AddressUseEnumFactory().fromType(castToCode(value)); this.use = (Enumeration) value; // Enumeration<AddressUse> return value; case 3575610: // type value = new AddressTypeEnumFactory().fromType(castToCode(value)); this.type = (Enumeration) value; // Enumeration<AddressType> return value; case 3556653: // text this.text = castToString(value); // StringType return value; case 3321844: // line this.getLine().add(castToString(value)); // StringType return value; case 3053931: // city this.city = castToString(value); // StringType return value; case 288961422: // district this.district = castToString(value); // StringType return value; case 109757585: // state this.state = castToString(value); // StringType return value; case 2011152728: // postalCode this.postalCode = castToString(value); // StringType return value; case 957831062: // country this.country = castToString(value); // StringType
private void checkAddress(List<ValidationMessage> errors, String path, Element focus, Address fixed) { checkFixedValue(errors, path + ".use", focus.getNamedChild("use"), fixed.getUseElement(), "use", focus); checkFixedValue(errors, path + ".text", focus.getNamedChild("text"), fixed.getTextElement(), "text", focus); checkFixedValue(errors, path + ".city", focus.getNamedChild("city"), fixed.getCityElement(), "city", focus); checkFixedValue(errors, path + ".state", focus.getNamedChild("state"), fixed.getStateElement(), "state", focus); checkFixedValue(errors, path + ".country", focus.getNamedChild("country"), fixed.getCountryElement(), "country", focus); checkFixedValue(errors, path + ".zip", focus.getNamedChild("zip"), fixed.getPostalCodeElement(), "postalCode", focus); List<Element> lines = new ArrayList<Element>(); focus.getNamedChildren("line", lines); if (rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, lines.size() == fixed.getLine().size(), "Expected " + Integer.toString(fixed.getLine().size()) + " but found " + Integer.toString(lines.size()) + " line elements")) { for (int i = 0; i < lines.size(); i++) checkFixedValue(errors, path + ".coding", lines.get(i), fixed.getLine().get(i), "coding", focus); } }
public org.hl7.fhir.instance.model.Address convertAddress(org.hl7.fhir.r4.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.r4.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 Address addAddress() { //3 Address t = new Address(); if (this.address == null) this.address = new ArrayList<Address>(); this.address.add(t); return t; }
ArrayList<StringType> allNames = new ArrayList<>(); Address nextAddress = (Address) nextObject; allNames.addAll(nextAddress.getLine()); allNames.add(nextAddress.getCityElement()); allNames.add(nextAddress.getStateElement()); allNames.add(nextAddress.getCountryElement()); allNames.add(nextAddress.getPostalCodeElement()); for (StringType nextName : allNames) { addSearchTerm(theEntity, retVal, nextSpName, nextName.getValue());
return false; for (Address item : this.address) if (!item.isEmpty()) return true; return false; } public Address addAddress() { //3 Address t = new Address();
public Address copy() { Address dst = new Address(); copyValues(dst); dst.use = use == null ? null : use.copy(); dst.type = type == null ? null : type.copy(); dst.text = text == null ? null : text.copy(); if (line != null) { dst.line = new ArrayList<StringType>(); for (StringType i : line) dst.line.add(i.copy()); }; dst.city = city == null ? null : city.copy(); dst.district = district == null ? null : district.copy(); dst.state = state == null ? null : state.copy(); dst.postalCode = postalCode == null ? null : postalCode.copy(); dst.country = country == null ? null : country.copy(); dst.period = period == null ? null : period.copy(); return dst; }
private void checkAddress(List<ValidationMessage> errors, String path, Element focus, Address fixed) { checkFixedValue(errors, path + ".use", focus.getNamedChild("use"), fixed.getUseElement(), "use", focus); checkFixedValue(errors, path + ".text", focus.getNamedChild("text"), fixed.getTextElement(), "text", focus); checkFixedValue(errors, path + ".city", focus.getNamedChild("city"), fixed.getCityElement(), "city", focus); checkFixedValue(errors, path + ".state", focus.getNamedChild("state"), fixed.getStateElement(), "state", focus); checkFixedValue(errors, path + ".country", focus.getNamedChild("country"), fixed.getCountryElement(), "country", focus); checkFixedValue(errors, path + ".zip", focus.getNamedChild("zip"), fixed.getPostalCodeElement(), "postalCode", focus); List<Element> lines = new ArrayList<Element>(); focus.getNamedChildren("line", lines); if (rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, lines.size() == fixed.getLine().size(), "Expected " + Integer.toString(fixed.getLine().size()) + " but found " + Integer.toString(lines.size()) + " line elements")) { for (int i = 0; i < lines.size(); i++) checkFixedValue(errors, path + ".coding", lines.get(i), fixed.getLine().get(i), "coding", focus); } }
public org.hl7.fhir.instance.model.Address convertAddress(org.hl7.fhir.r4.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.r4.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 Address addAddress() { //3 Address t = new Address(); if (this.address == null) this.address = new ArrayList<Address>(); this.address.add(t); return t; }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("use")) { value = new AddressUseEnumFactory().fromType(castToCode(value)); this.use = (Enumeration) value; // Enumeration<AddressUse> } else if (name.equals("type")) { value = new AddressTypeEnumFactory().fromType(castToCode(value)); this.type = (Enumeration) value; // Enumeration<AddressType> } else if (name.equals("text")) { this.text = castToString(value); // StringType } else if (name.equals("line")) { this.getLine().add(castToString(value)); } else if (name.equals("city")) { this.city = castToString(value); // StringType } else if (name.equals("district")) { this.district = castToString(value); // StringType } else if (name.equals("state")) { this.state = castToString(value); // StringType } else if (name.equals("postalCode")) { this.postalCode = castToString(value); // StringType } else if (name.equals("country")) { this.country = castToString(value); // StringType } else if (name.equals("period")) { this.period = castToPeriod(value); // Period } else return super.setProperty(name, value); return value; }
public boolean hasAddress() { if (this.address == null) return false; for (Address item : this.address) if (!item.isEmpty()) return true; return false; }
public Address copy() { Address dst = new Address(); copyValues(dst); dst.use = use == null ? null : use.copy(); dst.type = type == null ? null : type.copy(); dst.text = text == null ? null : text.copy(); if (line != null) { dst.line = new ArrayList<StringType>(); for (StringType i : line) dst.line.add(i.copy()); }; dst.city = city == null ? null : city.copy(); dst.district = district == null ? null : district.copy(); dst.state = state == null ? null : state.copy(); dst.postalCode = postalCode == null ? null : postalCode.copy(); dst.country = country == null ? null : country.copy(); dst.period = period == null ? null : period.copy(); return dst; }
public static org.hl7.fhir.dstu2016may.model.Address convertAddress(org.hl7.fhir.r4.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.r4.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; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case 116103: return getUseElement(); case 3575610: return getTypeElement(); case 3556653: return getTextElement(); case 3321844: return addLineElement(); case 3053931: return getCityElement(); case 288961422: return getDistrictElement(); case 109757585: return getStateElement(); case 2011152728: return getPostalCodeElement(); case 957831062: return getCountryElement(); case -991726143: return getPeriod(); default: return super.makeProperty(hash, name); } }
public static org.hl7.fhir.r4.model.Address convertAddress(org.hl7.fhir.dstu2016may.model.Address src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Address tgt = new org.hl7.fhir.r4.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 (this.address == null) this.address = new ArrayList<Address>(); this.address.add(t); return t; } public Practitioner addAddress(Address t) { //3 if (t == null)