watchman 0.0.7 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +3248 -0
- data/.rvmrc +1 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +35 -12
- data/lib/watchman/call.rb +43 -14
- data/lib/watchman/version.rb +1 -1
- data/spec/support/istatus_mocker.rb +257 -0
- data/spec/watchman/call_watcher_spec.rb +4 -4
- data/spec/watchman/client_spec.rb +1 -0
- data/watchman.gemspec +2 -0
- metadata +27 -38
data/.rvmrc
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
rvm
|
1
|
+
rvm 1.9.2-p180@watchman --create
|
2
2
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -7,19 +7,41 @@ PATH
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
-
|
10
|
+
archive-tar-minitar (0.5.2)
|
11
|
+
columnize (0.3.4)
|
12
|
+
diff-lcs (1.1.3)
|
11
13
|
fakeweb (1.3.0)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
14
|
+
linecache19 (0.5.12)
|
15
|
+
ruby_core_source (>= 0.1.4)
|
16
|
+
mechanize (2.0.1)
|
17
|
+
net-http-digest_auth (~> 1.1, >= 1.1.1)
|
18
|
+
net-http-persistent (~> 1.8)
|
19
|
+
nokogiri (~> 1.4)
|
20
|
+
webrobots (~> 0.0, >= 0.0.9)
|
21
|
+
net-http-digest_auth (1.1.1)
|
22
|
+
net-http-persistent (1.9)
|
23
|
+
nokogiri (1.5.0)
|
24
|
+
rake (0.9.2)
|
25
|
+
rspec (2.6.0)
|
26
|
+
rspec-core (~> 2.6.0)
|
27
|
+
rspec-expectations (~> 2.6.0)
|
28
|
+
rspec-mocks (~> 2.6.0)
|
29
|
+
rspec-core (2.6.4)
|
30
|
+
rspec-expectations (2.6.0)
|
21
31
|
diff-lcs (~> 1.1.2)
|
22
|
-
rspec-mocks (2.
|
32
|
+
rspec-mocks (2.6.0)
|
33
|
+
ruby-debug-base19 (0.11.25)
|
34
|
+
columnize (>= 0.3.1)
|
35
|
+
linecache19 (>= 0.5.11)
|
36
|
+
ruby_core_source (>= 0.1.4)
|
37
|
+
ruby-debug19 (0.11.6)
|
38
|
+
columnize (>= 0.3.1)
|
39
|
+
linecache19 (>= 0.5.11)
|
40
|
+
ruby-debug-base19 (>= 0.11.19)
|
41
|
+
ruby_core_source (0.1.5)
|
42
|
+
archive-tar-minitar (>= 0.5.2)
|
43
|
+
webrobots (0.0.11)
|
44
|
+
nokogiri (>= 1.4.4)
|
23
45
|
|
24
46
|
PLATFORMS
|
25
47
|
ruby
|
@@ -27,6 +49,7 @@ PLATFORMS
|
|
27
49
|
DEPENDENCIES
|
28
50
|
bundler (>= 1.0.0.rc.6)
|
29
51
|
fakeweb
|
30
|
-
|
52
|
+
rake
|
31
53
|
rspec (>= 2.3.0)
|
54
|
+
ruby-debug19
|
32
55
|
watchman!
|
data/lib/watchman/call.rb
CHANGED
@@ -50,7 +50,7 @@ module Watchman
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def pro_qa_notes
|
53
|
-
notes.select{|n| n[:text] =~
|
53
|
+
notes.select{|n| n[:text] =~ /ProQA/}
|
54
54
|
end
|
55
55
|
|
56
56
|
def incidental_notes
|
@@ -59,17 +59,25 @@ module Watchman
|
|
59
59
|
|
60
60
|
def spliced_notes
|
61
61
|
s_notes = {}
|
62
|
-
|
62
|
+
|
63
|
+
operator_notes = notes.select{|n| n[:text] =~ /[\(\[]\d+-\d+[\)\]]$/}
|
64
|
+
splicing_notes = operator_notes + pro_qa_notes()
|
65
|
+
splicing_notes.each do |note|
|
66
|
+
token = "Pro QA"
|
63
67
|
note_text = note[:text]
|
64
|
-
|
65
|
-
|
66
|
-
|
68
|
+
if note[:text] =~ /[\(\[]\d+-\d+[\)\]]$/
|
69
|
+
note_text_arr = note_text.split(/\s/)
|
70
|
+
token = note_text_arr.delete_at(note_text_arr.size - 1)
|
71
|
+
note_text = note_text_arr.join(" ")
|
72
|
+
end
|
73
|
+
|
67
74
|
if s_notes[token].nil?
|
68
|
-
s_notes[token] = [{:time=>note[:time],:text=>
|
75
|
+
s_notes[token] = [{:time=>note[:time],:text=>note_text}]
|
69
76
|
else
|
70
|
-
s_notes[token] << {:time=>note[:time],:text=>
|
77
|
+
s_notes[token] << {:time=>note[:time],:text=>note_text}
|
71
78
|
end
|
72
79
|
end
|
80
|
+
|
73
81
|
s_notes
|
74
82
|
end
|
75
83
|
|
@@ -110,17 +118,25 @@ module Watchman
|
|
110
118
|
end
|
111
119
|
|
112
120
|
def time_of_alarm
|
113
|
-
if
|
114
|
-
|
115
|
-
elsif
|
116
|
-
|
121
|
+
if is_prior_call?
|
122
|
+
parse_time_at "#{main_table_path}/tr[16]/td"
|
123
|
+
elsif is_active_call?
|
124
|
+
parse_time_at "#{main_table_path}/tr[18]/td"
|
117
125
|
end
|
118
126
|
end
|
119
127
|
|
120
128
|
def time_of_first_unit_on_scene
|
121
|
-
|
129
|
+
if is_prior_call?
|
130
|
+
parse_time_at "#{main_table_path}/tr[17]/td"
|
131
|
+
elsif is_active_call?
|
132
|
+
parse_time_at "#{main_table_path}/tr[19]/td"
|
133
|
+
end
|
122
134
|
end
|
135
|
+
|
136
|
+
|
123
137
|
private
|
138
|
+
|
139
|
+
|
124
140
|
def nature_cell_text
|
125
141
|
if xpath_text("#{main_table_path}/tr[3]/th") == "Nature"
|
126
142
|
xpath_text("#{main_table_path}/tr[3]/td")
|
@@ -129,16 +145,29 @@ module Watchman
|
|
129
145
|
end
|
130
146
|
end
|
131
147
|
|
148
|
+
def is_active_call?
|
149
|
+
xpath_text("#{main_table_path}/tr[18]/th") == "Date Recd"
|
150
|
+
end
|
151
|
+
|
152
|
+
def is_prior_call?
|
153
|
+
xpath_text("#{main_table_path}/tr[16]/th") == "Inc Date/Time"
|
154
|
+
end
|
155
|
+
|
132
156
|
def main_table_path
|
133
157
|
"/html/body/table/tr[1]/td[1]/table"
|
134
158
|
end
|
135
159
|
|
160
|
+
def xpath(path)
|
161
|
+
@page.parser.xpath(path)
|
162
|
+
end
|
163
|
+
|
136
164
|
def xpath_text(path)
|
137
165
|
xpath(path).text.strip
|
138
166
|
end
|
139
167
|
|
140
|
-
def
|
141
|
-
|
168
|
+
def parse_time_at(path)
|
169
|
+
time_string = xpath_text(path)
|
170
|
+
DateTime.strptime time_string, "%m/%d/%Y %H:%M:%s"
|
142
171
|
end
|
143
172
|
end
|
144
173
|
end
|
data/lib/watchman/version.rb
CHANGED
@@ -37,6 +37,14 @@ class IstatusMocker
|
|
37
37
|
'content-type'=>"text/html",
|
38
38
|
:body => CALL_LIST_HTML)
|
39
39
|
end
|
40
|
+
|
41
|
+
def active_call_page
|
42
|
+
PageMocker.new(PROQA_CALL_HTML)
|
43
|
+
end
|
44
|
+
|
45
|
+
def prior_call_page
|
46
|
+
PageMocker.new(INCIDENT_HTML)
|
47
|
+
end
|
40
48
|
end
|
41
49
|
|
42
50
|
CALL_LIST_HTML = "/*{\"calls\":[{\"incnum\":\"<td class=Status style=><a href='DisplayCall.php?Incid=201023885' target=Fire>201023885 </a></td>\",\"time\":\"13:49\",\"pri\":\"5\",\"tac\":\"CF1 \",\"addr\":\"1 BROADWAY E-CO.C1\",\"bldg\":\"BACK & NECK PAIN CENTER \",\"grid\":\"28123S \",\"firearea\":\"112C\",\"nature\":\"55B4-ELCTRL ODOR \",\"units\":\"<SPAN style=\\\"white-space:nowrap;\\\" CLASS=\\\"INC\\\"><a href=ApparatusDetail.php?TruckID=SNZ1 CLASS=\\\"INC\\\"> SNZ1m</a></SPAN> \",\"dispcode\":\"SR \"},{\"incnum\":\"<td class=Status style=background-color:#D6E5EE;><a href='DisplayCall.php?Incid=201023884' target=Fire>201023884 </a></td>\",\"time\":\"13:42\",\"pri\":\"3\",\"tac\":\"BF1 \",\"addr\":\"607 SPRINGTIME DR-AS\",\"bldg\":\" \",\"grid\":\"3910E \",\"firearea\":\"17-19A\",\"nature\":\"26C2-SICK PERSON \",\"units\":\"<SPAN style=\\\"white-space:nowrap;\\\" CLASS=\\\"AVL\\\"><a href=ApparatusDetail.php?TruckID=G1706 CLASS=\\\"AVL\\\"> G1706</a></SPAN> <SPAN style=\\\"white-space:nowrap;\\\" CLASS=\\\"ONS\\\"><a href=ApparatusDetail.php?TruckID=M241 CLASS=\\\"ONS\\\"> M241m</a></SPAN> \",\"dispcode\":\"FRM \"},{\"incnum\":\"<td class=Status style=><a href='DisplayCall.php?Incid=201023883' target=Fire>201023883 </a></td>\",\"time\":\"13:40\",\"pri\":\"9\",\"tac\":\"AMB \",\"addr\":\"1600 BROADWAY E-CO\",\"bldg\":\"BOONE HOSPITAL CENTER \",\"grid\":\"29073S \",\"firearea\":\"143\",\"nature\":\"RT-ROUTINE TRANSPORT \",\"units\":\"<SPAN style=\\\"white-space:nowrap;\\\" CLASS=\\\"ENH\\\"><a href=ApparatusDetail.php?TruckID=M151 CLASS=\\\"ENH\\\"> M151m</a></SPAN> \",\"dispcode\":\"NA \"},{\"incnum\":\"<td class=Status style=background-color:#D6E5EE;><a href='DisplayCall.php?Incid=201023879' target=Fire>201023879 </a></td>\",\"time\":\"12:55\",\"pri\":\"9\",\"tac\":\"CF1 \",\"addr\":\"201 ORR ST-CO\",\"bldg\":\"COLUMBIA FIRE DEPT STATION 1 \",\"grid\":\"29073P \",\"firearea\":\"154\",\"nature\":\"TRA-TRAINING \",\"units\":\"<SPAN style=\\\"white-space:nowrap;\\\" CLASS=\\\"ONS\\\"><a href=ApparatusDetail.php?TruckID=Q44 CLASS=\\\"ONS\\\"> Q44</a></SPAN> <SPAN style=\\\"white-space:nowrap;\\\" CLASS=\\\"ONS\\\"><a href=ApparatusDetail.php?TruckID=Q6 CLASS=\\\"ONS\\\"> Q6m</a></SPAN> <SPAN style=\\\"white-space:nowrap;\\\" CLASS=\\\"ONS\\\"><a href=ApparatusDetail.php?TruckID=Q8 CLASS=\\\"ONS\\\"> Q8</a></SPAN> <SPAN style=\\\"white-space:nowrap;\\\" CLASS=\\\"ONS\\\"><a href=ApparatusDetail.php?TruckID=L1 CLASS=\\\"ONS\\\"> L1</a></SPAN> \",\"dispcode\":\"NA \"},{\"incnum\":\"<td class=Status style=><a href='DisplayCall.php?Incid=201023876' target=Fire>201023876 </a></td>\",\"time\":\"12:48\",\"pri\":\"9\",\"tac\":\"AMB \",\"addr\":\"1600 BROADWAY E-CO\",\"bldg\":\"BOONE HOSPITAL CENTER \",\"grid\":\"29073S \",\"firearea\":\"143\",\"nature\":\"LDT-LONG DISTANCE TRANSPORT \",\"units\":\"<SPAN style=\\\"white-space:nowrap;\\\" CLASS=\\\"ENH\\\"><a href=ApparatusDetail.php?TruckID=M113 CLASS=\\\"ENH\\\"> M113m</a></SPAN> \",\"dispcode\":\"NA \"},{\"incnum\":\"<td class=Status style=background-color:#D6E5EE;><a href='DisplayCall.php?Incid=201023863' target=Fire>201023863 </a></td>\",\"time\":\"10:55\",\"pri\":\"9\",\"tac\":\"AMB \",\"addr\":\"1600 BROADWAY E-CO\",\"bldg\":\"BOONE HOSPITAL CENTER \",\"grid\":\"29073S \",\"firearea\":\"143\",\"nature\":\"LDT-LONG DISTANCE TRANSPORT \",\"units\":\"<SPAN style=\\\"white-space:nowrap;\\\" CLASS=\\\"ONH\\\"><a href=ApparatusDetail.php?TruckID=M112 CLASS=\\\"ONH\\\"> M112m</a></SPAN> \",\"dispcode\":\"NA \"},{\"incnum\":\"<td class=Status style=><a href='DisplayCall.php?Incid=201023861' target=Fire>201023861 </a></td>\",\"time\":\"10:46\",\"pri\":\"9\",\"tac\":\"AMB \",\"addr\":\"1 HOSPITAL DR-CO\",\"bldg\":\"UNIVERSITY HOSPITAL & CLIN MU \",\"grid\":\"28134C \",\"firearea\":\"311\",\"nature\":\"LDT-LONG DISTANCE TRANSPORT \",\"units\":\"<SPAN style=\\\"white-space:nowrap;\\\" CLASS=\\\"ONH\\\"><a href=ApparatusDetail.php?TruckID=M212 CLASS=\\\"ONH\\\"> M212m</a></SPAN> \",\"dispcode\":\"LDT \"}]}*/"
|
@@ -1159,4 +1167,253 @@ class IstatusMocker
|
|
1159
1167
|
|
1160
1168
|
|
1161
1169
|
}
|
1170
|
+
|
1171
|
+
PROQA_CALL_HTML = %Q{
|
1172
|
+
|
1173
|
+
|
1174
|
+
<HTML>
|
1175
|
+
<HEAD>
|
1176
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
1177
|
+
<!--<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">-->
|
1178
|
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
|
1179
|
+
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
|
1180
|
+
<META HTTP-EQUIV="EXPIRES" CONTENT="0">
|
1181
|
+
<TITLE>EnRoute I-STATUS - Version 5.10</TITLE>
|
1182
|
+
<LINK REL="stylesheet" HREF="DisplayFormat.css" TYPE="text/css">
|
1183
|
+
<script language="javascript">
|
1184
|
+
//bring the page to foreground
|
1185
|
+
this.focus();
|
1186
|
+
</script>
|
1187
|
+
</HEAD>
|
1188
|
+
<BODY CLASS="Detail" j=l>
|
1189
|
+
<H3 class="Status">Active Incident: 201116829</H3><table cellpadding="0" cellspacing="0" width="100%"><tr width="100%"><td valign="top" width="50%"><table cellpadding="0" cellspacing="0" width="100%"><tr><th class="Detail" align="left" width=$cw>Location</th><td class="Detail" align="left" colspan="3"><a href="SearchDStatsSubmit.php?Address=705 BUSINESS LOOP 70 W-CO">705 BUSINESS LOOP 70 W-CO</a></td></tr><tr><TH CLASS='Detail' align=left width=100px>
|
1190
|
+
Building</TH>
|
1191
|
+
<TD CLASS='Detail' COLSPAN=3>
|
1192
|
+
MOSERS GROCERY SUPERMARKET </TD>
|
1193
|
+
</tr><tr><th class="Detail" align="left" width=$cw>Nature</th><TD CLASS='Detail' COLSPAN=3>
|
1194
|
+
12D4-SEIZURE </TD>
|
1195
|
+
</tr><tr><TH CLASS='Detail' align=left width=100px>
|
1196
|
+
Priority</TH>
|
1197
|
+
<TD CLASS='Detail' width=110px>
|
1198
|
+
2</TD>
|
1199
|
+
<TH CLASS='Detail' align=left width=100px>
|
1200
|
+
Dispatch Code</TH>
|
1201
|
+
<TD CLASS='Detail' >
|
1202
|
+
FRM </TD>
|
1203
|
+
</tr><tr><TH CLASS='Detail' align=left>
|
1204
|
+
Grid</TH>
|
1205
|
+
<TD CLASS='Detail' width=110px>
|
1206
|
+
28024A </TD>
|
1207
|
+
<TH CLASS='Detail' align=left width=100px>
|
1208
|
+
Tac</TH>
|
1209
|
+
<TD CLASS='Detail' >
|
1210
|
+
CF1 </TD>
|
1211
|
+
</tr><tr><TH CLASS='Detail' align=left>
|
1212
|
+
Fire Area</TH>
|
1213
|
+
<td class="Detail" COLSPAN="3">221</td></tr><tr><TH CLASS='Detail' align=left>
|
1214
|
+
Plan</TH>
|
1215
|
+
<TD CLASS='Detail' width=110px>
|
1216
|
+
</TD>
|
1217
|
+
<TH CLASS='Detail' align=left width=100px>
|
1218
|
+
Map</TH>
|
1219
|
+
<TD CLASS='Detail' >
|
1220
|
+
</TD>
|
1221
|
+
</tr><tr><TH CLASS='Detail' align=left>
|
1222
|
+
Cross1</TH>
|
1223
|
+
<td class="Detail" COLSPAN="3">JACKSON ST</td></tr><tr><TH CLASS='Detail' align=left>
|
1224
|
+
Cross2</TH>
|
1225
|
+
<td class="Detail" COLSPAN="3">SEXTON RD W</td></tr><tr><th class="Detail" align="left">Hyd1</th><td class="Detail" width=$dw>SE CORNER OF LOT, 705 BL70W </td><th class="Detail" align="left" width=$cw>Hyd2</th><td class="Detail">SW CORNER OF PRICE CHOPPER </td></tr><tr><th class="Detail" align="left" width=$cw>Cautions</th><td class="Detail" colspan="3">EC FC </td></tr><tr><td colspan="4"><hr color=navy></td></tr><tr><TH CLASS='Detail' align=left width=100px>
|
1226
|
+
Complainant</TH>
|
1227
|
+
<TD CLASS='Detail' colspan=3>
|
1228
|
+
MOSER'S DISCOUNT FOODS/DAVID</TD>
|
1229
|
+
</tr><tr><TH CLASS='Detail' align=left width=100px>
|
1230
|
+
Phone</TH>
|
1231
|
+
<TD CLASS='Detail' colspan=3>
|
1232
|
+
442-4102 </TD>
|
1233
|
+
</tr><tr><th class="Detail" align="left" width=$cw>Dispatcher</th><td class="Detail" width=$dw>ALL </td><th class="Detail" align="left" width=$cw>CallTaker</th><td class="Detail">LEE </td></tr><tr><TH CLASS='Detail' align=left width=100px>
|
1234
|
+
DispO</TH>
|
1235
|
+
<TD CLASS='Detail' >
|
1236
|
+
ND </TD>
|
1237
|
+
<TH CLASS='Detail' align=left width=100px>
|
1238
|
+
Meth. Alarm</TH>
|
1239
|
+
<TD CLASS='Detail' >
|
1240
|
+
1 </TD>
|
1241
|
+
</tr><tr><td colspan="4"><hr color=navy></td></tr><tr><TH CLASS='Detail' align=left width=100px>
|
1242
|
+
Date Recd</TH>
|
1243
|
+
<TD CLASS='Detail' colspan=3>
|
1244
|
+
09/04/2011 16:51:35</TD>
|
1245
|
+
</tr><tr><TH CLASS='Detail' align=left width=100px>
|
1246
|
+
On Scene</TH>
|
1247
|
+
<TD CLASS='Detail' colspan=3>
|
1248
|
+
09/04/2011 16:56:19</TD>
|
1249
|
+
</tr><tr><TH CLASS='Detail' align=left width=100px>
|
1250
|
+
Upgrade</TH>
|
1251
|
+
<TD CLASS='Detail' colspan=3>
|
1252
|
+
00:00:00</TD>
|
1253
|
+
</tr><tr><TH CLASS='Detail' align=left width=100px>
|
1254
|
+
Pat Contact</TH>
|
1255
|
+
<TD CLASS='Detail' colspan=3>
|
1256
|
+
00:00:00</TD>
|
1257
|
+
</tr></TR>
|
1258
|
+
</table></td><td valign="top" align="center" width="50%"><table border="1" bordercolor="#76a5b6" cellpadding="0" cellspacing="0" width="90%"><TR >
|
1259
|
+
<TH CLASS='Detail' align=left>
|
1260
|
+
Apparatus</TH>
|
1261
|
+
<TH CLASS='Detail' align="center">
|
1262
|
+
DSP</TH>
|
1263
|
+
<TH CLASS='Detail' align="center">
|
1264
|
+
ENR</TH>
|
1265
|
+
<TH CLASS='Detail' align="center">
|
1266
|
+
ONS</TH>
|
1267
|
+
<TH CLASS='Detail' align="center">
|
1268
|
+
Tran</TH>
|
1269
|
+
<TH CLASS='Detail' align="center">
|
1270
|
+
OSH</TH>
|
1271
|
+
<TH CLASS='Detail' align="center">
|
1272
|
+
AVL</TH>
|
1273
|
+
</TR>
|
1274
|
+
<TR >
|
1275
|
+
<TD CLASS='AVL' >
|
1276
|
+
Q9 </TD>
|
1277
|
+
<TD CLASS='Detail' align="center">
|
1278
|
+
16:52:54</TD>
|
1279
|
+
<TD CLASS='Detail' align="center">
|
1280
|
+
00:00:00</TD>
|
1281
|
+
<TD CLASS='Detail' align="center">
|
1282
|
+
00:00:00</TD>
|
1283
|
+
<TD CLASS='Detail' align="center">
|
1284
|
+
00:00:00</TD>
|
1285
|
+
<TD CLASS='Detail' align="center">
|
1286
|
+
00:00:00</TD>
|
1287
|
+
<TD CLASS='Detail' align="center">
|
1288
|
+
16:53:53</TD>
|
1289
|
+
</TR>
|
1290
|
+
<TR >
|
1291
|
+
<TD CLASS='ONS' >
|
1292
|
+
M221 </TD>
|
1293
|
+
<TD CLASS='Detail' align="center">
|
1294
|
+
16:52:56</TD>
|
1295
|
+
<TD CLASS='Detail' align="center">
|
1296
|
+
16:56:14</TD>
|
1297
|
+
<TD CLASS='Detail' align="center">
|
1298
|
+
16:56:19</TD>
|
1299
|
+
<TD CLASS='Detail' align="center">
|
1300
|
+
00:00:00</TD>
|
1301
|
+
<TD CLASS='Detail' align="center">
|
1302
|
+
00:00:00</TD>
|
1303
|
+
<TD CLASS='Detail' align="center">
|
1304
|
+
00:00:00</TD>
|
1305
|
+
</TR>
|
1306
|
+
<TR >
|
1307
|
+
<TD CLASS='AVL' >
|
1308
|
+
L2 </TD>
|
1309
|
+
<TD CLASS='Detail' align="center">
|
1310
|
+
16:53:59</TD>
|
1311
|
+
<TD CLASS='Detail' align="center">
|
1312
|
+
16:54:35</TD>
|
1313
|
+
<TD CLASS='Detail' align="center">
|
1314
|
+
00:00:00</TD>
|
1315
|
+
<TD CLASS='Detail' align="center">
|
1316
|
+
00:00:00</TD>
|
1317
|
+
<TD CLASS='Detail' align="center">
|
1318
|
+
00:00:00</TD>
|
1319
|
+
<TD CLASS='Detail' align="center">
|
1320
|
+
16:59:19</TD>
|
1321
|
+
</TR>
|
1322
|
+
</table></td></tr><tr><td colspan="4"><hr color=navy></td></tr><tr><table cellpadding="1" cellspacing="0" width="100%"><tr><th class="Detail" align="left" width=$cw>Notes</th><td class="Detail" colspan=3"><table cellpadding="1" cellspacing="0" width="100%"><TR >
|
1323
|
+
<td class="Notes" valign="top">16:51:35</td><TD CLASS='Notes' >
|
1324
|
+
*CITY: CO-COLUMBIA </TD>
|
1325
|
+
</TR>
|
1326
|
+
<TR >
|
1327
|
+
<td class="Notes" valign="top">16:51:35</td><TD CLASS='Notes' >
|
1328
|
+
!!911 CN - PRICE CHOPPER.</TD>
|
1329
|
+
</TR>
|
1330
|
+
<TR >
|
1331
|
+
<td class="Notes" valign="top">16:51:47</td><TD CLASS='Notes' >
|
1332
|
+
ProQAE Number: 0011008763</TD>
|
1333
|
+
</TR>
|
1334
|
+
<TR >
|
1335
|
+
<td class="Notes" valign="top">16:52:46</td><TD CLASS='Notes' >
|
1336
|
+
!***Nature changed via ProQAE From: </TD>
|
1337
|
+
</TR>
|
1338
|
+
<TR >
|
1339
|
+
<td class="Notes" valign="top">16:52:46</td><TD CLASS='Notes' >
|
1340
|
+
!PA</TD>
|
1341
|
+
</TR>
|
1342
|
+
<TR >
|
1343
|
+
<td class="Notes" valign="top">16:52:46</td><TD CLASS='Notes' >
|
1344
|
+
ProQAE Determinant Code: 12D4</TD>
|
1345
|
+
</TR>
|
1346
|
+
<TR >
|
1347
|
+
<td class="Notes" valign="top">16:52:46</td><TD CLASS='Notes' >
|
1348
|
+
ProQAE 58 year old, Male, Conscious, Breathing</TD>
|
1349
|
+
</TR>
|
1350
|
+
<TR >
|
1351
|
+
<td class="Notes" valign="top">16:52:46</td><TD CLASS='Notes' >
|
1352
|
+
ProQAE status uncertain. Effective breathing not</TD>
|
1353
|
+
</TR>
|
1354
|
+
<TR >
|
1355
|
+
<td class="Notes" valign="top">16:52:46</td><TD CLASS='Notes' >
|
1356
|
+
ProQAE verified => 35. Caller Statement: SEIZURE.</TD>
|
1357
|
+
</TR>
|
1358
|
+
<TR >
|
1359
|
+
<td class="Notes" valign="top">16:52:54</td><TD CLASS='Notes' >
|
1360
|
+
Fire service incident 201116829 (00000194-100)</TD>
|
1361
|
+
</TR>
|
1362
|
+
<TR >
|
1363
|
+
<td class="Notes" valign="top">16:52:58</td><TD CLASS='Notes' >
|
1364
|
+
Complainant name changed from: MOSER'S (00000161-140)</TD>
|
1365
|
+
</TR>
|
1366
|
+
<TR >
|
1367
|
+
<td class="Notes" valign="top">16:52:58</td><TD CLASS='Notes' >
|
1368
|
+
DISCOUNT FOODS (00000161-140)</TD>
|
1369
|
+
</TR>
|
1370
|
+
<TR >
|
1371
|
+
<td class="Notes" valign="top">16:53:06</td><TD CLASS='Notes' >
|
1372
|
+
TAC CHANNEL CF1 ASSIGNED (00000194-100)</TD>
|
1373
|
+
</TR>
|
1374
|
+
<TR >
|
1375
|
+
<td class="Notes" valign="top">16:53:08</td><TD CLASS='Notes' >
|
1376
|
+
****LEFT DOOR IS BEST ACCESS (00000161-140)</TD>
|
1377
|
+
</TR>
|
1378
|
+
<TR >
|
1379
|
+
<td class="Notes" valign="top">16:53:15</td><TD CLASS='Notes' >
|
1380
|
+
PT IN FRONT OF COURTESY BOOTH (00000161-140)</TD>
|
1381
|
+
</TR>
|
1382
|
+
<TR >
|
1383
|
+
<td class="Notes" valign="top">16:53:59</td><TD CLASS='Notes' >
|
1384
|
+
Units 'on air': L2 (00000194-100)</TD>
|
1385
|
+
</TR>
|
1386
|
+
<TR >
|
1387
|
+
<td class="Notes" valign="top">16:54:42</td><TD CLASS='Notes' >
|
1388
|
+
**PT AWAKE AND BREATHING (00000161-140)</TD>
|
1389
|
+
</TR>
|
1390
|
+
<TR >
|
1391
|
+
<td class="Notes" valign="top">16:54:44</td><TD CLASS='Notes' >
|
1392
|
+
NO LONGER SEIZING (00000161-140)</TD>
|
1393
|
+
</TR>
|
1394
|
+
<TR >
|
1395
|
+
<td class="Notes" valign="top">16:54:52</td><TD CLASS='Notes' >
|
1396
|
+
HIT HIS HEAD WHEN HE FEL (00000161-140)</TD>
|
1397
|
+
</TR>
|
1398
|
+
<TR >
|
1399
|
+
<td class="Notes" valign="top">16:54:53</td><TD CLASS='Notes' >
|
1400
|
+
FELL (00000161-140)</TD>
|
1401
|
+
</TR>
|
1402
|
+
<TR >
|
1403
|
+
<td class="Notes" valign="top">16:55:06</td><TD CLASS='Notes' >
|
1404
|
+
*SEIZURE STARTED BEFORE PT FELL (00000161-140)</TD>
|
1405
|
+
</TR>
|
1406
|
+
</table></td></tr></table></tr></table></html><script language="javascript" src="JSFuncs.js"></script>
|
1407
|
+
|
1408
|
+
|
1409
|
+
|
1410
|
+
}
|
1411
|
+
end
|
1412
|
+
|
1413
|
+
class PageMocker
|
1414
|
+
attr_reader :parser
|
1415
|
+
|
1416
|
+
def initialize(html)
|
1417
|
+
@parser = Nokogiri::HTML(html)
|
1418
|
+
end
|
1162
1419
|
end
|
@@ -59,11 +59,11 @@ describe "Watchman::CallWatcher" do
|
|
59
59
|
end
|
60
60
|
|
61
61
|
it "gets the time of alarm" do
|
62
|
-
call.time_of_alarm.should ==
|
62
|
+
call.time_of_alarm.should == DateTime.strptime("12/19/2010 14:15:05", "%m/%d/%Y %H:%M:%s")
|
63
63
|
end
|
64
64
|
|
65
65
|
it "gets the on-scene time" do
|
66
|
-
call.time_of_first_unit_on_scene ==
|
66
|
+
call.time_of_first_unit_on_scene.should == DateTime.strptime("12/19/2010 14:27:09", "%m/%d/%Y %H:%M:%s" )
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
@@ -107,11 +107,11 @@ describe "Watchman::CallWatcher" do
|
|
107
107
|
end
|
108
108
|
|
109
109
|
it "gets the time of alarm" do
|
110
|
-
call.time_of_alarm.should ==
|
110
|
+
call.time_of_alarm.should == DateTime.strptime("12/29/2010 14:54:53", "%m/%d/%Y %H:%M:%s")
|
111
111
|
end
|
112
112
|
|
113
113
|
it "gets the on-scene time" do
|
114
|
-
call.time_of_first_unit_on_scene ==
|
114
|
+
call.time_of_first_unit_on_scene.should == DateTime.strptime("12/29/2010 15:04:18", "%m/%d/%Y %H:%M:%s")
|
115
115
|
end
|
116
116
|
|
117
117
|
it "grabs the apparatus array" do
|