← Back to Index

TIP/MIS External Feed Processing

Comprehensive documentation of the TIP (Third-party Information Processing) and MIS external data feed pipelines — including all configuration tables, staging tables, stored procedures, validation logic, and SUPPLEMENTAL table integration.

1. Overview

TIP/MIS is the system that ingests data supplied by external classification societies, flag state registers, PSC inspection databases, shipbuilder return feeds, and other third-party maritime data providers. Incoming data is staged, compared against the live Lloyd's Register Fleet (LRF) database, validated, and — subject to analyst review or automatic rules — applied to the master ABSD_ tables.

The system serves two distinct consumer workflows:

ScaleOver 40 distinct external sources feed the system. Sources include NK (Nippon Kaiji Kyokai), DNV, RINA, RS (Russian Register), BKI, Bureau Veritas (XML), Malta Flag, Korea, PSC inspection data, Shipbuilder Returns (SBR), and many more. The staging tables alone represent thousands of inbound records per supply cycle.

2. Architecture — Two Processing Pipelines

TIP/MIS runs two distinct technical pipelines that serve the same logical purpose but operate differently:

Pipeline A — Classic (tblThirdPartyData)

The original field-level ETL pipeline. Each inbound field value is stored as an individual row in tblThirdPartyData, with explicit type columns (VarcharValue, IntValue, DecimalValue, DatetimeValue). Source-specific loading SPs translate raw staging table columns into these normalised rows. After load, comparison and validation SPs mark each record, and an analyst UI or auto-process job acts on unprocessed records.

Key sources: PSC, SBR (Shipbuilder Returns), NK, BV, RINA, DNV, Malta, all TIP_* table-backed sources.

Pipeline B — FlexTemp / Modern (tblTIPMISFlexTemp)

A key-value staging pipeline introduced to handle configurable external feeds without writing new loading code per source. Inbound data is stored as (KEY=LRNO, Source, SourceColumnName, ColumnValue) rows. A mapping table (tblTIPMISMappings) translates source column names to LR target fields. Business rules and manipulation rules engines apply transforms before validation and application.

Key sources: Sources managed via the MIS UI where field mapping is configured dynamically, not hard-coded.

Both pipelines share the same downstream action vocabulary (Keep / Learn / Overwrite / Insert) and the same configuration tables for validation rules and auto-process settings.

End-to-End Flow Diagram

EXTERNAL SOURCE FILE / TABLE
         │
         ▼
┌─────────────────────────────────────────────────────────────┐
│  PIPELINE A — Classic                                       │
│  TIP_*/BV_Xml/PSC source table  ──► spTIPPSCLoad           │
│                                      spImportSBRIntoTIP     │
│                                      (source-specific SPs)  │
│         ▼ INSERT rows                                       │
│  tblThirdPartyData                                          │
│  (LRNO, TableName, FieldName, Source, VarcharValue, ...)    │
└─────────────────────────────────────────────────────────────┘
         │
         ▼ (same for both pipelines after staging)
         │
┌─────────────────────────────────────────────────────────────┐
│  PIPELINE B — FlexTemp                                      │
│  CSV/Delimited file  ──► spTIPMISProcessSource (DataLoad)   │
│                           tblTIPMISMappings (field mapping) │
│         ▼ INSERT rows                                       │
│  tblTIPMISFlexTemp                                          │
│  (KEY=LRNO, Source, SourceColumnName, ColumnValue, ...)     │
│  spTIPMISHandleOnetoManyMappings                            │
│  spTIPMISManipulationRulesEngine  (DM transforms)          │
│  spTIPMISBusinessRule_Flextemp_Update  (BR validation)      │
└─────────────────────────────────────────────────────────────┘
         │
         ▼ (both pipelines converge)
         │
┌─────────────────────────────────────────────────────────────┐
│  LRNO DERIVATION (if needed)                                │
│  spTIPDeriveLRNO  ──► tblThirdPartyDeriveLRNO config        │
└─────────────────────────────────────────────────────────────┘
         │
         ▼
┌─────────────────────────────────────────────────────────────┐
│  PREVIOUS SUPPLY COMPARISON                                 │
│  spTIPMISProcessPreviousSupply                              │
│  — Marks Processed=2 if matches prior manual supply        │
│  — Marks Processed=1 if matches prior auto supply          │
│  — Marks older records for same field Processed=1 (superseded)│
└─────────────────────────────────────────────────────────────┘
         │
         ▼
┌─────────────────────────────────────────────────────────────┐
│  LRF CURRENT COMPARISON                                     │
│  spTIPMISProcessCurrentVarcharAgainstLRF                    │
│  — Dynamic SQL JOIN against live ABSD_ table               │
│  — Levenshtein distance OR exact collation match           │
│  — Marks Processed=1 if value already matches LRF          │
└─────────────────────────────────────────────────────────────┘
         │
         ▼
┌─────────────────────────────────────────────────────────────┐
│  VALIDATION                                                 │
│  spTIPMISValidateVarchar                                    │
│  — Min/Max length checks                                   │
│  — Regex pattern match (dbo.find_regular_expression)       │
│  — Sets Validated=0 (fail) or Validated=1 (pass)           │
└─────────────────────────────────────────────────────────────┘
         │
         ├──────────────────────────────────────────────────────┐
         ▼ (Processed=0, Validated=1: needs action)             ▼ (Auto)
┌─────────────────────────────┐        ┌──────────────────────────────┐
│  ANALYST REVIEW UI          │        │  AUTO PROCESSING             │
│  spTIPLRDataByField         │        │  spTIPAutoProcessVarcharValues│
│  — Shows current LRF value  │        │  — AutoOverwrite=ZeroOrNull   │
│  — Shows change history     │        │    or All per tblThirdParty   │
│  — Decode view lookup       │        │    AutoProcess                │
│  — TIPInd flag (pending)    │        │  — Calls spTIPProcessUpdate  │
└──────────────┬──────────────┘        └──────────────────────────────┘
               │ Analyst action
               ▼
┌─────────────────────────────────────────────────────────────┐
│  ACTION PROCESSING — spTIPProcessUpdate                     │
│  Keep    ► UPDATE tblThirdPartyData SET Processed=2         │
│  Learn   ► INSERT tblThirdPartyMatchedValues                │
│  Overwrite/Insert ► Dynamic UPDATE on ABSD_ table          │
│           EFD special case for G01_NAME / new-con vessels  │
│           B04_CNTY adds B04_TOWN from vwPortDecode          │
│           Marks Processed=2 on success                     │
└─────────────────────────────────────────────────────────────┘
         │
         ▼
