/** * @return The first repetition of repeating field {@link #authorizingPrescription}, creating it if it does not already exist */ public Reference getAuthorizingPrescriptionFirstRep() { if (getAuthorizingPrescription().isEmpty()) { addAuthorizingPrescription(); } return getAuthorizingPrescription().get(0); }
public org.hl7.fhir.instance.model.MedicationDispense convertMedicationDispense(org.hl7.fhir.dstu3.model.MedicationDispense src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.MedicationDispense tgt = new org.hl7.fhir.instance.model.MedicationDispense(); copyDomainResource(src, tgt); tgt.setIdentifier(convertIdentifier(src.getIdentifierFirstRep())); tgt.setStatus(convertMedicationDispenseStatus(src.getStatus())); tgt.setMedication(convertType(src.getMedication())); tgt.setPatient(convertReference(src.getSubject())); // tgt.setDispenser(convertReference(src.getDispenser())); for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthorizingPrescription()) tgt.addAuthorizingPrescription(convertReference(t)); tgt.setType(convertCodeableConcept(src.getType())); tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); tgt.setDaysSupply(convertSimpleQuantity(src.getDaysSupply())); tgt.setWhenPrepared(src.getWhenPrepared()); tgt.setWhenHandedOver(src.getWhenHandedOver()); tgt.setDestination(convertReference(src.getDestination())); for (org.hl7.fhir.dstu3.model.Reference t : src.getReceiver()) tgt.addReceiver(convertReference(t)); for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.setNote(t.getText()); for (org.hl7.fhir.dstu3.model.Dosage t : src.getDosageInstruction()) tgt.addDosageInstruction(convertMedicationDispenseDosageInstructionComponent(t)); tgt.setSubstitution(convertMedicationDispenseSubstitutionComponent(src.getSubstitution())); return tgt; }
this.getPerformer().add((MedicationDispensePerformerComponent) value); } else if (name.equals("authorizingPrescription")) { this.getAuthorizingPrescription().add(castToReference(value)); } else if (name.equals("type")) { this.type = castToCodeableConcept(value); // CodeableConcept
return value; case -1237557856: // authorizingPrescription this.getAuthorizingPrescription().add(castToReference(value)); // Reference return value; case 3575610: // type
public org.hl7.fhir.instance.model.MedicationDispense convertMedicationDispense(org.hl7.fhir.dstu3.model.MedicationDispense src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.MedicationDispense tgt = new org.hl7.fhir.instance.model.MedicationDispense(); copyDomainResource(src, tgt); tgt.setIdentifier(convertIdentifier(src.getIdentifierFirstRep())); tgt.setStatus(convertMedicationDispenseStatus(src.getStatus())); tgt.setMedication(convertType(src.getMedication())); tgt.setPatient(convertReference(src.getSubject())); // tgt.setDispenser(convertReference(src.getDispenser())); for (org.hl7.fhir.dstu3.model.Reference t : src.getAuthorizingPrescription()) tgt.addAuthorizingPrescription(convertReference(t)); tgt.setType(convertCodeableConcept(src.getType())); tgt.setQuantity(convertSimpleQuantity(src.getQuantity())); tgt.setDaysSupply(convertSimpleQuantity(src.getDaysSupply())); tgt.setWhenPrepared(src.getWhenPrepared()); tgt.setWhenHandedOver(src.getWhenHandedOver()); tgt.setDestination(convertReference(src.getDestination())); for (org.hl7.fhir.dstu3.model.Reference t : src.getReceiver()) tgt.addReceiver(convertReference(t)); for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.setNote(t.getText()); for (org.hl7.fhir.dstu3.model.Dosage t : src.getDosageInstruction()) tgt.addDosageInstruction(convertMedicationDispenseDosageInstructionComponent(t)); tgt.setSubstitution(convertMedicationDispenseSubstitutionComponent(src.getSubstitution())); return tgt; }