RESTful Interface Design for Entity Version

Record Link Domain Resource

11 min read

On this page
  1. URL: /openempi-ws-rest/1.0/record-links
  2. Parameters
  3. Methods
  4. Responses
  5. Example
  6. URL: /openempi-ws-rest/1.0/record-links/${recordLinkId}
  7. Parameters
  8. Methods
  9. Responses
  10. Example
  11. URL: /openempi-ws-rest/1.0/record-links/loadByRecordId
  12. Parameters
  13. Methods
  14. Responses
  15. Example
  16. URL(POST for add): /openempi-ws-rest/1.0/record-links
  17. Parameters
  18. Methods
  19. Responses
  20. Example
  21. URL(PUT for updating match status): /openempi-ws-rest/1.0/record-links
  22. Parameters
  23. Methods
  24. Responses
  25. Example
  26. URL(DELETE for remove): /openempi-ws-rest/1.0/record-links
  27. Parameters
  28. Methods
  29. Responses
  30. Example

Parameters

Parameter

Value Type

Parameter Type

R/O

Description

entityId

Integer

Query Parameter

R

The unique identifier of the entity type whose records are queried

firstResultIntegerQuery ParameterOThe number of records to skip before the first result record
maxResultsIntegerQuery ParameterOThe maximum number of records that should be returned
linkStateString {M, A, P}Query ParameterOUsed to indicate that only links of a given state must be returned. The state can be one of M for match, A for all states (starting with the 3.5.7 release), or P for probable match
keyValStringQuery ParameterOWhen present, it will cause the server to only return record links where both records in the link have the value specified in the value portion of the keyVal parameter in the field specified in the key portion of the keyVal parameter. The keyVal parameter takes the same form as in the findByAttributes request but you can only filter by a single field value. The keyVla parameter should look like keyVal=field,value. For example, adding the parameter keyVal=familyName,Chandler will only return record pairs where both records in each pair have the value 'Chandler' for the field 'familyName' (starting with version 3.5.9 and 3.6.3).

Methods

GET

Returns the list of record links between records of the specified entity type and that match the query criteria specified in the additional parameters. If you don’t provide the linkState parameter then the system will return only match links. Starting with the 3.5.7 release, you can use the value ‘A’ for the linkState parameter to indicate that you want links of all states to be returned.

Responses

  • 200 - application/json - Returns a JSON representation of the response based on the Accept header

  • 200 - application/xml - Returns an XML representation of the response based on the Accept header

  • 404 - Returned if there are no record links in the system that match the query criteria

Example

Version 1.0

Entity id is 7650.

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/record-links?entityId=7650

Return:

             7650                     7650                             city                 Tucson                                         givenName                 Albert                                         state                 AZ                                         address1                 15 N Saguaro                                         gender                 M                                         country                 USA                                         dateOfBirth                 1961-01-01                                         postalCode                 85701                                         familyName                 Hon                                         2013-10-03T10:52:44.826-04:00                 IHERED-999                                     2013-01-17T11:33:45.903-05:00                     IHERED                     2750                     IHERED                     IHERED                     1.3.6.1.4.1.21367.13.20.1000                     ISO                                 2750                 9                         4                 1                     7650                             city                 Tucson                                         givenName                 Carrie                                         state                 AZ                                         address1                 515 W Cholla                                         gender                 F                                         country                 USA                                         dateOfBirth                 1961-04-01                                         postalCode                 85719                                         familyName                 Hon                                         2013-10-03T10:52:44.176-04:00                 IHERED-1002                                     2013-01-17T11:33:45.903-05:00                     IHERED                     2750                     IHERED                     IHERED                     1.3.6.1.4.1.21367.13.20.1000                     ISO                                 2750                 1                         0                 M         5.621535053391952     

URL: /openempi-ws-rest/1.0/record-links/{recordLinkId}

Parameters

| Parameter

|

Value Type

|

Parameter Type

|

R/O

|

Description

| | --- | --- | --- | --- | --- | |

recordLinkId

|

Integer

|

Path Parameter

| R |

The unique identifier of the record link requested

|

Methods

GET

Returns the record link .

Responses

  • 200 - application/json - Returns a JSON representation of the response based on the Accept header

  • 200 - application/xml - Returns an XML representation of the response based on the Accept header

  • 404 - Returned if there is no record link in the system with that identifier

Example

Version 1.0

Entity id is 7650.

Record link id is 1

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/record-links/1?entityId=7650

Return:

    7650              7650                     city             Tucson                             givenName             Albert                             state             AZ                             address1             15 N Saguaro                             gender             M                             country             USA                             dateOfBirth             1961-01-01                             postalCode             85701                             familyName             Hon                             2013-10-03T10:52:44.826-04:00             IHERED-999                             2013-01-17T11:33:45.903-05:00                 IHERED                 2750                 IHERED                 IHERED                 1.3.6.1.4.1.21367.13.20.1000                 ISO                         2750             9                 4          1              7650                     city             Tucson                             givenName             Carrie                             state             AZ                             address1             515 W Cholla                             gender             F                             country             USA                             dateOfBirth             1961-04-01                             postalCode             85719                             familyName             Hon                             2013-10-03T10:52:44.176-04:00             IHERED-1002                             2013-01-17T11:33:45.903-05:00                 IHERED                 2750                 IHERED                 IHERED                 1.3.6.1.4.1.21367.13.20.1000                 ISO                         2750             1                 0          M     5.621535053391952

URL: /openempi-ws-rest/1.0/record-links/loadByRecordId

Parameters

Parameter

Value Type

Parameter Type

R/O

Description

entityId

Integer

Query Parameter

R

The unique identifier of the entity type whose records are queried

recordId

Integer

Query Parameter

R

The unique identifier of the record to which links are requested

linkStateString {M, A, P}Query ParameterOUsed to indicate that only links of a given state must be returned. The state can be one of M for match, A for all states (starting with the 3.5.7 release), or P for probable match

Methods

GET

Returns the list of record links that are associated with the record identified by the recordId unique identifier. If you don’t provide the linkState parameter then the system will return only match links. Starting with the 3.5.7 release, you can use the value ‘A’ for the linkState parameter to indicate that you want links of all states to be returned.

Responses

  • 200 - application/json - Returns a JSON representation of the response based on the Accept header

  • 200 - application/xml - Returns an XML representation of the response based on the Accept header

  • 404 - Returned if there are no record links in the system with that identifier

Example

Version 1.0

Entity id is 7650.

Record id is 4

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/record-links/loadByRecordId?recordId=4&entityId=7650

Return:

            7650                     7650                             city                 Tucson                                         givenName                 Carrie                                         state                 AZ                                         address1                 515 W Cholla                                         gender                 F                                         country                 USA                                         dateOfBirth                 1961-04-01                                         postalCode                 85719                                         familyName                 Hon                                         2013-10-03T10:52:44.176-04:00                 IHERED-1002                                     2013-01-17T11:33:45.903-05:00                     IHERED                     2750                     IHERED                     IHERED                     1.3.6.1.4.1.21367.13.20.1000                     ISO                                 2750                 1                         0                 0                     7650                             city                 Tucson                                         givenName                 Albert                                         state                 AZ                                         address1                 15 N Saguaro                                         gender                 M                                         country                 USA                                         dateOfBirth                 1961-01-01                                         postalCode                 85701                                         familyName                 Hon                                         2013-10-03T10:52:44.826-04:00                 IHERED-999                                     2013-01-17T11:33:45.903-05:00                     IHERED                     2750                     IHERED                     IHERED                     1.3.6.1.4.1.21367.13.20.1000                     ISO                                 2750                 9                         4                 M         5.621535053391952    

Parameters

| Parameter

|

Value Type

|

Parameter Type

|

R/O

|

Description

| | --- | --- | --- | --- | --- | | recordLink | RecordLink | Body | R | A RecordLink object which include the entity id, match status, weight, left record and right record |

Methods

POST

Returns the newly added recordLink.

