# sansukumar22j24-hash/doctorappoimtmentsystem architecture

> Architecture diagram of the GitHub repository sansukumar22j24-hash/doctorappoimtmentsystem, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sansukumar22j24-hash/doctorappoimtmentsystem
- Repository: https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem

## Overview

This is a small console-based doctor appointment example. The user enters symptoms and a doctor type; Main creates a patient, selects a general or special doctor, books an appointment, and displays the fee and appointment ID. Doctor holds appointment data and a patient reference, and reads the patient’s symptoms when booking. The graph reflects the shown code; it does not infer behavior from the empty README.

Main entry points: [`Main.java`](https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/Main.java) (Main workflow), [`Doctor.java`](https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/Doctor.java) (Doctor base), [`DoctorInterface.java`](https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/DoctorInterface.java) (Doctor contract), [`Patient.java`](https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/Patient.java) (Patient state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Console workflow"]
  node_main["Main workflow<br/>[Main.java]"]
end

subgraph group_domain["Appointment domain"]
  node_patient["Patient state<br/>[Patient.java]"]
  node_patient_api["Patient contract"]
  node_doctor["Doctor base<br/>[Doctor.java]"]
  node_doctor_api["Doctor contract"]
  node_general["General doctor<br/>[GeneralDoctor.java]"]
  node_general_api["General contract"]
  node_special["Special doctor<br/>[SpecialDoctor.java]"]
  node_special_api["Special contract"]
end

node_user(("Console user"))

node_user -->|"enters details"| node_main
node_main -->|"creates and updates"| node_patient
node_main -->|"creates or selects"| node_general
node_main -->|"creates or selects"| node_special
node_main -->|"books and reads details"| node_doctor_api
node_main -->|"stores doctor reference"| node_patient
node_doctor -->|"reads symptoms"| node_patient_api
node_general -->|"extends"| node_doctor
node_special -->|"extends"| node_doctor
node_patient -->|"implements"| node_patient_api
node_doctor -->|"implements"| node_doctor_api
node_general_api -->|"extends"| node_doctor_api
node_special_api -->|"extends"| node_doctor_api

click node_main "https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/Main.java"
click node_patient "https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/Patient.java"
click node_patient_api "https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/PatientInterface.java"
click node_doctor "https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/Doctor.java"
click node_doctor_api "https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/DoctorInterface.java"
click node_general "https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/GeneralDoctor.java"
click node_general_api "https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/GeneralDoctorInterface.java"
click node_special "https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/SpecialDoctor.java"
click node_special_api "https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/SpecialDoctorInterface.java"

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_main,node_user toneBlue
class node_patient,node_patient_api,node_doctor,node_doctor_api,node_general,node_general_api,node_special,node_special_api toneAmber
```

## Components

### Console workflow

- [Main workflow](https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/Main.java): `Main.java`

### Appointment domain

- [Patient state](https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/Patient.java): `Patient.java`
- [Patient contract](https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/PatientInterface.java): `PatientInterface.java`
- [Doctor base](https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/Doctor.java): `Doctor.java`
- [Doctor contract](https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/DoctorInterface.java): `DoctorInterface.java`
- [General doctor](https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/GeneralDoctor.java): `GeneralDoctor.java`
- [General contract](https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/GeneralDoctorInterface.java): `GeneralDoctorInterface.java`
- [Special doctor](https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/SpecialDoctor.java): `SpecialDoctor.java`
- [Special contract](https://github.com/sansukumar22j24-hash/doctorappoimtmentsystem/blob/main/SpecialDoctorInterface.java): `SpecialDoctorInterface.java`

### Other components

- **Console user**

## Connections

- Console user → Main workflow: enters details (evidence: `Main.java`)
- Main workflow → Patient state: creates and updates (evidence: `Main.java`)
- Main workflow → General doctor: creates or selects (evidence: `Main.java`)
- Main workflow → Special doctor: creates or selects (evidence: `Main.java`)
- Main workflow → Doctor contract: books and reads details (evidence: `Main.java`)
- Main workflow → Patient state: stores doctor reference (evidence: `Main.java`)
- Doctor base → Patient contract: reads symptoms (evidence: `Doctor.java`)
- General doctor → Doctor base: extends (evidence: `GeneralDoctor.java`)
- Special doctor → Doctor base: extends (evidence: `SpecialDoctor.java`)
- Patient state → Patient contract: implements (evidence: `Patient.java`)
- Doctor base → Doctor contract: implements (evidence: `Doctor.java`)
- General contract → Doctor contract: extends (evidence: `GeneralDoctorInterface.java`)
- Special contract → Doctor contract: extends (evidence: `SpecialDoctorInterface.java`)
