Logic - Departure Report
IF Departure Report
Initial Port Call Locator
If vessel is reporting voyage reference number and reason for call:ÂThe first port call for reported vessel code, reference number, reason for call and port that is not budget and not estimate.Â
If not port call is found then use exception:Â No port call found for this combination of vessel, voyage number, reason for call and port where departure fixed is not set.
If vessel is not reporting voyage reference number and reason for call:ÂThe first port call for a vessel code that is not budget, not estimate, not redelivery, event is departure, event log date (departure date) > report date from vessel report.Â
If no port call is found then use exception:Â No departure port call found for the reported date and vessel.
A port call in Dataloy VMS can be registered multiple times after each other with different reason for calls. The Dataloy VRS rule for Departure Reports is to update arrival and berthing date for the first port call that is not a redelivery port call and the departure date for the last port call that is not a redelivery port call. The report should be inserted to the last port call. This action also controls if the departure date of the previous port call is fixed. If the departure date for a previous port call is not fixed, then VRS will assume that this is the port call to update (see Step 2).
- Locate Previous Non-Redelivery Port Call but has Port not Equal to Located Port Call in Step 1
- IF previous port calls departure date from Step 2Â is fixed:
- Locate last port call where port is equal to the port located in Step 1.
- IF departure date for port from Step 2ai is not fixed: choose this port call as the port call to update.
- IF departure date for port from Step 2aiis fixed: throw exception Can not find a matching departure port.
- IF previous port calls departure date from Step 2 is not fixed:
- Choose previous port call as the main port call where the vessel report should be inserted.
- Get the next port call for the port call located in Steps 2a or 2b (is the next arrival port call).
- If no arrival port call is found: throw exception Can not find next arrival port call.Â