Responses

  • 200 - application/json - Returns a JSON representation of the response based on the Accept header

  • 200 - application/xml - Returns an XML representation of the response based on the Accept header

  • 400 - Returned if there is a bad request.

  • 409 - Returned if there is a record conflict in the system.

Example

Version 1.0

Left Record is Record 20.

Right Record is Record 24.

POST

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/record-links

Content-Type: application/xml

Body:

    7650              7650                      givenName             recordLeft                               familyName             Test                               2013-10-04T12:04:38.270-04:00             identifierLeft                              2013-01-17T11:33:45.903-05:00                 IHERED                 2750                 IHERED                 IHERED                 1.3.6.1.4.1.21367.13.20.1000                 ISO                          2750             25                  20                   7650                      givenName             recordRight                               familyName             Test                               2013-10-04T12:04:39.307-04:00             identifierRight                              2013-01-17T11:33:45.903-05:00                 IHERED                 2750                 IHERED                 IHERED                 1.3.6.1.4.1.21367.13.20.1000                 ISO                          2750             26                  24          M     6.5

Return:

    7650             7650                     givenName             recordLeft                             familyName             Test                             2013-10-04T12:04:38.270-04:00             identifierLeft                             2013-01-17T11:33:45.903-05:00                 IHERED                 2750                 IHERED                 IHERED                 1.3.6.1.4.1.21367.13.20.1000                 ISO                         2750             25                 20         114             7650                     givenName             recordRight                             familyName             Test                             2013-10-04T12:04:39.307-04:00             identifierRight                             2013-01-17T11:33:45.903-05:00                 IHERED                 2750                 IHERED                 IHERED                 1.3.6.1.4.1.21367.13.20.1000                 ISO                         2750             26                 24         M     6.5

Content-Type: application/json

Body:

{ “entityId” : “7650”,   “leftRecord” : { “entityId” : “7650”,       “field” : [ { “name” : “givenName”,             “value” : “recordRight”           },           { “name” : “familyName”,             “value” : “Test”           }         ],       “identifier” : { “dateCreated” : “2013-10-04T12:04:39.307-04:00”,           “identifier” : “identifierRight”,           “identifierDomain” : { “dateCreated” : “2013-01-17T11:33:45.903-05:00”,               “identifierDomainDescription” : “IHERED”,               “identifierDomainId” : “2750”,               “identifierDomainName” : “IHERED”,               “namespaceIdentifier” : “IHERED”,               “universalIdentifier” : “1.3.6.1.4.1.21367.13.20.1000”,               “universalIdentifierTypeCode” : “ISO”             },           “identifierDomainId” : “2750”,           “identifierId” : “26”         },       “recordId” : “24”     },   “rightRecord” : { “entityId” : “7650”,       “field” : [ { “name” : “givenName”,             “value” : “recordLeft”           },           { “name” : “familyName”,             “value” : “Test”           }         ],       “identifier” : { “dateCreated” : “2013-10-04T12:04:38.270-04:00”,           “identifier” : “identifierLeft”,           “identifierDomain” : { “dateCreated” : “2013-01-17T11:33:45.903-05:00”,               “identifierDomainDescription” : “IHERED”,               “identifierDomainId” : “2750”,               “identifierDomainName” : “IHERED”,               “namespaceIdentifier” : “IHERED”,               “universalIdentifier” : “1.3.6.1.4.1.21367.13.20.1000”,               “universalIdentifierTypeCode” : “ISO”             },           “identifierDomainId” : “2750”,           “identifierId” : “25”         },       “recordId” : “20”     },   “state” : “M”,   “weight” : “6.5” }

Return:

