'action_if_completed' Meanings
'action_if_completed' can have any of the following values:
‘ignore' – not to update the activity and neither to insert a new activity:
new activity is never created
command is rejected with 'appointment status is not pending' error
‘update' – update existing activity
new activity is never created
existing activity is updated
'create’– always create a new activity, unless an existing activity is 'started'
'cancelled' by user, 'completed' and 'not done' activities are ignored – new activity is created
'started' activity properties are updated
'create_if_reassign_or_reschedule' – create activity with new date or 'provider/provider_group' (= 'create_as_new' and default)
if date specified for the transaction is different from the one specified for the started activity, a new 'pending' activity is created
if date OR provider/provider group specified for the transaction is different from the one specified for 'cancelled' by user, 'completed' or 'not done', a new 'pending' activity is created
in other cases, the existing activity is updated
Note: If 'head/appointment/action_if_completed' value of the request contradicts 'command/appointment/appointment/action_if_completed' value, the meaning defined for the command should take precedence.