Skip to content

Instantly share code, notes, and snippets.

@cooperka
Last active February 16, 2024 18:47
Show Gist options
  • Save cooperka/c9d325983af71c73e65a654f9b9a0aff to your computer and use it in GitHub Desktop.
Save cooperka/c9d325983af71c73e65a654f9b9a0aff to your computer and use it in GitHub Desktop.
Auto-select all FHIR APIs listed within the USCDI core data set

Auto-select all FHIR APIs listed within the USCDI core data set

Automatic Client ID Distribution for USCDI depends on you selecting a limited subset of FHIR resources, but it's painful to manually cross-reference to select exactly which ones (Epic documentation is here with the full list). Automated solution:

  1. Create a new app at https://fhir.epic.com/Developer/Apps

  2. On the edit page, deselect any selected APIs, and run in browser console:

    $("#WebServicesChosen option[data-uscdi-readonly=True]").each((i, item) => {
      var id = $(item).val()
      $(`#availableWebServices li[id=${id}]`).addClass("active")
    })
  3. Click the >> button to add the APIs that are now selected

  4. Verify "Client IDs for this app WILL be automatically downloaded to certain customer systems upon marking it ready for production." is showing

  5. Save your app

@cooperka
Copy link
Author

glad to help you @mitchell-sweigart!

unfortunately i don't know how new things get categorized.

yes, since "ExplanationOfBenefit.Read (R4)" is NOT in the USCDI auto-download list, that means you need manual approval of your app from each health system you want to use. once they allow-list your production client ID, you'll be able to query that data.

@mitchell-sweigart
Copy link

Do you have experience getting health systems to add your client ID to their allow-list? I'm curious about what the best approach is and who/what titles are best to target.

@cooperka
Copy link
Author

my personal experience is within a single system where i knew the person's email address. it would likely be a clinical IT person implementing the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment