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;
}
Aggregations