CAD - Import Interface File Format

 

This section describes the process and file format used for importing Computer Aided Dispatch (CAD) information/data from external systems into the Calls For Service module of Crimestar RMS.  CAD data is imported via a file that uses a simple XML layout where each XML tag represents a specific data field as shown in the data field table contained within this help topic below.     The XML file can contain one ore more event records and each event record can optionally contain one or more unit history status transactions.  When the XML import file contains a CAD record with an event # <event_no> value that already exists within the Calls For Service table of the Crimestar RMS database the existing Calls For Service data record will be updated and overwritten by the contents of the data in the XML import file.  When the event # <event_no> of the record in the XML import file does not already exist within the Calls For Service table of the Crimestar RMS database a new Calls For Service record is created.  

 

MANUAL IMPORT

 

XML files containing CAD data can be imported manually via the "Import" menu of Crimestar RMS.  

 

Using the RMS import form the XM fie is manually selected using a standard Windows file dialog selection process.  Once the file is selected click the button labeled

"Import CFS/CAD Records from XML File"

 

 

 

AUTOMATED IMPORT

 

To facilitate the automation of this process so that CAD XML data files can be imported to the Crimestar RMS Calls For Service tables on an ongoing and continuous basis, Crimestar RMS provides a small companion utility program named CADTOCFS.EXE which can be setup and left running.  The program monitors a specific shared windows folder or directory and when new CAD XML data files are found in that folder the program will automatically read, process and optionally delete the file after it has been processed..

    

When the CAD XML import is done via the automated CADTOCFS.EXE companion program, all CAD XML import files should follow a specific file naming convention as follows:  

 

"CAD_YYYYMMDDHHMMSS.XML"  (where YYYY = year; MM= month; DD= day of the month; HH=hours; MM=Minutes; SS=Seconds the file was created).  Using this format helps to ensure that multiple CAD XML Import files can co-exist within the same directory/folder without file name conflicts as well as allowing the files to be processed in a logical order or sequence ensuring that the file with the latest data is processed last and overwrites any existing CAD event which may have been imported prior.

 

 

Whether you are importing the CAD XML data files manually via the Crimestar RMS program menu or via the automated CADTOCFS.EXE utility program all XML data files containing CAD information should adhere to the following data record XML file layout format and must use these specific XML tag names in order for data to be mapped to the proper fields within the Crimestar RMS Calls For Service table..

The XML file should follow the format below and use the XML tag names specified.

 

XML FIELD TAG

 Description

Data Type

Max Length (Bytes)

Required

<cadevent> Designates an event record within the crimestar XML data block.

 

 

Yes

<event_no> The event # assigned to the data record.

Character

12

Yes

<police_no> The police incident # (if any) assigned to the event.

Character

12

 

<fire_no> The fire incident # (if any) assigned to the event.

Character

12

 

<med_no> The medical incident # (if any) assigned to the event.

Character

12

 

<other_no1> Another misc # (if any) assigned to the event.

Character

12

 

<other_no2> Another misc # (if any) assigned to the event.

Character

12

 

<call_type_code> The call type for the event.  This code must match one of the user defined code in the Crimestar RMS Calls For Service / CAD Call Type configuration table.

Character

8

Yes

<event_type> The primary event type using pre-defined codes as follows:   P=Police Event F=Fire Event M=Medical Event O=Other Event
A=All / Multiple Types

Character

1

 

<agency_code> The agency code for the event such as "APD" (Anytown Police Department) to distinguish events in a multiple agency dispatch environment.  This code must match one of the user defined agency codes in the Crimestar RMS system configuration table.

Character

6

Yes

<priority> The event priority using a value of 0 thru 9 where 0 is the highest priority and 9 is the lowest priority.

Integer

 0 thru 9

1

 

<call_source> How the call was received. Uses a single character code such as "P"=Phone; "9"=911; "O"=Office Initiated etc.   This code must match one of the user defined call source codes in the Crimestar RMS system configuration table.

Character

1

Yes

<datetime_rpt> Date and Time that the event or call was received.  Must be formatted in XML datetime format: 1999-10-31T22:05:00

DateTime

19

Yes

<common_location> Common place name location which can be used when no specific postal address is available.

Character

60

 

<loc_digits> Digits or house number for the event address

Character

6

 

<loc_prefix> Street Name Prefix for the event address.  This code must match one of the user defined location street prefix codes in the Crimestar RMS system configuration table.

Character

2

 

<loc_street> Root Street Name for the event address

Character

30

 

<loc_street_type> Street Name Type (ST:RD:AV:CT) for the event address.   This code must match one of the user defined street type codes in the Crimestar RMS system configuration table.

Character

2

 

<loc_suffix> Street Name Suffix for the event address.  This code must match one of the user defined location street suffix codes in the Crimestar RMS system configuration table.

