Sending a Case Id List

Top  Previous  Next

Case Id List study types query the crash data by requesting a specific list of Case Id's.  (rather than the bulk of the study types that query based on other crash data values such as street names, dates, milepost, etc.)  This is done by maintaining a table in the Crash Magic system tables containing the case id numbers and associated study id.  As a result, unlike all other study types, the parameters needed for the query are not located in the study record.  For this reason, creating a Case Id list study is handled a bit differently.  While it is possible to create such a study using a URL command, the recommended method is to post the data from an html file.

 

As with other report creation described in this section, values must be sent for Action and StudyDefinition.  What is different is that a parameter called LoadCID must be passed as well.  It must contain a very specific XML format.  That format looks like this:

 

<pdroot>

  <CIDList>

    <CID>

      <UniqueNum1>1100002</UniqueNum1>

    </CID>

    <CID>

      <UniqueNum1>1100006</UniqueNum1>

    </CID>

    <CID>

      <UniqueNum1>1100009</UniqueNum1>

    </CID>

    <CID>

      <UniqueNum1>1100010</UniqueNum1>

    </CID>

  </CIDList>

</pdroot>

 

If the Case Id values are not numeric, then the data elements will be called <UniqueStr> rather than <UniqueNum1>.  Something like this:

 

<pdroot>

  <CIDList>

    <CID>

      <UniqueStr>14-1100002</UniqueStr>

    </CID>

    <CID>

      <UniqueStr>14-1100006</UniqueStr>

    </CID>

    <CID>

      <UniqueStr>14-1100009</UniqueStr>

    </CID>

    <CID>

      <UniqueStr>13-1100010</UniqueStr>

    </CID>

  </CIDList>

</pdroot>

 

 

So, a typical html file might look like this.  Actually, this is a real file sent from our Map Magic plugin to ArcMap to generate a diagram.

 

<!-- saved from url=(0014)about:internet -->

<html>

<title>Crash Magic Online</title>

<body onload="document.autosubmit.submit();">

<body>

<form name="autosubmit" method="post" target="_self" 

action="http://www.governmenttools.com/cm/CrashMagicOnline_ISAPI.dll/MagicAuto/

?ACTION=diagram&StudyDefinition=AccidentNbr List&Name=Selection%20Report">

 

<table width="100%" bgcolor="silver"><tr><td align="center">

<h1>Map Magic</h1>

Is preparing your new report<br/><br/><br/>

<input name="LoadCID" type="hidden" 

value="<pdroot><CIDList>

<CID><UniqueNum1>1100002</UniqueNum1></CID>

<CID><UniqueNum1>1100006</UniqueNum1></CID>

<CID><UniqueNum1>1100009</UniqueNum1></CID>

<CID><UniqueNum1>1100010</UniqueNum1></CID>

<CID><UniqueNum1>1100012</UniqueNum1></CID>

<CID><UniqueNum1>1100013</UniqueNum1></CID>

<CID><UniqueNum1>1100020</UniqueNum1></CID>

<CID><UniqueNum1>1100021</UniqueNum1></CID>

<CID><UniqueNum1>1100022</UniqueNum1></CID>

<CID><UniqueNum1>1100023</UniqueNum1></CID>

<CID><UniqueNum1>1216487</UniqueNum1></CID>

<CID><UniqueNum1>1216488</UniqueNum1></CID>

</CIDList></pdroot>" 

>

</form>

<img src="http://www.governmenttools.com/cm/CrashMagicOnline_ISAPI.dll/files/icons/processing.gif" title="Processing image" />

</td></tr></table>

<script language="Javascript">window.focus();</script>

</body>

</html>