Search in sources :

Example 1 with MedicationRequestSubstitutionComponent

use of org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestSubstitutionComponent in project bunsen by cerner.

the class TestData method newMedicationRequest.

/**
 * Returns a new MedicationRequest for testing.
 *
 * @return a FHIR MedicationRequest for testing.
 */
public static MedicationRequest newMedicationRequest() {
    MedicationRequest medicationRequest = new MedicationRequest();
    medicationRequest.setId("test-medication-request");
    CodeableConcept itemCodeableConcept = new CodeableConcept();
    itemCodeableConcept.addCoding().setSystem("http://www.nlm.nih.gov/research/umls/rxnorm").setCode("103109").setDisplay("Vitamin E 3 MG Oral Tablet [Ephynal]").setUserSelected(true);
    medicationRequest.setMedication(itemCodeableConcept);
    medicationRequest.setSubject(new Reference("Patient/12345").setDisplay("Here is a display for you."));
    medicationRequest.setDosageInstruction(ImmutableList.of(new Dosage().setTiming(new Timing().setRepeat(new TimingRepeatComponent().setCount(10)))));
    medicationRequest.setSubstitution(new MedicationRequestSubstitutionComponent().setAllowed(true));
    return medicationRequest;
}
Also used : MedicationRequest(org.hl7.fhir.dstu3.model.MedicationRequest) MedicationRequestSubstitutionComponent(org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestSubstitutionComponent) Reference(org.hl7.fhir.dstu3.model.Reference) TimingRepeatComponent(org.hl7.fhir.dstu3.model.Timing.TimingRepeatComponent) Timing(org.hl7.fhir.dstu3.model.Timing) Dosage(org.hl7.fhir.dstu3.model.Dosage) CodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept)

Aggregations

CodeableConcept (org.hl7.fhir.dstu3.model.CodeableConcept)1 Dosage (org.hl7.fhir.dstu3.model.Dosage)1 MedicationRequest (org.hl7.fhir.dstu3.model.MedicationRequest)1 MedicationRequestSubstitutionComponent (org.hl7.fhir.dstu3.model.MedicationRequest.MedicationRequestSubstitutionComponent)1 Reference (org.hl7.fhir.dstu3.model.Reference)1 Timing (org.hl7.fhir.dstu3.model.Timing)1 TimingRepeatComponent (org.hl7.fhir.dstu3.model.Timing.TimingRepeatComponent)1