# saisid6798/clinical-trial-programming-portfolio architecture

> Architecture diagram of the GitHub repository saisid6798/clinical-trial-programming-portfolio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/saisid6798/clinical-trial-programming-portfolio
- Repository: https://github.com/saisid6798/clinical-trial-programming-portfolio

## Overview

#### 1. Purpose and Execution Model
This is a SAS 9.4 clinical-programming portfolio implementing a batch pipeline from simulated clinical raw data through CDISC SDTM and ADaM datasets to regulatory-style tables, listings, and figures. There is no application runtime or service layer; SAS programs are the operational entry points, with PDFs/logs/RTFs serving as preserved execution and validation evidence.

#### 2. Raw Clinical Data Boundary
The pipeline begins with source CRF extracts, primarily SAS datasets, under `SDTM/CRF_Data/`. These include subject, adverse-event, exposure, disposition, medical-history, and vital-sign sources such as `SDTM/CRF_Data/dm.sas7bdat`, `SDTM/CRF_Data/ae.sas7bdat`, and `SDTM/CRF_Data/ex.sas7bdat`. This directory is the source-data boundary; it also contains `SDTM/CRF_Data/se.xpt`, a transport-format input.

#### 3. SDTM Standardization Stage
SDTM programming transforms CRF inputs into CDISC tabulation domains, focused on DM, DS, EX, MH, and VS. The surviving implementation artifacts are PDF exports at `SDTM/SAS_Code/DM_Code.pdf`, `SDTM/SAS_Code/EX_Code.pdf`, and `SDTM/SAS_Code/VS_Code.pdf`; their corresponding run evidence is in `SDTM/SAS_Log/`. Resulting standardized data is consumed downstream as XPT transport files, notably `ADAM/Data_SDTM/DM.xpt`, `ADAM/Data_SDTM/AE.xpt`, and `ADAM/Data_SDTM/LB.xpt`.

#### 4. SDTM Transport and Domain Integration
`ADAM/Data_SDTM/` is the handoff boundary between tabulation and analysis layers. It contains core SDTM domains plus supplemental qualifiers and trial-design metadata: e.g., `ADAM/Data_SDTM/SUPPDM.xpt`, `ADAM/Data_SDTM/TA.xpt`, and `ADAM/Data_SDTM/TE.xpt`. ADaM derivations therefore integrate subject-level, event, lab, exposure, and trial-design data rather than relying only on the five demonstrated SDTM generation domains.

#### 5. ADaM Analysis Dataset Stage
Analysis programming derives five analysis-ready datasets: subject-level ADSL, adverse events ADAE, baseline lab ADLBSI, time-to-event ADTTE, and exposure ADEX. Entrypoints are preserved as `ADAM/SAS_Code/ADSL_ADAM_Code.pdf`, `ADAM/SAS_Code/ADTTE_ADAM_Code.pdf`, and `ADAM/SAS_Code/ADEX_ADAM_Code.pdf`. This is the key analytical boundary: SDTM variables are transformed into population/treatment flags, baseline and study-day concepts, and time-to-event measures for statistical reporting.

#### 6. Independent Validation and Audit Evidence
Validation is artifact-based and uses SAS PROC COMPARE, with parallel comparison reports for each major SDTM and ADaM deliverable. Examples include `SDTM/SAS_PROC_COMPARE/DM_PROC_COMPARE.rtf`, `ADAM/SAS_PROC_COMPARE/ADAE_PROC_COMPARE_ADAM.rtf`, and `ADAM/SAS_PROC_COMPARE/ADTTE_PROC_COMPARE_ADAM.rtf`. Execution logs—such as `ADAM/SAS_Log/ADSL_ADAM_Log.pdf`—provide a second control boundary for warnings/errors and reproducibility.

#### 7. TLF Reporting Stage
Seven SAS reporting jobs form the final entry points: `TLF/SAS_Code/1.TLF_Creation.sas` through `TLF/SAS_Code/7.TLF_Creation.sas`. They consume analysis datasets conceptually and apply SAS reporting/statistical procedures (including reporting, survival, Cox modeling, and plotting). Deliverables are persisted as RTF and, once, HTML—for example `TLF/SAS_Output/Output_1.rtf`, `TLF/SAS_Output/Output_5.html`, and `TLF/SAS_Output/Output_7.rtf`—with matching logs in `TLF/SAS_Log/`.

