Oracle® Healthcare Master Person Index Relationship Management REST APIs Reference Guide Release 4.0 E71322-01 |
|
|
PDF · Mobi · ePub |
The integration resources are used to integrate with the underlying OHMPI applications. The integration resources contain the following APIs:
Note:
Before using the integration APIs, make sure that the domains are configured correctly and the MPI application is up and running. The name of the OHMPI domain name or the OHMPI primary object must exactly match to the name of the RM entity type.This API is used to get integration REST API versioning information.
http(s)://<server>:<port>/ohmpi-rm/1.0.0/integration
HTTP GET
application/json;charset=UTF-8
Parameter | Description |
---|---|
version | OHMPI RM version number |
description | The description of the integration resources |
url | The URL of this REST API |
Status Code | Description |
---|---|
200 | Success |
404 | Incorrect URI |
http://localhost:7001/ohmpi-rm/1.0.0/integration
{ "version": "1.0.0", "description": "OHMPI RM MPI Integration Resources", "url": http://localhost:7001/ohmpi-rm/1.0.0/integration }
200
This API is used to search relationships between the source MPI domain and the target MPI domain with the relationship type filter.
http(s)://<server>:<port>/ohmpi-rm/1.0.0/integration/relationships/{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-]+ | Relationship type name of relationship to be searched |
source | Matching the regex [a-zA-Z][a-zA-Z_0-9]+ | Source Entity Type name |
target | Matching the regex [a-zA-Z][a-zA-Z_0-9]+ | Target Entity Type name |
totalResults | true or false | View total records count |
expand | all | View more details of the relationships |
relationshipResource | - | Details of the relationships to be searched. For details of the fields for relationship request body, see Section A.1.9, "Integration Relationship Resource". |
Parameter | Description |
---|---|
relationship | For information on relationship attributes in response, see Section A.2.7, "Relationship 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/integration/relationships/spouse-of?source=Patient&target=Patient
{ "source": { "type": { name": "Patient" }, "attributes": [ { "name": "FirstName", "value": "Akshay" }, { "name": "LastName", "value": "Kumar" } ] }, "target": { "type": { "name": "Patient" }, "attributes": [ { "name": "FirstName", "value": "Balaji" }, { "name": "LastName", "value": "Kadam" } ] } }
{ "items": [ { "attributes": null, "createdBy": null, "createdDate": null, "effectiveDate": null, "expirationDate": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/relationships/45", "mediaType": "application/json", "rel": "canonical" } ], "modifiedBy": null, "modifiedDate": null, "relationshipId": 45, "source": { "attributes": null, "entityId": 91, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/91", "mediaType": "application/json", "rel": "canonical" } ], "status": null, "type": null }, "status": "Active", "target": { "attributes": null, "entityId": 92, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/92", "mediaType": "application/json", "rel": "canonical" } ], "status": null, "type": null }, "type": { "attributes": null, "createdBy": null, "createdDate": null, "description": null, "direction": null, "effectiveDate": null, "end": { "attributes": null, "description": null, "entityTypeId": null, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "name": "Patient", "status": "Active" }, "expirationDate": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/relationships/spouse-of", "mediaType": "application/json", "rel": "canonical" } ], "modifiedBy": null, "modifiedDate": null, "multiplicity": null, "name": "spouse-of", "relationshipTypeId": 22, "start": { "attributes": null, "description": null, "entityTypeId": null, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "name": "Patient", "status": "Active" }, "status": "Active", "task": null }, "validity": "Resolved" } ], "links": [ { "href": "/ohmpi-rm/1.0.0/integration/relationships/spouse-of", "mediaType": "application/json", "rel": "canonical" } ], "totalResults": null }
200
This API is used to search relationships from the source MPI domain or target MPI domain and with the relationship type filter.
Difference between the POST /integration/relationships/{entity} API and the POST /resources/relationships/{entity} API is that the POST /integration/relationships/{entity} API queries the MPI database of the corresponding domain and retrieves the EUID from that database. Whereas, the POST /resources/relationships/{entity} API queries the RM database directly.
http(s)://<server>:<port>/ohmpi-rm/1.0.0/integration/relationships/{entity}
application/json
HTTP POST
application/json;charset=UTF-8
Parameter | Value | Description |
---|---|---|
entity | Matching the regex [a-zA-Z][a-zA-Z_0-9]+ | Entity type name of entity whose relationships need to be retrieved |
label | Matching the regex [a-zA-Z][a-zA-Z_0-9-]+ | Relationship type name whose relationships need to be retrieved. It is a mandatory parameter. |
depth | - | Maximum length of the relationship path search. Currently, not in use. |
totalResults | true or false | View total records count |
expand | all | View more details of the relationship |
entityResource | - | More details of the entity whose relationships need to be retrieved. For details on the fields for entity request body, see Section A.1.6, "Entity Resource". |
Parameter | Description |
---|---|
items | An array containing relationships |
relationship | For information on relationship attributes in response, see Section A.2.7, "Relationship Response Structure". |
totalResults | Value is set to the total number of relationships based on filter. 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/integration/relationships/Patient?label=spouse-of
{ "attributes": [ { "name": "FirstName", "value": "Peter" } ] }
{ "items": [ { "attributes": null, "createdBy": null, "createdDate": null, "effectiveDate": null, "expirationDate": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/relationships/42", "mediaType": "application/json", "rel": "canonical" } ], "modifiedBy": null, "modifiedDate": null, "relationshipId": 42, "source": { "attributes": null, "entityId": 22, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/22", "mediaType": "application/json", "rel": "canonical" } ], "status": null, "type": null }, "status": "Active", "target": { "attributes": null, "entityId": 82, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/82", "mediaType": "application/json", "rel": "canonical" } ], "status": null, "type": null }, "type": { "attributes": null, "createdBy": null, "createdDate": null, "description": null, "direction": null, "effectiveDate": null, "end": { "attributes": null, "description": null, "entityTypeId": null, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "name": "Patient", "status": "Active" }, "expirationDate": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/relationships/spouse-of", "mediaType": "application/json", "rel": "canonical" } ], "modifiedBy": null, "modifiedDate": null, "multiplicity": null, "name": "spouse-of", "relationshipTypeId": 22, "start": { "attributes": null, "description": null, "entityTypeId": null, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "name": "Patient", "status": "Active" }, "status": "Active", "task": null }, "validity": "Resolved" } ], "links": [ { "href": "/ohmpi-rm/1.0.0/integration/relationships/Patient", "mediaType": "application/json", "rel": "canonical" } ], "totalResults": null }
200
This API is used to create a relationship between the source MPI domain, target MPI domain, and relationship type.
Differences between the POST /integration/relationships/{name}/{source}/{target} API and the POST /resources/relationships/{name}/{source}/{target} API is that:
In the POST /integration/relationships/{name}/{source}/{target} API, the MPI database of the corresponding entity type is queried to check whether or not the record exists. Accordingly, create or retrieve an entry of the MPI database, and then entities and relationship are created in the RM database.
In the POST /resources/relationships/{name}/{source}/{target} API, entities and relationships are directly created in the RM database. There is no interaction with the MPI database.
http(s)://<server>:<port>/ohmpi-rm/1.0.0/integration/relationships/{name}/{source}/{target}
application/json
HTTP POST
application/json;charset=UTF-8
Parameter | Value | Description |
---|---|---|
name | Matching the regex [a-zA-Z][a-zA-Z_0-9-]+ | Relationship type name of relationship to be created |
source | Matching the regex [a-zA-Z][a-zA-Z_0-9]+ | Source Entity Type name |
target | Matching the regex [a-zA-Z][a-zA-Z_0-9]+ | Target Entity Type name |
relationshipResource | - | Details of the relationships to be searched. For details on the fields for relationship request body, see Section A.1.9, "Integration Relationship Resource". Any date values of the source or target entity must be provided in the MPI date format of the corresponding entity type or domain. |
Parameter | Description |
---|---|
relationship | For information on relationship attributes in response, see Section A.2.7, "Relationship Response Structure". To display all the attributes of the relationship type, use the GET /resources/relationships/{id} API with expand=all. |
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/integration/relationships/spouse-of/Patient/Patient
Assume that the date format of Patient MPI is yyyy/MM/dd and date format of RM is yyyy-MM-dd HH:mm:ss.
{ "source": { "type": { "name": "Patient" }, "attributes": [ { "name": "LocalId", "value": "2000099333" }, { "name": "SystemCode", "value": "BBB" }, { "name": "FirstName", "value": "Peter" }, { "name": "LastName", "value": "Wills" }, { "name": "Gender", "value": "M" }, { "name": "SSN", "value": "994936919" }, { "name": "DOB", "value": "1987/01/03" } ] }, "target": { "type": { "name": "Patient" }, "attributes": [ { "name": "LocalId", "value": "1000023351" }, { "name": "SystemCode", "value": "BBB" }, { "name": "FirstName", "value": "Mary" }, { "name": "LastName", "value": "John" }, { "name": "Gender", "value": "F" }, { "name": "SSN", "value": "12761813" }, { "name": "DOB", "value": "1988/02/01" } ] }, "type": { "name": "spouse-of" }, "attributes": [ { "name": "DateOfMarriage", "value": "2015-02-23 20:10:10" } ] }
{ "attributes": null, "createdBy": null, "createdDate": null, "effectiveDate": null, "expirationDate": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/relationships/61", "mediaType": "application/json", "rel": "canonical" } ], "modifiedBy": null, "modifiedDate": null, "relationshipId": 61, "source": { "attributes": null, "entityId": 22, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/22", "mediaType": "application/json", "rel": "canonical" } ], "status": null, "type": null }, "status": "Active", "target": { "attributes": null, "entityId": 101, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/101", "mediaType": "application/json", "rel": "canonical" } ], "status": null, "type": null }, "type": { "attributes": null, "createdBy": null, "createdDate": null, "description": null, "direction": null, "effectiveDate": null, "end": { "attributes": null, "description": null, "entityTypeId": null, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "name": "Patient", "status": "Active" }, "expirationDate": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/relationships/spouse-of", "mediaType": "application/json", "rel": "canonical" } ], "modifiedBy": null, "modifiedDate": null, "multiplicity": null, "name": "spouse-of", "relationshipTypeId": 22, "start": { "attributes": null, "description": null, "entityTypeId": null, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "name": "Patient", "status": "Active" }, "status": "Active", "task": null }, "validity": "Resolved" }
200
This API is used to create a relationship from a single source or target MPI domain by using the configured inferring rules.
http(s)://<server>:<port>/ohmpi-rm/1.0.0/integration/relationships/entities/{entity}
application/json
HTTP POST
application/json;charset=UTF-8
Parameter | Value | Description |
---|---|---|
entity | Matching the regex [a-zA-Z][a-zA-Z_0-9]+ | Entity type name of the entity for which relationship is to be created |
entityResource | - | Details of the entity whose relationship needs to be created. For details on the fields for the entity request body, see Section A.1.6, "Entity Resource". |
Parameter | Description |
---|---|
relationship | For information on the relationship attributes in response, see Section A.2.7, "Relationship Response Structure". To display all the attributes of the relationship type, use the GET /resources/relationships/{id} API with expand=all. |
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/integration/relationships/entities/Patient
Assuming that you want to create a relationship of type primary-care-physician-of, the source entity type of the relationship type is Patient, and the target entity type is IndProvider. Also, an IndProvider entity having ID 0000000013 exists in system. Perform the following steps for the initial setup:
Create a ruleset with source as Patient and target as IndProvider.
Create a ruleset file for the ruleset and upload it using REST APIs or UI.
For sample purpose, consider the ruleset with name primary-care-physician-creation and ruleset file defined in Section A.4.1, "Sample Ruleset File 1".
Create a task with the same name as defined in the ruleset file.
Create a groovy script for the task and upload it using REST APIs or UI.
For sample purpose, consider the task with name PrimaryCarePhysicianCreationTask and the task groovy script defined in Section A.4.4, "Sample Task File 1".
Invoke the API using the following sample request body.
{ "id":"PA1311", "attributes": [ { "name" : "LocalId", "value" : "1000000000" }, { "name" : "SystemCode", "value" : "Oracle" }, { "name":"FirstName", "value":"John" }, { "name":"LastName", "value":"D" }, { "name":"Gender", "value":"M" }, { "name":"City", "value":"CA" }, { "name":"Provider.ID", "value":"0000000013" }, { "name":"DOB", "value":"2015/01/02" }, { "name" : "SSN", "value" : "111111111" }, { "name" : "Provider.Name", "value" : "Appolo" } ] }
{ "attributes": null, "createdBy": null, "createdDate": null, "effectiveDate": null, "expirationDate": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/relationships/143", "mediaType": "application/json", "rel": "canonical" } ], "modifiedBy": null, "modifiedDate": null, "relationshipId": 143, "source": { "attributes": null, "entityId": 22, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/22", "mediaType": "application/json", "rel": "canonical" } ], "status": null, "type": null }, "status": "Active", "target": { "attributes": null, "entityId": 275, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/275", "mediaType": "application/json", "rel": "canonical" } ], "status": null, "type": null }, "type": { "attributes": null, "createdBy": null, "createdDate": null, "description": null, "direction": null, "effectiveDate": null, "end": { "attributes": null, "description": null, "entityTypeId": null, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "name": "Patient", "status": "Active" }, "expirationDate": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/relationships/primary-care-physician-of", "mediaType": "application/json", "rel": "canonical" } ], "modifiedBy": null, "modifiedDate": null, "multiplicity": null, "name": "primary-care-physician-of", "relationshipTypeId": 1, "start": { "attributes": null, "description": null, "entityTypeId": null, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/IndProvider", "mediaType": "application/json", "rel": "canonical" } ], "name": "IndProvider", "status": "Active" }, "status": "Active", "task": null }, "validity": "Resolved" }
200
This API is used to create a relationship between the source and target MPI domain by using the configured inferring rules.
http(s)://<server>:<port>/ohmpi-rm/1.0.0/integration/relationships/entities/{source}/{target}
application/json
HTTP POST
application/json;charset=UTF-8
Parameter | Value | Description |
---|---|---|
source | Matching the regex [a-zA-Z][a-zA-Z_0-9]+ | Source entity type name of the entity for which relationship is to be created |
target | Matching the regex [a-zA-Z][a-zA-Z_0-9]+ | Target entity type name of the entity for which relationship is to be created |
entityResources | - | Details of the source and target entities whose relationship needs to be created. For details on the fields for the entity request body, see Section A.1.7, "Entity Resources". |
Parameter | Description |
---|---|
relationship | For information on the relationship attributes in response, see Section A.2.7, "Relationship Response Structure". To display all the attributes of the relationship type, use the GET /resources/relationships/{id} API with expand=all. |
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/integration/relationships/entities/Patient/IndProvider
Assuming that you want to create a relationship of type patient-of, the source entity domain of the relationship type is Patient, and the target entity domain. Perform the following steps for the initial setup:
Create a ruleset with source as Patient and target as IndProvider.
Create a ruleset file for the ruleset and upload it using REST APIs or UI.
For sample purpose, consider the ruleset with name CreatePatientOfSampleRuleset and ruleset file defined in Section A.4.3, "Sample Ruleset File 3".
Create a task with the same name as defined in the ruleset file.
Create a groovy script for the task and upload it using REST APIs or UI.
For sample purpose, consider the task with name CreatePatientOfSampleTask and the task groovy script defined in Section A.4.5, "Sample Task File 2".
Invoke the API using the following sample request body.
{ "items" : [ { "id":"PA1311", "attributes": [ { "name" : "LocalId", "value" : "1000000001" }, { "name" : "SystemCode", "value" : "Oracle" }, { "name":"FirstName", "value":"Ricky" }, { "name":"LastName", "value":"D" }, { "name":"Gender", "value":"M" }, { "name":"City", "value":"CA" }, { "name":"Provider.ID", "value":"0000000014" }, { "name":"DOB", "value":"2015/01/02" }, { "name" : "Doctor", "value" : "Dr." }, { "name" : "SSN", "value" : "111111111" }, { "name" : "Provider.Name" , "value" :"Nancy" } ] }, { "id":"DA12312", "attributes": [ { "name" : "LocalId", "value" : "0000012299" }, { "name" : "SystemCode", "value" : "Oracle" }, { "name":"FirstName", "value":"Johny" }, { "name":"LastName", "value":"Perch" }, { "name":"Gender", "value":"F" }, { "name":"License", "value":"CA" }, { "name":"DOB", "value":"2015/01/02" }, { "name":"Specialty", "value":"Nutritionist" }, { "name" : "ProviderStatus", "value" : "ACTIVE" }, { "name" : "Names.NameType", "value" : "RN" }, { "name" : "Names.FirstName", "value" : "Ricky" }, { "name" : "Names.LastName", "value" : "B" }, { "name" : "Locations.LocationType", "value" : "M1" }, { "name" : "Locations.AddressLine1", "value" : "lane10" }, { "name" : "Locations.City", "value" : "CA" } ] } ] }
{ "attributes": null, "createdBy": null, "createdDate": null, "effectiveDate": null, "expirationDate": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/relationships/144", "mediaType": "application/json", "rel": "canonical" } ], "modifiedBy": null, "modifiedDate": null, "relationshipId": 144, "source": { "attributes": null, "entityId": 282, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/282", "mediaType": "application/json", "rel": "canonical" } ], "status": null, "type": null }, "status": "Active", "target": { "attributes": null, "entityId": 283, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/resources/entities/283", "mediaType": "application/json", "rel": "canonical" } ], "status": null, "type": null }, "type": { "attributes": null, "createdBy": null, "createdDate": null, "description": null, "direction": null, "effectiveDate": null, "end": { "attributes": null, "description": null, "entityTypeId": null, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/IndProvider", "mediaType": "application/json", "rel": "canonical" } ], "name": "IndProvider", "status": "Active" }, "expirationDate": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/relationships/patient-of", "mediaType": "application/json", "rel": "canonical" } ], "modifiedBy": null, "modifiedDate": null, "multiplicity": null, "name": "patient-of", "relationshipTypeId": 5, "start": { "attributes": null, "description": null, "entityTypeId": null, "id": null, "links": [ { "href": "/ohmpi-rm/1.0.0/metadata/entities/Patient", "mediaType": "application/json", "rel": "canonical" } ], "name": "Patient", "status": "Active" }, "status": "Active", "task": null }, "validity": "Resolved" }
200