@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":NoteCommandParser" as NoteCommandParser LOGIC_COLOR
participant "nc:NoteCommand" as NoteCommand LOGIC_COLOR
participant "r:CommandResult" as CommandResult LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant "m:Model" as Model MODEL_COLOR
end box

[-> LogicManager : execute("note 1 nt/Call nc/Anxious")
activate LogicManager

LogicManager -> AddressBookParser : parseCommand("note 1 nt/Call nc/Anxious")
activate AddressBookParser

create NoteCommandParser
AddressBookParser -> NoteCommandParser
activate NoteCommandParser

NoteCommandParser --> AddressBookParser
deactivate NoteCommandParser

AddressBookParser -> NoteCommandParser : parse("note 1 nt/Call nc/Anxious")
activate NoteCommandParser

create NoteCommand
NoteCommandParser -> NoteCommand
activate NoteCommand

NoteCommand --> NoteCommandParser :
deactivate NoteCommand

NoteCommandParser --> AddressBookParser : nc
deactivate NoteCommandParser
'Hidden arrow to position the destroy marker below the end of the activation bar.
NoteCommandParser -[hidden]-> AddressBookParser
destroy NoteCommandParser

AddressBookParser --> LogicManager : nc
deactivate AddressBookParser

LogicManager -> NoteCommand : execute(m)
activate NoteCommand

NoteCommand -> Model : setPatient(patientToEdit, editedPatient)
activate Model

Model --> NoteCommand
deactivate Model

create CommandResult
NoteCommand -> CommandResult
activate CommandResult

CommandResult --> NoteCommand
deactivate CommandResult

NoteCommand --> LogicManager : r
deactivate NoteCommand

[<--LogicManager
deactivate LogicManager
@enduml
