public ContactComponent copy() { ContactComponent dst = new ContactComponent(); copyValues(dst); if (relationship != null) { dst.relationship = new ArrayList<CodeableConcept>(); for (CodeableConcept i : relationship) dst.relationship.add(i.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(); dst.gender = gender == null ? null : gender.copy(); dst.organization = organization == null ? null : organization.copy(); dst.period = period == null ? null : period.copy(); return dst; }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("relationship")) { return addRelationship(); } 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 if (name.equals("gender")) { throw new FHIRException("Cannot call addChild on a primitive type Patient.gender"); } else if (name.equals("organization")) { this.organization = new Reference(); return this.organization; } else if (name.equals("period")) { this.period = new Period(); return this.period; } else return super.addChild(name); }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("relationship")) { this.getRelationship().add(castToCodeableConcept(value)); } 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 if (name.equals("gender")) { value = new AdministrativeGenderEnumFactory().fromType(castToCode(value)); this.gender = (Enumeration) value; // Enumeration<AdministrativeGender> } else if (name.equals("organization")) { this.organization = castToReference(value); // Reference } else if (name.equals("period")) { this.period = castToPeriod(value); // Period } else return super.setProperty(name, value); return value; }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("relationship")) { return addRelationship(); } 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 if (name.equals("gender")) { throw new FHIRException("Cannot call addChild on a primitive type Patient.gender"); } else if (name.equals("organization")) { this.organization = new Reference(); return this.organization; } else if (name.equals("period")) { this.period = new Period(); return this.period; } else return super.addChild(name); }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case -261851592: // relationship this.getRelationship().add(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; case -1249512767: // gender value = new AdministrativeGenderEnumFactory().fromType(castToCode(value)); this.gender = (Enumeration) value; // Enumeration<AdministrativeGender> return value; case 1178922291: // organization this.organization = castToReference(value); // Reference return value; case -991726143: // period this.period = castToPeriod(value); // Period return value; default: return super.setProperty(hash, name, value); } }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("relationship")) { this.getRelationship().add(castToCodeableConcept(value)); } 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 if (name.equals("gender")) { value = new AdministrativeGenderEnumFactory().fromType(castToCode(value)); this.gender = (Enumeration) value; // Enumeration<AdministrativeGender> } else if (name.equals("organization")) { this.organization = castToReference(value); // Reference } else if (name.equals("period")) { this.period = castToPeriod(value); // Period } else return super.setProperty(name, value); return value; }
public ContactComponent copy() { ContactComponent dst = new ContactComponent(); copyValues(dst); if (relationship != null) { dst.relationship = new ArrayList<CodeableConcept>(); for (CodeableConcept i : relationship) dst.relationship.add(i.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(); dst.gender = gender == null ? null : gender.copy(); dst.organization = organization == null ? null : organization.copy(); dst.period = period == null ? null : period.copy(); return dst; }
public org.hl7.fhir.r4.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.instance.model.Patient.ContactComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Patient.ContactComponent tgt = new org.hl7.fhir.r4.model.Patient.ContactComponent(); copyElement(src, tgt); for (org.hl7.fhir.instance.model.CodeableConcept t : src.getRelationship()) tgt.addRelationship(convertCodeableConcept(t)); tgt.setName(convertHumanName(src.getName())); for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); tgt.setAddress(convertAddress(src.getAddress())); tgt.setGender(convertAdministrativeGender(src.getGender())); tgt.setOrganization(convertReference(src.getOrganization())); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
public org.hl7.fhir.instance.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.r4.model.Patient.ContactComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Patient.ContactComponent tgt = new org.hl7.fhir.instance.model.Patient.ContactComponent(); copyElement(src, tgt); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRelationship()) tgt.addRelationship(convertCodeableConcept(t)); tgt.setName(convertHumanName(src.getName())); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); tgt.setAddress(convertAddress(src.getAddress())); tgt.setGender(convertAdministrativeGender(src.getGender())); tgt.setOrganization(convertReference(src.getOrganization())); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
public ContactComponent addContact() { //3 ContactComponent t = new ContactComponent(); if (this.contact == null) this.contact = new ArrayList<ContactComponent>(); this.contact.add(t); return t; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -261851592: return addRelationship(); case 3373707: return getName(); case -1429363305: return addTelecom(); case -1147692044: return getAddress(); case -1249512767: return getGenderElement(); case 1178922291: return getOrganization(); case -991726143: return getPeriod(); default: return super.makeProperty(hash, name); } }
/** * @return The first repetition of repeating field {@link #relationship}, creating it if it does not already exist */ public CodeableConcept getRelationshipFirstRep() { if (getRelationship().isEmpty()) { addRelationship(); } return getRelationship().get(0); }
public boolean hasContact() { if (this.contact == null) return false; for (ContactComponent item : this.contact) if (!item.isEmpty()) return true; return false; }
/** * @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 setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case -261851592: // relationship this.getRelationship().add(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; case -1249512767: // gender value = new AdministrativeGenderEnumFactory().fromType(castToCode(value)); this.gender = (Enumeration) value; // Enumeration<AdministrativeGender> return value; case 1178922291: // organization this.organization = castToReference(value); // Reference return value; case -991726143: // period this.period = castToPeriod(value); // Period return value; default: return super.setProperty(hash, name, value); } }
public org.hl7.fhir.r4.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.instance.model.Patient.ContactComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Patient.ContactComponent tgt = new org.hl7.fhir.r4.model.Patient.ContactComponent(); copyElement(src, tgt); for (org.hl7.fhir.instance.model.CodeableConcept t : src.getRelationship()) tgt.addRelationship(convertCodeableConcept(t)); tgt.setName(convertHumanName(src.getName())); for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); tgt.setAddress(convertAddress(src.getAddress())); tgt.setGender(convertAdministrativeGender(src.getGender())); tgt.setOrganization(convertReference(src.getOrganization())); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
public org.hl7.fhir.instance.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.r4.model.Patient.ContactComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Patient.ContactComponent tgt = new org.hl7.fhir.instance.model.Patient.ContactComponent(); copyElement(src, tgt); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRelationship()) tgt.addRelationship(convertCodeableConcept(t)); tgt.setName(convertHumanName(src.getName())); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); tgt.setAddress(convertAddress(src.getAddress())); tgt.setGender(convertAdministrativeGender(src.getGender())); tgt.setOrganization(convertReference(src.getOrganization())); tgt.setPeriod(convertPeriod(src.getPeriod())); return tgt; }
public ContactComponent addContact() { //3 ContactComponent t = new ContactComponent(); if (this.contact == null) this.contact = new ArrayList<ContactComponent>(); this.contact.add(t); return t; }
/** * @return The first repetition of repeating field {@link #relationship}, creating it if it does not already exist */ public CodeableConcept getRelationshipFirstRep() { if (getRelationship().isEmpty()) { addRelationship(); } return getRelationship().get(0); }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -261851592: return addRelationship(); case 3373707: return getName(); case -1429363305: return addTelecom(); case -1147692044: return getAddress(); case -1249512767: return getGenderElement(); case 1178922291: return getOrganization(); case -991726143: return getPeriod(); default: return super.makeProperty(hash, name); } }