Logic - Noon, Arrival and In Port Report

IF Noon, Arrival OR In Port Report

  1. 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 no port call is found then return 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 return exception: No departure port call found for the reported date and vessel.


    1. Start with port call from Step 1, loop port calls backwards and locate the first port call where departure date is not fixed.
  2. Registering Port Calls in Dataloy VMS
    A port call in Dataloy VMS can be registered multiple times after each other with different reason for calls. The Dataloy VRS rule 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 first port call for Arrival and Noon and to the port call from Step 1 for In Port Reports.

    1. Get the last port call where the port is equal to the portCall.port from Step 1.
    2. Get the first port call where the port is equal to portCall.port from Step 1.
  3. IF Arrival OR Noon Report
    1. Choose the port call from Step 2b as the main port call where the vessel report should be inserted.
  4. IF In Port Report
    1. Choose the port call from Step 1 as the main port call where the vessel report should be inserted.