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

cooperka commented Nov 4, 2021

Items that qualify for USCDI auto-download as of Nov 2021:

APIs included:

"AllergyIntolerance.Read (DSTU2)"
"AllergyIntolerance.Read (R4)"
"AllergyIntolerance.Read (STU3)"
"AllergyIntolerance.Search (DSTU2)"
"AllergyIntolerance.Search (R4)"
"AllergyIntolerance.Search (STU3)"
"Binary.Read (CCDA Documents) (DSTU2)"
"Binary.Read (Clinical Notes) (R4)"
"Binary.Read (Clinical Notes, Practitioner Photo) (STU3)"
"Binary.Read (Labs) (R4)"
"Bulk Data Delete Request"
"Bulk Data File Request"
"Bulk Data Kick-off"
"Bulk Data Status Request"
"CarePlan.Read (Encounter-Level) (R4)"
"CarePlan.Read (Encounter-Level, Longitudinal) (DSTU2)"
"CarePlan.Read (Longitudinal) (R4)"
"CarePlan.Search (Encounter-Level) (R4)"
"CarePlan.Search (Encounter-Level, Longitudinal) (DSTU2)"
"CarePlan.Search (Longitudinal) (R4)"
"CareTeam.Read (Longitudinal) (R4)"
"CareTeam.Search (Longitudinal) (R4)"
"Condition.Read (Encounter Diagnosis, Problems) (STU3)"
"Condition.Read (Health Concern) (R4)"
"Condition.Read (Problems) (DSTU2)"
"Condition.Read (Problems) (R4)"
"Condition.Search (Encounter Diagnosis, Problems) (STU3)"
"Condition.Search (Health Concern) (R4)"
"Condition.Search (Problems) (DSTU2)"
"Condition.Search (Problems) (R4)"
"Device.Read (DSTU2)"
"Device.Read (Implants) (R4)"
"Device.Read (STU3)"
"Device.Search (DSTU2)"
"Device.Search (Implants) (R4)"
"Device.Search (STU3)"
"DiagnosticReport.Read (Results) (DSTU2)"
"DiagnosticReport.Read (Results) (R4)"
"DiagnosticReport.Read (Results) (STU3)"
"DiagnosticReport.Search (Results) (DSTU2)"
"DiagnosticReport.Search (Results) (R4)"
"DiagnosticReport.Search (Results) (STU3)"
"DocumentReference.Read (CCDA Documents) (DSTU2)"
"DocumentReference.Read (Clinical Notes) (R4)"
"DocumentReference.Read (Clinical Notes) (STU3)"
"DocumentReference.Read (Labs) (R4)"
"DocumentReference.Search (CCDA Documents) (DSTU2)"
"DocumentReference.Search (Clinical Notes) (R4)"
"DocumentReference.Search (Clinical Notes) (STU3)"
"DocumentReference.Search (Labs) (R4)"
"Encounter.Read (R4)"
"Encounter.Read (STU3)"
"Encounter.Search (R4)"
"Encounter.Search (STU3)"
"Goal.Read (Patient) (DSTU2)"
"Goal.Read (Patient) (R4)"
"Goal.Read (Patient) (STU3)"
"Goal.Search (Patient) (DSTU2)"
"Goal.Search (Patient) (R4)"
"Goal.Search (Patient) (STU3)"
"Immunization.Read (DSTU2)"
"Immunization.Read (R4)"
"Immunization.Read (STU3)"
"Immunization.Search (DSTU2)"
"Immunization.Search (R4)"
"Immunization.Search (STU3)"
"Location.Read (R4)"
"Location.Read (STU3)"
"Medication.Read (DSTU2)"
"Medication.Read (R4)"
"Medication.Read (STU3)"
"Medication.Search (DSTU2)"
"Medication.Search (R4)"
"MedicationOrder.Read (DSTU2)"
"MedicationOrder.Search (DSTU2)"
"MedicationRequest.Read (Orders) (R4)\n"
"MedicationRequest.Read (Orders) (STU3)\n"
"MedicationRequest.Search (Orders) (R4)"
"MedicationRequest.Search (Orders) (STU3)"
"MedicationStatement.Read (DSTU2)"
"MedicationStatement.Read (STU3)"
"MedicationStatement.Search (DSTU2)"
"MedicationStatement.Search (STU3)"
"Observation.Read (Labs) (DSTU2)"
"Observation.Read (Labs) (R4)"
"Observation.Read (Labs) (STU3)"
"Observation.Read (Social History) (DSTU2)"
"Observation.Read (Social History) (R4)"
"Observation.Read (Social History) (STU3)"
"Observation.Read (Vitals) (DSTU2)"
"Observation.Read (Vitals) (R4)"
"Observation.Read (Vitals) (STU3)"
"Observation.Search (Labs) (DSTU2)"
"Observation.Search (Labs) (R4)"
"Observation.Search (Labs) (STU3)"
"Observation.Search (Social History) (DSTU2)"
"Observation.Search (Social History) (R4)"
"Observation.Search (Social History) (STU3)"
"Observation.Search (Vitals) (DSTU2)"
"Observation.Search (Vitals) (R4)"
"Observation.Search (Vitals) (STU3)"
"Organization.Read (R4)"
"Organization.Read (STU3)"
"Patient.Read (DSTU2)"
"Patient.Read (R4)"
"Patient.Read (STU3)"
"Patient.Search (DSTU2)"
"Patient.Search (R4)"
"Patient.Search (STU3)"
"Practitioner.Read (DSTU2)"
"Practitioner.Read (R4)"
"Practitioner.Read (STU3)"
"Practitioner.Search (DSTU2)"
"Practitioner.Search (R4)"
"Practitioner.Search (STU3)"
"PractitionerRole.Read (R4)"
"PractitionerRole.Read (STU3)"
"PractitionerRole.Search (R4)"
"PractitionerRole.Search (STU3)"
"Procedure.Read (Orders) (DSTU2)"
"Procedure.Read (Orders) (R4)"
"Procedure.Read (Orders) (STU3)"
"Procedure.Search (Orders) (DSTU2)"
"Procedure.Search (Orders) (R4)"
"Procedure.Search (Orders) (STU3)"
"Provenance.Read (R4)"
"RelatedPerson.Read (R4)"