ABSD_ MASTER TABLES UPDATED

3. Configuration Tables

tblThirdPartySource — Source Registry

Master registry of all external data sources. Every row in tblThirdPartyData has a FK to this table via Source.

ColumnTypeDescription
SourceNamevarchar PKShort source code (e.g. 'NK', 'PSC', 'BV', 'SBR', 'DNV')
SourceNotevarchar(500)Human-readable description of the source
DeleteCriteriavarchar(2000)SQL fragment used when purging old supply data
FileNameRulevarchar(255)Pattern/rule for expected incoming file name
ArchiveFoldervarchar(255)Path where processed source files are moved
RejectedFoldervarchar(255)Path where rejected/failed files are moved
MappingNamevarchar(255)For FlexTemp sources: the mapping name used in tblTIPMISMappings
SoftDeletedbit default 01 = source logically deleted but record retained
FlagSourcechar(3)3-character flag state code for flag register sources

tblThirdPartyData — Classic Pipeline Staging

Central staging table for the Classic pipeline. One row per field value per supply. Supports four data types in typed columns.

ColumnTypeDescription
DataIDint IDENTITY PKSurrogate key
LRNOchar(7)LR ship number (derived or supplied by source)
TableNamevarcharTarget ABSD_ table or virtual view name (e.g. 'ABSD_OVGE', 'vwTIPOwnerDetails')
FieldNamevarcharTarget field name (e.g. 'G01_NAME', 'B01_CALLSIGN')
Sourcevarchar FK→tblThirdPartySourceSource code
DateOriginateddatetimeDate the data was originated at the source (e.g. inspection date)
DateReceiveddatetimeDate the record was loaded into this table
VarcharValuevarchar(4000)String value (used for most fields)
IntValueintInteger value (e.g. gross tonnage)
DecimalValuedecimal(22,15)Decimal value (e.g. LOA, draught)
DatetimeValuedatetimeDate value
AnnotationvarcharOptional annotation text
Validatedtinyint0=failed validation, 1=passed (default)
Processedtinyint default 00=pending, 1=matched/auto-processed, 2=manually reviewed/kept/overwritten
ValidatedForAutoUpdatebit1=cleared for auto-update (no SP override needed)
DoNotAutoProcessbit default 01=excluded from nightly auto-processing
EmailAlertSentbit1=exception email already sent for this record
OWCODEvarchar default 'n/a'Owner code for owner-type fields
PortIDvarchar default 'n/a'Port identifier for port-type fields
MultipartKeyPart3varchar3rd part of multi-part key (e.g. SEQNO for history tables)
MultipartKeyPart4varchar4th part of multi-part key
AutoUpdateFailurevarchar(2000)Error message if auto-update attempt failed

Key Indexes

tblTIPMISFlexTemp — FlexTemp Pipeline Staging

Key-value staging table for the modern FlexTemp pipeline. Each row holds one source column value for one vessel in one supply batch.

ColumnTypeDescription
AutoIDint IDENTITY PKSurrogate key
KEYvarchar(7)LRNO — the vessel identifier
Sourcevarchar(10)Source code FK→tblThirdPartySource
SourceMonthvarchar(50)Month label of the supply (partitioning)
SourceYearvarchar(20)Year label of the supply (partitioning)
DateLoadeddatetimeTimestamp when batch was loaded
FileNamevarchar(30)Source file name this record came from
SourceColumnNamevarchar(100)Column name as supplied by source (before mapping)
ColumnNamevarchar(30)Mapped LR field name (populated by mapping engine)
TableNamevarchar(50)Target ABSD_ table name (populated by mapping engine)
ColumnValuevarchar(8000)The actual data value (all types stored as string)
Criteria1varchar(50)Additional filter criterion 1 (e.g. SEQNO)
Criteria2varchar(50)Additional filter criterion 2
Validatedtinyint default 11=pass, 0=fail length/regex, 2=BR fail, 3/4/5=other fail codes
Processedtinyint default 00=pending, 1=matched/applied, 2=matched to previous manual
ValidationFailureReasonvarchar(255)Human-readable reason for validation failure

Key Indexes

tblTIPMISMappings — FlexTemp Field Mapping

Maps source column names to LR target field names for each FlexTemp source. The Mapped flag controls processing behaviour.

ColumnTypeMapped Values & Meaning
MappingIDint IDENTITY PKSurrogate key
SourceNamevarchar(100)Source code
SourceFieldNamevarchar(100)Column name in the source file as received
MainGroupvarchar(255)Display grouping (from tblTIPMISFieldGlossaryMainGroup)
SubGroupvarchar(255)Display sub-grouping
FieldNamevarchar(50)LR target field name (after mapping)
Mappedvarchar(2)'Y'=mapped to LR field; 'N'=received but unmapped; 'K'=key field (LRNO identifier)
TableNamevarchar(255)Target ABSD_ table name

tblThirdPartyValidation — Validation Rules per Field

One row per (TableName, FieldName) combination defining all validation and processing rules for that field in the Classic pipeline.

ColumnTypeDescription
TableName + FieldName + PrecedenceComposite PKIdentifies the target field; Precedence allows multiple rule sets
RegularExpressionvarchar(255)Regex pattern applied via dbo.find_regular_expression
RegularExpressionLenintExpected match length appended as {n} suffix to the regex
MinLength / MaxLengthintAllowed string length bounds; values outside → Validated=0
MinimumValue / MaximumValuedecimalNumeric range for int/decimal fields
AllowedPercentageVariationdecimalPercentage tolerance for numeric comparisons
LevensteinEditDistanceMaxintIf >0, use Levenshtein distance ≤ this value for LRF comparison instead of exact match
StoredProcedurevarchar(500)Override SP called before standard validation (e.g. spValidateMMSI)
HistStoredProcedurevarchar(500)Historical data SP override
SequenceNumberColumnvarchar(50)Column name holding SEQNO in multi-row target tables (e.g. ABSD_HIFL)
CurrentOrFirstSequencevarchar(3)Which SEQNO to target for auto-update (e.g. '00' = primary record)
EffDateFieldvarchar(50)Column name of the effective date field for display/update
AnnotationNamevarchar(50)English field name used in tblChanges annotation entries
DecodeViewvarchar(500)View name providing Code→Decode lookup for coded fields (e.g. flag, ship type)
ProcessOrderintSequence for auto-processing when field order matters
MultiPartKeyPart3 / 4varcharAdditional key column names for multi-part keyed tables
Updatablebit1=field can be overwritten by TIP; 0=read-only in this context
EmailExceptionsTovarcharEmail address for exception alerts on this field

