-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add Bulk-FHIR Connectathon examples to Jupyter Notebook #24
Comments
Update: I found a workaround for the performance issue with the transitive closure query. If we first run the transitive closure to get the list of applicable terms, then run the FHIR query with those literal array values in it (rather than the subquery) then it completes much faster. First, get the subtypes of WITH hpo_subclassof(node) as (
select array_agg(array [REPLACE(from_term,'_',':'), REPLACE(to_term,'_',':')]) from search_postgres_pgpc.ontology.axiom where ontology_version = 'http://purl.obolibrary.org/obo/hp/releases/2019-04-15' and relation='SubClassOf'
)
select transitive_closure((SELECT node FROM hpo_subclassof), array ['HP:0410030']); Returns:
Then, run the original query with the subtypes as an array literal:
Returns the same 42 rows as before. Note that I've plugged the results of the first query into the second query as |
Here's a colab notebook that does that above: https://colab.research.google.com/drive/1Fr6l02-1clmouxVuhUgtsRVe7cVphjQA?usp=sharing |
Jonathan worked up the Search examples in the attachment from queries Brian Walsh had done as
https://colab.research.google.com/drive/1HhEEB3MJ8LbMP2ta946s8OARPc5RflHu?usp=sharing#scrollTo=nM-GHd3IWeqF
Jonathan wrote
These would be useful to have in a Jupyter notebook. Have attached the queries Jonathan created as an attachment.
fhir_query_examples.txt
The text was updated successfully, but these errors were encountered: