How oussoudiop05-ui/hospiquery works
HQ is a browser-based workbench for designing French PMSI/CORA database extractions and generating an R script. Users start from a request or template, refine a table-and-join schema (including columns, filters and derived fields), review the final output, and obtain generated R code; an AI discussion can propose schema patches. The graph includes major documented UI capabilities from the tree and excerpts. The README is empty, and unsampled modules are represented at directory level where their exact internal behavior is not evidenced.
Main entry points: app.js Workbench shell · store.js Extraction state · render-chat.js AI discussion · render-joins.js Join editor
Components 21
Extraction design
- Schema editor
js/render-schema.js - Join editor
js/render-joins.js - Join logic
js/joins.js - Data dictionary
js/dictionary.js - I50 example
data/seed-i50.js
AI assistance
- Prompt and parsing
js/prompt.js - AI discussion
js/render-chat.js - Model client
js/api.js
Script and review
- Final table review
js/render-final.js - R script generator
js/generator.js
State and references
- Extraction state
js/store.js - DOM utilities
js/dom.js
Workbench interface
- Workbench shell
js/app.js - API settings
js/ui-settings.js - Templates and history
js/ui-templates.js - File management
js/ui-files.js - Project guidance
js/ui-claudemd.js - Warnings UI
js/ui-warnings.js - Dictionary UI
js/ui-dictionary.js
Other components
- Analyst
- Anthropic service
Connections 28
- Analyst → Workbench shell: uses
- Workbench shell → Templates and history: wires
js/app.js - Workbench shell → Project guidance: wires
js/app.js - Workbench shell → Extraction state: updates
js/app.js - Templates and history → Extraction state: loads state
js/ui-templates.js - Workbench shell → API settings: wires
js/app.js - API settings → Model client: configures
js/ui-settings.js - Workbench shell → File management: wires
- Workbench shell → Warnings UI: wires
- Workbench shell → Dictionary UI: wires
- Workbench shell → Schema editor: hosts
- Workbench shell → Join editor: hosts
- Schema editor → Extraction state: edits
- Join editor → Extraction state: edits
js/render-joins.js - Join editor → Join logic: uses
js/render-joins.js - Join logic → Extraction state: reads connections
js/joins.js - Extraction state → I50 example: initializes from
js/store.js - Prompt and parsing → Data dictionary: looks up tables
js/prompt.js - AI discussion → Prompt and parsing: parses patches
js/render-chat.js - AI discussion → Model client: requests responses
- Model client → Anthropic service: sends requests
js/api.js - AI discussion → Extraction state: applies patches
js/render-chat.js - Final table review → R script generator: gets final columns
js/render-final.js - Final table review → Extraction state: saves order
js/render-final.js - R script generator → Extraction state: reads extraction
- Analyst → Final table review: reviews
- Analyst → R script generator: requests script
- Workbench shell → DOM utilities: uses
js/app.js