Discussion

EF System: Add event comment: detailed Ani/Ali remark

Comments: 3 - Last Comment by bfoss on Apr 24, 2017  
Posted on Apr 18, 2016
 
 
(5.0)
 

NOTE: See ****UPDATED VERSION**** in comments below

 

TitleName/Agency Point of ContactVersion of EdgeFrontier

Add event comment: detailed Ani/Ali remark
Beth Whitezel
6.3.0.4298

Adds a more detailed Ani/Ali remark to an event upon creation and when additional Ani/Ali data is associated with the event. The comment is added using the IFCADEventAddComments command. The Ani/Ali data is queried directly from the CAD database via a view that we added to our instance called vw_AniAliDataForRemark. 

If you want to customize what the ani/ali remark says or formatting you would change the view. You could also use this as an example for adding a comment to an event based off of data from a database (or other source). We were advised to put the views in a schema specific to our organization so that when database updates are made our objects would not be deleted/modified.

To set up you will have to enter the database connection information.

The format of the remark currently looks something like this:

LOCATION:6201 6TH AVE - W, TACOMA \PHONE:(360) 979-XXXX \COMP:VERIZON \SRC:WPH1 \PNUM:253-722-XXXX \ESN_TEXT:PSAP=SS911 WIRELESS 911 CALL VERIFY CALLER'S LOCATION +047.256596 -122.517622 \ESN:02957

 

Here is the view... I couldn't add multiple files.

CREATE VIEW [ss911].[vw_AniAliDataForRemark]  
(
     [num_1]
    ,[eid]
    ,[eventCallID]
    ,[aniAliString]
)
AS
    WITH cte AS(
    --Some of the data when returned contains carriage returns (CHAR(13)) and/or line feeds (CHAR(10)) from the source. Replace these characters with a space to ensure
    --AniAli data is not broken up when added to remarks.
    SELECT ae.[num_1], ae.[eid], cech.[event_call_id],
        REPLACE(REPLACE(
            'LOCATION:'    + ISNULL(aniali.[estnum],'') + ' ' + ISNULL(aniali.[efeanme],'') + coalesce(', ' + aniali.loc_id, '') + ', ' + ISNULL(aniali.[ccity],'') +
            ' \PHONE:'    + ISNULL(aniali.[clrnum],'')  +
            ' \COMP:'    + COALESCE(aniali.clname, cech.clname, '') +
            ' \SRC:'    + ISNULL(aniali.[service],'') +
            ' \PNUM:'    + ISNULL(aniali.[pilot_nnx],'')   +
            ' \ESN_TEXT:'    + ISNULL(aniali.[esn_text],'') + ISNULL(' ' + [y_lat],'') + ISNULL(' ' + [x_long],'') +
            ' \ESN:'    + ISNULL(aniali.[esn], '')
        ,CHAR(13), ' '), CHAR(10), ' ') as aniAliString
    FROM [dbo].[an_al] as aniali
    INNER JOIN [dbo].[common_event_call_history] AS cech ON cech.call_id = aniali.call_num
    INNER JOIN [dbo].[agency_event] AS ae ON ae.eid = cech.eid
    )
    --Do not show rows that have already been listed as a remark for this eid.
    SELECT * FROM cte
    WHERE aniAliString NOT IN (SELECT comm FROM evcom WHERE eid = cte.eid)
GO

 

SS911_Add_ANIALI_Remark.xml
YOUR USE OF DOWNLOADED MATERIALS PROVIDED THROUGH THIS SITE IS ENTIRELY AT YOUR OWN RISK.
See the Disclaimers section in Terms of Use.
Point your RSS reader here for a feed of the latest messages in this topic
RE: Add event comment: detailed Ani/Ali remark
Posted on Mar 1, 2017 in response to: bwhitezel
 
   
 

Hi Beth - Did we discover a different way to watch for Advised Events today?

RE: Add event comment: detailed Ani/Ali remark
Posted on Apr 18, 2017 in response to: Rob Oesch
 
   
 

Hi Rob,

We have discovered two different ways to watch for Advised Events.

1. Subscribe to the IFCADEventReport, and look for OriginatingActions of CadEventNewAdvised.

2. Subscribe to the IFCADEventReport, and look for OriginatingActions of EventCommentNotification, with the SupplementalData/CommentText of "Accept Advised Event:"

    Access the CommentText via XPath like: 

/*[local-name()='IFCADEventReport']/SupplementalData/CommentText

****UPDATED VERSION**** RE: Add event comment: detailed Ani/Ali remark
Posted on Apr 24, 2017 in response to: bwhitezel
 
 
(5.0)
   
 
****UPDATED VERSION****
The attached system is the latest version of the AniAliRemark system.
This version includes multiple improvements/revisions to: 
  • account for multiple entries coming in at the same time, by use of a queue
  • delay remark injection by 2 seconds for benefit of MPS users view of critical information.
  • Add new Ani/Ali 'location uncertainty' value  to the injected comment string.
  • convert view into table function
  • eliminate chance of duplicates
The system works in this way:
  • When a CadEventNew or CadEventAdvised 'OriginatingAction' message comes through the published IFCAD930.IFCADEventReport:
    • we insert the AgencyEventID into a new series as a "QualifyingAniAliEvent"
  • Also, when a EventCommentNotification message comes through the published IFCAD930.IFCADEventReport, with the text (StartsWith) "Duplicate Event:" OR "Accept Advised Event":
    • we insert the AgencyEventID into a new series as a "QualifyingAniAliEvent"
  • When a new row is added to the QualifyingAniAliEvent series, an AniAliRemarkEnqueue stored procedure is executed, which captures the aniali string (via custom function), and inserts necessary information into a database table
  • Every 2 seconds (configurable), an AniAliRemarkDequeue stored procedure is executed, which selects data from the above mentioned table, returns it to the EdgeFrontier calling system (into series AniAliDataForRemark), and deletes the same rows from the existing table (eliminates chance of duplicates).
  • When a new row is added to the AniAliDataForRemark series, the injection command (IFCAD930.IFCADCommands.IFCADEventAddComments) is called, with given parameters which include the target AgencyEventID and the desired ANIALI remark.
SS911_Add_ANIALI_Remark.zip

Add a Comment

Please sign in on the right menu to comment.  If you do not have an account, please Join now.