org.hl7.fhir.r4.model.Annotation Java Examples
The following examples show how to use
org.hl7.fhir.r4.model.Annotation.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FhirEncodersTest.java From bunsen with Apache License 2.0 | 5 votes |
@Test public void annotation() throws FHIRException { Annotation original = medRequest.getNoteFirstRep(); Annotation decoded = decodedMedRequest.getNoteFirstRep(); Assert.assertEquals(original.getText(), medDataset.select(functions.expr("note[0].text")).head().get(0)); Assert.assertEquals(original.getText(), decoded.getText()); Assert.assertEquals(original.getAuthorReference().getReference(), decoded.getAuthorReference().getReference()); }
Example #2
Source File: AnnotationBuilder.java From cqf-ruler with Apache License 2.0 | 4 votes |
public AnnotationBuilder() { super(new Annotation()); }
Example #3
Source File: TestData.java From bunsen with Apache License 2.0 | 3 votes |
/** * Returns a FHIR medication request for testing purposes. */ public static MedicationRequest newMedRequest() { MedicationRequest medReq = new MedicationRequest(); medReq.setId("test-med"); // Medication code CodeableConcept med = new CodeableConcept(); med.addCoding() .setSystem("http://www.nlm.nih.gov/research/umls/rxnorm") .setCode("582620") .setDisplay("Nizatidine 15 MG/ML Oral Solution [Axid]"); med.setText("Nizatidine 15 MG/ML Oral Solution [Axid]"); medReq.setMedication(med); Annotation annotation = new Annotation(); annotation.setText("Test medication note."); annotation.setAuthor( new Reference("Provider/example") .setDisplay("Example provider.")); medReq.addNote(annotation); return medReq; }