Character

2

 

<loc_apartment> Apartment # related to the event address

Character

6

 

<city> City where the event is located

Character

2

Yes

<county_code> County where the event is located

Character

6

Yes

<state> State where the event is located.   This code must match one of the (user defined) standardized state abbreviation codes in the Crimestar RMS system configuration table.

Character

2

Yes

<beat_code> Beat code associated with the location of the event.   This code must match one of the user defined location beat codes in the Crimestar RMS system configuration table.

Character

6

 

<sector_code> Sector code associated with the location of the event.   This code must match one of the user defined location sector codes in the Crimestar RMS system configuration table.

Character

6

 

<district_code> District code associated with the location of the event.   This code must match one of the user defined location district codes in the Crimestar RMS system configuration table.

Character

6

 

<latitude> Latitude associated with the location of the event.

Decimal

12,6

 

<longitude> Longitude associated with the location of the event

Decimal

12,6

 

<description> Description of the event or circumstances

Text

 

 

<reporting_party> Name of Person/Party reporting the event.  This does not have to be a proper name and could be a title such as "Store Manager"

Character

40

 

<rp_last_name> Last name of person reporting the event, if known

Character

20

 

<rp_first_name> First name of person reporting the event, if known

Character

14

 

<rp_middle_name> Middle name of person reporting the event, if known

Character

14

 

<rp_dob> Date of Birth for person reporting the event. YYYY-MM-DD, if known.   Must be in XML Date or Datetime format: 1999-10-31T00:00:00

Date

or Datetime

10

 

<rp_location> Location or Address for person reporting the event

Character

40

 

<rp_city> City Location for the person reporting the event

Character

20

 

<rp_state> State Location for the person reporting the event.   This code must match one of the (user defined) standardized state abbreviation codes in the Crimestar RMS system configuration table.

Character

2

 

<rp_zip_code> Zip Code for the person reporting the event

Character

9

 

<rp_area_code> Phone Area Code for the person reporting the event

Character

3

 

<rp_phone> Phone number for the person reporting the event.  The phone number should be formatted as "999-9999" with the hyphen in byte position 4.

Character

8

 

<req_contact> Does the Person Reporting the event want to be contacted (Y/N)

Logical

1

 

<dispatcher_id> ID Code for the dispatcher entering the event.

Character

6

Yes

<pri_unit_id> Primary responding unit ID code.   This code must match one of the user defined CFS/CAD Unit ID codes in the Crimestar RMS system configuration table.

Character

6

 

<pri_officer_id> Primary responding officer ID code.   This code must match one of the user defined Officer ID codes in the Crimestar RMS system configuration table.

Character

6

 

<time_pri_disp> Primary Unit datetime dispatched to the event.   Must be in XML Datetime format:  1999-10-31T22:06:00

Datetime

 

 

<time_pri_enroute> Primary Unit datetime enroute to the event location.  Must be in XML Datetime format:  1999-10-31T22:06:00

Datetime

 

 

<time_pri_arrive> Primary Unit datetime arrived at the event location.  Must be in XML Datetime format: 1999-10-31T22:06:00

Datetime

 

 

<time_pri_clear> Primary Unit datetime cleared from the event.  Must be in XML Datetime format: 1999-10-31T22:06:00

Datetime

 

 

<sec_unit_id> Secondary responding unit ID code.   This code must match one of the user defined CFS/CAD Unit ID codes in the Crimestar RMS system configuration table.

Character

6

 

<sec_officer_id> Secondary responding officer ID code.  This code must match one of the user defined Officer ID codes in the Crimestar RMS system configuration table.

Character

6

 

<time_sec_disp> Secondary Unit datetime dispatched to the event.  Must be in XML Datetime format: 1999-10-31T22:06:00

Datetime

 

 

<time_sec_enroute> Secondary Unit datetime enroute to the event location.  Must be in XML Datetime format: 1999-10-31T22:06:00

Datetime

 

 

<time_sec_arrive> Secondary Unit datetime arrived at the event location.  Must be in XML Datetime format: 1999-10-31T22:06:00

Datetime

 

 

<time_sec_clear> Secondary Unit datetime cleared from the event.  Must be in XML Datetime format: 1999-10-31T22:06:00

Datetime

 

 

<total_consumed> Total time represented in minutes consumed by all units attached to the event

Integer

5

 

<emd_code> Emergency Medical Disposition code.  This code must match one of the user defined EMD codes in the Crimestar RMS system configuration table.

Character

6

 

<dispo_code> Event disposition code.  This code must match one of the user defined CFS/CAD event disposition codes in the Crimestar RMS system configuration table.

Character

6

Yes

<dispo_cmnts> Event disposition comments