Main entry points: [`TLF/SAS_Code/1.TLF_Creation.sas`](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/TLF/SAS_Code/1.TLF_Creation.sas) (TLF creation jobs), [`SDTM/SAS_Code/DM_Code.pdf`](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/SDTM/SAS_Code/DM_Code.pdf) (SDTM domain programs), [`ADAM/SAS_Code/ADSL_ADAM_Code.pdf`](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/ADAM/SAS_Code/ADSL_ADAM_Code.pdf) (ADaM derivation programs), [`ADAM/SAS_PROC_COMPARE/ADAE_PROC_COMPARE_ADAM.rtf`](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/ADAM/SAS_PROC_COMPARE/ADAE_PROC_COMPARE_ADAM.rtf) (ADaM compare reports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sdtm["SDTM tabulation"]
  node_crf[("CRF source extracts<br/>SAS/XPT data<br/>[dm.sas7bdat]")]
  node_sdtm_code["SDTM domain programs<br/>SAS program exports<br/>[DM_Code.pdf]"]
  node_sdtm_domains[("SDTM domains<br/>CDISC tabulations")]
  node_sdtm_handoff[("SDTM transport package<br/>XPT handoff<br/>[DM.xpt]")]
end

subgraph group_adam["ADaM analysis"]
  node_adam_code["ADaM derivation programs<br/>SAS program exports<br/>[ADSL_ADAM_Code.pdf]"]
  node_analysis_concepts["Analysis derivations<br/>analysis logic"]
  node_adsl[("ADSL<br/>ADaM subject-level")]
  node_adae[("ADAE<br/>ADaM adverse events")]
  node_adlpsi[("ADLBSI<br/>ADaM baseline labs")]
  node_adtte[("ADTTE<br/>ADaM time-to-event")]
  node_adex[("ADEX<br/>ADaM exposure")]
end

subgraph group_tlf["TLF reporting"]
  node_tlf_jobs["TLF creation jobs<br/>SAS reporting jobs<br/>[1.TLF_Creation.sas]"]
  node_stat_reporting["Statistical reporting<br/>SAS procedures"]
  node_tlf_outputs["Regulatory-style outputs<br/>RTF and HTML<br/>[Output_1.rtf]"]
end

subgraph group_evidence["Validation evidence"]
  node_sdtm_logs["SDTM execution logs<br/>SAS logs<br/>[DM_Log.pdf]"]
  node_sdtm_compare["SDTM compare reports<br/>PROC COMPARE"]
  node_adam_logs["ADaM execution logs<br/>SAS logs<br/>[ADSL_ADAM_Log.pdf]"]
  node_adam_compare["ADaM compare reports<br/>PROC COMPARE"]
  node_tlf_logs["TLF execution logs<br/>SAS logs<br/>[Output_1.log]"]
end

node_crf -->|"source inputs"| node_sdtm_code
node_sdtm_code -->|"standardizes"| node_sdtm_domains
node_sdtm_domains -->|"exports XPT"| node_sdtm_handoff
node_sdtm_code -.->|"run evidence"| node_sdtm_logs
node_sdtm_domains -.->|"compared"| node_sdtm_compare
node_sdtm_handoff -->|"integrated inputs"| node_adam_code
node_adam_code -->|"derives"| node_analysis_concepts
node_analysis_concepts -->|"subject analysis"| node_adsl
node_analysis_concepts -->|"event analysis"| node_adae
node_analysis_concepts -->|"lab analysis"| node_adlpsi
node_analysis_concepts -->|"time-to-event"| node_adtte
node_analysis_concepts -->|"exposure analysis"| node_adex
node_adam_code -.->|"run evidence"| node_adam_logs
node_adsl -.->|"validated"| node_adam_compare
node_adae -.->|"validated"| node_adam_compare
node_adtte -.->|"validated"| node_adam_compare
node_adsl -->|"analysis input"| node_tlf_jobs
node_adae -->|"analysis input"| node_tlf_jobs
node_adlpsi -->|"analysis input"| node_tlf_jobs
node_adtte -->|"analysis input"| node_tlf_jobs
node_adex -->|"analysis input"| node_tlf_jobs
node_tlf_jobs -->|"executes"| node_stat_reporting
node_stat_reporting -->|"produces"| node_tlf_outputs
node_tlf_jobs -.->|"run evidence"| node_tlf_logs

click node_crf "https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/SDTM/CRF_Data/dm.sas7bdat"
click node_sdtm_code "https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/SDTM/SAS_Code/DM_Code.pdf"
click node_sdtm_handoff "https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/ADAM/Data_SDTM/DM.xpt"
click node_sdtm_logs "https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/SDTM/SAS_Log/DM_Log.pdf"
click node_sdtm_compare "https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/SDTM/SAS_PROC_COMPARE/DM_PROC_COMPARE.rtf"
click node_adam_code "https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/ADAM/SAS_Code/ADSL_ADAM_Code.pdf"
click node_adam_logs "https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/ADAM/SAS_Log/ADSL_ADAM_Log.pdf"
click node_adam_compare "https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/ADAM/SAS_PROC_COMPARE/ADAE_PROC_COMPARE_ADAM.rtf"
click node_tlf_jobs "https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/TLF/SAS_Code/1.TLF_Creation.sas"
click node_tlf_outputs "https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/TLF/SAS_Output/Output_1.rtf"
click node_tlf_logs "https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/TLF/SAS_Log/Output_1.log"

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_crf,node_sdtm_code,node_sdtm_domains,node_sdtm_handoff toneBlue
class node_adam_code,node_analysis_concepts,node_adsl,node_adae,node_adlpsi,node_adtte,node_adex toneAmber
class node_tlf_jobs,node_stat_reporting,node_tlf_outputs toneMint
class node_sdtm_logs,node_sdtm_compare,node_adam_logs,node_adam_compare,node_tlf_logs toneRose
```

## Components

### SDTM tabulation

- [CRF source extracts](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/SDTM/CRF_Data/dm.sas7bdat): SAS/XPT data · Raw clinical source-data boundary. · `SDTM/CRF_Data/dm.sas7bdat`
- [SDTM domain programs](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/SDTM/SAS_Code/DM_Code.pdf): SAS program exports · Transforms CRF data into CDISC domains. · `SDTM/SAS_Code/DM_Code.pdf`
- **SDTM domains**: CDISC tabulations · DM, DS, EX, MH, and VS standard domains.
- [SDTM transport package](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/ADAM/Data_SDTM/DM.xpt): XPT handoff · Domains, supplemental qualifiers, and trial design metadata. · `ADAM/Data_SDTM/DM.xpt`

### ADaM analysis

- [ADaM derivation programs](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/ADAM/SAS_Code/ADSL_ADAM_Code.pdf): SAS program exports · Derives analysis-ready datasets and analysis variables. · `ADAM/SAS_Code/ADSL_ADAM_Code.pdf`
- **Analysis derivations**: analysis logic · Population and treatment flags, baselines, study days, and event times.
- **ADSL**: ADaM subject-level
- **ADAE**: ADaM adverse events
- **ADLBSI**: ADaM baseline labs
- **ADTTE**: ADaM time-to-event
- **ADEX**: ADaM exposure

### TLF reporting

- [TLF creation jobs](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/TLF/SAS_Code/1.TLF_Creation.sas): SAS reporting jobs · Seven table, listing, and figure entry points. · `TLF/SAS_Code/1.TLF_Creation.sas`
- **Statistical reporting**: SAS procedures · Reporting, survival, Cox modeling, and plotting.
- [Regulatory-style outputs](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/TLF/SAS_Output/Output_1.rtf): RTF and HTML · Persisted tables, listings, and figures. · `TLF/SAS_Output/Output_1.rtf`

### Validation evidence

- [SDTM execution logs](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/SDTM/SAS_Log/DM_Log.pdf): SAS logs · `SDTM/SAS_Log/DM_Log.pdf`
- [SDTM compare reports](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/SDTM/SAS_PROC_COMPARE/DM_PROC_COMPARE.rtf): PROC COMPARE · Independent domain comparison evidence. · `SDTM/SAS_PROC_COMPARE/DM_PROC_COMPARE.rtf`
- [ADaM execution logs](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/ADAM/SAS_Log/ADSL_ADAM_Log.pdf): SAS logs · Reproducibility and warning/error evidence. · `ADAM/SAS_Log/ADSL_ADAM_Log.pdf`
- [ADaM compare reports](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/ADAM/SAS_PROC_COMPARE/ADAE_PROC_COMPARE_ADAM.rtf): PROC COMPARE · Independent analysis-dataset comparison evidence. · `ADAM/SAS_PROC_COMPARE/ADAE_PROC_COMPARE_ADAM.rtf`
- [TLF execution logs](https://github.com/saisid6798/clinical-trial-programming-portfolio/blob/main/TLF/SAS_Log/Output_1.log): SAS logs · `TLF/SAS_Log/Output_1.log`

## Connections

- CRF source extracts → SDTM domain programs: source inputs
- SDTM domain programs → SDTM domains: standardizes
- SDTM domains → SDTM transport package: exports XPT
- SDTM domain programs → SDTM execution logs: run evidence
- SDTM domains → SDTM compare reports: compared
- SDTM transport package → ADaM derivation programs: integrated inputs
- ADaM derivation programs → Analysis derivations: derives
- Analysis derivations → ADSL: subject analysis
- Analysis derivations → ADAE: event analysis
- Analysis derivations → ADLBSI: lab analysis
- Analysis derivations → ADTTE: time-to-event
- Analysis derivations → ADEX: exposure analysis
- ADaM derivation programs → ADaM execution logs: run evidence
- ADSL → ADaM compare reports: validated
- ADAE → ADaM compare reports: validated
- ADTTE → ADaM compare reports: validated
- ADSL → TLF creation jobs: analysis input
- ADAE → TLF creation jobs: analysis input
- ADLBSI → TLF creation jobs: analysis input
- ADTTE → TLF creation jobs: analysis input
- ADEX → TLF creation jobs: analysis input
- TLF creation jobs → Statistical reporting: executes
- Statistical reporting → Regulatory-style outputs: produces
- TLF creation jobs → TLF execution logs: run evidence
