Commit d0316e8c authored by Bas Lijnse's avatar Bas Lijnse

Moved iTasks.API.Extensions to iTasks.Extensions

parent f87d4621
......@@ -3,8 +3,8 @@ implementation module Incidone.ActionManagementTasks
import iTasks
import iTasks.UI.Editor, iTasks.UI.Editor.Common
import iTasks._Framework.Serialization
import iTasks.API.Extensions.DateTime
import iTasks.API.Extensions.JSONFile
import iTasks.Extensions.DateTime
import iTasks.Extensions.JSONFile
import Incidone.Util.TaskPatterns
import Incidone.OP.Concepts, Incidone.OP.SDSs, Incidone.OP.Conversions
import Incidone.OP.IncidentManagementTasks, Incidone.OP.ContactManagementTasks, Incidone.OP.CommunicationManagementTasks
......
definition module Incidone.Configuration
import iTasks
from iTasks.API.Extensions.SQLDatabase import :: SQLDatabase, :: SQLDatabaseDef
from iTasks.API.Extensions.Web import :: URL
from iTasks.Extensions.SQLDatabase import :: SQLDatabase, :: SQLDatabaseDef
from iTasks.Extensions.Web import :: URL
:: DBConfig
= InternalSQLiteDB
......
implementation module Incidone.Configuration
import iTasks, iTasks.API.Extensions.SQLDatabase, iTasks.API.Extensions.Web
import iTasks, iTasks.Extensions.SQLDatabase, iTasks.Extensions.Web
derive class iTask DBConfig, AISConfig, AsteriskConfig, SMTPConfig, WebLinksConfig, WebLink
......
definition module Incidone.ContactPosition
//This module provides a type for representing geographic positions of contacts
import iTasks
import iTasks.API.Extensions.GIS.Leaflet
import iTasks.Extensions.GIS.Leaflet
from Incidone.OP.Concepts import :: Contact, :: ContactGeo
......
......@@ -7,7 +7,7 @@ import qualified Text.Parsers.ZParsers.ParsersDerived as PD
import qualified Control.Applicative as CA
from Control.Applicative import class Alternative, class Applicative
from Text.Parsers.ZParsers.ParsersKernel import :: Parser, instance Alternative Parser, instance Applicative Parser, instance Functor Parser
import iTasks.API.Extensions.GIS.LeafletNavalIcons
import iTasks.Extensions.GIS.LeafletNavalIcons
import Incidone.OP.Concepts
import Incidone.Util.TaskPatterns
......
implementation module Incidone.DeviceBased.VideoWall
import iTasks
import iTasks.API.Extensions.DateTime
import iTasks.Extensions.DateTime
import Incidone.OP.Concepts, Incidone.OP.SDSs, Incidone.ActionManagementTasks
import Incidone.Util.TaskPatterns
import Text, Text.HTML, Data.List, iTasks._Framework.HtmlUtil
......
implementation module Incidone.OP.CommunicationManagementTasks
import iTasks
import iTasks.API.Extensions.SQLDatabase
import iTasks.Extensions.SQLDatabase
import Incidone.Configuration
import Incidone.OP.Concepts, Incidone.OP.SDSs
import Incidone.OP.ContactManagementTasks, Incidone.OP.IncidentManagementTasks
......
concept module Incidone.OP.Concepts
import iTasks, iTasks.API.Extensions.Document, iTasks.API.Extensions.Contact, Database.SQL, Incidone.OP.ConceptsTOP, Incidone.OP.ConceptsSQL, Incidone.ContactPosition, Incidone.Util.AIS
import iTasks, iTasks.Extensions.Document, iTasks.Extensions.Contact, Database.SQL, Incidone.OP.ConceptsTOP, Incidone.OP.ConceptsSQL, Incidone.ContactPosition, Incidone.Util.AIS
//Shared value types
$$ MMSI = Int
......
definition module Incidone.OP.Concepts
//GENERATED BY CCL, DO NOT EDIT
import iTasks, iTasks.API.Extensions.Document, iTasks.API.Extensions.Contact, Database.SQL, Incidone.OP.ConceptsTOP, Incidone.OP.ConceptsSQL, Incidone.ContactPosition, Incidone.Util.AIS
import iTasks, iTasks.Extensions.Document, iTasks.Extensions.Contact, Database.SQL, Incidone.OP.ConceptsTOP, Incidone.OP.ConceptsSQL, Incidone.ContactPosition, Incidone.Util.AIS
:: AISStaticInfo :== AIVDM5
......
......@@ -665,4 +665,4 @@ instance toSQLRow NewIncident where
toSQLRow {NewIncident|title,summary,type}
= (mbToSQL title ++ mbToSQL summary ++ mbToSQL type)
IncidoneDB :: SQLSchema
IncidoneDB = [{SQLTable|name = "AISContact",columns = [{SQLColumn|name = "mmsi",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "position_lat",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_lon",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_desc",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "heading",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "track",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "lastPositionMsg",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "lastInfoMsg",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "positionUpdated",type = SQLTDatetime ,null = True,autoIncrement = False},{SQLColumn|name = "infoUpdated",type = SQLTDatetime ,null = True,autoIncrement = False}],primaryKey = ["mmsi"],foreignKeys = []},{SQLTable|name = "Contact",columns = [{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = True},{SQLColumn|name = "type",type = SQLTEnum ["Person","Vessel","Surfer","Diver","Airplane","Helicopter","Other"],null = True,autoIncrement = False},{SQLColumn|name = "name",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "group",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "position_lat",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_lon",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_desc",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "heading",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "track",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "positionUpdated",type = SQLTDatetime ,null = True,autoIncrement = False},{SQLColumn|name = "needsHelp",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "providesHelp",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "notes",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "account",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "access",type = SQLTEnum ["Watch officer","Partner"],null = True,autoIncrement = False},{SQLColumn|name = "status",type = SQLTEnum ["Alerted","Briefed","Proceeding","On Scene","Standby On Location","On Task","Standby","Transfer","Released","Returned","Limited Availability","Unavailable","Training","Pre-Alert"],null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = []},{SQLTable|name = "Helicopter",columns = [{SQLColumn|name = "callsign",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "helicopterType",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = [(["contactNo"],"Contact",["contactNo"])]},{SQLTable|name = "Airplane",columns = [{SQLColumn|name = "callsign",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "planeType",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = [(["contactNo"],"Contact",["contactNo"])]},{SQLTable|name = "Diver",columns = [{SQLColumn|name = "description",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = [(["contactNo"],"Contact",["contactNo"])]},{SQLTable|name = "Surfer",columns = [{SQLColumn|name = "surfboardDescription",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "suitDescription",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "age",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "gender",type = SQLTEnum ["Male","Female"],null = True,autoIncrement = False},{SQLColumn|name = "nationality",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "injuries",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "stateOfMind",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "medicalHistory",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = [(["contactNo"],"Contact",["contactNo"])]},{SQLTable|name = "Vessel",columns = [{SQLColumn|name = "vesselType",type = SQLTEnum ["Yacht","Fishing vessel","Cargo vessel","Towing vessel","Patrol vessel","Rescue vessel","Other"],null = True,autoIncrement = False},{SQLColumn|name = "imo",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "inmarsatNo",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "description",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "pob",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "engineType",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "fuel",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "destination",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "course",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "speed",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "lpc",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "npc",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "range",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "lseOnBoard",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "navaidsOnBoard",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = [(["contactNo"],"Contact",["contactNo"])]},{SQLTable|name = "Person",columns = [{SQLColumn|name = "age",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "gender",type = SQLTEnum ["Male","Female"],null = True,autoIncrement = False},{SQLColumn|name = "nationality",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "injuries",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "stateOfMind",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "medicalHistory",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = [(["contactNo"],"Contact",["contactNo"])]},{SQLTable|name = "ContactPhoto",columns = [{SQLColumn|name = "original",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "thumb",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "avatar",type = SQLTText ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "CommunicationMean",columns = [{SQLColumn|name = "id",type = SQLTInteger ,null = True,autoIncrement = True},{SQLColumn|name = "type",type = SQLTEnum ["Telephone","VHF","E-mail","P2000"],null = True,autoIncrement = False}],primaryKey = ["id"],foreignKeys = []},{SQLTable|name = "P2000Receiver",columns = [{SQLColumn|name = "capCode",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "id",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["id"],foreignKeys = [(["id"],"CommunicationMean",["id"])]},{SQLTable|name = "EmailAccount",columns = [{SQLColumn|name = "emailAddress",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "id",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["id"],foreignKeys = [(["id"],"CommunicationMean",["id"])]},{SQLTable|name = "VHFRadio",columns = [{SQLColumn|name = "callSign",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "mmsi",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "id",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["id"],foreignKeys = [(["id"],"CommunicationMean",["id"])]},{SQLTable|name = "Telephone",columns = [{SQLColumn|name = "phoneNo",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "id",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["id"],foreignKeys = [(["id"],"CommunicationMean",["id"])]},{SQLTable|name = "Incident",columns = [{SQLColumn|name = "incidentNo",type = SQLTInteger ,null = True,autoIncrement = True},{SQLColumn|name = "title",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "summary",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "type",type = SQLTEnum ["Aircraft appears in difficulties","Aircraft collision","Aircraft crash","Aircraft ditch","Aircraft emergency","Aircraft overdue","Diver in problems","Diver missing","DSC alert in NLSSR","DSC alert outside NLSSR","False alert good intent","False alert malicious intent","Family message","Flare sighted","INMARSAT alert in NLSRR","INMARSAT alert outside NLSRR","Medevac","Medical advice","NRB test","Person appears in difficulties","Person body recovery","Person in problems","Person missing","Rig incident","Rig man overboard","SAR HELI unavailable","SART alert","Surfer appears in difficulties","Surfer in problems","Surfer missing","Vessel appears in difficulties","Vessel capsized","Vessel collision","Vessel engine or steering problems","Vessel fire or explosion","Vessel man overboard","Vessel overdue","Vessel piracy or hijack","Vessel sunk","Vessel taking water","Vessel unsure of position","Yacht aground","Yacht appears in difficulties","Yacht capsized","Yacht collision","Yacht engine problems","Yacht fire or explosion","Yacht gear fouled","Yacht man overboard"],null = True,autoIncrement = False},{SQLColumn|name = "phase",type = SQLTEnum ["INCERFA","ALERFA","DETRESFA"],null = True,autoIncrement = False},{SQLColumn|name = "closed",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["incidentNo"],foreignKeys = []},{SQLTable|name = "WeatherData",columns = [{SQLColumn|name = "weatherType",type = SQLTEnum ["Rain","Drizzle","Mist","Fog","Snow","Hail","Sunny","Haze","Cloudy","Showers","Thunderstorms"],null = True,autoIncrement = False},{SQLColumn|name = "windDirection",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "windSpeed",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "visibility",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "seaState",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "swellDirection",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "waveHeight",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "airTemp",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "seaTemp",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "cloudBase",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "barometric",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "incidentNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["incidentNo"],foreignKeys = [(["incidentNo"],"Incident",["incidentNo"])]},{SQLTable|name = "LogEntry",columns = [{SQLColumn|name = "incident",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "eventAt",type = SQLTDatetime ,null = True,autoIncrement = False},{SQLColumn|name = "loggedAt",type = SQLTDatetime ,null = True,autoIncrement = False},{SQLColumn|name = "loggedBy",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "message",type = SQLTText ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "INMARSATCMessage",columns = [{SQLColumn|name = "inmarsatNo",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "toCes",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "position_lat",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_lon",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_desc",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "positionUpdated",type = SQLTTime ,null = True,autoIncrement = False},{SQLColumn|name = "course",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "speed",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "activation",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "positionActivated",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "courseSpeedActivated",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "DSCMessage",columns = [{SQLColumn|name = "callTime",type = SQLTDatetime ,null = True,autoIncrement = False},{SQLColumn|name = "category",type = SQLTEnum ["Safety","Routine","Urgency","Distress","Invalid"],null = True,autoIncrement = False},{SQLColumn|name = "fromMmsi",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "fromCountry",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "no",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "rqi",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "format",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "distressId",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "nature",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "position_lat",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_lon",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_desc",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "workstation",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "teleCmd",type = SQLTText ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "Communication",columns = [{SQLColumn|name = "communicationNo",type = SQLTInteger ,null = True,autoIncrement = True},{SQLColumn|name = "time",type = SQLTDatetime ,null = True,autoIncrement = False},{SQLColumn|name = "type",type = SQLTEnum ["Phone call","Radio call","E-mail message","P2000 message","DSC message"],null = True,autoIncrement = False},{SQLColumn|name = "direction",type = SQLTEnum ["In","Out"],null = True,autoIncrement = False},{SQLColumn|name = "handledBy",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "status",type = SQLTEnum ["Pending","Ringing","Connected","Answered","Missed","Sent"],null = True,autoIncrement = False},{SQLColumn|name = "withContact",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["communicationNo"],foreignKeys = []},{SQLTable|name = "P2000Message",columns = [{SQLColumn|name = "capCode",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "prio",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "body",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "communicationNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["communicationNo"],foreignKeys = [(["communicationNo"],"Communication",["communicationNo"])]},{SQLTable|name = "EmailMessage",columns = [{SQLColumn|name = "recipient",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "sender",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "subject",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "body",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "communicationNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["communicationNo"],foreignKeys = [(["communicationNo"],"Communication",["communicationNo"])]},{SQLTable|name = "Message",columns = [{SQLColumn|name = "communicationNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["communicationNo"],foreignKeys = [(["communicationNo"],"Communication",["communicationNo"])]},{SQLTable|name = "RadioCall",columns = [{SQLColumn|name = "channel",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "callNotes",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "communicationNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["communicationNo"],foreignKeys = [(["communicationNo"],"Communication",["communicationNo"])]},{SQLTable|name = "PhoneCall",columns = [{SQLColumn|name = "externalNo",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "externalRef",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "callNotes",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "communicationNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["communicationNo"],foreignKeys = [(["communicationNo"],"Communication",["communicationNo"])]},{SQLTable|name = "communicationMeans1_communicationMeans2",columns = [{SQLColumn|name = "communicationMeans1",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "communicationMeans2",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "photos1_photos2",columns = [{SQLColumn|name = "photos1",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "contacts_incidents",columns = [{SQLColumn|name = "contacts",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "incidents",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "communications_aboutIncidents",columns = [{SQLColumn|name = "communications",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "aboutIncidents",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []}]
\ No newline at end of file
IncidoneDB = [{SQLTable|name = "AISContact",columns = [{SQLColumn|name = "mmsi",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "position_lat",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_lon",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_desc",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "heading",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "track",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "lastPositionMsg",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "lastInfoMsg",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "positionUpdated",type = SQLTDatetime ,null = True,autoIncrement = False},{SQLColumn|name = "infoUpdated",type = SQLTDatetime ,null = True,autoIncrement = False}],primaryKey = ["mmsi"],foreignKeys = []},{SQLTable|name = "Contact",columns = [{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = True},{SQLColumn|name = "type",type = SQLTEnum ["Person","Vessel","Surfer","Diver","Airplane","Helicopter","Other"],null = True,autoIncrement = False},{SQLColumn|name = "name",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "group",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "position_lat",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_lon",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_desc",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "heading",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "track",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "positionUpdated",type = SQLTDatetime ,null = True,autoIncrement = False},{SQLColumn|name = "needsHelp",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "providesHelp",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "notes",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "account",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "access",type = SQLTEnum ["Watch officer","Partner"],null = True,autoIncrement = False},{SQLColumn|name = "status",type = SQLTEnum ["Alerted","Briefed","Proceeding","On Scene","Standby On Location","On Task","Standby","Transfer","Released","Returned","Limited Availability","Unavailable","Training","Pre-Alert"],null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = []},{SQLTable|name = "Helicopter",columns = [{SQLColumn|name = "callsign",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "helicopterType",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = [(["contactNo"],"Contact",["contactNo"])]},{SQLTable|name = "Airplane",columns = [{SQLColumn|name = "callsign",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "planeType",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = [(["contactNo"],"Contact",["contactNo"])]},{SQLTable|name = "Diver",columns = [{SQLColumn|name = "description",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = [(["contactNo"],"Contact",["contactNo"])]},{SQLTable|name = "Surfer",columns = [{SQLColumn|name = "surfboardDescription",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "suitDescription",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "age",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "gender",type = SQLTEnum ["Male","Female"],null = True,autoIncrement = False},{SQLColumn|name = "nationality",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "injuries",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "stateOfMind",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "medicalHistory",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = [(["contactNo"],"Contact",["contactNo"])]},{SQLTable|name = "Vessel",columns = [{SQLColumn|name = "vesselType",type = SQLTEnum ["Yacht","Fishing vessel","Cargo vessel","Towing vessel","Patrol vessel","Rescue vessel","Other"],null = True,autoIncrement = False},{SQLColumn|name = "imo",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "inmarsatNo",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "description",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "pob",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "engineType",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "fuel",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "destination",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "course",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "speed",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "lpc",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "npc",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "range",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "lseOnBoard",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "navaidsOnBoard",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = [(["contactNo"],"Contact",["contactNo"])]},{SQLTable|name = "Person",columns = [{SQLColumn|name = "age",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "gender",type = SQLTEnum ["Male","Female"],null = True,autoIncrement = False},{SQLColumn|name = "nationality",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "injuries",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "stateOfMind",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "medicalHistory",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "contactNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["contactNo"],foreignKeys = [(["contactNo"],"Contact",["contactNo"])]},{SQLTable|name = "ContactPhoto",columns = [{SQLColumn|name = "original",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "thumb",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "avatar",type = SQLTText ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "CommunicationMean",columns = [{SQLColumn|name = "id",type = SQLTInteger ,null = True,autoIncrement = True},{SQLColumn|name = "type",type = SQLTEnum ["Telephone","VHF","E-mail","P2000"],null = True,autoIncrement = False}],primaryKey = ["id"],foreignKeys = []},{SQLTable|name = "P2000Receiver",columns = [{SQLColumn|name = "capCode",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "id",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["id"],foreignKeys = [(["id"],"CommunicationMean",["id"])]},{SQLTable|name = "EmailAccount",columns = [{SQLColumn|name = "emailAddress",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "id",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["id"],foreignKeys = [(["id"],"CommunicationMean",["id"])]},{SQLTable|name = "VHFRadio",columns = [{SQLColumn|name = "callSign",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "mmsi",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "id",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["id"],foreignKeys = [(["id"],"CommunicationMean",["id"])]},{SQLTable|name = "Telephone",columns = [{SQLColumn|name = "phoneNo",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "id",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["id"],foreignKeys = [(["id"],"CommunicationMean",["id"])]},{SQLTable|name = "Incident",columns = [{SQLColumn|name = "incidentNo",type = SQLTInteger ,null = True,autoIncrement = True},{SQLColumn|name = "title",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "summary",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "type",type = SQLTEnum ["Aircraft appears in difficulties","Aircraft collision","Aircraft crash","Aircraft ditch","Aircraft emergency","Aircraft overdue","Diver in problems","Diver missing","DSC alert in NLSSR","DSC alert outside NLSSR","False alert good intent","False alert malicious intent","Family message","Flare sighted","INMARSAT alert in NLSRR","INMARSAT alert outside NLSRR","Medevac","Medical advice","NRB test","Person appears in difficulties","Person body recovery","Person in problems","Person missing","Rig incident","Rig man overboard","SAR HELI unavailable","SART alert","Surfer appears in difficulties","Surfer in problems","Surfer missing","Vessel appears in difficulties","Vessel capsized","Vessel collision","Vessel engine or steering problems","Vessel fire or explosion","Vessel man overboard","Vessel overdue","Vessel piracy or hijack","Vessel sunk","Vessel taking water","Vessel unsure of position","Yacht aground","Yacht appears in difficulties","Yacht capsized","Yacht collision","Yacht engine problems","Yacht fire or explosion","Yacht gear fouled","Yacht man overboard"],null = True,autoIncrement = False},{SQLColumn|name = "phase",type = SQLTEnum ["INCERFA","ALERFA","DETRESFA"],null = True,autoIncrement = False},{SQLColumn|name = "closed",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["incidentNo"],foreignKeys = []},{SQLTable|name = "WeatherData",columns = [{SQLColumn|name = "weatherType",type = SQLTEnum ["Rain","Drizzle","Mist","Fog","Snow","Hail","Sunny","Haze","Cloudy","Showers","Thunderstorms"],null = True,autoIncrement = False},{SQLColumn|name = "windDirection",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "windSpeed",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "visibility",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "seaState",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "swellDirection",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "waveHeight",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "airTemp",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "seaTemp",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "cloudBase",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "barometric",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "incidentNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["incidentNo"],foreignKeys = [(["incidentNo"],"Incident",["incidentNo"])]},{SQLTable|name = "LogEntry",columns = [{SQLColumn|name = "incident",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "eventAt",type = SQLTDatetime ,null = True,autoIncrement = False},{SQLColumn|name = "loggedAt",type = SQLTDatetime ,null = True,autoIncrement = False},{SQLColumn|name = "loggedBy",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "message",type = SQLTText ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "INMARSATCMessage",columns = [{SQLColumn|name = "inmarsatNo",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "toCes",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "position_lat",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_lon",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_desc",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "positionUpdated",type = SQLTTime ,null = True,autoIncrement = False},{SQLColumn|name = "course",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "speed",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "activation",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "positionActivated",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "courseSpeedActivated",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "DSCMessage",columns = [{SQLColumn|name = "callTime",type = SQLTDatetime ,null = True,autoIncrement = False},{SQLColumn|name = "category",type = SQLTEnum ["Safety","Routine","Urgency","Distress","Invalid"],null = True,autoIncrement = False},{SQLColumn|name = "fromMmsi",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "fromCountry",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "no",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "rqi",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "format",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "distressId",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "nature",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "position_lat",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_lon",type = SQLTReal ,null = True,autoIncrement = False},{SQLColumn|name = "position_desc",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "workstation",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "teleCmd",type = SQLTText ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "Communication",columns = [{SQLColumn|name = "communicationNo",type = SQLTInteger ,null = True,autoIncrement = True},{SQLColumn|name = "time",type = SQLTDatetime ,null = True,autoIncrement = False},{SQLColumn|name = "type",type = SQLTEnum ["Phone call","Radio call","E-mail message","P2000 message","DSC message"],null = True,autoIncrement = False},{SQLColumn|name = "direction",type = SQLTEnum ["In","Out"],null = True,autoIncrement = False},{SQLColumn|name = "handledBy",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "status",type = SQLTEnum ["Pending","Ringing","Connected","Answered","Missed","Sent"],null = True,autoIncrement = False},{SQLColumn|name = "withContact",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["communicationNo"],foreignKeys = []},{SQLTable|name = "P2000Message",columns = [{SQLColumn|name = "capCode",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "prio",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "body",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "communicationNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["communicationNo"],foreignKeys = [(["communicationNo"],"Communication",["communicationNo"])]},{SQLTable|name = "EmailMessage",columns = [{SQLColumn|name = "recipient",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "sender",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "subject",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "body",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "communicationNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["communicationNo"],foreignKeys = [(["communicationNo"],"Communication",["communicationNo"])]},{SQLTable|name = "Message",columns = [{SQLColumn|name = "communicationNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["communicationNo"],foreignKeys = [(["communicationNo"],"Communication",["communicationNo"])]},{SQLTable|name = "RadioCall",columns = [{SQLColumn|name = "channel",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "callNotes",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "communicationNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["communicationNo"],foreignKeys = [(["communicationNo"],"Communication",["communicationNo"])]},{SQLTable|name = "PhoneCall",columns = [{SQLColumn|name = "externalNo",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "externalRef",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "callNotes",type = SQLTText ,null = True,autoIncrement = False},{SQLColumn|name = "communicationNo",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = ["communicationNo"],foreignKeys = [(["communicationNo"],"Communication",["communicationNo"])]},{SQLTable|name = "communicationMeans1_communicationMeans2",columns = [{SQLColumn|name = "communicationMeans1",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "communicationMeans2",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "photos1_photos2",columns = [{SQLColumn|name = "photos1",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "contacts_incidents",columns = [{SQLColumn|name = "contacts",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "incidents",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []},{SQLTable|name = "communications_aboutIncidents",columns = [{SQLColumn|name = "communications",type = SQLTInteger ,null = True,autoIncrement = False},{SQLColumn|name = "aboutIncidents",type = SQLTInteger ,null = True,autoIncrement = False}],primaryKey = [],foreignKeys = []}]
implementation module Incidone.OP.ConceptsSQL
import iTasks.API.Extensions.DateTime</