public org.hl7.fhir.r4.model.Person convertPerson(org.hl7.fhir.instance.model.Person src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Person tgt = new org.hl7.fhir.r4.model.Person(); copyDomainResource(src, tgt); for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); for (org.hl7.fhir.instance.model.HumanName t : src.getName()) tgt.addName(convertHumanName(t)); for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); tgt.setGender(convertAdministrativeGender(src.getGender())); tgt.setBirthDate(src.getBirthDate()); for (org.hl7.fhir.instance.model.Address t : src.getAddress()) tgt.addAddress(convertAddress(t)); tgt.setPhoto(convertAttachment(src.getPhoto())); tgt.setManagingOrganization(convertReference(src.getManagingOrganization())); tgt.setActive(src.getActive()); for (org.hl7.fhir.instance.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); return tgt; }
public org.hl7.fhir.r4.model.Person convertPerson(org.hl7.fhir.instance.model.Person src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Person tgt = new org.hl7.fhir.r4.model.Person(); copyDomainResource(src, tgt); for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); for (org.hl7.fhir.instance.model.HumanName t : src.getName()) tgt.addName(convertHumanName(t)); for (org.hl7.fhir.instance.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t)); tgt.setGender(convertAdministrativeGender(src.getGender())); tgt.setBirthDate(src.getBirthDate()); for (org.hl7.fhir.instance.model.Address t : src.getAddress()) tgt.addAddress(convertAddress(t)); tgt.setPhoto(convertAttachment(src.getPhoto())); tgt.setManagingOrganization(convertReference(src.getManagingOrganization())); tgt.setActive(src.getActive()); for (org.hl7.fhir.instance.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); return tgt; }