Search in sources :

Example 6 with ObservationDtu3

use of org.monarchinitiative.loinc2hpofhir.fhir2hpo.ObservationDtu3 in project loinc2hpo by monarch-initiative.

the class ObservationWithCodedValueTest method testEcoliBloodCulture.

@Test
public void testEcoliBloodCulture() {
    Observation ecoliObservation = ecoliNoInterpretationBloodCulture();
    Uberobservation uberobservation = new ObservationDtu3(ecoliObservation);
    LoincId loincId = new LoincId("600-7");
    Optional<LoincId> loincOpt = uberobservation.getLoincId();
    assertTrue(loincOpt.isPresent());
    assertEquals(loincId, loincOpt.get());
    Optional<Outcome> outcomeOpt = uberobservation.getOutcome();
    assertTrue(outcomeOpt.isPresent());
    Outcome outcome = outcomeOpt.get();
    assertTrue(outcome.isNominal());
    assertEquals("112283007:http://snomed.info/sct:Escherichia coli", outcome.getOutcome());
}
Also used : ObservationDtu3(org.monarchinitiative.loinc2hpofhir.fhir2hpo.ObservationDtu3) Outcome(org.monarchinitiative.loinc2hpocore.codesystems.Outcome) Observation(org.hl7.fhir.dstu3.model.Observation) LoincId(org.monarchinitiative.loinc2hpocore.loinc.LoincId) Uberobservation(org.monarchinitiative.loinc2hpofhir.fhir2hpo.Uberobservation) Test(org.junit.jupiter.api.Test)

Aggregations

Observation (org.hl7.fhir.dstu3.model.Observation)6 Test (org.junit.jupiter.api.Test)6 Outcome (org.monarchinitiative.loinc2hpocore.codesystems.Outcome)6 LoincId (org.monarchinitiative.loinc2hpocore.loinc.LoincId)6 ObservationDtu3 (org.monarchinitiative.loinc2hpofhir.fhir2hpo.ObservationDtu3)6 Uberobservation (org.monarchinitiative.loinc2hpofhir.fhir2hpo.Uberobservation)6 TestBase.importDstu3Observation (fhir.TestBase.importDstu3Observation)3