public OrganizationContactComponent copy() { OrganizationContactComponent dst = new OrganizationContactComponent(); copyValues(dst); dst.purpose = purpose == null ? null : purpose.copy(); dst.name = name == null ? null : name.copy(); if (telecom != null) { dst.telecom = new ArrayList<ContactPoint>(); for (ContactPoint i : telecom) dst.telecom.add(i.copy()); }; dst.address = address == null ? null : address.copy(); return dst; }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("purpose")) { this.purpose = new CodeableConcept(); return this.purpose; } else if (name.equals("name")) { this.name = new HumanName(); return this.name; } else if (name.equals("telecom")) { return addTelecom(); } else if (name.equals("address")) { this.address = new Address(); return this.address; } else return super.addChild(name); }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case -220463842: // purpose this.purpose = castToCodeableConcept(value); // CodeableConcept return value; case 3373707: // name this.name = castToHumanName(value); // HumanName return value; case -1429363305: // telecom this.getTelecom().add(castToContactPoint(value)); // ContactPoint return value; case -1147692044: // address this.address = castToAddress(value); // Address return value; default: return super.setProperty(hash, name, value); } }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("purpose")) { this.purpose = new CodeableConcept(); return this.purpose; } else if (name.equals("name")) { this.name = new HumanName(); return this.name; } else if (name.equals("telecom")) { return addTelecom(); } else if (name.equals("address")) { this.address = new Address(); return this.address; } else return super.addChild(name); }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case -220463842: // purpose this.purpose = castToCodeableConcept(value); // CodeableConcept return value; case 3373707: // name this.name = castToHumanName(value); // HumanName return value; case -1429363305: // telecom this.getTelecom().add(castToContactPoint(value)); // ContactPoint return value; case -1147692044: // address this.address = castToAddress(value); // Address return value; default: return super.setProperty(hash, name, value); } }
public OrganizationContactComponent copy() { OrganizationContactComponent dst = new OrganizationContactComponent(); copyValues(dst); dst.purpose = purpose == null ? null : purpose.copy(); dst.name = name == null ? null : name.copy(); if (telecom != null) { dst.telecom = new ArrayList<ContactPoint>(); for (ContactPoint i : telecom) dst.telecom.add(i.copy()); }; dst.address = address == null ? null : address.copy(); return dst; }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("purpose")) { this.purpose = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("name")) { this.name = castToHumanName(value); // HumanName } else if (name.equals("telecom")) { this.getTelecom().add(castToContactPoint(value)); } else if (name.equals("address")) { this.address = castToAddress(value); // Address } else return super.setProperty(name, value); return value; }
public OrganizationContactComponent addContact() { //3 OrganizationContactComponent t = new OrganizationContactComponent(); if (this.contact == null) this.contact = new ArrayList<OrganizationContactComponent>(); this.contact.add(t); return t; }
public boolean hasContact() { if (this.contact == null) return false; for (OrganizationContactComponent item : this.contact) if (!item.isEmpty()) return true; return false; }
public org.hl7.fhir.instance.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.r4.model.Organization.OrganizationContactComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.instance.model.Organization.OrganizationContactComponent(); copyElement(src, tgt); tgt.setPurpose(convertCodeableConcept(src.getPurpose())); tgt.setName(convertHumanName(src.getName())); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); tgt.setAddress(convertAddress(src.getAddress())); return tgt; }
public org.hl7.fhir.r4.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.instance.model.Organization.OrganizationContactComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.r4.model.Organization.OrganizationContactComponent(); copyElement(src, tgt); tgt.setPurpose(convertCodeableConcept(src.getPurpose())); tgt.setName(convertHumanName(src.getName())); for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); tgt.setAddress(convertAddress(src.getAddress())); return tgt; }
/** * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist */ public ContactPoint getTelecomFirstRep() { if (getTelecom().isEmpty()) { addTelecom(); } return getTelecom().get(0); }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -220463842: return getPurpose(); case 3373707: return getName(); case -1429363305: return addTelecom(); case -1147692044: return getAddress(); default: return super.makeProperty(hash, name); } }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("purpose")) { this.purpose = castToCodeableConcept(value); // CodeableConcept } else if (name.equals("name")) { this.name = castToHumanName(value); // HumanName } else if (name.equals("telecom")) { this.getTelecom().add(castToContactPoint(value)); } else if (name.equals("address")) { this.address = castToAddress(value); // Address } else return super.setProperty(name, value); return value; }
public boolean hasContact() { if (this.contact == null) return false; for (OrganizationContactComponent item : this.contact) if (!item.isEmpty()) return true; return false; }
public OrganizationContactComponent addContact() { //3 OrganizationContactComponent t = new OrganizationContactComponent(); if (this.contact == null) this.contact = new ArrayList<OrganizationContactComponent>(); this.contact.add(t); return t; }
/** * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist */ public ContactPoint getTelecomFirstRep() { if (getTelecom().isEmpty()) { addTelecom(); } return getTelecom().get(0); }
public org.hl7.fhir.r4.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.instance.model.Organization.OrganizationContactComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.r4.model.Organization.OrganizationContactComponent(); copyElement(src, tgt); tgt.setPurpose(convertCodeableConcept(src.getPurpose())); tgt.setName(convertHumanName(src.getName())); for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); tgt.setAddress(convertAddress(src.getAddress())); return tgt; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -220463842: return getPurpose(); case 3373707: return getName(); case -1429363305: return addTelecom(); case -1147692044: return getAddress(); default: return super.makeProperty(hash, name); } }
public org.hl7.fhir.instance.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.r4.model.Organization.OrganizationContactComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Organization.OrganizationContactComponent tgt = new org.hl7.fhir.instance.model.Organization.OrganizationContactComponent(); copyElement(src, tgt); tgt.setPurpose(convertCodeableConcept(src.getPurpose())); tgt.setName(convertHumanName(src.getName())); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); tgt.setAddress(convertAddress(src.getAddress())); return tgt; }