Text

 

 

<press_release> Event flagged for Press Release (Y/N)

Logical

1

 

<console_id> Dispatch Console ID where event was created

Character

4

Yes

<unit_history> Designates the Unit History Data Block within the <cadevent> record.  When defined within the <cadevent> record there must only be one (1) <unit_history> tag.

 

 

 

<unit>

Designates a Unit record within the <unithistory> data block of the <cadevent> record. There can be multiple <unit> records with the <unithistory> data block.

 

 

 

<unit_id>

Identifies the field Unit ID as used in CAD.    This code must match one of the user defined CFS/CAD Unit ID codes in the Crimestar RMS system configuration table.   * This is an optionally required field. It is not required that you provide the <unit_history> data tag at all, however if you do choose to provide unit related data then the <unit_id> tag is required within the <unit> </unit> tags.

Character

6

*Yes

<officer_id>

Primary Officer ID for the field unit.   This code must match one of the user defined Officer ID codes in the Crimestar RMS system configuration table.

Character

6

 

<officer_id2>

Second Officer ID for the field unit when a 2 officer car.    This code must match one of the user defined Officer ID codes in the Crimestar RMS system configuration table.

Character

6

 

<vehicle_id>

Vehicle Fleet ID#.     This code should  match one of the user defined fleet Vehicle  ID codes in the Crimestar RMS system configuration table.

Character

8

 

<status_code>

Unit Staus Code in CAD.  Must be one of the following:
D=Dispatched
E=Enroute
A=Arrived on scene
F=Free'd from the event prior to arrival
CL=Cleared from event after arrival M=Miscellaneous status T=Transport RL=Radio Log.  Used to log radio comments and information given by officers that does not change their current status.   * This is an optionally required field. It is not required that you provide the <unit_history> data tag however if you do and you choose to provide unit related data then the <status_code> tag is required within the <unit> </unit> tags.

Character

2

*Yes

<status_time>

Time of the Status as designated by the status code  Must be in XML Datetime format: 1999-10-31T22:06:00   * This is an optionally required field. It is not required that you provide the <unit_history> data tag however if you do and you choose to provide unit related data then the <status_time> tag is required within the <unit> </unit> tags.

Datetime

19

*Yes

<status_loc>

Location for the status (may or may not be the same as event location)

Character

30

 

<status_cmt>

Unit Status Comment

Character

90

 

<dispatcher_id>

ID Code for the dispatcher entering the status transaction.   * This is an optionally required field. It is not required that you provide the <unit_history> data tag however if you do and you choose to provide unit related data then the <dispatcher_id> tag is required within the <unit> </unit> tags.  

Character

6

*Yes

<console_id>

Dispatch Console ID where status transaction was created   * This is an optionally required field. It is not required that you provide the <unit_history> data tag however if you do and you choose to provide unit related data then the <console_ide> tag is required within the <unit> </unit> tags.  

Character

4

*Yes

</unit>

     </unit_history>

</cadevent>

 

 

 

 

 

 

The following is a sample XML file layout as required for data import:

 

<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>

<Crimestar>

<cadevent>

<event_no>199910311</event_no>

<police_no>99-00178</police_no>

<fire_no></fire_no>

<med_no></med_no>

<other_no1></other_no1>

<other_no2></other_no2>

<call_type_code>415PC</call_type_code>

<event_type>P</event_type>

<agency_code>MHPD</agency_code>

<priority>0</priority>

<call_source>P</call_source>

<datetime_rpt>1999-10-31T22:05:00</datetime_rpt>

<common_location>123 W MAIN ST</common_location>

<loc_digits>123</loc_digits>

<loc_prefix>W</loc_prefix>

<loc_street>MAIN</loc_street>

<loc_street_type>ST</loc_street_type>

<loc_suffix>W</loc_suffix>

<loc_apartment>2</loc_apartment>

<city>ANYTOWN</city>

<county_code>ANYCOUNTY</county_code>

<state>CA</state>

<beat_code>01</beat_code>

<sector_code>N</sector_code>

<district_code>28</district_code>

<latitude></latitude>

<longitude></longitude>

<description>R/P reports loud music in the area.</description>

<reporting_party>JOE SMITH</reporting_party>

<rp_last_name>SMITH</rp_last_name>

<rp_first_name>JOE</rp_first_name>

<rp_middle_name></rp_middle_name>

<rp_dob>1960-04-19</rp_dob>

<rp_location>125 W MAIN ST</rp_location>

<rp_city>ANYTOWN</rp_city>

<rp_state>CA</rp_state>

<rp_zip_code>95153</rp_zip_code>

<rp_area_code>408</rp_area_code>

<rp_phone>555-1212</rp_phone>

<req_contact>true</req_contact>

<dispatcher_id>CJW</dispatcher_id>

