Make PhenX (Phenotypes and eXposures Toolkit) a first-class citizen in the eSheet builder

Aperta
#263 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Start by reading the builder's form-import entry point and the @esheet/fields schema, then examine a representative REDCap instrument and data-dictionary CSV from the linked PhenX downloads. Identify where protocol indexing, field and conditional-logic mapping, metadata storage, search UI, and attribution should be added. Done means a user can find and import a complete protocol into a usable eSheet, retain its protocol ID and LOINC metadata, preserve basic logic, and see the required attribution.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

builder enhancement integration loinc phenx

We want native, first-class support for the PhenX Toolkit in the eSheet builder so users can search, preview, and import standardized phenotype/exposure protocols directly into eSheet schemas without manual translation.

PhenX (https://www.phenxtoolkit.org/) is the NHGRI-funded catalog of consensus measurement protocols used across genomic, clinical, and epidemiologic research. Protocols are LOINC-coded, linked to HPO, and already distributed as REDCap instruments, data dictionaries, and data collection worksheets. Making them first-class in eSheet turns the builder into a practical authoring surface for these standards instead of just another form tool.

Goals

  • Users can browse/search PhenX protocols inside the builder (by domain, collection, keyword, or protocol ID).
  • One-click (or low-friction) import of a PhenX protocol into an eSheet form definition.
  • Preserve key metadata: PhenX protocol ID, LOINC code(s), HPO links, variable IDs, source attribution.
  • Map PhenX field types + branching/skip logic into eSheet’s conditional logic system where possible.
  • Support both full protocol import and selective variable import.

Technical Notes / Data Sources

PhenX publishes structured downloads (https://www.phenxtoolkit.org/resources/download):

  • REDCap ZIP instruments (best starting point — already structured for electronic capture)
  • Data Dictionaries (CSV and RTF) — variable-level detail, skip patterns in RTF
  • Data Collection Worksheets
  • Variable and protocol cross-reference spreadsheets
  • Protocol metadata including LOINC and HPO mappings

No public JSON API is currently documented. Initial implementation should consume the REDCap instruments and/or DD CSV files. Longer-term we can evaluate a cached index or direct integration if PhenX exposes better endpoints.

Required attribution (CC BY 4.0):

“The Web-based PhenX Toolkit currently receives funding from the National Institutes of Health; official current and archived versions of the PhenX Toolkit are available at www.phenxtoolkit.org.”

Proposed Approach (for discussion)

  1. Build a PhenX protocol index (cached from official downloads or periodic sync).
  2. Add a “Import from PhenX” entry point in the builder (search modal or side panel).
  3. Map REDCap instrument / DD structure → eSheet schema:
    • Field types → @esheet/fields
    • Branching logic → eSheet conditional logic
    • Variable names / IDs → field IDs + metadata
  4. Attach PhenX + LOINC metadata to the resulting form/schema so it survives export and remains queryable.
  5. Provide a “PhenX protocol” badge or panel in the builder when a form originates from or contains PhenX content.

Acceptance Criteria

  • User can search PhenX protocols by name, domain, or ID from within the builder.
  • User can import at least one complete PhenX protocol (preferentially via REDCap instrument) and get a usable eSheet form with fields and basic conditional logic preserved.
  • Imported form retains PhenX protocol ID and associated LOINC codes in metadata.
  • Attribution is visible and correct.
  • Import works for a representative sample across domains (e.g., demographics, cardiovascular, mental health, environmental exposures).
  • Documentation added covering how to use the feature and any limitations of the mapping.

Out of Scope (for this ticket)

  • Full bidirectional sync with the PhenX Toolkit site
  • Automatic LOINC submission or new code creation
  • Clinical decision support or scoring logic beyond what’s in the source protocol

References

Lingua principale
TypeScript
Stelle
2
Fork
1
Merge medio
1g 14h
PR unite (30g)
11

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mieweb/eSheet

Tutte le issue di mieweb/eSheet

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.