use of org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.GENERATED in project openmrs-module-fhir2 by openmrs.
the class MedicationNarrativeTest method shouldGenerateMedicationNarrative.
/**
* Check that the expected narrative is generated for some example Medication resource
*
* @throws IOException
*/
@Test
public void shouldGenerateMedicationNarrative() throws IOException {
Medication given = parser.parseResource(Medication.class, getClass().getClassLoader().getResourceAsStream(EXAMPLE_RESOURCE_PATH));
Medication result = parser.parseResource(Medication.class, parser.encodeResourceToString(given));
assertThat(result, notNullValue());
assertThat(result.getText(), notNullValue());
assertThat(result.getText().getStatusAsString(), equalTo("generated"));
assertThat(result.getText().getDivAsString(), equalTo(readNarrativeFile(EXPECTED_NARRATIVE_PATH)));
}
use of org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.GENERATED in project openmrs-module-fhir2 by openmrs.
the class MedicationRequestNarrativeTest method shouldGenerateMedicationRequestNarrative.
/**
* Check that the expected narrative is generated for some example MedicationRequest resource
*
* @throws IOException
*/
@Test
public void shouldGenerateMedicationRequestNarrative() throws IOException {
MedicationRequest given = parser.parseResource(MedicationRequest.class, getClass().getClassLoader().getResourceAsStream(EXAMPLE_RESOURCE_PATH));
MedicationRequest result = parser.parseResource(MedicationRequest.class, parser.encodeResourceToString(given));
assertThat(result, notNullValue());
assertThat(result.getText(), notNullValue());
assertThat(result.getText().getStatusAsString(), equalTo("generated"));
assertThat(result.getText().getDivAsString(), equalTo(readNarrativeFile(EXPECTED_NARRATIVE_PATH)));
}
use of org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.GENERATED in project openmrs-module-fhir2 by openmrs.
the class ObservationNarrativeTest method shouldGenerateObservationNarrative.
/**
* Check that the expected narrative is generated for some example Observation resource
*
* @throws IOException
*/
@Test
public void shouldGenerateObservationNarrative() throws IOException {
Observation given = parser.parseResource(Observation.class, getClass().getClassLoader().getResourceAsStream(EXAMPLE_RESOURCE_PATH));
Observation result = parser.parseResource(Observation.class, parser.encodeResourceToString(given));
assertThat(result, notNullValue());
assertThat(result.getText(), notNullValue());
assertThat(result.getText().getStatusAsString(), equalTo("generated"));
assertThat(result.getText().getDivAsString(), equalTo(readNarrativeFile(EXPECTED_NARRATIVE_PATH)));
}
use of org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.GENERATED in project openmrs-module-fhir2 by openmrs.
the class PersonNarrativeTest method shouldGeneratePersonNarrative.
/**
* Check that the expected narrative is generated for some example Person resource
*
* @throws IOException
*/
@Test
public void shouldGeneratePersonNarrative() throws IOException {
Person given = parser.parseResource(Person.class, getClass().getClassLoader().getResourceAsStream(EXAMPLE_RESOURCE_PATH));
Person result = parser.parseResource(Person.class, parser.encodeResourceToString(given));
assertThat(result, notNullValue());
assertThat(result.getText(), notNullValue());
assertThat(result.getText().getStatusAsString(), equalTo("generated"));
assertThat(result.getText().getDivAsString(), equalTo(readNarrativeFile(EXPECTED_NARRATIVE_PATH)));
}
use of org.hl7.fhir.dstu3.model.Narrative.NarrativeStatus.GENERATED in project openmrs-module-fhir2 by openmrs.
the class PractitionerNarrativeTest method shouldGeneratePractitionerNarrative.
/**
* Check that the expected narrative is generated for some example Practitioner resource
*
* @throws IOException
*/
@Test
public void shouldGeneratePractitionerNarrative() throws IOException {
Practitioner given = parser.parseResource(Practitioner.class, getClass().getClassLoader().getResourceAsStream(EXAMPLE_RESOURCE_PATH));
Practitioner result = parser.parseResource(Practitioner.class, parser.encodeResourceToString(given));
assertThat(result, notNullValue());
assertThat(result.getText(), notNullValue());
assertThat(result.getText().getStatusAsString(), equalTo("generated"));
assertThat(result.getText().getDivAsString(), equalTo(readNarrativeFile(EXPECTED_NARRATIVE_PATH)));
}
Aggregations