calculating drive time between injury & hospital in spinal cord injury research using online...
TRANSCRIPT
Calculating Drive Time Between Injury & Hospital in
Spinal Cord Injury Research Using Online Navigation Tools
Jayson H. Shurgold
Background
‘A world without paralysis after spinal cord injury’
Access to Care and Timing (ACT)•Define the continuum of care experienced by individuals that suffer a traumatic spinal cord injury•Data is collected from 15 Canadian care centres that specialize in the acute care, treatment, and/or rehabilitation of patients with spinal cord injuries
•The outcome is a mathematical model designed to predict the effect of specific scenarios, and the subsequent affect on patient flow and overall outcome
CommunityInjury Acute Care Rehab
One hypotheses is that spinal cord injuries sustained closer to a specialized treatment centre results in more timely access to specialized care and overall better outcomes for the patient.
How do we define proximity?
From our data:
• Time of injury • Time of admission to specialized hospital• First 3 digits of the postal code where the
injury occurred• Address of closest specialized hospital
Background
Question 1:
Can we estimate proximity using
T admission - T injury
Injury at 2:00 PMAdmission at 6:00 PMProximity = 4 hours
Background
Question 1:
Can we estimate proximity using
T admission - T injury
Injury at 2:00 PMAdmission at 6:00 PMProximity = 4 hours
Answer: Sometimes, but no.
In reality, ~34% of the observations are considered ‘indirect’. This means patients are admitted to a non-specialized centre prior to admission to a specialized centre.
Background
Question 2:
Can we estimate proximity using built in functions?
- Geodist (latitude-1, longitude-1, latitude-2, longitude-2)
- Haverstine Formula - SASHELP.zipcode
Background
Question 2:
Can we estimate proximity using built in functions?
- Geodist (latitude-1, longitude-1, latitude-2, longitude-2)
- Haverstine Formula - SASHELP.zipcode
Answer:Not ideal.
If you happen to have the latitude and longitude of the incident and target in degrees, you can use the GeoDist function to calculate straight line distance.
Ignores roads and natural barriers
Background
Question 3:
Can I just Google this?
Background
Question 3:
Can I just Google this?
Answer:You can, but it’s not recommended.
With large databases, doing this by hand takes a long time and is prone to error.
Background
Question 4:
Is there any hope?
Background
SAS Nav Systems
Mike ZdebUniversity of Albany School of Public Health
Ash Roy & Yingbo Na Canadian Institute for Health Information
What is an API?• Application Programming Interface
•‘In most procedural languages, an API specifies a set of functions or routines that accomplish a specific task or are allowed to interact with a specific software component’
Introduction to APIs
Graphic User Interface
Standard API output (XML)
Searching non-specific addresses:
Asking most navigation software to calculate directions between two FSAs or Postal Codes results in directions from ‘centroid to centroid’.
For example, the calculated distance between ‘V6B’ and ‘V6B 6P6’ is 0.4Km, centroid to centroid.
Introduction to APIs
V6B 6P6
V6B
Full Postal Code:
Forward Sortation Area (FSA):
Introduction to the dataset
ID p1 p2 GeoDesc TOITOA_VG
H1 V0N V5Z1M9 North of Whisler 1:00 22:002 V8B V5Z1M9 Squamish 12:30 15:003 V8B V5Z1M9 Squamish 12:30 15:004 V6B V5Z1M9 Downtown 9:00 9:455 V5K V5Z1M9 PNE 16:30 18:306 V7R V5Z1M9 Grouse Grind 6:00 8:007 V2S V5Z1M9 Abbotsford 4:00 7:308 V0K V5Z1M9 Lillooet 7:00 17:00
9 V7A V5Z1M9George Massey
Tunnel 11:00 12:0010 V0K V5Z1M9 Lillooet 13:00 23:3011 V6X V5Z1M9 Richmond 8:00 9:0012 V6J V5Z1M9 Kits 16:00 16:30
Dataset: ACT_Raw
ID Unique ID of participantP1 Forward Sortation Area of injury
P2 Postal Code of Vancouver General Hospital
GeoDesc Geographical description
TOI Time of injury
TOA_VGH Time of admission to Vancouver General Hospital
Data Dictionary
Introduction to the dataset
PC_IDV0N V5Z1M9V8B V5Z1M9V8B V5Z1M9V6B V5Z1M9V5K V5Z1M9V7R V5Z1M9V2S V5Z1M9V0K V5Z1M9V7A V5Z1M9V0K V5Z1M9V6X V5Z1M9V6J V5Z1M9
ID p1 p2 GeoDescript TOITOA_VG
H1 V0N V5Z1M9 North of Whisler 1:00 22:002 V8B V5Z1M9 Squamish 12:30 15:003 V8B V5Z1M9 Squamish 12:30 15:004 V6B V5Z1M9 Downtown 9:00 9:455 V5K V5Z1M9 PNE 16:30 18:306 V7R V5Z1M9 Grouse Grind 6:00 8:007 V2S V5Z1M9 Abbotsford 4:00 7:308 V0K V5Z1M9 Lillooet 7:00 17:00
9 V7A V5Z1M9George Massey
Tunnel 11:00 12:0010 V0K V5Z1M9 Lillooet 13:00 23:3011 V6X V5Z1M9 Richmond 8:00 9:0012 V6J V5Z1M9 Kits 16:00 16:30
Dataset: ACT_Raw
Concatenate the source and target location information into a single variable:
This is the start of determining the total number of unique queries.
Data Manipulations
p1 p2 PC_IDV0K V5Z1M9 V0K V5Z1M9V0K V5Z1M9 V0K V5Z1M9V0N V5Z1M9 V0N V5Z1M9V2S V5Z1M9 V2S V5Z1M9V5K V5Z1M9 V5K V5Z1M9V6B V5Z1M9 V6B V5Z1M9V6J V5Z1M9 V6J V5Z1M9V6X V5Z1M9 V6X V5Z1M9V7A V5Z1M9 V7A V5Z1M9V7R V5Z1M9 V7R V5Z1M9V8B V5Z1M9 V8B V5Z1M9V8B V5Z1M9 V8B V5Z1M9
ID p1 p2 Notes TOI TOA_VGH PC_ID1 V0N V5Z1M9 North 1:00:00 22:00:00 V0N V5Z1M92 V8B V5Z1M9 Squam 12:30:00 15:00:00 V8B V5Z1M93 V8B V5Z1M9 Squam 12:30:00 15:00:00 V8B V5Z1M94 V6B V5Z1M9 Downt 9:00:00 9:45:00 V6B V5Z1M95 V5K V5Z1M9 PNE 16:30:00 18:30:00 V5K V5Z1M96 V7R V5Z1M9 Grous 6:00:00 8:00:00 V7R V5Z1M97 V2S V5Z1M9 Abbos 4:00:00 7:30:00 V2S V5Z1M98 V0K V5Z1M9 Lilloo 7:00:00 17:00:00 V0K V5Z1M99 V7A V5Z1M9 Georg 11:00:00 12:00:00 V7A V5Z1M9
10 V0K V5Z1M9 Lilloo 13:00:00 23:30:00 V0K V5Z1M911 V6X V5Z1M9 Richm 8:00:00 9:00:00 V6X V5Z1M912 V6J V5Z1M9 Kits 16:00:00 16:30:00 V6J V5Z1M9
Dataset: ACT_Dataset (n=12) Dataset: PC (n=10)
Remove duplicate postal code combinations:There is no need to look up the same postal code twice. This will save time.
This step reduced the number of actual queries from 2101 to 994
Dataset: PC (n=10)
API Macro
p1 p2 PC_IDV0K V5Z1M9 V0K V5Z1M9V0N V5Z1M9 V0N V5Z1M9V2S V5Z1M9 V2S V5Z1M9V5K V5Z1M9 V5K V5Z1M9V6B V5Z1M9 V6B V5Z1M9V6J V5Z1M9 V6J V5Z1M9V6X V5Z1M9 V6X V5Z1M9V7A V5Z1M9 V7A V5Z1M9V7R V5Z1M9 V7R V5Z1M9V8B V5Z1M9 V8B V5Z1M9
p1 p2 distance_val time_valV0K V5Z1M9 339.908 15343V0N V5Z1M9 440.64 27232V2S V5Z1M9 75.453 4093V5K V5Z1M9 9.56 1069V6B V5Z1M9 2.921 327V6J V5Z1M9 2.004 240V6X V5Z1M9 12.556 1224V7A V5Z1M9 18.905 1530V7R V5Z1M9 -2 -2V8B V5Z1M9 66.802 3958
Dataset: Dist_Time (n=10)
Distance_Val (Kilometres)Time_Val (Seconds)
Dataset: PC (n=10)
API Macro
p1 p2 PC_IDV0K V5Z1M9 V0K V5Z1M9V0N V5Z1M9 V0N V5Z1M9V2S V5Z1M9 V2S V5Z1M9V5K V5Z1M9 V5K V5Z1M9V6B V5Z1M9 V6B V5Z1M9V6J V5Z1M9 V6J V5Z1M9V6X V5Z1M9 V6X V5Z1M9V7A V5Z1M9 V7A V5Z1M9V7R V5Z1M9 V7R V5Z1M9V8B V5Z1M9 V8B V5Z1M9
p1 p2 distance_val time_valV0K V5Z1M9 339.908 15343V0N V5Z1M9 440.64 27232V2S V5Z1M9 75.453 4093V5K V5Z1M9 9.56 1069V6B V5Z1M9 2.921 327V6J V5Z1M9 2.004 240V6X V5Z1M9 12.556 1224V7A V5Z1M9 18.905 1530V7R V5Z1M9 -2 -2V8B V5Z1M9 66.802 3958
Dataset: Dist_Time (n=10)
Distance_Val (Kilometres)Time_Val (Seconds)
Errors output as -2
p1 p2 distance_val
time_val
V0K V5Z1M9
339.908 15343
V0N V5Z1M9
440.64 27232
V2S V5Z1M9
75.453 4093
V5K V5Z1M9
9.56 1069
V6B V5Z1M9
2.921 327
V6J V5Z1M9
2.004 240
V6X V5Z1M9
12.556 1224
V7A V5Z1M9
18.905 1530
V7R V5Z1M9
-2 -2
V8B V5Z1M9
66.802 3958
Dataset: Dist_Time (n=10) p1 p2 distance_
valtime_va
lV0K V5Z1M
9339.908 15343
V0N V5Z1M9
440.64 27232
V2S V5Z1M9
75.453 4093
V5K V5Z1M9
9.56 1069
V6B V5Z1M9
2.921 327
V6J V5Z1M9
2.004 240
V6X V5Z1M9
12.556 1224
V7A V5Z1M9
18.905 1530
V7R V5Z1M9
15.7 1503
V8B V5Z1M9
66.802 3958
Dataset: Dist_Time (n=10)
API Errors
Actual manual data entry for the ACT project is 18 / 994.
Now we have an accurate, timely, and reproducible method to define proximity based on two geographical locations*.
Dataset: Dist_Time (n=10)
Final Data
p1 p2 distance_val
time_val
V0K V5Z1M9
339.908 15343
V0N V5Z1M9
440.64 27232
V2S V5Z1M9
75.453 4093
V5K V5Z1M9
9.56 1069
V6B V5Z1M9
2.921 327
V6J V5Z1M9
2.004 240
V6X V5Z1M9
12.556 1224
V7A V5Z1M9
18.905 1530
V7R V5Z1M9
15.7 1503
V8B V5Z1M9
66.802 3958
Dataset: ACT_DriveTime (n=12)
*until the technology changes
ID p1 p2 TOI TOA_VGH
distance_val
time_val
1 V0N V5Z1M9 1:00:00 22:00:00 440.64 272322 V8B V5Z1M9 12:30:0
015:00:00 66.802 3958
3 V8B V5Z1M9 12:30:00
15:00:00 66.802 3958
4 V6B V5Z1M9 9:00:00 9:45:00 2.921 3275 V5K V5Z1M9 16:30:0
018:30:00 9.56 1069
6 V7R V5Z1M9 6:00:00 8:00:00 12.139 11187 V2S V5Z1M9 4:00:00 7:30:00 75.453 40938 V0K V5Z1M9 7:00:00 17:00:00 339.908 153439 V7A V5Z1M9 11:00:0
012:00:00 18.905 1530
10 V0K V5Z1M9 13:00:00
23:30:00 339.908 15343
11 V6X V5Z1M9 8:00:00 9:00:00 12.556 122412 V6J V5Z1M9 16:00:0
016:30:00 2.004 240
Final Analysis
What if…All patients were transported directly to a specialized health care centre, and how does this compare to the observed mean time to admission?
Assumptions12 minute average response time10 minute load delayRestricted by speed limitNo traffic delay
Final Analysis
ID time_val_M TTA_VGH_O1 453.8667 12002 65.96667 1503 65.96667 1504 5.45 455 17.81667 1206 18.63333 1207 68.21667 2108 255.7167 6009 25.5 60
10 255.7167 63011 20.4 6012 4 30
Dataset: ACT_SimpleID time_val_M TTA_VGH_
OTTA_VGH_
E1 453.867 1200 475.8672 65.967 150 87.9673 65.967 150 87.9674 5.45 45 27.455 17.817 120 39.8176 18.633 120 40.6337 68.217 210 90.2178 255.717 600 277.7179 25.5 60 47.5
10 255.717 630 277.71711 20.4 60 42.412 4 30 26
Dataset: ACT_Simple_Analysis
What if…All patients were transported directly to a specialized health care centre, and how does this compare to the observed mean time to admission?
Thank you for listening
Acknowledgements:
Mike ZdebUniversity of Albany School of Public Healthhttp://www.sascommunity.org/wiki/Driving_Distances_and_Drive_Times_using_SAS_and_Google_Maps
Ash Roy & Yingbo Na Canadian Institute fore Health Informationhttp://support.sas.com/resources/papers/proceedings12/091-2012.pdf
Special Thanks:
Suzanne HumphreysRick Hansen Institute
Argelio SantosRick Hansen Institute