OCTRI / fhir2hpo

Library for converting FHIR messages to HPO
MIT License
7 stars 2 forks source link

Loinc2HpoAnnotation could be more general #6

Closed kingmanzhang closed 6 years ago

kingmanzhang commented 6 years ago

@aeyates You did a wonderful job converting the original messy code (sorry for that!) into clean & nice code! The only suggestion I have, which you also noticed, is to make the DefaultLoinc2HpoAnnotation class more general so that it does not entirely dependent on our internal code. More specifically,

Map<Loinc2HpoCodedValue, HpoTermWithNegation> codeToHpoTerm;

Maybe we can define a more general class "CodedValue", an adapter for Loinc2HpoCodedValue, so that we are able to deal with, say SNOMED codes, in future? I will try to work out a prototype for you to review.

kingmanzhang commented 6 years ago

Let me know if you are already working on it! @aeyates

aeyates commented 6 years ago

Yes, I was struggling with how best to allow for support of things like SNOMED in the future. It seemed to me to be more of a post-processing step. First determine if the LOINC coded value could be mapped, then optionally look for more refined terms. But it would be nice to reuse the map for both purposes, as I think your original library did.