This project has moved. For the latest updates, please go here.

 

Demonstration Server

The OpenIZ IMS is currently running on a demonstration server at: http://demo.openiz.org:8080 . The users on this server are as follows:

User

Password

Group

Grant

Lucy

OpenIZClinical

CLINICAL_STAFF

LOGIN, ALL CLINICAL

Bob

OpenIZUser

USERS

LOGIN

In order to access this service you’ll need an OpenIZ developer key for your application. Because we don’t have automatic enrolment configured, you can use the Fiddler web debugger credentials for the time being: fiddler/fiddler. Instructions on how to use these credentials can be found in the OpenIZ Functional Design specification.

 

Authentication Service

The OAUTH2 authentication service can be found at http://demo.openiz.org:8080/auth/oauth2_token . You may request  token from this service using the “password” grant. Below is a sample request/response for user Lucy.

POST http://demo.openiz.org:8080/auth/oauth2_token HTTP/1.1
User-Agent: Fiddler
Content-Type: application/x-www-form-urlencoded
Authorization: BASIC ZmlkZGxlcjpmaWRkbGVy
Host: demo.openiz.org:8080
Content-Length: 91
username=Lucy&grant_type=password&password=OpenIZClinical&scope=http://demo.openiz.org:8080/imsi

HTTP/1.1 200 OK
Content-Length: 1779
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 22 Jun 2016 23:28:40 GMT
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlpfMVk5T1hyNWR0dFdXMkEzb0xEVEhKalptQSJ9.eyJyb2xlIjoiQ0xJTklDQUxfU1RBRkYiLCJpc3MiOiJodHRwOi8vZGVtby5vcGVuaXoub3JnOjgwODAvYXV0aC9vYXV0aDJfdG9rZW4iLCJhdXRoX3RpbWUiOiIyMDE2LTA2LTIyVDE5OjI4OjQwLjQyMzUwMTMtMDQ6MDAiLCJhdXRobWV0aG9kIjoiT0F1dGgyIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9leHBpcmF0aW9uIjoiMjAxNi0wNi0yMlQxOTozODo0MC40MjM1MDEzLTA0OjAwIiwidW5pcXVlX25hbWUiOiJ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kl6EdVnLcxjB5VLoK6eZFlFmYl_sfz1s6JnTCGmtTuBebRW0WpSa_s14azrwLZXjJCs--a7hoC5UU-1SOORQ-bkPiWVpFvTaP7_SJv0hyVN_5y0rkFXMdlOHUvrv9NUeHCS9FX4REB0vD4OXw03j0NXCeFpgh3hQ",
"token_type": "urn:ietf:params:oauth:token-type:jwt",
"expires_in": 600000
}

You may get an oauth_error, some common errors are:

  • HTTP 400 with status Invalid Username/Password : Check the username and password you used.
  • HTTP 401 Check that your application credentials are correct
  • HTTP 400 with status Invalid Grant Type : Check that you’re using the password grant, refresh grants are not yet enabled
  • You can decode the JWT token which is returned at http://jwt.io

IMSI Service

The IMSI service can be used to retrieve data from the IMS database. Currently there concept sets, and a few patients in the service which can be used to retrieve data. The data contract can be obtained by reading the specification in the OpenIZ functional design specification, or can be acquired in XML Schema format from http://demo.openiz.org:8080/imsi/?xsd=0 . (Note: currently you’ll have to authenticate yourself to gain access to the schema).

The IMSI service is configured using a BEARER token scheme. Below is a sample where a client may ask the IMSI for all gender concepts:

GET http://demo.openiz.org:8080/imsi/ConceptSet?mnemonic=AdministrativeGenderCode HTTP/1.1
User-Agent: Fiddler
Authorization: BEARER eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlpfMVk5T1hyNWR0dFdXMkEzb0xEVEhKalptQSJ9.eyJyb2xlIjoiQ0xJTklDQUxfU1RBRkYiLCJpc3MiOiJodHRwOi8vZGVtby5vcGVuaXoub3JnOjgwODAvYXV0aC9vYXV0aDJfdG9rZW4iLCJhdXRoX3RpbWUiOiIyMDE2LTA2LTIyVDE5OjE2OjMzLjg3ODEyOTktMDQ6MDAiLCJhdXRobWV0aG9kIjoiT0F1dGgyIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9leHBpcmF0aW9uIjoiMjAxNi0wNi0yMlQxOToyNjozMy44NzgxMjk5LTA0OjAwIiwidW5pc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JeaNMQJBu2T95ZuU7pk9hMQSFbMLvNMlUKuP1bEeaD3xLAAD9lEdT0fkSTHznzf1IyxCHN7xsVprSN0A3iNloZ_Rb6f6gaQbrpPQyL9aayAlQhorGb_CX0L-1KeA0uLEe-2GAI4Tc1yW5JgkSBVYd1ZrVbAxOqtX2TY6SV8IEp5gv33-w
Host: demo.openiz.org:8080
Content-Length: 0
Accept: application/json

HTTP/1.1 200 OK
Content-Length: 1708
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
X-PoweredBy: OpenIZIMSI
X-GeneratedOn: 2016-06-22T19:21:30.6871719-04:00
Access-Control-Allow-Origin: *
Access-Control-Request-Method: GET,POST,PUT,DELETE,OPTIONS
Access-Control-Allow-Headers: X-Requested-With,Content-Type,Accept,Content-Encoding,Accept-Encoding
Date: Wed, 22 Jun 2016 23:21:30 GMT
{"item":[{"name":"Administrative Genders","mnemonic":"AdministrativeGenderCode","oid":"1.3.6.1.4.1.33349.3.1.5.9.1.16","url":"
http://openiz.org/valueset/administrative-gender","concept":["ae94a782-1485-4241-9bca-5b09db2156bf","094941e9-a3db-48b5-862c-bc289bd7f86c","f4e3a6bb-612e-46b2-9f77-ff844d971198"],"creationTime":"2016-06-22T18:50:30.9530000+00:00","createdBy":"fadca076-3690-4a6e-af9e-f1cd68e8c7e8","id":"e9eecd3c-7b80-47f9-9cb6-55c8d3110fb0","$type":"ConceptSet"},{"isReadonly":true,"mnemonic":"Undifferentiated","statusConcept":"c8064cbd-fa06-4530-b430-1a52f1530c27","class":"0d6b3439-c9be-4480-af39-eeb457c052d0","version":"9f0dbbb8-cb38-e611-80c5-0050569d83e3","sequence":391.0,"creationTime":"2016-06-22T18:50:32.3900000+00:00","createdBy":"fadca076-3690-4a6e-af9e-f1cd68e8c7e8","id":"ae94a782-1485-4241-9bca-5b09db2156bf","$type":"Concept"},{"isReadonly":true,"mnemonic":"Female","statusConcept":"c8064cbd-fa06-4530-b430-1a52f1530c27","class":"0d6b3439-c9be-4480-af39-eeb457c052d0","version":"9d0dbbb8-cb38-e611-80c5-0050569d83e3","sequence":389.0,"creationTime":"2016-06-22T18:50:32.3900000+00:00","createdBy":"fadca076-3690-4a6e-af9e-f1cd68e8c7e8","id":"094941e9-a3db-48b5-862c-bc289bd7f86c","$type":"Concept"},{"isReadonly":true,"mnemonic":"Male","statusConcept":"c8064cbd-fa06-4530-b430-1a52f1530c27","class":"0d6b3439-c9be-4480-af39-eeb457c052d0","version":"9e0dbbb8-cb38-e611-80c5-0050569d83e3","sequence":390.0,"creationTime":"2016-06-22T18:50:32.3900000+00:00","createdBy":"fadca076-3690-4a6e-af9e-f1cd68e8c7e8","id":"f4e3a6bb-612e-46b2-9f77-ff844d971198","$type":"Concept"}],"offset":0,"count":1,"totalResults":1,"id":"27e539cb-96e1-4454-a768-82ab1ed839a9","$type":"IdentifiedData"}

Note that this same data can be retrieved using the Concept resource and doing a join on the conceptSet.

GET http://demo.openiz.org:8080/imsi/Concept?conceptSet.mnemonic=AdministrativeGenderCode HTTP/1.1
User-Agent: Fiddler
Content-Type: application/x-www-form-urlencoded
Authorization: BEARER eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlpfMVk5T1hyNWR0dFdXMkEzb0xEVEhKalptQSJ9.eyJyb2xlIjoiQ0xJTklDQUxfU1RBRkYiLCJpc3MiOiJodHRwOi8vZGVtby5vcGVuaXoub3JnOjgwODAvYXV0aC9vYXV0aDJfdG9rZW4iLCJhdXRoX3RpbWUiOiIyMDE2LTA2LTIyVDE5OjE2OjMzLjg3ODEyOTktMDQ6MDAiLCJhdXRobWV0aG9kIjoiT0F1dGgyIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9leHBpcmF0aW9uIjoiMjAxNi0wNi0yMlQxOToyNjozMy44NzgxMjk5LTA0OjAwIiwidW5pcXVlX25hbWUiOiJMdWN5IiwiaHR0cDovL29wZW5pei5vcmcvY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LAAD9lEdT0fkSTHznzf1IyxCHN7xsVprSN0A3iNloZ_Rb6f6gaQbrpPQyL9aayAlQhorGb_CX0L-1KeA0uLEe-2GAI4Tc1yW5JgkSBVYd1ZrVbAxOqtX2TY6SV8IEp5gv33-w
Host: demo.openiz.org:8080
Content-Length: 0
Accept: application/json

You may also ask the IMSI to compress the result by adding the HTTP “Accept-Encoding: gzip, deflate” header to your request.

Last edited Jun 23, 2016 at 12:06 AM by jf03cg, version 2