tblThirdPartyAutoProcess — Auto-Update Rules

Defines which (Source, TableName, FieldName) combinations are eligible for nightly automated processing, and the overwrite mode.

ColumnTypeDescription
SourceNamevarchar PK (part)FK→tblThirdPartySource
TableNamevarchar PK (part)Target ABSD_ table
FieldNamevarchar PK (part)Target field; also FK→tblThirdPartyValidation
AutoOverwritevarchar FK→tblThirdPartyOverwrites'ZeroOrNull'=only update if LRF value is null or 'U'; 'All'=always overwrite
PrecedenceintSource priority when multiple sources supply same field

tblThirdPartyMatchedValues — Learned Value Mappings

Stores "learned" mappings between source values and the LR canonical values that analysts have accepted. Used to automatically match future identical incoming values.

ColumnDescription
IDint IDENTITY PK
TableNameTarget ABSD_ table
FieldNameTarget field
SourceSource code
VarcharValueThe incoming source value (up to 4000 chars)
LRFValueThe accepted LRF canonical value

Business Rules & Manipulation Rules Engine Tables

tblTIPMISBrHdr / tblTIPMISBrDtl — Business Rules

Define validation rules that operate on FlexTemp data. Rules are evaluated per field per source; records failing a rule have their Validated set to 2 with RuleErrorMsg.

ColumnTableDescription
RuleIDHdrPK; int IDENTITY
RuleNameHdr/DtlDescriptive name of the rule
RuleSQLScriptHdrFull dynamic SQL that returns AutoIDs of rows passing the rule
SourceHdrComma-separated source codes, or 'ALL' for all sources
RuleErrorMsgHdrMessage stored in ValidationFailureReason when rule is violated
SoftDeletedHdr1=rule disabled
DisplayFieldNameDtlFK→vwTIPMISFieldGlossary.DisplayFieldName; field the rule applies to
Operator / ValueType / ActualValue / ConditionDtlRule detail parameters for the multi-source rule variant

tblTIPMISManipulationHdr / tblTIPMISManipulationDtl — Data Manipulation Rules

Define field transformation rules applied before validation in the FlexTemp pipeline. Supports concatenation, replacement, and custom SQL transforms.

ColumnTableDescription
RuleIDHdrPK; int IDENTITY
RuleNameHdrDescriptive name
RuleSQLScriptHdrFull SELECT SQL producing transformed values
SourceHdrApplicable source codes
RuleFieldHdrTarget field(s)
QueryFlagHdrchar(1) flag controlling execution mode
Approved / SoftDeletedHdrApproval/active flags
DateRuleAppliedHdrLast execution timestamp
RuleDetailIDDtlPK; int IDENTITY
FunctionDtlTransform function name (e.g. REPLACE, SUBSTRING, CONVERT)
FunctionValueTo / FunctionValueForDtlParameters for the transform function
ConcatenatedDtlbit; 1=this detail is a concatenation step
SeperatorDtlSeparator string for concatenation

tblThirdPartyDeriveLRNO and supporting tables

Configuration for the LRNO derivation process when a source does not supply LRNO directly.

TableKey ColumnsPurpose
tblThirdPartyDeriveLRNOSourceNo, Source, SourceTableName, SourceIMoColumnNameMaster config: which source table to match from, which column holds the IMO/identifier
tblThirdPartyDeriveLRNO_ColumnsBatchNo, BatchSeq, ColumnExpressionJOIN column expressions with optional FunctionApplied transforms
tblThirdPartyDeriveLRNO_IHSCColumnIHSCColumnNameLR-side column name to match against
tblThirdPartyDeriveLRNO_IHSCTableIHSCTableNameLR-side table to match against
tblThirdPartyDeriveLRNOUpdatedLRNO, SourceTableName, SourceIMORecords derivation results for audit

4. External Source Tables

TIP_* Staging Tables (~40 tables)

Each external classification society or flag register that feeds the Classic pipeline has a dedicated raw staging table. Data is loaded from source files into these tables, then source-specific SPs or generic loading procedures translate them into tblThirdPartyData rows.

Known TIP_* tables:

TIP_Azerbaijan
TIP_Belize
TIP_BKI
TIP_Bulgaria
TIP_Canadian_FlagState
TIP_CKI
TIP_Cyprus
TIP_DNV
TIP_GEU
TIP_Honduras
TIP_IR_New
TIP_Kapow
TIP_KapowPanama
TIP_KapowSMC
TIP_KOL
TIP_Korea
TIP_Korea_Clean
TIP_LTH
TIP_Malta
TIP_Mongolia
TIP_Netherlands
TIP_NK_Ships
TIP_NK_Owners
TIP_RinaShip_Data
TIP_RinaEngines
TIP_RinaNewBuildings
TIP_RinaOwner_Details
TIP_RS
TIP_ShipBuilderReturns
TIP_SIE
TIP_StVincent
TIP_Swedish_FlagState
TIP_TL
TIP_TZZ
TIP_UKE
tblTIP_CCS
tblTIP_IOM
tblTIP_IR2
tblTIP_PAN3
tblTIP_TL2

TIP_NK_Ships — Example Column Structure (Nippon Kaiji Kyokai)

Illustrates the structure of a typical classification society supply table. All data columns are varchar to accommodate raw input without transformation.

ColumnDescription
AUTO_IDint IDENTITY PK
LRNOchar(7) — LR number (pre-matched by source or derived)
CLASS_NONK class number
SIGNAL_CODECall sign
FLAG_NAMEFlag state name
PORT_NAMEPort of registry
SHIP_ENAMEShip name in English
CLASS_CHAR / INST_CHAR / SP_DESCClass character, instructions, special descriptors
REG_GT / REG_NTRegistered gross and net tonnage
TM69_GT / TM69_NTTonnage Measurement 1969 values
ASGN_DW / ASGN_DRAFTAssigned deadweight and draft
LOALength overall
ENGINE_1..2 / ENGINE_POWER_1..2Engine details including manufacturer, power, RPM, bore/stroke
BOILER_1..3Boiler details (pressure, evaporation, manufacturer)
YARD_NAME_1..2 / HULL_NO_1..2Shipyard and hull number
KEEL_LAID_DATE / LAUNCH_DATE / COMPLETE_DATE / RC_COMP_DATEConstruction milestone dates

BV XML Supply Tables — Bureau Veritas

