/** * @return The first repetition of repeating field {@link #responsibleParty}, creating it if it does not already exist */ public Reference getResponsiblePartyFirstRep() { if (getResponsibleParty().isEmpty()) { addResponsibleParty(); } return getResponsibleParty().get(0); }
@Override public Base addChild(String name) throws FHIRException { if (name.equals("wasSubstituted")) { throw new FHIRException("Cannot call addChild on a primitive type MedicationDispense.wasSubstituted"); } else if (name.equals("type")) { this.type = new CodeableConcept(); return this.type; } else if (name.equals("reason")) { return addReason(); } else if (name.equals("responsibleParty")) { return addResponsibleParty(); } else return super.addChild(name); }
public org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent convertMedicationDispenseSubstitutionComponent(org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseSubstitutionComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent tgt = new org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent(); copyElement(src, tgt); tgt.setType(convertCodeableConcept(src.getType())); for (org.hl7.fhir.instance.model.CodeableConcept t : src.getReason()) tgt.addReason(convertCodeableConcept(t)); for (org.hl7.fhir.instance.model.Reference t : src.getResponsibleParty()) tgt.addResponsibleParty(convertReference(t)); return tgt; }
@Override public Base makeProperty(int hash, String name) throws FHIRException { switch (hash) { case -592113567: return getWasSubstitutedElement(); case 3575610: return getType(); case -934964668: return addReason(); case 1511509392: return addResponsibleParty(); default: return super.makeProperty(hash, name); } }
public org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent convertMedicationDispenseSubstitutionComponent(org.hl7.fhir.instance.model.MedicationDispense.MedicationDispenseSubstitutionComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent tgt = new org.hl7.fhir.dstu3.model.MedicationDispense.MedicationDispenseSubstitutionComponent(); copyElement(src, tgt); tgt.setType(convertCodeableConcept(src.getType())); for (org.hl7.fhir.instance.model.CodeableConcept t : src.getReason()) tgt.addReason(convertCodeableConcept(t)); for (org.hl7.fhir.instance.model.Reference t : src.getResponsibleParty()) tgt.addResponsibleParty(convertReference(t)); return tgt; }