<pri_unit_id>1A12</pri_unit_id>

<pri_officer_id>L57</pri_officer_id>

<time_pri_disp>1999-10-31T22:06:00</time_pri_disp>

<time_pri_enroute>1999-10-31T22:06:22</time_pri_enroute>

<time_pri_arrive>1999-10-31T22:09:50</time_pri_arrive>

<time_pri_clear>1999-10-31T22:39:21</time_pri_clear>

<sec_unit_id>1B3</sec_unit_id>

<sec_officer_id>L21</sec_officer_id>

<time_sec_disp>1999-10-31T22:06:00</time_sec_disp>

<time_sec_enroute>1999-10-31T22:06:31</time_sec_enroute>

<time_sec_arrive>1999-10-31T22:10:12</time_sec_arrive>

<time_sec_clear>1999-10-31T22:39:29</time_sec_clear>

<total_consumed>66</total_consumed>

<emd_code>AMB</emd_code>

<dispo_code>NRPT</dispo_code>

<dispo_cmnts>No Report.  Subjects told to keep the noise down </dispo_cmnts>

<press_release>false</press_release>

<console_id>01</console_id>

<unit_history>

<unit>

<unit_id>1A12</unit_id>

<officer_id>L57</officer_id>

<officer_id2></officer_id2>

<vehicle_id>1522</vehicle_id>

<status_code>D</status_code>

<status_time>1999-10-31T22:06:00</status_time>

<status_loc></status_loc

<status_cmt></status_cmt>

<dispatcher_id>CJW</dispatcher_id>

<console_id>01</console_id>

</unit>

<unit>

<unit_id>1B3</unit_id>

<officer_id>L21</officer_id>

<officer_id2></officer_id2>

<vehicle_id>1401</vehicle_id>

<status_code>D</status_code>

<status_time>1999-10-31T22:06:00</status_time>

<status_loc></status_loc>

<status_cmt></status_cmt>

<dispatcher_id>CJW</dispatcher_id>

<console_id>01</console_id>

</unit>

<unit>

<unit_id>1A12</unit_id>

<officer_id>L57</officer_id>

<officer_id2></officer_id2>

<vehicle_id>1522</vehicle_id>

<status_code>E</status_code>

<status_time>1999-10-31T22:06:22</status_time>

<status_loc></status_loc>

<status_cmt></status_cmt>

<dispatcher_id>CJW</dispatcher_id>

<console_id>01</console_id>

</unit>

<unit>

<unit_id>1B3</unit_id>

<officer_id>L21</officer_id>

<officer_id2></officer_id2>

<vehicle_id>1401</vehicle_id>

<status_code>E</status_code>

<status_time>1999-10-31T22:06:31</status_time>

<status_loc></status_loc>

<status_cmt></status_cmt>

<dispatcher_id>CJW</dispatcher_id>

<console_id>01</console_id>

</unit>

<unit>

<unit_id>1A12</unit_id>

<officer_id>L57</officer_id>

<officer_id2></officer_id2>

<vehicle_id>1522</vehicle_id>

<status_code>A</status_code>

<status_time>1999-10-31T22:09:50</status_time>

<status_loc>125 W MAIN ST</status_loc>

<status_cmt>Translator Needed</status_cmt>

<dispatcher_id>CJW</dispatcher_id>

<console_id>01</console_id>

</unit>

<unit>

<unit_id>1B3</unit_id>

<officer_id>L21</officer_id>

<officer_id2></officer_id2>

<vehicle_id>1401</vehicle_id>

<status_code>A</status_code>

<status_time>1999-10-31T22:10:12</status_time>

<status_loc>125 W MAIN ST</status_loc>

<status_cmt></status_cmt>

<dispatcher_id>CJW</dispatcher_id>

<console_id>01</console_id>

</unit>

<unit>

<unit_id>1A12</unit_id>

<officer_id>L57</officer_id>

<officer_id2></officer_id2>

<vehicle_id>1522</vehicle_id>

<status_code>CL</status_code>

<status_time>1999-10-31T22:39:21</status_time>

<status_loc></status_loc>

<status_cmt>NO REPORT</status_cmt>

<dispatcher_id>CJW</dispatcher_id>

<console_id>01</console_id>

</unit>

<unit>

<unit_id>1B3</unit_id>

<officer_id>L21</officer_id>

<officer_id2></officer_id2>

<vehicle_id>1401</vehicle_id>

<status_code>CL</status_code>

<status_time>1999-10-31T22:39:29</status_time>

<status_loc></status_loc>

<status_cmt>FILL UNIT</status_cmt>

<dispatcher_id>CJW</dispatcher_id>

<console_id>01</console_id>

</unit>

</unit_history>

</cadevent>

</Crimestar>