{ “entityId” : “7650”,   “leftRecord” : { “entityId” : “7650”,       “field” : [ { “name” : “givenName”,             “value” : “recordRight”           },           { “name” : “familyName”,             “value” : “Test”           }         ],       “identifier” : { “dateCreated” : “2013-10-04T12:04:39.307-04:00”,           “identifier” : “identifierRight”,           “identifierDomain” : { “dateCreated” : “2013-01-17T11:33:45.903-05:00”,               “identifierDomainDescription” : “IHERED”,               “identifierDomainId” : “2750”,               “identifierDomainName” : “IHERED”,               “namespaceIdentifier” : “IHERED”,               “universalIdentifier” : “1.3.6.1.4.1.21367.13.20.1000”,               “universalIdentifierTypeCode” : “ISO”             },           “identifierDomainId” : “2750”,           “identifierId” : “26”         },       “recordId” : “24”     },   “recordLinkId” : “115”,   “rightRecord” : { “entityId” : “7650”,       “field” : [ { “name” : “givenName”,             “value” : “recordLeft”           },           { “name” : “familyName”,             “value” : “Test”           }         ],       “identifier” : { “dateCreated” : “2013-10-04T12:04:38.270-04:00”,           “identifier” : “identifierLeft”,           “identifierDomain” : { “dateCreated” : “2013-01-17T11:33:45.903-05:00”,               “identifierDomainDescription” : “IHERED”,               “identifierDomainId” : “2750”,               “identifierDomainName” : “IHERED”,               “namespaceIdentifier” : “IHERED”,               “universalIdentifier” : “1.3.6.1.4.1.21367.13.20.1000”,               “universalIdentifierTypeCode” : “ISO”             },           “identifierDomainId” : “2750”,           “identifierId” : “25”         },       “recordId” : “20”     },   “state” : “M”,   “weight” : “6.5” }

Parameters

| Parameter

|

Value Type

|

Parameter Type

|

R/O

|

Description

| | --- | --- | --- | --- | --- | | recordLink | RecordLink | Body | R | A RecordLink object which include the entity id, match status, weight, left record and right record |

Methods

PUT

Returns the updated recordLink.

Responses

  • 200 - application/json - Returns a JSON representation of the response based on the Accept header

  • 200 - application/xml - Returns an XML representation of the response based on the Accept header

  • 404 - Returned if there are no that record link in the system

  • 409 - Returned if there is a record conflict in the system.

Example

Version 1.0

Update state as “P”

PUT

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/record-links

Content-Type: application/xml

Body:

    7650             7650                     givenName             recordLeft                             familyName             Test                             2013-10-04T12:04:38.270-04:00             identifierLeft                             2013-01-17T11:33:45.903-05:00                 IHERED                 2750                 IHERED                 IHERED                 1.3.6.1.4.1.21367.13.20.1000                 ISO                         2750             25                 20         114             7650                     givenName             recordRight                             familyName             Test                             2013-10-04T12:04:39.307-04:00             identifierRight                             2013-01-17T11:33:45.903-05:00                 IHERED                 2750                 IHERED                 IHERED                 1.3.6.1.4.1.21367.13.20.1000                 ISO                         2750             26                 24         P     6.5

Return:

    7650             7650                     givenName             recordRight                             familyName             Test                             2013-10-04T12:04:39.307-04:00             identifierRight                             2013-01-17T11:33:45.903-05:00                 IHERED                 2750                 IHERED                 IHERED                 1.3.6.1.4.1.21367.13.20.1000                 ISO                         2750             26                 24         114             7650                     givenName             recordLeft                             familyName             Test                             2013-10-04T12:04:38.270-04:00             identifierLeft                             2013-01-17T11:33:45.903-05:00                 IHERED                 2750                 IHERED                 IHERED                 1.3.6.1.4.1.21367.13.20.1000                 ISO                         2750             25                 20         P     6.5

Content-Type: application/json

Body:

{ “entityId” : “7650”,   “leftRecord” : { “entityId” : “7650”,       “field” : [ { “name” : “givenName”,             “value” : “recordRight”           },           { “name” : “familyName”,             “value” : “Test”           }         ],       “identifier” : { “dateCreated” : “2013-10-04T12:04:39.307-04:00”,           “identifier” : “identifierRight”,           “identifierDomain” : { “dateCreated” : “2013-01-17T11:33:45.903-05:00”,               “identifierDomainDescription” : “IHERED”,               “identifierDomainId” : “2750”,               “identifierDomainName” : “IHERED”,               “namespaceIdentifier” : “IHERED”,               “universalIdentifier” : “1.3.6.1.4.1.21367.13.20.1000”,               “universalIdentifierTypeCode” : “ISO”             },           “identifierDomainId” : “2750”,           “identifierId” : “26”         },       “recordId” : “24”     },   “recordLinkId” : “115”,   “rightRecord” : { “entityId” : “7650”,       “field” : [ { “name” : “givenName”,             “value” : “recordLeft”           },           { “name” : “familyName”,             “value” : “Test”           }         ],       “identifier” : { “dateCreated” : “2013-10-04T12:04:38.270-04:00”,           “identifier” : “identifierLeft”,           “identifierDomain” : { “dateCreated” : “2013-01-17T11:33:45.903-05:00”,               “identifierDomainDescription” : “IHERED”,               “identifierDomainId” : “2750”,               “identifierDomainName” : “IHERED”,               “namespaceIdentifier” : “IHERED”,               “universalIdentifier” : “1.3.6.1.4.1.21367.13.20.1000”,               “universalIdentifierTypeCode” : “ISO”             },           “identifierDomainId” : “2750”,           “identifierId” : “25”         },       “recordId” : “20”     },   “state” : “P”,   “weight” : “6.5” }

Return:

{ “entityId” : “7650”,   “leftRecord” : { “entityId” : “7650”,       “field” : [ { “name” : “givenName”,             “value” : “recordLeft”           },           { “name” : “familyName”,             “value” : “Test”           }         ],       “identifier” : { “dateCreated” : “2013-10-04T12:04:38.270-04:00”,           “identifier” : “identifierLeft”,           “identifierDomain” : { “dateCreated” : “2013-01-17T11:33:45.903-05:00”,               “identifierDomainDescription” : “IHERED”,               “identifierDomainId” : “2750”,               “identifierDomainName” : “IHERED”,               “namespaceIdentifier” : “IHERED”,               “universalIdentifier” : “1.3.6.1.4.1.21367.13.20.1000”,               “universalIdentifierTypeCode” : “ISO”             },           “identifierDomainId” : “2750”,           “identifierId” : “25”         },       “recordId” : “20”     },   “recordLinkId” : “115”,   “rightRecord” : { “entityId” : “7650”,       “field” : [ { “name” : “givenName”,             “value” : “recordRight”           },           { “name” : “familyName”,             “value” : “Test”           }         ],       “identifier” : { “dateCreated” : “2013-10-04T12:04:39.307-04:00”,           “identifier” : “identifierRight”,           “identifierDomain” : { “dateCreated” : “2013-01-17T11:33:45.903-05:00”,               “identifierDomainDescription” : “IHERED”,               “identifierDomainId” : “2750”,               “identifierDomainName” : “IHERED”,               “namespaceIdentifier” : “IHERED”,               “universalIdentifier” : “1.3.6.1.4.1.21367.13.20.1000”,               “universalIdentifierTypeCode” : “ISO”             },           “identifierDomainId” : “2750”,           “identifierId” : “26”         },       “recordId” : “24”     },   “state” : “P”,   “weight” : “6.5” }

Delete the recordLink   in the database.

Parameters

| Parameter

|

Value Type

|

Parameter Type

|

R/O

|

Description

| | --- | --- | --- | --- | --- | |

entityId

|

Integer

|

Query Parameter

| R |

The unique identifier of the entity type whose records are queried

| | recordLinkId | Long | Path Parameter | R | The unique identifier of the recordLink |

Methods

DELETE

Returns no content if delete successfully.

Responses

  • 200 - application/json - Returns a JSON representation of the response based on the Accept header

  • 200 - application/xml - Returns an XML representation of the response based on the Accept header

  • 404 - Returned if cannot find the record link to be deleted by recordLinkId

  • 409 - Returned if there is some conflict in the system

Example

Version 1.0

Entity id is 7650.

Record id is 115

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/record-links/115?entityId=7650

Return:

No content if delete successfully

Up to Entity API Documentation