can a web script or macro do this?

FrontlineWarrior

Diamond Member
Apr 19, 2000
4,905
1
0
Hello all,

I have a very tedious task of looking up hospital diagnosis codes (ICD 9 codes) on this website:

http://www.lumrix.com/icd-9.php

and copying what it says.

For example, I look up "2780" and it outputs "obesity"

I have an excel file with all of these numbers in one column, and I want to input the text that the webpage spits out into a second column.

e.g.:

278.0 obesity
752.64 Micropenis
091 Early syphilis, symptomatic

...etc

Is that possible at all?
 

Ka0t1x

Golden Member
Jan 23, 2004
1,724
0
71
I don't know about writing something that can do that, but you might be able to get a CSV file from them, if the information is publicly available.

Never hurts to ask.
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
all webforms are going to be sent one of two ways.

GET or POST.

Either HTML or javascript submitted.

Once you figure that out, it's trivial to write a script to submit the proper values, then scrape the page to get the proper results.
 

Duwelon

Golden Member
Nov 3, 2004
1,058
0
0
If you can utilize .NET 2.0 or higher, the HtmlDocument and it's associated classes can do exactly what you want. Basically add a WebBrowser control to a windows form, and you can manipulate the document contained within. There's probably an easier way but I know for sure it's all built into the .NET 2.0+ framework.
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
with php you could use cURL, scraping a single page (with or without form data) is pretty easy.
 
Oct 27, 2007
17,009
5
0
The site uses a simple GET request using the data string /icd-9.php?k=2780&suchen=search&f=lumrix-search&x=
Without knowing what programming languages you're familiar with it's impossible to give solid suggestions but I'd probably build a simple web scraper. You can use regular expressions to grab the data, it's 2am here so I'm not going to do a bunch of the leg work right now but you'd use a regex that looks something like >\d+(.\d)* ([a-zA-Z\s]+)< (this is because the data is presented in HTML like ...onMouseOut="window.status=''">278.01 Morbid obesity</a></.... Building a .csv file from this would be trivial.