views:

45

answers:

2

I have a web app built in coldfusion that receives medical referral letters from primary care doctors (family doctors) for transmission to hospitals and specialists. The data comes in to a MySQL database and is the format

referral_ID (autoincrement)

patient_firstname (string) patient_lastname (string)

... other patient identifiers

org_from_ID (numeric) org_to_ID (numeric) datetime_added (datetime) message_status ( a bool reflecting pending or received by hospital)

... and other "meta" data

message (memo , this is a 1-2 page text, rtf or Word type file of the actual referral letter)

I want to allow hospitals to pick up the referrals directed to them. Most of the hospitals who are likely early adopters seem to be using MS technologies for their hospital Patient Administration Systems (PAS) and I'm assuming that the biggest programmer pool is using .NET so they are likely to use .NET savvy programmers to pick up this information into their systems ?

The functionality the API will need is

  1. only be accessible from the predefined hospital system , so some sort of login passed

  2. data encrypted between my app and hospital e.g via https

  3. provide list of referral data between #startdate# and #enddate# for hospital_ID xyz

  4. provide list of referrals that have been previously notified to the hospital that have now been cancelled.

I'm not worried about the coding of the API, just trying to work out what the is best format that easiest lets them consume the data feed for their organisation, whether to put the logic in a cfc access="remote" as a web service, provide HTTPS access simply via a web page using URL variables, use WDDX or what?

+1  A: 

If you use cfc's to provide the web services, then you can let your client hospitals choose. CFC methods can return json, plain or WDDX by attaching returnformat attribute to the request they make.

You need to be a little careful with the JSON return format, because CF is typeless and it so does struggle to return data in the correct data types unless you are very prescriptive.

If you use something like ColdSpring, then using the remote proxies can help provide a facade between the full application and the bits you want to expose to your client hospitals.

Hope that helps some.

Stephen Moretti
+2  A: 

First of all, forget about WDDX. Use only JSON or plain and your .NET buddies will thank you. :)

If you don't want to use heavy SOAP webservices, you can try RESTful services with PowerNap.

http://cfcommons.org/index.cfm/blog/2010/3/31/cfcommons-visuals--rest-web-services-with-powernap---part-1

Henry
Thanks for the mentioning the Powernap, didn't know about it.
Sergii