Quick Start
Set up your environment and create your first instance using the REST API by performing the following tasks.
Prerequisites
Prerequisite | More Information |
---|---|
Install Oracle Healthcare Foundation (OHF) 7.1.1 |
This installer creates the OHF data model, Data Management Assembly for Oracle Data Integrator(ODI) and Informatica, WebLogic domain (oh_domain) and the managed WebLogic server. All OHF-related applications are deployed in the managed server. It also creates OHF user groups. The Active state of the deployment ensures that the application has been deployed successfully. |
Install Oracle Healthcare Translational Research (OHTR) 3.2 |
This installer creates schemas and tables required for OHTR. It deploys OHF-TRC-App and OHF-CGA-App applications in the managed server. It also creates OHTR API and UI user groups. The Active state of the deployment ensures that the application has been deployed successfully. |
Step 1: Create Users
All REST API calls are stateless and therefore require authentication information for each request. Make sure that the user has proper application roles. Following are the roles created in the application as part of the middle tier installation:
trc-admin-api-user- This is reserved for the admin role.
trc-api-user- This is the API consumer user role.
Log into the WebLogic console at http://<hostname>:<port>/console
Navigate to Domain Structure > <Domain Name> > Security Realms > myRealm > Users and Groups > Users > New.
Create a new user by entering the Name, Description and Password.
Select the new user you just created and navigate to Groups.
Assign the user to the groups trc-admin-api-user or trc-api-user.
Step 2: Execute a Web Service
You may use any tool available to execute a Web API. For example, Chrome Postman, Advanced Rest Client, cURL. For details on using cURL, see Using cURL.
To execute an API, the following name-value pairs are mandatory in the Request header:
Accept: application/json OR application/xml
X-Requested-By: TRC
Content-Type : application/json
Authentication : username and password configured in Step 1.
Following are some examples of GET and POST APIs.
Example: GET request
http://localhost:7001/HSDataService-web/api/3.2.0/patientapi/patients/1
Request Header:
Accept: application/json X-Requested-By: TRC Username: <username>
Expected Response:
The response you receive will be similar to the following.
{ "identifiers": [ { "system": "CDM", "value": "1" }, { "system": "Customer Defined", "value": "P1_1" } ], "name": { "text": "James MN1 Young", "family": "Young", "given": [ "James", "MN1" ] }, "gender": { "coding": [ { "code": "1", "display": "Male", "description": "Male", "sysId": "EHA_CUSTOM_CD_SYS", "sysName": "EHA Custom Code System", "sysVersion": "1" } ] }, "birthDate": "01/01/1945", "deceasedBoolean": false, "maritalStatus": { "coding": [ { "code": "1", "display": "Married", "description": "Married", "sysId": "EHA_CUSTOM_CD_SYS", "sysName": "EHA Custom Code System", "sysVersion": "1" } ] }, "race": { "reference": "/HSDataService-web/api/3.2.0/patientapi/patients/1/race" }, "ethnicity": { "reference": "/HSDataService-web/api/3.2.0/patientapi/patients/1/ethnicity" }, "subject": { "reference": "/HSDataService-web/api/3.2.0/patientapi/patients/1/subjects" } }
For details on this web service, see Retrieve Demographics for a Patient Identifier.
Example: POST request
http://localhost:7001/HSDataService-web/api/3.2.0/geneSets/create
Request Header :
Accept: application/json X-Requested-By: TRC Content-Type : application/json Username: <username>
Request Body:
{ "hugoNames": ["BID","EGFR"], "geneNames":["ENSG00000015475"], "species" : "homo sapiens", "assemblyVersions":["GRCh37"], "geneSetName":"geneSet", "geneSetDesc":"geneSetDesc" }
Expected Response:
{ "geneSetId": 10000000002249, "geneSetName": "geneSet", "geneSetDesc": "geneSetDesc", "geneCount": 2, "geneSetMember": { "reference": "/HSDataService-web/api/3.2.0/geneSets/10000000002249" } }
For details on this web service, see Create Geneset.
Step 3: Troubleshooting
To view the errors while executing a web service, see the log file located at:
<MIDDLEWARE_HOME>/user_projects/domains/oh_domain/servers/AdminServer/logs/AdminServer-diagnostic.log
<MIDDLEWARE_HOME>/user_projects/domains/oh_domain/servers/<servername>_MS_1/logs/<servername>_MS_1-diagnostic.log