Bureau Veritas supplies data as XML files which are parsed into a family of related tables. All columns are varchar(1000) to accommodate the XML-extracted raw values.

TableKey Columns
BV_XmlDataSupply_ShipsShipName, BVRegNo, LRNO, CallSign, Flag, ShipType, RegOwnName, ManName, ComOwnName, Port — plus full Dimensions (GT/NT/DWT/LOA/Breadth/Depth/Draught), Hull (YearOfBuild, Shipyard, HullNo, Compartments, Decks), Propulsion (Type, Builder, Units, Power kW/HP), Refrigerating installation, Last survey dates
BV_XmlDataSupply_EnginesEngine details per vessel: type, maker, power, cylinders, bore/stroke
BV_XmlDataSupply_OwnersOwner company details: name, BV code, address, country
BV_XmlDataSupply_NewBuildingsNew construction data: keel/launch/delivery dates, yard, hull number
BV_XmlDataSupply_BoilersBoiler specifications per vessel
BV_XmlDataSupply_DOCCompaniesDocument of Compliance company details

PSC & SBR — Internal-Source Loaders

spTIPPSCLoad — Port State Control Weekly Import

Loads inspection data from ABSD_INSPECTION (the internal PSC inspection table) into tblThirdPartyData. Pulls the most recent inspection per vessel within the last 2 weeks and extracts 7 field values per vessel.

Fields loaded per vessel from PSC:

TableName (virtual)FieldNameSource columnTransform
ABSD_OVNAG01_NAMEShipNamedbo.fnTidyShipname(UPPER(...))
ABSD_OVGEB01_CALLSIGNcallsignUPPER
vwProductionSearchClassBasicclassdbo.proper(); excludes 'Other (Class Not Specified)', 'N.A', 'Unspecified'
vwTIPOwnerDetailsRegOwnerNameownerdbo.proper()
vwTIPShipManagerDetailsShipManNamemanagerdbo.proper()
vwTIPTechManDetailsTechManNamemanagerdbo.proper()
vwTIPBBCDetailsBBCNamechartererdbo.proper()

After loading, spTIPPSCLoad calls the full processing chain: spTIPProcessPreviousSupply, spTIPProcessCurrentAgainstLRF (for each field), spTIPValidate (for each field), and spTIPProcessLowerImportanceData.

Duplicate guardUses a LEFT JOIN anti-join pattern: records are only inserted where no matching (LRNO + DateOriginated) row already exists in tblThirdPartyData. The 2008+ version uses LEFT JOIN ... WHERE ... IS NULL rather than the old NOT IN (subquery) form for performance.

spImportSBRIntoTIP — Shipbuilder Returns Import

