Oracle® Healthcare Master Person Index Relationship Management REST APIs Reference Guide Release 4.0 E71322-01 |
|
|
PDF · Mobi · ePub |
The entities resources contain the following APIs:
This API is used to retrieve entity and relationship resources REST API version information.
http(s)://<server>:<port>/ohmpi-rm/1.0.0/resources
HTTP GET
application/json;charset=UTF-8
Parameter | Description |
---|---|
version | OHMPI RM version number |
description | The description of entity and relationship resources |
url | The URL of this REST API |
Status Code | Description |
---|---|
200 | Success |
404 | Incorrect URI |
http://localhost:7001/ohmpi-rm/1.0.0/resources
{ "items": [ { "description": "OHMPI RM Entity Resources", "roles": null, "url": "http://localhost:7001/ohmpi-rm/1.0.0/resources/entities", "userId": null, "version": "1.0.0" }, { "description": "OHMPI RM Relationship Resources", "roles": null, "url": "http://localhost:7001/ohmpi-rm/1.0.0/resources/relationships", "userId": null, "version": "1.0.0" } ] }
200
This API is used to get entity by its ID.
http(s)://<server>:<port>/ohmpi-rm/1.0.0/resources/entities/{id}
HTTP GET
application/json;charset=UTF-8
Parameter | Value | Description |
---|---|---|
id | Matching the regex [a-zA-Z0-9]+ | EntityId of the entity to be retrieved |
Parameter | Description |
---|---|
entity | For information on the entity attributes in response, see Section A.2.6, "Entity Response Structure". |
Status Code | Description |
---|---|
200 | Success |
404 | Incorrect URI |
400 | Invalid argument/Invalid Resource Id |
500 | Error while processing |
http://localhost:7001/ohmpi-rm/1.0.0/resources/entities /1
{ "attributes": [ { "entity": { "attributes": null, "entityId": 1, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/1", "mediaType": "application/json", "rel": "canonical" } ], "status": null, "type": null }, "entityAttributeId": 1, "name": "FirstName", "value": "Mark" } ], "entityId": 1, "id": "0000000003", "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/1", "mediaType": "application/json", "rel": "canonical" } ], "status": "Active", "type": { "attributes": null, "description": null, "entityTypeId": 1, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "name": "Patient", "status": "Active" } }
200
This API is used to search entities by entity type and entity attributes.
http(s)://<server>:<port>/ohmpi-rm/1.0.0/resources/entities
application/json
HTTP POST
application/json;charset=UTF-8
Parameter | Value | Description |
---|---|---|
name | Matching the regex [a-zA-Z][a-zA-Z_0-9]+ | Entity type name of entities to be searched. It is a mandatory parameter. |
status | active, inactive, or all | Status of entities to filter |
limit | Any positive integer | Maximum number of results to return in the REST API response. Default value is 1000. |
offset | Any positive integer | Offset from which the results should be provided in the response. Default value is 1. |
totalResults | true or false | View total records count |
expand | all | View more details of the entities |
entityResource | - | Details of the entities to be searched. For details on the fields for the entity request body, see Section A.1.6, "Entity Resource". |
Parameter | Description |
---|---|
items | An array containing entities |
entity | For information on the entity attributes in response, see Section A.2.6, "Entity Response Structure". |
totalResults | Value is set to the total number of entities based on the filter. This might be greater than the number of results displayed in the REST API response, based on offset and limit values. The value is displayed if totalResults is set to true in the request parameter. Otherwise, the value is null. |
Status Code | Description |
---|---|
200 | Success |
404 | Incorrect URI |
400 | Invalid argument/Invalid Resource Name |
500 | Error while processing |
http://localhost:7001/ohmpi-rm/1.0.0/resources/entities?name=Patient&status=active
{ "attributes": [ { "name":"FirstName", "value":"Mark" } ] }
{ "items": [ { "attributes": null, "entityId": 1, "id": "0000000003", "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/1", "mediaType": "application/json", "rel": "canonical" } ], "status": "Active", "type": { "attributes": null, "description": null, "entityTypeId": 1, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "name": "Patient", "status": "Active" } } ], "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities", "mediaType": "application/json", "rel": "canonical" } ], "totalResults": 1 }
200
This API is used to search entities by entity type and date attribute range.
http(s)://<server>:<port>/ohmpi-rm/1.0.0/resources/entities/{name}/{attribute}
application/json
HTTP POST
application/json;charset=UTF-8
Parameter | Value | Description |
---|---|---|
name | Matching the regex [a-zA-Z][a-zA-Z_0-9]+ | Entity type name of entities to be searched |
attribute | Matching the regex [a-zA-Z][a-zA-Z_0-9]+ | Attribute name of the entity type to be searched using range search. It must be of type Date. |
since | Should be in the format yyyy-MM-dd | Start date from which attribute must be searched. It is a mandatory parameter. |
until | Should be in the format yyyy-MM-dd | End date till which attribute must be searched. Default is today's date. |
status | active, inactive, or all | Status of entities to filter |
orderBy | Format: fieldname|sortOrder where fieldname can be id, entityId, status; sortOrder can be asc, desc | Order by built-in attribute name. Default is order by entityId in ascending order. |
limit | Any positive integer | Maximum number of results to return in the REST API response. Default value is 1000. |
offset | Any positive integer | Offset from which the results should be provided in the response. Default value is 1. |
totalResults | true or false | View total records count |
expand | all | View more details of the entities |
entityResource | - | Details of the entities to be searched. For details on the fields for the entity request body, see Section A.1.6, "Entity Resource". |
Parameter | Description |
---|---|
items | An array containing entities |
entity | For information on the entity attributes in response, see Section A.2.6, "Entity Response Structure". |
totalResults | Value is set to the total number of entities based on the filter. This might be greater than the number of results displayed in the REST API response, based on the offset and limit values.The value is displayed if totalResults is set to true in the request parameter. Otherwise, the value is null. |
Status Code | Description |
---|---|
200 | Success |
404 | Incorrect URI |
400 | Invalid argument/Invalid Resource Name |
500 | Error while processing |
http://localhost:7001/ohmpi-rm/1.0.0/resources/entities/IndPatient/DOB?since=2010-01-01
{ "attributes": [ { "name":"FirstName", "value":"Mark" } ] }
{ "items": [ { "attributes": null, "entityId": 5, "id": "IP5", "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/IndPatient/DOB/5", "mediaType": "application/json", "rel": "canonical" }, ], "status": "Active", "type": { "attributes": null, "description": null, "entityTypeId": 1, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/IndPatient", "mediaType": "application/json", "rel": "canonical" } ], "name": "IndPatient", "status": "Active" } } ], "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/IndPatient/DOB", "mediaType": "application/json", "rel": "canonical" } ], "totalResults": null }
200
This API is used to create an entity of the specific entity type.
http(s)://<server>:<port>/ohmpi-rm/1.0.0/resources/entities/{name}
application/json
HTTP POST
application/json;charset=UTF-8
Parameter | Value | Description |
---|---|---|
name | Matching the regex [a-zA-Z][a-zA-Z_0-9]+ | Entity type name of entity to be created |
entityResource | - | Details of the entities to be created. For details on the fields for the entity request body, see Section A.1.6, "Entity Resource". |
Parameter | Description |
---|---|
entity | For information on the entity attributes in response, see Section A.2.6, "Entity Response Structure". |
Status Code | Description |
---|---|
200 | Success |
404 | Incorrect URI |
400 | Invalid argument/Invalid Resource Name |
500 | Error while processing |
http://localhost:7001/ohmpi-rm/1.0.0/resources/entities/Patient
{ "id": "1000000101", "type": { "name": "Patient" }, "attributes": [ { "name": "FirstName", "value": "Peter" } ] }
{ "attributes": [ { "entity": null, "entityAttributeId": 1, "name": "FirstName", "value": "Peter" } ], "entityId": 1, "id": "1000000101", "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "status": "Active", "type": { "attributes": null, "description": null, "entityTypeId": 1, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "name": "Patient", "status": "Active" } }
200
This API is used to update an entity by its ID.
http(s)://<server>:<port>/ohmpi-rm/1.0.0/resources/entities/{id}
application/json
HTTP PUT
application/json;charset=UTF-8
Parameter | Value | Description |
---|---|---|
id | Matching the regex [a-zA-Z0-9]+ | EntityId of the entity to be updated |
status | active or inactive | To activate or deactivate the entity. When status is passed, the body (entityResource) details are ignored. However, the body must be passed as {}. |
entityResource | - | Details of the entity to be updated. This is considered for updating the entity if the status parameter is not set to any value. For details on the fields for the relationship type request body, see Section A.1.6, "Entity Resource". |
Parameter | Description |
---|---|
entity | For information on the entity attributes in response, see Section A.2.6, "Entity Response Structure". |
Status Code | Description |
---|---|
200 | Success |
404 | Incorrect URI |
400 | Invalid argument/Invalid Resource Id |
500 | Error while processing |
http://localhost:7001/ohmpi-rm/1.0.0/resources/entities/1?status=active
{}
{ "attributes": [ { "entity": null, "entityAttributeId": 1, "name": "FirstName", "value": "Peter" } ], "entityId": 1, "id": "1000000101", "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/1", "mediaType": "application/json", "rel": "canonical" } ], "status": "Active", "type": { "attributes": null, "description": null, "entityTypeId": 1, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "name": "Patient", "status": "Active" } }
200
http://localhost:7001/ohmpi-rm/1.0.0/resources/entities/1
{ "attributes": [ { "name": "FirstName", "value": "Harry" } ] }
{ "attributes": [ { "entity": null, "entityAttributeId": 1, "name": "FirstName", "value": "Harry" } ], "entityId": 1, "id": "1000000101", "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/1", "mediaType": "application/json", "rel": "canonical" } ], "status": "Active", "type": { "attributes": null, "description": null, "entityTypeId": 1, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "name": "Patient", "status": "Active" } }
200