/** * @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(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 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(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 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; }
/** * @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.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; }