# priyaranjankumar/hospitalrepositorysytem architecture

> Architecture diagram of the GitHub repository priyaranjankumar/hospitalrepositorysytem, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/priyaranjankumar/hospitalrepositorysytem
- Repository: https://github.com/priyaranjankumar/hospitalrepositorysytem

## Overview

##### Project type and purpose
- This is a mainframe–based transactional application (“Hospital Repository System”) built in COBOL/CICS/DB2 with JCL for batch jobs.
- Purpose: manage patient, doctor, donor data in real time (via CICS online transactions) and produce reports (via batch JCL jobs).

##### File structure
- Top-level directories:
- Mapset/B18MPS1 – CICS map definitions (screen layouts)
- Programs/B18PGM1…B18PGM6 – COBOL transaction and report programs
- Tables/CRTTAB – DB2 DDL scripts for table creation
- Screens – UI screenshots (for reference)
- README confirms key technologies (COBOL, CICS, DB2, JCL) and workflows (online vs. batch).

##### Key insights from the README
- Online transaction flow via CICS; batch processing via JCL
- DB2 is the single source of persistent data
- System modules correspond directly to Programs/B18PGMx for patients, doctors, donors, reports

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Online Transaction Processing Layer
    subgraph "Online Transaction Processing"
        direction TB
        Terminal["Terminal (3270)"]:::online
        ScreensNode["UI Reference Screens"]:::ui
        MapsetNode["CICS Map Definitions\n(Mapset/B18MPS1)"]:::ui
        CICS["CICS TS Region"]:::online
        B18PGM1["B18PGM1 PatientMgmt"]:::online
        B18PGM2["B18PGM2 DoctorMgmt"]:::online
        B18PGM3["B18PGM3 DonorMgmt"]:::online
    end

    %% Batch Processing Layer
    subgraph "Batch Processing"
        direction TB
        JES["JES Queue / Scheduler"]:::batch
        JCL["JCL Subsystem"]:::batch
        B18PGM4["B18PGM4 ReportGen1"]:::batch
        B18PGM5["B18PGM5 ReportGen2"]:::batch
        B18PGM6["B18PGM6 Auxiliary"]:::batch
        Output["Report Output\n(SYSOUT / Printers)"]:::doc
    end

    %% Data Layer
    subgraph "Data Layer"
        direction TB
        DB2["DB2 HOSPITALDB"]:::db
        TablesNode["DB2 Table Creation Scripts\n(Tables/CRTTAB)"]:::db
    end

    %% README
    ReadmeNode["Project Overview and Build Instructions\n(README.md)"]:::doc

    %% Relationships
    Terminal -->|"uses screens"| MapsetNode
    MapsetNode -->|"dispatched by"| CICS
    Terminal -->|"user request"| CICS
    CICS -->|"calls EXEC CICS"| B18PGM1
    CICS -->|"calls EXEC CICS"| B18PGM2
    CICS -->|"calls EXEC CICS"| B18PGM3
    B18PGM1 -->|"SQL operations"| DB2
    B18PGM2 -->|"SQL operations"| DB2
    B18PGM3 -->|"SQL operations"| DB2

    JES -->|"schedules jobs"| JCL
    JCL -->|"runs batch program"| B18PGM4
    JCL -->|"runs batch program"| B18PGM5
    JCL -->|"runs batch program"| B18PGM6
    B18PGM4 -->|"SQL operations"| DB2
    B18PGM5 -->|"SQL operations"| DB2
    B18PGM6 -->|"SQL operations"| DB2
    B18PGM4 -->|"generates"| Output
    B18PGM5 -->|"generates"| Output

    %% Reference connections
    ScreensNode -.-> Terminal
    TablesNode -.-> DB2
    ReadmeNode -.-> CICS

    %% Click Events
    click MapsetNode "https://github.com/priyaranjankumar/hospitalrepositorysytem/tree/main/Mapset/B18MPS1"
    click B18PGM1 "https://github.com/priyaranjankumar/hospitalrepositorysytem/tree/main/Programs/B18PGM1"
    click B18PGM2 "https://github.com/priyaranjankumar/hospitalrepositorysytem/tree/main/Programs/B18PGM2"
    click B18PGM3 "https://github.com/priyaranjankumar/hospitalrepositorysytem/tree/main/Programs/B18PGM3"
    click B18PGM4 "https://github.com/priyaranjankumar/hospitalrepositorysytem/tree/main/Programs/B18PGM4"
    click B18PGM5 "https://github.com/priyaranjankumar/hospitalrepositorysytem/tree/main/Programs/B18PGM5"
    click B18PGM6 "https://github.com/priyaranjankumar/hospitalrepositorysytem/tree/main/Programs/B18PGM6"
    click TablesNode "https://github.com/priyaranjankumar/hospitalrepositorysytem/tree/main/Tables/CRTTAB"
    click ScreensNode "https://github.com/priyaranjankumar/hospitalrepositorysytem/tree/main/Screens"
    click ReadmeNode "https://github.com/priyaranjankumar/hospitalrepositorysytem/blob/main/README.md"

    %% Styles
    classDef online fill:#E3F2FD, stroke:#90CAF9, stroke-width:2px;
    classDef batch fill:#FFF3E0, stroke:#FFB74D, stroke-width:2px;
    classDef db fill:#E8F5E9, stroke:#A5D6A7, stroke-width:2px;
    classDef ui fill:#F3E5F5, stroke:#CE93D8, stroke-width:2px;
    classDef doc fill:#FBE9E7, stroke:#FFCCBC, stroke-width:2px;
```
