use of org.monarchinitiative.loinc2hpo.io.HPOParser in project loinc2hpo by monarch-initiative.
the class FhirObservationParserTest method setup.
@BeforeClass
public static void setup() throws IOException {
ClassLoader classLoader = FhirObservationParserTest.class.getClassLoader();
String obopath = classLoader.getResource("obo/hp.obo").getFile();
String loincpath = classLoader.getResource("loinc2hpoAnnotationTest.tsv").getFile();
HPOParser parser = new HPOParser(obopath);
HpoOntology ontology = parser.getHPO();
loincparser = new FromFile(loincpath, ontology);
testmap = loincparser.getTestmap();
String fhirPath = classLoader.getResource("json/glucoseHigh.fhir").getFile();
ObjectMapper mapper = new ObjectMapper();
File f = new File(fhirPath);
FileInputStream fis = new FileInputStream(f);
byte[] data = new byte[(int) f.length()];
fis.read(data);
fis.close();
node = mapper.readTree(data);
}
Aggregations