The Book Appointment use case represents a common scenario in healthcare or service-based systems, where a patient or client selects an available timeslot, confirms their details, and finalizes the booking. This example shows how the AI Sequence Diagram Refinement Tool can break down the process into focused sub-diagrams, making it easier to explore specific interactions such as scheduling, rescheduling, or verifying availability.

Paste the PlantUML code of the use case diagram into the editor. The preview will instantly render on the right, allowing you to see the full appointment booking flow. From there, you can begin a quick analysis by pressing the Analyze Diagram button.
PlantUML Exampl:
@startuml
' Use Case Diagram for Hospital Management System
left to right direction
' Define actors
actor "Patient" as patient
actor "Doctor" as doctor
actor "Admin Staff" as staff
' Define system boundary (Hospital Management System)
rectangle "Hospital Management System" {
' Primary use cases
usecase "Book Appointment" as UC1
usecase "View Medical Records" as UC2
usecase "Update Medical Records" as UC3
usecase "Generate Bill" as UC4
usecase "Process Payment" as UC5
' Secondary use cases for relationships
usecase "Login" as SUC1
usecase "Verify Insurance" as SUC2
usecase "Send Notification" as SUC3
}
' Actor associations
patient --> UC1
patient --> UC2
patient --> UC4
doctor --> UC2
doctor --> UC3
staff --> UC4
staff --> UC5
' Include relationships
UC1 .> SUC1 : <<include>>
UC2 .> SUC1 : <<include>>
UC3 .> SUC1 : <<include>>
UC4 .> UC5 : <<include>>
UC4 .> SUC2 : <<include>>
' Extend relationships
SUC3 .> UC1 : <<extend>>
SUC3 .> UC4 : <<extend>>
@enduml

The diagram is automatically turned into a table format. This makes it simple to read through the actors, relationships, and extended or included use cases without needing to interpret the diagram visually. It provides a structured way to verify all system interactions.

Choose Book Appointment as the base use case. The tool extracts all related include and extend connections to build a smaller, focused diagram that highlights only the relevant parts of the system.

Click Generate Sub-Diagram to produce a simplified PlantUML diagram that highlights only the Book Appointment use case and its relationships. The diagram will be updated in the preview area, showing a clear view of the main flow.

Once the sub-diagram is generated, you can continue working with it in different ways:
