Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Third party systems, such as a practice management system or a web site, can submit orders to Rx-Universe in two different ways. Such a system can also obtain information on orders, such as the current status of the order, calculation results, etc.

Submit an Order as a flat file

Rx-Universe can accept an order as a flat file placed into a specific folder for processing. Such an order needs to be in the format described in the section Remote Order Entry

The folder that Rx-Universe checks for these flat files is specified in the Remote, Remote Order Parameters screen:

To process flat files in this folder, the Remote Processor must be running. This can be run either from the menu, under Remote, or it can be run as a standalone screen using a station set up with the “EF” auto-command.

Placing order files in the designated folder

Actually transferring the flat files from the third party system to the Rx-Universe server can be accomplished in different ways, in whatever method is most appropriate for the lab and IT infrastructure. Please note that there is no specific method recommended nor provided by Rx-Universe; actually transferring the files to the Rx-Universe server is something that should be set up by the lab’s IT department or resource.

Some possible ways to consider would include a direct copy to the folder (if the lab server is on the same network as the third party software), or providing an ftp server on the Rx-Universe folder. If the latter is chosen, we encourage the lab to use ftp authentication (rather than allowing anonymous access).

Submit an order to an API endpoint

An alternative to providing flat files to Rx-Universe is submitting orders via an API endpoint. This requires the Rx-API module to be installed and active. A third party system can connect to the endpoint and submit a json packet containing the order. Here is a sample of a simple Flat Top 28 order, deliberately omitting the add power:
curl -X 'POST' \ 'http://localhost:5645/api/orders/add' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "customerNum": "1", "custJobID": "Patient Name", "poNumber": "123456-optional", "releaseNumber": "56789-optional", "jobType": "F", "rtLensStyle": "ST28", "ltLensStyle": "ST28", "rtLensMaterial": "P", "ltLensMaterial": "P", "rtLensColor": "", "ltLensColor": "", "rtLensTreat": "SRC", "ltLensTreat": "SRC", "rtSPH": -1.25, "ltSPH": -1.50, "rtCYL": -0.50, "ltCYL": -0.75, "rtAX": 85, "ltAX": 115, "rtIPD": 30, "ltIPD": 29.5, "rtNPD": 28.5, "ltNPD": 28.0, "rtSEGHT": 20, "ltSEGHT": 20, "rtADD": 0, "ltADD": 0, "addon1": "ARC", "REM": "Comment line", "HBOX": 52, "VBOX": 44, "FED": 53, "DBL": 16, "_ETYPE": "M", "ORIGIN": "3rdParty" }'

The endpoint will detect the missing information in the submission, and respond with an appropriate error:
{ "error12:": "373: Add power must be greater than 0", "error45:": "373: Add power must be greater than 0" }

If the order is submitted correctly, the order number will be returned to the calling program:
{ "orderNumber": "10000341" }

In order to use the API endpoints, the endpoints must be accessible to the third party system; allowing such access will be handled by the lab’s IT department or resource, to ensure compatibility with the local IT security requirements. Note that Rx-API does support SSL - if used, the lab’s IT department or resource will need to provide and keep updated the appropriate certificate to allow access via SSL.

Request order information

  • No labels