Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Update of FHIR tutorial #10

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

Conversation

Delphine-L
Copy link

I updated the tutorial, with a notebook focusing on querying FHIR Servers. More notebooks will come for the creation/ modification of data models and data management.
This tutorial query dbgap server, and a test server provided by HL7. It uses FHIR version 4, SMART FHIR client, and the FHIR API.

I updated the tutorial, with a notebook focusing on querying FHIR Servers. More notebooks will come for the creation/ modification of data models, and data management. 
This tutorial query dbgap server, and a test server provided by HL7. It uses FHIR version 4, SMART FHIR client, and the FHIR API.
Changed README to include the description of the tutorial content
@Delphine-L
Copy link
Author

I wasn't sure how to include it in a pull request. Binder has been unstable for me, making it a bit difficult to use, but I can modify the Notebook on Github if the colab notebook looks good to you.

Copy link
Member

@znatty22 znatty22 left a comment

Choose a reason for hiding this comment

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

Thanks @Delphine-L! The query notebook is a nice addition. I'd like to leave the link to the FHIR 101 binder notebook for now since it has a lot of intro material that the colab Query notebook doesn't cover yet. Also would like to leave the bits in the README that give an overview of the FHIR 101 notebook. Could you please revise your README updates with the following changes: Append the Quickstart section with a link to the Colab Query notebook rather than replacing the current binder link. Append to the What is this Guide section to include an overview of the Colab Query notebook. Thanks so much for your addition!

@liberaliscomputing
Copy link
Member

Thanks for the effort to translate the existing 101, @Delphine-L!

I am down for @znatty22's suggestions about curating both the FHIR 101 binder notebook and the query notebook until the latter reaches some degree of maturity where we can archive the former. Please consider adding some descriptions about why you refactor the 101 into a new version as well.

@bwalsh
Copy link

bwalsh commented Dec 10, 2020

Use Case 1 : Query Patient informations

  • Should we start with querying for all patients?

    • If we do want to start with a set of patients, do we want to include paging?
  • The resulting list has a number of duplicate records, missing names, etc. Should we have a cleaner data set to query?

{'0b327bc5-13e5-4510-8a17-91bc0bf081': 'Jason Lee',
 '0ecdf6ab-a506-4c44-8b70-b413274c4e': 'P D',
 '1': 'ADAM EVERYMAN',
 '20217344': 'Undefined',
 '20217345': 'Tina A Roy',
 '20217346': 'Tina A Roy',
 '20217347': 'Tina A Roy',
 '20217348': 'FN3062 MN3062 LN3062',
 '20217349': 'JANE I FREDERICKS',
 '20217351': 'Jose Rodriguez',
 '20217352': 'Undefined',
 '20217353': 'Undefined',
 '20217354': 'Undefined',
 '20217355': 'Undefined',
 '20217356': 'Henry Levin',
 '20217357': 'Sandy Notsowell',
 '20217358': 'Daniel Eduardo Moya',
 '20217359': 'Undefined',
 '20217360': 'Undefined',
 '20217361': 'Undefined',
 '20217362': 'Undefined',
 '20217363': 'Undefined',
 '20217364': 'Undefined',
 '20217365': 'Undefined',
 '20217366': 'Undefined',
 '20217367': 'Undefined',
 '20217368': 'Undefined',
 '20217369': 'Undefined',
 '20217382': 'Joginder Singh',
 '20217383': 'Joginder Singh',
 '20217395': 'Peter James Chalmers',
 '20217412': 'Sherlock Holmes Chalmers',
 '20217416': 'GIVEN FAMILY',
 '20217417': 'GIVEN FAMILY',
 '20217419': 'Krishna James Chalmers',
 '20217425': '太郎 患者',
 '20217433': '太郎 患者',
 '20217435': '太郎 患者',
 '20217437': 'Srividya Vaidhyanathan Vaidhyanathan',
 '20217438': 'Haripriya Gaddam Gaddam',
 '20217439': 'Srividya Vaidhyanathan Vaidhyanathan',
 '20217440': 'Haripriya Gaddam Gaddam',
 '20217441': 'Srividya Vaidhyanathan Vaidhyanathan',
 '20217442': 'Haripriya Gaddam Gaddam',
 '20217468': 'Srividya Vaidhyanathan Vaidhyanathan',
 '20217501': 'inspire ventilador ',
 '20217530': 'Peter James Chalmers',
 '20217531': 'Peter James Chalmers',
 '20217532': 'Peter James Chalmers',
 '20217533': 'Pavithra James Chalmers'}
  • Harmonization code is never 'clean'. However, I'm wondering if there is a way to harmonize names without try/catch?
    e.g.
def simple_name(entry):
  """Harmonize name."""
  # return family_name first_name if provided
  if 'name' in entry['resource'] \
    and len(entry['resource']['name']) > 0 \
    and 'family' in entry['resource']['name'][0] \
    and 'given' in entry['resource']['name'][0]:
      return f"{entry['resource']['name'][0]['family']} {entry['resource']['name'][0]['given'][0]}"
  # return concatenated when first, last not provided
  if 'name' in entry['resource'] \
    and len(entry['resource']['name']) > 0:
      return "-".join(entry['resource']['name'][0].values())
  return "Undefined"    

patientlist={entry['resource']['id']: simple_name(entry) for entry in smart.server.request_json('Patient')['entry'] }

Interactions

  • Should this section start with a 'Use Case' ?
  • I'd like to see an example of retrieving specimen, observation etc.

Get Server metadata

  • This should definetly have its own 'Use Case'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants