Hi Kurt,
I have activated the "EMR.Image.Add" and "EMR.Image.URL.List" procedures at
the care2x.net demo server.
Here are the tentative specs:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Procedure:
EMR.Image.Add(auth, enc_nr, img_data)
Params:
auth = (xmlrpc struct) containing the username:password pair
keys:
[usr] = the username (use "hxp")
[pw] = the password (use "hxp")
enc_nr = the encounter number (or case key) where image should be linked
img_data = (xmlrpc struct) the image data
keys:
[img] = image file data converted to base64
[shot_date] = date picture was taken (YYYY-MM-DD)
[ext] = file extension string e.g. "jpeg"
[mime_type] = mime type string
[notes] = string of notes, diagnosis, etc.
Return:
string of the image's URL for instant viewing of the image e.g. via browser
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Procedure:
EMR.Image.URL.List(auth, enc_nr)
Params:
auth = (xmlrpc struct) containing the username:password pair
keys:
[usr] = the username (use "hxp")
[pw] = the password (use "hxp")
enc_nr = the encounter number (or case key) of the images
Return:
an array of URLs pointing to the images for displaying e.g. via a browser.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The above specs are proposals and open for fine-tuning. e.g. instead of
passing the encounter number as extra for the first procedure, why should not
we embed it in the img_data struct as additional key-value pair ???
I have attached here two php scripts which will demonstrate the two procedures
communicating with the care2x.net hxp server. Also, the ixr library is
attached. Just save them all in a common directory of your webserver. You
have to rewrite the line of the image's filename to upload though
(imageupload.php). Just point it to the image in your local files. Also, just
upload small images to avoid long transfer periods (another reason is that
the diskspace of care2x.net is nearly used up).
As you have said before, this is really trivial. You can rewrite the code for
python language. Also, if you can rewrite the wxPython client for this
purpose, we can showcase that tiny client for uploading images to any
application that has an hxp server.
The two scripts were tested to work. One advantage of xmlrpc compared to
simple _REQUEST is that the url redirection problem did not appear (which is
the case in the current wxpython client).
Please let me know your findings and opinion.
Thanks in advance,
elpidio
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
Hxp-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hxp-developers