/** * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist */ public Identifier getIdentifierFirstRep() { if (getIdentifier().isEmpty()) { addIdentifier(); } return getIdentifier().get(0); }
public org.hl7.fhir.dstu3.model.ListResource convertList(org.hl7.fhir.instance.model.List_ src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.ListResource tgt = new org.hl7.fhir.dstu3.model.ListResource(); copyDomainResource(src, tgt); for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); tgt.setTitle(src.getTitle()); tgt.setCode(convertCodeableConcept(src.getCode())); tgt.setSubject(convertReference(src.getSubject())); tgt.setSource(convertReference(src.getSource())); tgt.setEncounter(convertReference(src.getEncounter())); tgt.setStatus(convertListStatus(src.getStatus())); if (src.hasDate()) tgt.setDate(src.getDate()); tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); tgt.setMode(convertListMode(src.getMode())); if (src.hasNote()) tgt.addNote(new org.hl7.fhir.dstu3.model.Annotation().setText(src.getNote())); for (org.hl7.fhir.instance.model.List_.ListEntryComponent t : src.getEntry()) tgt.addEntry(convertListEntry(t)); return tgt; }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("identifier")) { return addIdentifier();
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -1618432855: return addIdentifier(); case -892481550: return getStatusElement(); case 3357091: return getModeElement(); case 110371416: return getTitleElement(); case 3059181: return getCode(); case -1867885268: return getSubject(); case 1524132147: return getEncounter(); case 3076014: return getDateElement(); case -896505829: return getSource(); case -391079516: return getOrderedBy(); case 3387378: return addNote(); case 96667762: return addEntry(); case 1140135409: return getEmptyReason(); default: return super.makeProperty(hash, name); } }
public org.hl7.fhir.dstu3.model.ListResource convertList(org.hl7.fhir.instance.model.List_ src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.ListResource tgt = new org.hl7.fhir.dstu3.model.ListResource(); copyDomainResource(src, tgt); for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); tgt.setTitle(src.getTitle()); tgt.setCode(convertCodeableConcept(src.getCode())); tgt.setSubject(convertReference(src.getSubject())); tgt.setSource(convertReference(src.getSource())); tgt.setEncounter(convertReference(src.getEncounter())); tgt.setStatus(convertListStatus(src.getStatus())); if (src.hasDate()) tgt.setDate(src.getDate()); tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy())); tgt.setMode(convertListMode(src.getMode())); if (src.hasNote()) tgt.addNote(new org.hl7.fhir.dstu3.model.Annotation().setText(src.getNote())); for (org.hl7.fhir.instance.model.List_.ListEntryComponent t : src.getEntry()) tgt.addEntry(convertListEntry(t)); return tgt; }