Create a webservice

Introduction

In this example we use Iguana as a web service to lookup the First Name for a patient. Incoming requests contain the Last Name, Iguana reads a database and supplies the corresponding First Names that match the surname.

In general when connecting to web services, you use the  HTTP API to pull or push the data. The XML or JSON API can be very useful to parse or generate data.

If you have any questions please contact us at support@interfaceware.com.

Using the Code [top]

This is the github code for the main module:

How it works [top]

This script uses Iguana up as a web service for patient name requests. Incoming requests contain the Last Name, Iguana reads a database and supplies the corresponding First Name(s) that match the surname.

The process is fairly straightforward:

  1. Parse the returned data with net.http.parseRequest
  2. Query the Database to get patients with matching surnames
    1. If no surname is supplied we return the default “instruction” web page
  3. Serve the result into a web page using net.http.respond

More information [top]

Leave A Comment?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.