Web services

Discussion in 'General Discussion' started by Graham, Oct 25, 2006.

  1. Graham

    Graham Developer Staff Member

    As mentioned on the front page blog, we now have a neat custom way of automating access to web services.

    This means for instance you can automate the following
    • Access patient laboratory web results
    • Look up drug data
    • Look up patient handouts for diseases
    • Look up disease data
    • Look up zip codes
    • Look up telephone numbers from web whitepages
  2. Jason

    Jason Developer / Handyman Staff Member

    Neat.

    The annoying thing for me is my lab blocks FireFox. Hard to believe.

    I definitely would like it to do search on

    (1) rxlist (www.rxlist.com). - could that be packaged for everyone ?

    (2) health canada drugs - http://search.hc-sc.gc.ca/cgi-bin/query?mss=dpd/english/active/simple

    (3) fpnotebook.com - (in the search box). Search queries look like this http://fpnotebook.com/search.asp?QU=eczema&CT=d%3A%5Cusers%5Csmoses%5Cdb- all you do is change the red word to what you need.

    multiple words - http://fpnotebook.com/search.asp?QU=Atopic+Dermatitis&CT=d%3A%5Cusers%5Csmoses%5Cdb

    Q: would there be a way to auto-include the most popular web services ?
  3. Graham

    Graham Developer Staff Member

    Yes, searches on the above is easy to do.

    As for auto-including .. no, because the user has to install the chickenfoot script themselves.

    I can write them .. but users have to install them.
  4. Jason

    Jason Developer / Handyman Staff Member

    Note: chickenfoot is not FireFox 2.0 Final compatible.
  5. Graham

    Graham Developer Staff Member

    Make sure that you use the 22nd Sept 2006 release which is compatible.
  6. Jason

    Jason Developer / Handyman Staff Member

    <pre id="pre">go("http://search.hc-sc.gc.ca/cgi-bin/query?mss=dpd/english/active/simple")
    pick("Active Ingredient")
    enter("Search for:", "omeprazole")
    click ("Search button")</pre><pre id="pre"></pre><pre id="pre">Is there a way to do this from Synapse ?</pre><pre id="pre"></pre><pre id="pre">I am doing this for a cma.ca website ... there is the problem of logging when when NOT logged in but then doing it a different way .. if already logged in.</pre><pre id="pre"></pre><pre id="pre"></pre>
  7. Graham

    Graham Developer Staff Member

    Yes, that would be simple to execute under Synapse.

    Not sure what you mean about logging ...
  8. Jason

    Jason Developer / Handyman Staff Member

    where are the webservices going to be put (In Synapse) ?

  9. Graham

    Graham Developer Staff Member

    I'll probably do them tonight my time.
  10. Jason

    Jason Developer / Handyman Staff Member

    Where in Synapse are they going to go .. Rename the "DRUGS" Tab and call it WEB ?

  11. Graham

    Graham Developer Staff Member

  12. Jason

    Jason Developer / Handyman Staff Member

  13. Graham

    Graham Developer Staff Member

    Must be beta software!

    Let me fix[;)]
  14. Graham

    Graham Developer Staff Member

    Odd .. nothing wrong with the code.

    Perhaps you don't have the cgi-bin directory??

    Try beta-10 .. moving it out of cgi-bin
  15. Graham

    Graham Developer Staff Member

    I think what I'll do is replace the "?" and replace them with a firefox logo if I can find one small enough!
  16. Jason

    Jason Developer / Handyman Staff Member

    I don't have a cgi-bin directory on this client.
  17. Graham

    Graham Developer Staff Member

    It should have been created automatically .. I'll have to check in future for that.

    I take it it's now working?
  18. Jason

    Jason Developer / Handyman Staff Member

    <h2>Search ...</h2>You need to write a chickenfoot script and trigger it on this page to run your custom searches. This also requires Firefox.

    Code:
    Disease: erectile dysfunction
  19. Jason

    Jason Developer / Handyman Staff Member

    works now.
  20. Graham

    Graham Developer Staff Member

    beta-11

    Adds a "?" near the phone for the patient details

    This is my trigger script to look up the phone on the nz white pages

    <pre id="pre">nameinit = find(/NameInitial: ([\w\s]+)/).groups[1];
    town = find(/Town: ([\w\s]+)/).groups[1];
    city = find(/City: ([\w\s]+)/).groups[1];

    with(openTab('http://www.whitepages.co.nz/', true)) {

    enter("Name",nameinit)
    enter("Location",town)
    pick(city)
    click("Search")

    }
    </pre>

Share This Page