Loads data from TIP_ShipBuilderReturns (shipyards' return submissions) into tblThirdPartyData. Extracts 21 distinct field values per vessel.

Fields loaded per vessel from SBR:

TableNameFieldNameSource columnType
ABSD_OVNAG01_NAMEShipNamevarchar
vwProductionSearchShipTypeLevel3ShipTypeLevel4varchar
vwProductionSearchHullTypeHullTypevarchar
vwTIPOwnerDetailsRegOwnerNameRegisteredOwnervarchar
vwTIPShipManagerDetailsShipManNameShipManagervarchar
ABSD_SHIP_SEARCHFlagNameFlagNamevarchar
vwProductionSearchClassBasicClassificationSocietyvarchar
ABSD_HITLB07_GROSSGrossTonnageint (ROUND 0)
ABSD_HIDRC07_DWTLDeadweightint
ABSD_HILEC02_LOALengthOverallLOAdecimal(18,3)
ABSD_HIBRC09_MLDBreadthMouldeddecimal(18,3)
ABSD_HIDRC07_DLDraughtdecimal(18,3)
vwProductionSearchYardNoSBRYardNumbervarchar
vwProductionSearchShipbuilderSubContractorSBRShipBuilderSubContractorvarchar
vwProductionSearchSubContractorYardNoSBRShipBuilderSubContractorShipYardYardHullNovarchar
vwProductionSearchShipBuilderSBRShipBuildervarchar
vwYearOfBuildYearOfBuildYearOfBuildvarchar
vwProductionSearchCapacityNarrativeCargoCapacitiesNarrativevarchar
vwProductionSearchEngineMakeLargestMainEngineDesignervarchar
vwProductionSearchEngineModelLargestMainEngineModelvarchar
vwProductionSearchPropulsionUnitsNumberOfPropulsionUnitsint
ABSD_SHIP_SEARCHStatusShipStatusvarchar
vwProductionSearchKeelLaidDateBestKeelLaidDatevarchar
vwProductionSearchLaunchDateBestLaunchDatevarchar
vwProductionSearchDeliveryDateBestDateOfBuildvarchar
ABSD_NCONGNTE / FABNcomments1 / comments2varchar

5. Classic Pipeline — Detailed Processing

5.1 Data Loading

The Classic pipeline loads data via source-specific stored procedures that SELECT from the appropriate TIP_* or BV_* staging table and INSERT normalised rows into tblThirdPartyData. The pattern used by PSC and SBR (above) is representative. Key characteristics:

5.2 LRNO Derivation — spTIPDeriveLRNO

Some sources (e.g. certain flag registers) do not supply the LRNO (Lloyd's Register Ship Number) directly. They supply an IMO number or other identifier that must be matched against LR data to derive the LRNO.

spTIPDeriveLRNO — Configuration-driven LRNO lookup

1
Read configuration — Joins tblThirdPartyDeriveLRNO + _Columns + _IHSCColumn + _IHSCTable to build the full JOIN specification. Config defines: source table name, source IMO column, LR-side table, LR-side IMO column, optional per-column functions.
2
Outer cursor per BatchNo — Iterates over each batch of derivation rules for the source. Each batch may target a different pair of source/LR tables.
3
Inner cursor per BatchSeq — Builds JOIN conditions. If FunctionApplied is set, wraps the column reference in the function: replace('?', column) pattern substitution. Accumulates WHERE/JOIN fragments into a dynamic SQL string.
4
Execute dynamic INSERT — Inserts matched LRNO into tblThirdPartyDeriveLRNOUpdated for audit, then executes a dynamic UPDATE on the source table to set the LRNO column from the matched LR table row.

5.3 Previous Supply Comparison — spTIPMISProcessPreviousSupply

Compares each new (Processed=0) supply record against all previous supply records for the same field from the same source. This avoids sending duplicate data to the analyst review queue.

-- Determine the date of the current new supply batch
SET @DATERECD = (SELECT MAX(datereceived)
                 FROM tblThirdPartyData
                 WHERE source = @SOURCE AND processed = 0)

-- 4 cursors iterate over each (LRNO, TableName, FieldName) combination
-- for each datatype: varchar, int, decimal, datetime

-- Rule 1: matches previous MANUALLY processed (Processed=2) supply
--         → cross-source allowed (source not compared)
--         → set Processed=2 (treat as already manually reviewed)
UPDATE tblThirdPartyData SET Processed=2
WHERE LRNO=@LRNO AND TableName=@TABLENAME AND FieldName=@FIELDNAME
  AND Source=@SOURCE AND DateReceived=@DATERECD AND Processed=0
  AND VarcharValue = (prior manual value)

-- Rule 2: matches previous AUTO processed (Processed=1) supply
--         → same source required
--         → set Processed=1 (treat as already auto-matched)
UPDATE tblThirdPartyData SET Processed=1
WHERE ... AND b.Processed=1 AND b.Source=@SOURCE

-- 5th cursor: mark ALL older records for same LRNO+Table+Field+Source+MPK
--             as Processed=1 (superseded by newer supply)
UPDATE tblThirdPartyData SET Processed=1
WHERE LRNO=@LRNO AND ... AND DateReceived < @DATERECD AND Processed=0

5.4 LRF Comparison — spTIPMISProcessCurrentVarcharAgainstLRF

Compares staged source values against the current value in the live LRF database. If the source value already matches what LR holds, it is marked as processed (no action needed).

1
Read field metadata — Reads SEQNO, SEQCOLNAME, MPK3, MPK4 from tblThirdPartyValidation. Also reads LevensteinEditDistanceMax.
2
Build comparison expression — If LED > 0: uses dbo.fnTIPMISEdit_Distance(sourceValue, lrfValue) <= @LED. Otherwise: exact match with COLLATE Latin1_General_CI_AI (case+accent insensitive).
3
Build dynamic SQL IF EXISTS / UPDATE — Constructs dynamic SQL that JOINs tblThirdPartyData to the target ABSD_ table. Incorporates SEQNO filter if SequenceNumberColumn is configured. Incorporates MPK3/MPK4 if multi-part key fields are defined.
4
Execute — Records matching the comparison expression are updated: Processed=1, Validated=1.
-- Example generated SQL structure (varchar field with SEQNO)
UPDATE tblThirdPartyData
SET Processed=1, Validated=1
WHERE EXISTS (
    SELECT 1 FROM ABSD_HIFL
    WHERE ABSD_HIFL.LRNO = tblThirdPartyData.LRNO
      AND ABSD_HIFL.SEQNO = '00'
      AND ABSD_HIFL.B04_CNTY COLLATE Latin1_General_CI_AI
          = tblThirdPartyData.VarcharValue COLLATE Latin1_General_CI_AI
)
AND tblThirdPartyData.Source = @SOURCE
AND tblThirdPartyData.TableName = @TABLENAME
AND tblThirdPartyData.FieldName = @FIELDNAME
AND tblThirdPartyData.Processed = 0

5.5 Validation — spTIPMISValidateVarchar

Validates unprocessed varchar values against the rules in tblThirdPartyValidation.

1
Fail length check — Records with LEN(VarcharValue) outside [MinLength, MaxLength] are marked Validated=0, Processed=1 (rejected from further processing).
2
Pass combined check — Records within length bounds AND (regex IS NULL OR dbo.find_regular_expression(VarcharValue, RegularExpression + '{' + RegularExpressionLen + '}') = 1) are marked Validated=1.
Note on regexThe dbo.find_regular_expression function is a CLR-backed regex engine. The length constraint is appended to the pattern as a {n} quantifier suffix, allowing the regex and length validation to be combined into a single match call.

5.6 Auto Processing — spTIPAutoProcessVarcharValues

Nightly batch that automatically applies validated external data without analyst intervention for pre-approved field/source combinations.

1
Pre-mark eligible records — Sets ValidatedForAutoUpdate=1 for all records where: Validated=1, Processed=0, VarcharValue IS NOT NULL, source is in tblThirdPartyAutoProcess with AutoOverwrite IN ('ZeroOrNull','All'), and no SP override is configured in tblThirdPartyValidation.
2
Main cursor — Iterates over distinct (TableName, FieldName, Source) combinations ordered by ProcessOrder from tblThirdPartyValidation.
3
Additional validation per field — Calls spTIPAutoValidateVarchar @table, @field, @source to apply any SP-level validation checks.
4
Dynamic UPDATE — Builds SQL: UPDATE <TargetTable> SET <Field> = a.VarcharValue FROM tblThirdPartyData a INNER JOIN tblThirdPartyAutoProcess b INNER JOIN <TargetTable> c ON a.LRNO = c.LRNO [+ SEQNO + MPK conditions]. AutoOverwrite='ZeroOrNull' adds: AND (c.Field IS NULL OR c.Field = 'U').
5
Re-compare after update — Calls spTIPProcessCurrentAgainstLRF to re-mark records that now match LRF as Processed=1.

5.7 Review UI Support — spTIPLRDataByField

Called by the analyst UI to show the current LRF value alongside the staged TIP value and change history for a given vessel+field. Returns a unified result set with both current data and annotation history.

Result set structure

ColumnDescription
LRDataFormatted display string: value + optional SEQ{n} label + effective date in parentheses. For decode fields, the decoded text is shown. For annotation rows, "From: X To: Y (source date)" format.
TIPInd1=a pending TIP record exists for this field; 0=no pending TIP record
EffdateEffective date for sorting (future-dated primary records get +2 days so they appear at top)
Seeding1=current LRF row; 0=change history row — allows ORDER BY effdate DESC, seeding DESC to show current value first

Four rendering branches based on field configuration

  1. DecodeView + SEQNO — JOIN to decode view for code→text, include SEQ label and EFD, UNION with tblChanges history using same decode view
  2. DecodeView, no SEQNO — JOIN to decode view, no SEQ label, UNION with history
  3. No DecodeView + SEQNO — Raw value with SEQ label and EFD display, UNION with history
  4. No DecodeView, no SEQNO — Plain raw value, optional EFD, UNION with history if tblEnglishFieldNames has an entry for this field (indicating annotation tracking is active)
Special caseFor Fieldname = 'FlagStatus' AND Tablename = 'tblTIPXMLExtractFlagStatus', the Source column from the LRF row is appended in parentheses instead of the EFD value.

5.8 Action Processing — spTIPProcessUpdate

Executes the analyst's chosen action for a specific staged record (@DataID).

Action: Keep

UPDATE tblThirdPartyData
SET Processed = 2
WHERE DataID = @DataID
-- Marks record as manually reviewed and kept (no LRF change needed)

Action: Learn

  1. Fetches current LRF value via dynamic SELECT on the target ABSD_ table for this LRNO+Field
  2. Inserts mapping into tblThirdPartyMatchedValues: (TableName, FieldName, Source, VarcharValue=incoming, LRFValue=current)
  3. Calls spTIPProcessedMatchedValues to immediately re-process any other staged records with the same source value using this learned mapping

Action: Overwrite / Insert

1
Reads staging record details — Gets (LRNO, TableName, FieldName, VarcharValue, IntValue, DecimalValue, DatetimeValue) from tblThirdPartyData. Reads SEQNO, SEQCOLNAME, MPK3, MPK4, EFD field from tblThirdPartyValidation.
2
Special: B04_CNTY on ABSD_HIFL — When updating the country field (B04_CNTY), also looks up B04_TOWN from vwPortDecode and includes it in the dynamic UPDATE statement, keeping town in sync with country.
3
Special: EFD handling for G01_NAME on ABSD_OVNA — For new-construction vessels (status O/P/U/E/F in ABSD_OVGE), if the existing G01_NAME_EFD is future-dated, the UPDATE preserves the existing EFD rather than overwriting it. This prevents premature delivery-date changes for vessels under construction.
4
Dynamic UPDATE execution — Executes the built UPDATE statement against the target ABSD_ table. Uses sp_executesql with parameterised values.
5
Mark processed — Sets Processed=2 on the staging record.

6. FlexTemp Pipeline — Detailed Processing

6.1 Data Loading & Mapping — spTIPMISProcessSource

spTIPMISProcessSource is a multi-mode stored procedure (controlled by the @status parameter) that manages both source metadata and the initial data loading into tblTIPMISFlexTemp.

Key @status modes

StatusAction
ActiveRecordsSELECT all active (SoftDeleted=0) sources from tblThirdPartySource
SourceNames (NEW_MAPPING)SELECT source names where MappingName IS NOT NULL — FlexTemp-capable sources only
FileNameRulesSELECT FileName rules and archive/rejected folders for file-watching logic
Add / Update / DeleteINSERT/UPDATE/soft-DELETE rows in tblThirdPartySource
EnableTip / UpdateNewMapToggle SoftDeleted flag; update MappingName
GetUnprocessedFromTipFlexTempSELECT DISTINCT Source WHERE Processed=0 AND Validated=1 from tblTIPMISFlexTemp — the processing queue query
GetMappedColumnsSELECT mapped columns (Mapped='Y') from tblTIPMISMappings for a given source
GetKeyMappedSourceNameSELECT sources that have a 'K' (key) mapping defined
ThirdPartyDataLoadManages tblTIPMISLock concurrency table to prevent concurrent loads for the same source
CompareConcur / EditConcurReads and updates concurrency lock records for file processing coordination

6.2 One-to-Many Mappings — spTIPMISHandleOnetoManyMappings

Handles the case where a single source column is mapped to multiple LR target fields (e.g. a single "owner name" column maps to both RegisteredOwner and ShipManager in different contexts).

1
Identify one-to-many fields — Queries tblTIPMISMappings with GROUP BY SourceFieldName HAVING COUNT > 1 to find all SourceFieldNames that have multiple target mappings for this source.
2
Outer loop per mapping pair — Iterates over each (SourceFieldName, FieldName, TableName) combination in the one-to-many set.
3
Inner loop per FlexTemp row — For each existing FlexTemp row with that SourceColumnName (for the latest DateLoaded), inserts additional copies into tblTIPMISFlexTemp — one per additional target mapping. vwTIPMISOneToManyMappingCountBySourceName determines how many copies to create.

6.3 Manipulation Rules Engine — spTIPMISManipulationRulesEngine

Executes data transformation rules defined in tblTIPMISManipulationHdr/Dtl before validation. Supports two execution modes:

Mode: ExecuteSelectQuery

-- Builds full SQL from RuleSQLScript and executes directly
EXEC (@ConcatFullScript)
-- Returns transformed rows to be reviewed or applied

Mode: ConcatExistUpdate

-- Executes dynamic SQL into a temp table
SELECT * INTO #tempConcatUpdate FROM (EXEC(@ConcatFullScript))

-- Then iterates over temp table results, updating FlexTemp ColumnValue
UPDATE tblTIPMISFlexTemp
SET ColumnValue = #tempConcatUpdate.ConcatenatedResult
WHERE AutoID = #tempConcatUpdate.AutoID
-- Applies concatenation or transform results back to the staging table

6.4 Business Rules Engine — spTIPMISBusinessRule_Flextemp_Update

Validates FlexTemp data against configurable business rules. Each rule defines what constitutes a valid value; records that fail are marked with an error message.

1
Build rule list — JOINs tblTIPMISBrDtl → vwTIPMISFieldGlossary → tblTIPMISBrHdr. Filters on: SoftDeleted=0, Source matches (via CHARINDEX for comma-separated lists or exact match or 'ALL').
2
Per rule: single or multi-source — If source list contains comma (multiple sources): calls spTIPMISRuleScript_Multi_Source which writes passing AutoIDs to tblTIPMISBusRuleSQLScriptMultiSource. Otherwise: calls spTIPMISRuleSQLScript which writes to tblTIPMISBusRuleSQLScript.
3
Mark failures — Records NOT IN the passing AutoID set for this (FileName, ColumnName, Source) get: ValidationFailureReason = @RuleErrorMsg, Validated = 2.

6.5 New Field Derivation — spTIPMISInsertNewFieldData

Derives a new computed field from existing FlexTemp data and inserts it as additional rows in tblTIPMISFlexTemp. Used to create derived fields (e.g. a combined value from two source columns) that do not exist directly in the source data.

1
Parse SQL components — Parses the @strSQL parameter to extract SELECT, FROM, JOIN, WHERE fragments.
2
Get latest DateLoaded — Reads MAX(DateLoaded) for the source to target only the current supply batch.
3
Create temp table — Creates #tblTIPMIS_DMInsert with columns: KEY, SourceMonth, SourceYear, Validated. Executes the parsed SQL to populate it.
4
INSERT into FlexTemp — Inserts new rows into tblTIPMISFlexTemp with SourceColumnName = @NewFieldName (the derived field name).
5
Register in mappings — Inserts a new row into tblTIPMISMappings with Mapped='N' if the derived field name is not already registered. Uses full TRY/CATCH with explicit transaction rollback on error.

6.6 Pivot / UnPivot for Display

spTIPMISPivotFlexTemp

Transforms FlexTemp data from its key-value row structure into a pivot (wide) format for display — one row per vessel with source columns as column headers.

spTIPMISUnPivotFlexTemp

Two-branch PIVOT+UNPIVOT that shows rejection detail for a specific vessel in a specific source batch.

6.7 Rejection Management — spTIPMISFlexTempRejection

Multi-mode SP that supports the analyst rejection review UI for FlexTemp pipeline failures (Validated IN (0,2,3,4,5) = various failure codes).

Status modeQuery
TipFlexTempSourceSELECT DISTINCT Source WHERE Validated IN (0,2,3,4,5) — populates source filter dropdown
FilteredTipFlexTempFull record SELECT for a specific Source+SourceMonth, showing all failed records with full field metadata from vwTIPMISFieldGlossary
DisplayFieldNamesJOINs to vwTIPMISFieldGlossary, shows only Mapped='Y' fields with FieldType, for the latest supply date — populates the field filter in the rejection UI

7. Field Glossary — tblTIPMISFieldGlossary / spTIPMISFieldGlossary

The Field Glossary is the central registry of LR field definitions for the FlexTemp pipeline. It maps LR internal field names to human-readable display names and provides metadata for the TIP/MIS UI.

tblTIPMISFieldGlossary — Columns

ColumnDescription
GlossaryIDint IDENTITY PK
DisplayFieldNameHuman-readable field label (e.g. "Ship Name", "Gross Tonnage")
MainGroupCodeFK→tblTIPMISFieldGlossaryMainGroup (e.g. "Vessel Details", "Ownership")
SubGroupCodeFK→tblTIPMISFieldGlossarySubGroup (sub-category within main group)
FieldNameInternal LR field name (e.g. G01_NAME, B01_CALLSIGN)
TableNameABSD_ target table
FieldTypeData type descriptor (varchar/int/decimal/datetime)
LengthMaximum display/storage length
SizePrecisionFor numeric fields: precision descriptor
ValidOperatorsComma-separated list of valid comparison operators for this field
SoftDeletedbit; 1=field removed from active use

spTIPMISFieldGlossary — @status modes

StatusAction
ActiveTipFieldsSELECT all active (SoftDeleted=0) glossary entries, ordered by DisplayFieldName — main UI list
DeletedTipFieldsSELECT all soft-deleted fields
DisplayMainGroup / DisplaySubGroupSELECT distinct group names from MainGroup/SubGroup tables
ActiveMainGroup / MainNsubGroupSELECT active group/subgroup hierarchy for UI dropdowns
FieldNames / FieldTypesSELECT distinct internal field names / data types for admin tools
ThirdPartyTableName / ThirdPartyFieldNameCross-reference with tblThirdPartyValidation to find which fields have validation rules
Add / Update / Delete / EnableTipCRUD operations on tblTIPMISFieldGlossary
AddMainGroup / UpdateMainGroupCRUD on tblTIPMISFieldGlossaryMainGroup
AddMainNsubGroup / UpdateMainNsubGroup / DeleteSubGroupCRUD on tblTIPMISFieldGlossarySubGroup
ConvertDataTypeUPDATE FieldType in tblTIPMISFieldGlossary for a specific field+source combination
Update (full)UPDATE glossary entry AND simultaneously UPDATE tblTIPMISMappings FieldName/TableName where they reference the old values — keeps mapping table in sync

8. SUPPLEMENTAL Tables

SUPPLEMENTAL tables store additional vessel data fields that do not fit in the primary ABSD_ schema, or that require a separate update cycle. Each SUPPLEMENTAL table is paired with an ABSD_ master table and has a trigger that propagates changes back to the master.

Known SUPPLEMENTAL tables

TablePaired MasterKey Fields
SUPPLEMENTAL_ABSD_OVGEABSD_OVGEMMSI, MMSI_EFD, YARD_NO, YARD_NO20, PHOTO, PENNANT_NO, FISHNO20
SUPPLEMENTAL_ABSD_HIFLABSD_HIFLMMSI, SEQNO (history row)
SUPPLEMENTAL_ABSD_HIMAABSD_HIMAMachinery additional fields
SUPPLEMENTAL_ABSD_HITLABSD_HITLTonnage additional fields
SUPPLEMENTAL_ABSD_STSEABSD_STSEStatus/service additional fields

SUPPLEMENTAL_ABSD_OVGE Schema

ColumnTypeDescription
LRNOvarchar(7) PKLR number — 1:1 with ABSD_OVGE
MMSIvarchar(9)Maritime Mobile Service Identity — 9-digit number; indexed for lookup
MMSI_EFDvarchar(6)MMSI effective date (LR date format YYMMDD)
YARD_NOvarchar(12)Yard number (short form, max 12 chars)
YARD_NO20varchar(20)Yard number (extended form, max 20 chars)
PHOTObitPhotograph available flag
PENNANT_NOvarchar(10)Naval pennant number
FISHNO20varchar(20)Fishing vessel number (extended; truncated to 10 chars when written to ABSD_OVGE.B10_FISHNO)

SUPPLEMENTAL_ABSD_OVGE Trigger — SuppOVGEUpdate

FOR INSERT, UPDATE trigger on SUPPLEMENTAL_ABSD_OVGE. Fires on every change and propagates data to the master ABSD_ tables with full validation, annotation, and cross-table synchronisation.

Trigger Guard Checks

IF NOT EXISTS(SELECT * FROM TRIGGER_DISABLE)
BEGIN
  IF NOT EXISTS(SELECT * FROM TRIGGER_DISABLE_SUPPOVGE)
  BEGIN
    -- actual trigger body
  END
END

TRIGGER_DISABLE = global trigger halt (used during bulk loads). TRIGGER_DISABLE_SUPPOVGE = SUPPLEMENTAL-specific halt (used to prevent recursion when the trigger itself updates related SUPPLEMENTAL tables).

Per-row processing (cursor over inserted)

1
IF UPDATE(MMSI) AND MMSI IS NOT NULL — Calls spValidateMMSI @lrno, @seqno, null, @MPK3, @MPK4, @mmsi, @Errcode OUTPUT, @Errmess OUTPUT. If Errcode=0: RAISERROR + ROLLBACK TRANSACTION (validation failed, entire transaction is aborted).
2
IF UPDATE(MMSI_EFD) — Calls valStandard4_new @PASSEDDATA, @RETMESSAGE OUTPUT for date format validation. If return ≠ 0: prepends 'MMSI EFD' to message, RAISERROR + ROLLBACK.
3
IF UPDATE(FISHNO20)UPDATE ABSD_OVGE SET B10_FISHNO = LEFT(LTRIM(RTRIM(FISHNO20)),10) — truncates the 20-char value to the 10-char master field.
4
Always: update audit fieldsUPDATE ABSD_OVGE SET J06_AUTHOR = [3-char initials from system_user], J06_LNCHDATE = [current date in YYMMDD format] for the affected LRNO.
5
Maintain updates staging — DELETE+INSERT into SUPPLEMENTAL_ABSD_OVGE_UPDATES for the affected LRNO. This staging table acts as a "last change" buffer for downstream consumers.
6
Primary annotation — Calls spGetUserSettings to retrieve analyst initials/source. IF UPDATE(MMSI) or IF UPDATE(YARD_NO): inserts a row into tblChanges with OldValue (from deleted), NewValue (from inserted), ChangeType=EnglishFieldName. Uses spGetEnglishFieldName to get the human-readable name.
7
Secondary annotation — Reads Grouping and ShipwatchCol from indAnnotation_SecondaryGroupings for SUPPLEMENTAL_ABSD_OVGE/Yard_no, then inserts into tblAnnotationLogGeneral.
8
Cross-table MMSI sync — IF UPDATE(MMSI): UPDATE ABSD_SHIP_SEARCH SET MMSI = INSERTED.MMSI WHERE LRNO = @LRNO and UPDATE SUPPLEMENTAL_ABSD_HIFL SET MMSI = INSERTED.MMSI WHERE LRNO = @LRNO AND SEQNO = '00'. Keeps the search index and history table primary row in sync.

9. Processing Flags Reference

tblThirdPartyData.Processed values

ValueMeaningSet by
0Pending — newly loaded, not yet processedLoad SPs (initial value)
1Matched/auto-processed — either matched to LRF or matched to previous auto supply. No analyst action required.spTIPMISProcessCurrentVarcharAgainstLRF, spTIPMISProcessPreviousSupply (rule 2), spTIPAutoProcessVarcharValues, superseded records
2Manually reviewed — analyst chose Keep or Overwrite, or matched prior manual supplyspTIPProcessUpdate (Keep/Overwrite), spTIPMISProcessPreviousSupply (rule 1)

tblThirdPartyData.Validated values

ValueMeaning
NULLNot yet validated (just loaded)
0Failed validation (length, regex, or SP-level validation)
1Passed validation — eligible for processing

tblTIPMISFlexTemp.Validated values

ValueMeaning
1Default — no failure detected yet
0Failed length or regex validation
2Failed business rule (ValidationFailureReason contains rule error message)
3/4/5Additional failure codes for specific error categories (shown in rejection UI)

10. Stored Procedure Reference Index

Stored ProcedurePipelinePurpose
spTIPPSCLoadClassicLoad PSC inspection data (7 fields per vessel, last 2 weeks) into tblThirdPartyData; runs full processing chain
spImportSBRIntoTIPClassicLoad Shipbuilder Returns (25 fields per vessel) into tblThirdPartyData
spTIPDeriveLRNOClassicDerive LRNO from source-supplied IMO via configurable multi-column JOIN
spTIPMISProcessPreviousSupplyBothCompare new supply against prior supply; mark unchanged records as pre-processed
spTIPMISProcessCurrentVarcharAgainstLRFClassicCompare staged values against live LRF data; mark matching records Processed=1
spTIPMISValidateVarcharClassicApply length and regex validation rules; mark records Validated=0 or 1
spTIPAutoProcessVarcharValuesClassicNightly auto-update: apply approved source values to ABSD_ tables without analyst review
spTIPAutoValidateVarcharClassicSP-level validation before auto-update (called by spTIPAutoProcessVarcharValues)
spTIPProcessCurrentAgainstLRFClassicRe-compare after update to mark newly-matching records processed (Classic version)
spTIPProcessUpdateClassicExecute analyst action: Keep / Learn / Overwrite / Insert on a single DataID
spTIPProcessedMatchedValuesClassicRe-process staged records using a newly learned value mapping
spTIPLRDataByFieldClassic (UI)Return current LRF value + change history for analyst comparison panel
spTIPProcessLowerImportanceDataClassicHandle lower-priority fields after main processing completes
spTIPValidateClassicField-level validation dispatcher (calls spTIPMISValidateVarchar and type-specific variants)
spTIPMISProcessSourceFlexTempMulti-mode: source CRUD, mapping queries, concurrency locking, data load coordination
spTIPMISHandleOnetoManyMappingsFlexTempExpand one-to-many mapped source columns into multiple FlexTemp rows
spTIPMISManipulationRulesEngineFlexTempExecute data manipulation/transformation rules (DM engine)
spTIPMISBusinessRule_Flextemp_UpdateFlexTempExecute business rules engine; mark failures with Validated=2 + error message
spTIPMISRuleSQLScriptFlexTempExecute single-source business rule SQL; write passing AutoIDs to temp result table
spTIPMISRuleScript_Multi_SourceFlexTempExecute multi-source business rule SQL; write passing AutoIDs to temp result table
spTIPMISInsertNewFieldDataFlexTempDerive and insert a new computed field into tblTIPMISFlexTemp
spTIPMISPivotFlexTempFlexTemp (UI)Return FlexTemp data in wide/pivot format for display
spTIPMISUnPivotFlexTempFlexTemp (UI)Return rejection detail for a specific vessel in PIVOT+UNPIVOT format
spTIPMISFlexTempRejectionFlexTemp (UI)Multi-mode rejection browser: source list, filtered records, field name list
spTIPMISFieldGlossaryFlexTemp (Admin)Multi-mode field glossary CRUD and lookup: 20+ @status modes
AA_fnTIPMISRetrieveDMOrderFlexTemp (Fn)Function: retrieve DM rule output order from tblTipManipulationOrder
fnTIPSelectDataTypeClassic (Fn)Function: build INSERT column string based on column datatype from information_schema
fnTIPMISEdit_DistanceBoth (Fn)Function: compute Levenshtein edit distance between two strings for fuzzy matching

Generated from actual SQL source files — StoredProcedures/, Functions/, Tables/ — LR Maritime Database. 2026-05-02.