monarch-initiative / loinc2hpo

Java library to map LOINC-encoded test results to Human Phenotype Ontology
http://loinc2hpo.readthedocs.io/en/latest/
Other
29 stars 8 forks source link

FHIR-related code #135

Closed pnrobinson closed 2 years ago

pnrobinson commented 2 years ago

It seems as if the FHIR-related code in the library does a lot of different things, but it might be good to offer just a simpler functionality for the library moving forward. Essentially, the core function is to take a FHIR Observation, extract the LOINC code and result, and return the annotation HPO code. The remaining functionality should be provide by application code that uses this library. That is, I would remove code such as FHIR retrieved.

The code Loinc2HPO library will have only one function in the API

public Optional query(TermId loincId, Outcome outcome);

The FHIR library should have something like

public Optional query(Observation);

Internally, this function needs to extract the loinc ID and code the outcome. All of the rest should be in application code.

Do we need anything else? Thoughts? @kingmanzhang @iimpulse

kingmanzhang commented 2 years ago

Agreed. The demo of FHIR transformation was an important part in the early stage for the demonstration of this project but not suitable to be together with this library.

Also keep in mind that Amy has ported some of the methods for FHIR -> HPO to a separate library.

pnrobinson commented 2 years ago

Simplified with https://github.com/monarch-initiative/loinc2hpo/pull/140