# medintelx-healthcare-services-pvt-ltd/dataminingdiscovery architecture

> Architecture diagram of the GitHub repository medintelx-healthcare-services-pvt-ltd/dataminingdiscovery, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery
- Repository: https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery

## Overview

This is a Streamlit healthcare-claims audit training and questionnaire application. Users select an audit concept, configure or load questions, review claim examples, answer a quiz, and receive a score; the app also supports synthetic claim generation and schema exploration. The graph includes the core data, persistence, and AI-generation layers. The README is empty, and app.py excerpts are incomplete, so some likely UI-to-engine connections remain unverified rather than being presented as confirmed calls.

Main entry points: [`app.py`](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/app.py) (Streamlit application), [`modules/schema_manager.py`](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/schema_manager.py) (Schema manager), [`modules/llm_synthetic_generator.py`](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/llm_synthetic_generator.py) (AI generation), [`modules/schema_reader.py`](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/schema_reader.py) (Schema reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Audit experience"]
  node_app["Streamlit application<br/>[app.py]"]
  node_ui["UI components<br/>[ui_components.py]"]
  node_concept_rules["Concept rules"]
  node_questionnaire["Questionnaire builder"]
  node_evaluation["Quiz evaluation"]
end

subgraph group_generation["Scenario generation"]
  node_synthetic["Rule-based scenarios"]
  node_llm_generator["AI generation"]
end

subgraph group_data["Schema and data"]
  node_schema_reader["Schema reader<br/>[schema_reader.py]"]
  node_schema_manager["Schema manager<br/>[schema_manager.py]"]
  node_clickhouse["ClickHouse client"]
end

subgraph group_persistence["Local persistence"]
  node_questionnaire_db[("Questionnaire store<br/>[questionnaires.db]")]
  node_schema_cache[("Schema cache<br/>[schema_cache.db]")]
end

node_auditor(("Auditor"))
node_clickhouse_service[("ClickHouse")]
node_openai_service["Azure OpenAI"]

node_auditor -->|"uses"| node_app
node_app -.->|"renders with"| node_ui
node_app -->|"loads rules"| node_concept_rules
node_app -->|"loads saved questions"| node_questionnaire
node_app -.->|"evaluates answers"| node_evaluation
node_app -.->|"generates scenarios"| node_synthetic
node_app -.->|"requests AI generation"| node_llm_generator
node_app -.->|"explores schema"| node_schema_reader
node_questionnaire -->|"reads and writes"| node_questionnaire_db
node_schema_reader -->|"gets table schema"| node_schema_manager
node_schema_reader -->|"queries samples"| node_clickhouse
node_schema_manager -->|"reads and writes"| node_schema_cache
node_schema_manager -->|"fetches columns"| node_clickhouse
node_clickhouse -->|"queries"| node_clickhouse_service
node_llm_generator -->|"gets friendly names"| node_schema_manager
node_llm_generator -->|"requests completions"| node_openai_service

click node_app "https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/app.py"
click node_ui "https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/ui_components.py"
click node_concept_rules "https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/tree/main/config"
click node_questionnaire "https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/questionnaire_builder.py"
click node_evaluation "https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/evaluation_engine.py"
click node_synthetic "https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/synthetic_data_generator.py"
click node_llm_generator "https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/llm_synthetic_generator.py"
click node_schema_reader "https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/schema_reader.py"
click node_schema_manager "https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/schema_manager.py"
click node_clickhouse "https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/clickhouse_client.py"
click node_questionnaire_db "https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/config/questionnaires.db"
click node_schema_cache "https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/config/schema_cache.db"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_ui,node_concept_rules,node_questionnaire,node_evaluation toneBlue
class node_synthetic,node_llm_generator,node_clickhouse_service toneAmber
class node_schema_reader,node_schema_manager,node_clickhouse toneMint
class node_questionnaire_db,node_schema_cache toneRose
class node_auditor,node_openai_service toneIndigo
```

## Components

### Audit experience

- [Streamlit application](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/app.py): `app.py`
- [UI components](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/ui_components.py): `modules/ui_components.py`
- [Concept rules](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/tree/main/config): `config`
- [Questionnaire builder](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/questionnaire_builder.py): `modules/questionnaire_builder.py`
- [Quiz evaluation](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/evaluation_engine.py): `modules/evaluation_engine.py`

### Scenario generation

- [Rule-based scenarios](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/synthetic_data_generator.py): `modules/synthetic_data_generator.py`
- [AI generation](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/llm_synthetic_generator.py): `modules/llm_synthetic_generator.py`

### Schema and data

- [Schema reader](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/schema_reader.py): `modules/schema_reader.py`
- [Schema manager](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/schema_manager.py): `modules/schema_manager.py`
- [ClickHouse client](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/modules/clickhouse_client.py): `modules/clickhouse_client.py`

### Local persistence

- [Questionnaire store](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/config/questionnaires.db): `config/questionnaires.db`
- [Schema cache](https://github.com/medintelx-healthcare-services-pvt-ltd/dataminingdiscovery/blob/main/config/schema_cache.db): `config/schema_cache.db`

### Other components

- **Auditor**
- **ClickHouse**
- **Azure OpenAI**

## Connections

- Auditor → Streamlit application: uses (evidence: `app.py`)
- Streamlit application → UI components: renders with (evidence: `app.py`)
- Streamlit application → Concept rules: loads rules (evidence: `app.py`)
- Streamlit application → Questionnaire builder: loads saved questions (evidence: `app.py`)
- Streamlit application → Quiz evaluation: evaluates answers (evidence: `app.py`)
- Streamlit application → Rule-based scenarios: generates scenarios (evidence: `app.py`)
- Streamlit application → AI generation: requests AI generation (evidence: `app.py`)
- Streamlit application → Schema reader: explores schema (evidence: `app.py`)
- Questionnaire builder → Questionnaire store: reads and writes (evidence: `modules/questionnaire_builder.py`)
- Schema reader → Schema manager: gets table schema (evidence: `modules/schema_reader.py`)
- Schema reader → ClickHouse client: queries samples (evidence: `modules/schema_reader.py`)
- Schema manager → Schema cache: reads and writes (evidence: `modules/schema_manager.py`)
- Schema manager → ClickHouse client: fetches columns (evidence: `modules/schema_manager.py`)
- ClickHouse client → ClickHouse: queries (evidence: `modules/clickhouse_client.py`)
- AI generation → Schema manager: gets friendly names (evidence: `modules/llm_synthetic_generator.py`)
- AI generation → Azure OpenAI: requests completions (evidence: `modules/llm_synthetic_generator.py`)
