Note |
---|
This page represents work by ?Kevin Peters for ?Summer Of Code 2008 and may have been replaced by work elsewhere. |
Table of Contents | ||||||||
---|---|---|---|---|---|---|---|---|
|
Overview
The Logic Web Service is a module for OpenMRS that allows web access to Logic Service functions.
info|The Logic Web Service uses HTTP BASIC authentication, and is thus only recommended for use on servers that use SSL. Use of non-SSL servers would broadcast HTTP authentication insecurely.
Installation
Access the Logic Web Service Module in the Module Repository and download the latest file (a .omod file). Install this module in OpenMRS (Administration -> Manage Modules -> Add Module).
Limiting Access by IP Address
Access can be limited by IP address via a global property. By default, only the computer on which the Logic Web Service module is installed can access it.
How to Modify
Create the property logicws.allowed_ip_list in your OpenMRS runtime properties file, and fill it in with a whitespace-separated list of remote IP addresses allowed to access the Logic Web Service API. Each entry should be four numbers (0-255) separated with periods, using "*" for wildcards.
Example
Code Block |
---|
logicws.allowed_ip_list=192.168.1.* 192.168.2.50 |
Panel |
---|
Allows all clients with IP addresses beginning with 192.168.1 plus the IP address 192.168.2.50. |
API Functions
getFilters
http://demo.openmrs.org/openmrs/moduleServlet/logicws/api/getFilters
Panel | ||
---|---|---|
|
getTokenTags
http://demo.openmrs.org/openmrs/moduleServlet/logicws/api/getTokenTags
Panel | ||
---|---|---|
|
getTokens
http://demo.openmrs.org/openmrs/moduleServlet/logicws/api/getTokens?tag=TAG
Panel | ||
---|---|---|
|
getData
http://demo.openmrs.org/openmrs/moduleServlet/logicws/api/getData?query=SELECT AGGREGATE X {TOKEN_1} OPERATOR OPERAND:SPLIT_1:SPLIT_2|AGGREGATE X {TOKEN_2} OPERATOR OPERAND:SPLIT_1:SPLIT_2 FROM COHORT&datastyle=DATASTYLE
The "splits" are those attributes that allow the user to get back more data regarding the token besides the token value (observation date, observation location, etc.). The data style is one of three data style choices: mostrecent, stacked, and flat.
Panel | ||
---|---|---|
|
Troubleshooting
- It doesn't work right!
If you find anything wrong with this, please notify the developers of this, by posting in the forums, sending an email to the Implementer's list, or sending a direct e-mail to Rudd Zwolinski or Kevin Peters. Make sure to note what went wrong, what you were doing when it happened, and any error messages if there are any.
Developers
To get involved in working on the Logic Web Service, see the Reporting Framework Integration Project.