APIs NOT included:

"AdverseEvent.Read (R4)"
"AdverseEvent.Search (R4)"
"AllergyIntolerance.Create (R4)"
"AllergyIntolerance.Create (STU3)"
"Appointment $book (STU3)"
"Appointment $find (STU3)"
"Appointment.Read (STU3)"
"Binary.Read (External CCDA Document) (R4)"
"Binary.Read (Handoff) (R4)"
"Binary.Read (HIS) (R4)"
"Binary.Read (OASIS) (R4)"
"Binary.Read (Practitioner Photo) (R4)"
"BodyStructure.Read (Tooth) (R4)"
"BodyStructure.Search (Tooth) (R4)"
"CarePlan.Read (Dental) (R4)"
"CarePlan.Read (Inpatient Pathway) (R4)"
"CarePlan.Read (Inpatient) (R4)"
"CarePlan.Read (Oncology) (R4)"
"CarePlan.Read (Outpatient) (R4)"
"CarePlan.Read (Questionnaires Due) (R4)"
"CarePlan.Search (Dental) (R4)"
"CarePlan.Search (Inpatient Pathway) (R4)"
"CarePlan.Search (Inpatient) (R4)"
"CarePlan.Search (Oncology) (R4)"
"CarePlan.Search (Outpatient) (R4)"
"CarePlan.Search (Questionnaires Due) (R4)"
"CareTeam.Read (Episode) (R4)"
"CareTeam.Search (Episode) (R4)"
"CDS Hooks Condition.Create (Encounter Diagnosis) (R4)"
"CDS Hooks Condition.Create (Encounter Diagnosis, Problems) (STU3)"
"CDS Hooks Condition.Create (Problems) (R4)"
"CDS Hooks MedicationRequest.Create (Unsigned Order) (R4)"
"CDS Hooks MedicationRequest.Create (Unsigned Order) (STU3)"
"CDS Hooks MedicationRequest.Delete (Unsigned Order) (R4)"
"CDS Hooks MedicationRequest.Delete (Unsigned Order) (STU3)"
"CDS Hooks MedicationRequest.Read (Unsigned Order) (R4)"
"CDS Hooks ProcedureRequest.Create (Unsigned Order) (STU3)"
"CDS Hooks ProcedureRequest.Delete (Unsigned Order) (STU3)"
"CDS Hooks ServiceRequest.Create (Unsigned Order) (R4)"
"CDS Hooks ServiceRequest.Delete (Unsigned Order) (R4)"
"CDS Hooks ServiceRequest.Read (Unsigned Order) (R4)\n"
"Communication.Create (Community Resource) (R4)"
"Communication.Read (Community Resource) (R4)"
"Communication.Search (Community Resource) (R4)"
"Condition.Create (Problems) (R4)"
"Condition.Create (Problems) (STU3)"
"Condition.Read (Care Plan Problem) (R4)"
"Condition.Read (Dental Finding) (R4)"
"Condition.Read (Encounter Diagnosis) (R4)"
"Condition.Read (Genomics) (R4)"
"Condition.Read (Infection) (R4)"
"Condition.Search (Care Plan Problem) (R4)"
"Condition.Search (Dental Finding) (R4)"
"Condition.Search (Encounter Diagnosis) (R4)"
"Condition.Search (Genomics) (R4)"
"Condition.Search (Infection) (R4)"
"Consent.Read (Document) (R4)"
"Consent.Search (Document) (R4)"
"Coverage.Read (R4)"
"Coverage.Read (STU3)"
"Coverage.Search (R4)"
"Coverage.Search (STU3)"
"COVID SMART Scheduling Links"
"DocumentReference.Create (Clinical Notes) (R4)"
"DocumentReference.Create (Clinical Notes) (STU3)"
"DocumentReference.Read (External CCDA Document) (R4)"
"DocumentReference.Read (Handoff) (R4)"
"DocumentReference.Read (HIS) (R4)"
"DocumentReference.Read (OASIS) (R4)"
"DocumentReference.Search (External CCDA Document) (R4)"
"DocumentReference.Search (Handoff) (R4)"
"DocumentReference.Search (HIS) (R4)"
"DocumentReference.Search (OASIS) (R4)"
"Endpoint.Read (R4)"
"Endpoint.Read (STU3)"
"EpisodeOfCare.Read (R4)"
"EpisodeOfCare.Search (R4)"
"ExplanationOfBenefit.Read (R4)"
"ExplanationOfBenefit.Search (R4)"
"FamilyMemberHistory.Read (R4)"
"FamilyMemberHistory.Search (DSTU2)"
"FamilyMemberHistory.Search (R4)"
"Flag.Read (Patient FYI) (R4)"
"Flag.Read (Patient FYI) (STU3)"
"Flag.Search (Patient FYI) (R4)"
"Flag.Search (Patient FYI) (STU3)"
"Goal.Create (Patient) (STU3)"
"Goal.Read (Care Plan) (R4)"
"Goal.Read (Pathway Step) (R4)"
"Goal.Search (Care Plan) (R4)"
"Goal.Search (Pathway Step) (R4)"
"Introspect"
"List.Read (Allergies) (R4)"
"List.Read (Family History) (R4)"
"List.Read (Hospital Problems) (R4)"
"List.Read (Immunizations) (R4)"
"List.Read (Medications) (R4)"
"List.Read (Patient List) (STU3)"
"List.Read (Patients With Questionnaires Due) (STU3)"
"List.Read (Problems) (R4)"
"List.Search (Allergies) (R4)"
"List.Search (Family History) (R4)"
"List.Search (Hospital Problems) (R4)"
"List.Search (Immunizations) (R4)"
"List.Search (Medications) (R4)"
"List.Search (Patient List) (STU3)"
"List.Search (Patients With Questionnaires Due) (STU3)"
"List.Search (Problems) (R4)"
"Location.Search (R4)"
"Observation.Create (LDA-W) (R4)"
"Observation.Create (LDA-W) (STU3)"
"Observation.Create (Vitals) (R4)"
"Observation.Create (Vitals) (STU3)"
"Observation.Read (Activities of Daily Living) (R4)"
"Observation.Read (Activities of Daily Living) (STU3)"
"Observation.Read (Core Characteristics) (R4)"
"Observation.Read (Core Characteristics) (STU3)"
"Observation.Read (LDA-W) (R4)"
"Observation.Read (LDA-W) (STU3)"
"Observation.Read (Obstetric Details) (R4)"
"Observation.Read (Obstetric Details) (STU3)"
"Observation.Read (Periodontal) (R4)"
"Observation.Read (SmartData Elements) (R4)"
"Observation.Search (Activities of Daily Living) (R4)"
"Observation.Search (Activities of Daily Living) (STU3)"
"Observation.Search (Core Characteristics) (R4)"
"Observation.Search (Core Characteristics) (STU3)"
"Observation.Search (LDA-W) (R4)"
"Observation.Search (LDA-W) (STU3)"
"Observation.Search (Obstetric Details) (R4)"
"Observation.Search (Obstetric Details) (STU3)"
"Observation.Search (Periodontal) (R4)"
"Observation.Search (SmartData Elements) (R4)"
"Observation.Update (LDA-W) (R4)"
"Observation.Update (LDA-W) (STU3)"
"Organization.Search (R4)"
"Patient.Create (R4)"
"Patient.Create (STU3)"
"Procedure.Read (Surgeries) (R4)"
"Procedure.Read (Surgical History) (R4)"
"Procedure.Search (Surgeries) (R4)"
"Procedure.Search (Surgical History) (R4)"
"ProcedureRequest.Read (Orders) (STU3)"
"ProcedureRequest.Search (Orders) (STU3)"
"Questionnaire.Read (Patient-Entered Questionnaires) (R4)"
"Questionnaire.Search (Patient-Entered Questionnaires) (R4)"
"QuestionnaireResponse.Create (Patient-Entered Questionnaires) (R4)\n"
"QuestionnaireResponse.Read (Patient-Entered Questionnaires) (R4)"
"QuestionnaireResponse.Search (Patient-Entered Questionnaires) (R4)"
"RequestGroup.Read (Dental Visit) (R4)"
"RequestGroup.Read (Oncology Plan Day) (R4)"
"RequestGroup.Search (Dental Visit) (R4)"
"RequestGroup.Search (Oncology Plan Day) (R4)"
"ResearchStudy.Read (R4)"
"ResearchStudy.Search (R4)"
"ResearchSubject.Read (R4)"
"ResearchSubject.Search (R4)"
"Schedule.Read (STU3)"
"ServiceRequest.Read (Community Resource) (R4)"
"ServiceRequest.Read (Dental Procedure) (R4)"
"ServiceRequest.Read (Orders) (R4)"
"ServiceRequest.Read (Referral) (R4)"
"ServiceRequest.Search (Community Resource) (R4)"
"ServiceRequest.Search (Dental Procedure) (R4)"
"ServiceRequest.Search (Orders) (R4)"
"Slot.Read (STU3)"
"Specimen.Read (R4)"
"Specimen.Search (R4)"
"Substance.Read (R4)"
"Substance.Search (R4)"
"Task.Read (Community Resource) (R4)"
"Task.Search (Community Resource) (R4)"
"Task.Update (Community Resource) (R4)"
"ValueSet.$expand (R4)"

@mitchell-sweigart
Copy link

this is fantastic @cooperka - thank you for putting this together.

Question for you - do you know how to get access to "ExplanationOfBenefit.Read (R4)"? Does this require each health system / EPIC client's approval? Do you know how additional resources get added to the 'standard' list?

@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