Welcome to SynapseDirect Sign in | Join | Help
in Search

SynapseDirect

Chickenscript

Chickenscripts

This blog will be used to add some scripts that you can use with Synapse EMR.

Here's a script that you can use on the http://127.0.0.1:8001/cgi-bin/searchprovider.html page that appears when you click on the Firefox icon on the provider screen ( 193 beta-14 )

It takes the provider address and brings up the Yahoo map for Canada. Change the pick("Canada"); to pick("United States"); if you want to search in the USA.  You can then print out the map and hand it to the patient.

 

// This chickenscript grabs the address details
// and brings up the appropriate map

try
{ street = find(/Number&Street: ([\S\s]+)/).groups[1]; }
catch(e) {
street = ''; // this is two single quotes
}
try { city = find(/City&State: ([\S\s]+)/).groups[1]; }
catch(e) {
city = '';
}

with(openTab('http://maps.yahoo.com/', true)) {
enter("Address",street);
enter("City",city);
pick("Canada");
click("Get Map");
}

Share this post: email it! | digg it!
Published Friday, October 27, 2006 6:19 PM by Graham

Comments

 

Graham said:

This is another script that can run on this page.  This one works for NZ, and searches for the providers ZIP code, and then, looks for their location on a local map service.  So, it shows how one trigger can bring up 2 pages.

try { number = find(/Number: ([\w\s]+)/).groups[1]; }
    catch(e) {
    number = '';
}

try { street = find(/Street: ([\w\s]+)/).groups[1]; }
    catch(e) {
    street = '';
}

try { suburb = find(/Suburb: ([\w\s]+)/).groups[1];
    catch(e) {
    suburb = '';
}

try { city = find(/City: ([\w\s]+)/).groups[1]; }
    catch(e) {
    city = '';
}

try { street2 = find(/Number&Street: ([\S\s]+)/).groups[1]; }
    catch(e) {
    street2 = '';  // this is two single quotes
}

try { city2 = find(/City&State: ([\S\s]+)/).groups[1]; }
    catch(e) {
    city2 = '';
}

with(openTab('http://www.nzpost.co.nz/Cultures/en-NZ/OnlineTools/PostCodeFinder/', true)) {
    enter("Number",number)
    enter("Street Name",street)
    enter("Suburb",suburb)
    enter("City",city)
    click("SubmitAddressSearchImageButton")
}

with(openTab('http://www.wises.co.nz/Default.aspx/', true)) {
    enter("Street",street2);
    enter("Auckland",city2);
    click("Search");
}

October 27, 2006 4:01 AM
Anonymous comments are disabled

This Blog

Syndication

Recent Posts

Tags

No tags have been created or used yet.

Archives

Try-out the Click to try-out Synapse EMR Express Edition Free Synapse EMR Express Edition Click to try-out Synapse EMR Express Edition · ©2006 SynapseDirect · Terms and Conditions · Privacy Policy · help us keep Synapse EMR Express free for all Doctors

managing your electronic medical records · Unique Visits Dell Computer