Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FHIR terminology import #2610

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

FHIR terminology import #2610

wants to merge 4 commits into from

Conversation

johngrimes
Copy link

@johngrimes johngrimes commented Sep 6, 2021

This change adds a tab to the Import section of the Concept Sets area.

A user can enter:

  1. The URL of a FHIR terminology server, and;
  2. A URI describing a FHIR ValueSet known to that terminology server.

A request will be made to the ValueSet expand operation on that server, and the resulting codes will be imported.

Limitations

  • Matching is done on code only, in the same way the "Source Codes" import currently works. This could be enhanced when a proper mapping of FHIR code system identifiers to OMOP vocabulary identifiers is available, which is currently being worked on.
  • Authenticated FHIR terminology endpoints are not yet supported.

@johngrimes
Copy link
Author

Just following up on this, has anybody had a chance to take a look?

@ablack3
Copy link

ablack3 commented Apr 20, 2022

@anthonysena, @alex-odysseus, @chrisknoll - Who is responsible for reviewing this PR?

@anthonysena anthonysena self-assigned this Apr 20, 2022
@anthonysena
Copy link
Collaborator

@ablack3 thanks for tagging me here. @johngrimes very sorry for the long delay here. I will take on the code review.

@johngrimes - let me make sure I understand the use case you are trying to address. You have a value set in FHIR and you'd like to import that as a concept set in ATLAS. Then you mention in the limitations:

Matching is done on code only, in the same way the "Source Codes" import currently works. This could be enhanced when a proper mapping of FHIR code system identifiers to OMOP vocabulary identifiers is available, which is currently being worked on.

I don't have access to the chat link you referenced and given the age of this PR, I'm unsure of the status of the mapping of FHIR to OMOP vocabularies. What happens if/when a value set is imported and no source codes are found in the vocabulary? There was some work done in #2653 that may be of interest to allow for importing of codes and then selecting of the vocabulary.

After quickly reviewing the code I had a few thoughts:

  • Configuration of the FHIR endpoint URL in the config/app.js is the right approach. I'm wondering though if this should be set to an empty string by default so that the FHIR import is hidden when that value is not set? Having that tab displayed when there is no FHIR endpoint configured will be confusing.
  • The cohort definition editor has a "Concept Sets" tab that allows for import of concept sets; we may need to include the FHIR import there as well.
  • Since you mentioned that "Authenticated FHIR terminology endpoints are not yet supported" what are your thoughts on that level of support? I'm unsure how many people are using FHIR endpoints without security?

@@ -3,7 +3,7 @@ define(function(require, exports) {
const config = require('appConfig');
const sharedState = require('atlas-state');
const { Api:OHDSIApi, STATUS } = require('ohdsi-api');
const JSON_RESPONSE_TYPE = 'application/json';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it replaced JSON_RESPONSE_TYPE with FHIR_JSON_RESPONSE_TYPE, and I don't think you should remove JSON_RESPONSE_TYPE...can you confirm?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was also curious about this change and it looks like JSON_RESPONSE_TYPE is already defined in the base class here: https://github.com/OHDSI/UiToolbox/blob/master/src/api/index.js#L15. So I think it is safe to remove.

@@ -100,6 +100,18 @@ define(function(require, exports) {
}
}

class FhirApi extends Api {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think FhirApi should be a nested class in http.js. The http.js is a module which facilitates http communication. I think the FHIR class handles communicating to a FHIR service. We have a separate folder of services which you can implement your class there, and then you can import the class in the javascript compoennt you want to use (via the define())

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: within this file we do define 2 classes: Api and PlainTextApi. I agree with moving this to another file but noting that we may want to do that for the PlainTextApi as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, my understanding about the http.js module was that it just wrapped some lower-level HTTP calls to handle passing specific headers, but not something that made some kind of 'client api' to a specific type of service (like the FHIR one or the PlainText one)...I'm not sure what the design decision was about introducing the PlainText api into http.js but it seems that whoever put that forward thought that you would put these type of API clients directly into the http.js module...so, I can't argue with that, so my only comment then is how the JSON_RESPONSE_TYPE was removed....although not sure where that is being used (but possibly it's a constant that is refernced elsewhere in the app).

@johngrimes
Copy link
Author

@anthonysena Thanks very much for your time and detailed response.

I don't have access to the chat link you referenced and given the age of this PR, I'm unsure of the status of the mapping of FHIR to OMOP vocabularies. What happens if/when a value set is imported and no source codes are found in the vocabulary? There was some work done in #2653 that may be of interest to allow for importing of codes and then selecting of the vocabulary.

The change looks great and really improves the import source codes feature. Once we have a solid vocabulary identifier mapping, I can imagine that you could enhance this implementation to remove the intermediate step in the user interface for FHIR source codes, as they are self-describing. Unfortunately I'm not sure that the work on the vocabulary mapping is complete, or I don't have visibility of it.

* Configuration of the FHIR endpoint URL in the `config/app.js` is the right approach. I'm wondering though if this should be set to an empty string by default so that the FHIR import is hidden when that value is not set? Having that tab displayed when there is no FHIR endpoint configured will be confusing.

It would be nice if there was a functional default for this, maybe "https://tx.fhir.org/r4" as the official reference server for the current version of the spec?

* The cohort definition editor has a "Concept Sets" tab that allows for import of concept sets; we may need to include the FHIR import there as well.

Is that a different component, or another instantiation of the same component? If there is a different one, could you point me towards where the source for that lives?

* Since you mentioned that "Authenticated FHIR terminology endpoints are not yet supported" what are your thoughts on that level of support? I'm unsure how many people are using FHIR endpoints without security?

I think that this change adds significant benefit even without this feature, as it allows users to interact with well-known terminologies that are available on public reference servers (e.g. tx.fhir.org, tx.ontoserver.csiro.au). I'd be keen to get your thoughts on what you think would be involved in adding authentication capability. I am not as familliar with the code base and any existing infrastructure or features of the framework that could be used for this purpose.

@chrisknoll
Copy link
Collaborator

Is that a different component, or another instantiation of the same component? If there is a different one, could you point me towards where the source for that lives?

I'm pretty sure there's one component being reused, similar how you defined your conceptset-list-import-fhir. I can pull the branch and see how it appears, it may be the case that you need to add that component in another place...i seem to recall the concept set tabs under the main 'concept sets' nav is slightly different than the other plaes we have embedded cocnept sets (like Incidence, Cohort Defs and Cohort Characterization).

@chrisknoll chrisknoll added this to the V2.13 milestone Sep 20, 2022
@anthonysena anthonysena modified the milestones: v2.13, v2.14 Dec 20, 2022
@anthonysena
Copy link
Collaborator

@johngrimes - just reviewing the upcoming v2.13 release and we are going to move this item to v2.14 since we were unsure if you still wanted to contribute this to the codebase?

@johngrimes
Copy link
Author

I definitely still want to get it in, I just haven't had a chance to address the comments yet 😔

@johngrimes
Copy link
Author

There's probably not too much work remaining.

@anthonysena
Copy link
Collaborator

No worries @johngrimes - we'll put it into v2.14 and we can check in with you next year. Thanks!

@anthonysena anthonysena modified the milestones: v2.14, v2.15 Sep 19, 2023
@anthonysena anthonysena removed this from the v2.15 milestone Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Pushed To Next Release
Development

Successfully merging this pull request may close these issues.

4 participants