Results (top 10)
Introduction

Introduction

1. About This Shiny App

  • This app extracts information for medical identifiers such as CUI, LOINC, PheCode, CCS, and RxNorm.
  • Enter multiple IDs in the left sidebar (separated by semicolons or newlines), or upload a CSV (the first column must be IDs).
  • Choose output fields, preview the top 10 rows, and download the full results as CSV.

2. Data Sources and Versions

3. How to Use Shiny

  • Paste IDs in the input box or upload a CSV (first column is IDs). Separate by semicolons or newlines.
  • Supported ID formats (case-insensitive prefixes; mixed types allowed):
    • CUI: C\d{7} 7 digit numbers (e.g., C0018681)
    • LOINC:
      • LOINC:n-n (e.g., LOINC:2162-6)
      • n-n (e.g., 2162-6LOINC:2162-6)
      • LPn-n (e.g., LP14355-9)
    • PheCode:
      • PheCode:nnn(.n) (e.g., PheCode:714.1)
      • Xnnn(.n) (e.g., X714.1)
      • phe_nnn[_n] (e.g., phe_714_1PheCode:714.1)
    • CCS: CCS:nnn (e.g., CCS:233)
    • RxNorm:
      • RXNORM:n (4–9 digits) (e.g., RXNORM:191831)
      • plain 4–9 digit numbers (e.g., 191831)
  • Select desired columns (e.g., id, term, groupid, groupdesc) and click Run.
  • The table shows the top 10 rows; click Download CSV to export all results.

4. API Usage

  • Endpoint: POST http://localhost:8000/query
  • Parameters:
    • ids: string; multiple IDs separated by semicolons or newlines, e.g., C0018681;LOINC:2162-6;RXNORM:191831.
    • fields: comma-separated list of columns, e.g., id,term,groupid,groupdesc.
  • curl example:
curl -X POST 'http://localhost:8000/query' \
  -d 'ids=C0018681;RXNORM:191831' \
  -d 'fields=id,term,groupid,groupdesc'
  • R example:
httr::POST(
  "http://localhost:8000/query",
  body = list(
    ids = "C0018681;LOINC:2162-6;RXNORM:191831",
    fields = "id,term,groupid,groupdesc"
  ),
  encode = "form"
) |> httr::content()
  • Returns JSON with the selected fields.