RESTful Interface Design for Entity Version

Record Domain Resource

20 min read

On this page
  1. URL: /openempi-ws-rest/1.0/records/findByAttributes
  2. Parameters
  3. Methods
  4. Responses
  5. Example
  6. URL: /openempi-ws-rest/1.0/records/findByIdentifier
  7. Parameters
  8. Methods
  9. Responses
  10. Example
  11. URL: /openempi-ws-rest/1.0/records/findOrAddRecord
  12. Parameters
  13. Methods
  14. Responses
  15. Example
  16. URL: /openempi-ws-rest/1.0/records/recordCountByAttributes
  17. Parameters
  18. Methods
  19. Responses
  20. Example
  21. URL: /openempi-ws-rest/1.0/records/recordCountByIdentifier
  22. Parameters
  23. Methods
  24. Responses
  25. Example
  26. URL: /openempi-ws-rest/1.0/records
  27. Parameters
  28. Methods
  29. Responses
  30. Example
  31. URL(POST for add): /openempi-ws-rest/1.0/records
  32. Parameters
  33. Methods
  34. Responses
  35. Example
  36. URL(PUT for update): /openempi-ws-rest/1.0/records
  37. Parameters
  38. Methods
  39. Responses
  40. Example
  41. URL(DELETE for remove): /openempi-ws-rest/1.0/records
  42. Parameters
  43. Methods
  44. Responses
  45. Example
  46. URL: /openempi-ws-rest/1.0/records/findByBlocking
  47. Parameters
  48. Methods
  49. Responses
  50. Example
  51. URL: /openempi-ws-rest/1.0/records/findByMatching
  52. Parameters
  53. Methods
  54. Responses
  55. Example
  56. URL: /openempi-ws-rest/1.0/records/findRecordPairsByMatching
  57. Parameters
  58. Methods
  59. Responses
  60. Example
  61. URL: /openempi-ws-rest/1.0/records/importFile
  62. Parameters
  63. Methods
  64. Responses
  65. Example

URL: /openempi-ws-rest/1.0/records/findByAttributes

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
ketValString of Key, Value pairQuery ParameterRThe key value pair that will be used to constrain the set of results returned. This is a repeating parameter and the value of the parameter will be coerced into the datatype of the attribute identified by the key

Methods

GET

Returns the list of records of the entity type specified that match the query criteria provided in the request in the form of a list of key-value pairs.

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 entity known in the system with that entityId

Example

Version 1.0

Entity id is 7650.

keyVal pairs are

          familyName,Hon

          givenName,Albert

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records/findByAttributes?entityId=7650&keyVal=familyName,Hon&keyVal=givenName,Albert

Return:

             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     

URL: /openempi-ws-rest/1.0/records/findByIdentifier

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. Uses 0 if the value is unspecified.
maxResultsIntegerQuery ParameterOThe maximum number of records that should be returned. Uses 10 if the value is unspecified.
identifierStringQuery ParameterRThe identifier is a required parameter that will be used in the query criteria to constrain the records returned
identifierDomainIdIntegerQuery ParameterOOptional parameter that can be used to specify the domain that assigned the identifier in the request

Methods

GET

Returns the list of records of the entity type specified that have the identifier or partial identifier specified in the query parameter.

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 entity known in the system with that entityId

Example

Version 1.0

Entity id is 7650. 

Identifier is IHERED-999 and identifier domain id is 2750.

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records/findByIdentifier?entityId=7650&identifier=IHERED-999&identifierDomainId=2750

Return:

             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     

URL: /openempi-ws-rest/1.0/records/findOrAddRecord

Since version 3.3.7 and 3.4.0

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

identifierStringQuery ParameterOThe identifier is an optional parameter that will be used in the query criteria to constrain the records identified
identifierDomainIdIntegerQuery ParameterO

Optional parameter that can be used to specify the domain that assigned the identifier in the request

recordRecordBodyRA Record object which includes attribute name/value pairs and identifiers (which are optional)

Methods

POST

Searches the repository for record with the identifier provided as a query parameter (and domain if present in the request). If any of the records found match against the record provided in the body of the POST request, then the matching record(s) are returned. If no records are found using the specified identifier or none of them match with the record provided in the body of the request, then the record is added to the repository and returned in the response. If the identifier and/or identifierDomainId parameters are not provided in the request, then the system searches for similar records using the blocking configuration of the system. The set of candidate records identified by the blocking algorithm are evaluated for a match with the record provided in the body of the request. If any of the candidates are found to match the record then those matching records are returned. If not candidate records match the requested record, then the new record is added to the repository.

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 entity known in the system with that entityId

Example

Version 1.0

Entity id is 7650. 

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records/findOrAddRecord?entityId=2

Header:

Content-Type: application/xml

Body:

<record>
        <entityId>2</entityId>
        <field>
            <name>givenName</name>
            <value>Cassandra</value>
        </field>
        <field>
            <name>familyName</name>
            <value>Finley</value>
        </field>
        <field>
            <name>dateOfBirth</name>
            <value>1967-02-13</value>
        </field>
        <field>
            <name>postalCode</name>
            <value>12121</value>
        </field>
        <field>
            <name>ssn</name>
            <value>111-11-1111</value>
        </field>
        <field>
            <name>address1</name>
            <value>11 Some Street</value>
        </field>
        <field>
            <name>city</name>
            <value>Somewhere</value>
        </field>
        <identifier>
            <identifier>mrn-232323</identifier>
            <identifierDomain>
                <identifierDomainDescription>IHENA</identifierDomainDescription>
                <identifierDomainId>14</identifierDomainId>
                <identifierDomainName>IHENA</identifierDomainName>
                <namespaceIdentifier>IHENA</namespaceIdentifier>
                <universalIdentifier>1.3.6.1.4.1.21367.2010.1.2.300</universalIdentifier>
                <universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
            </identifierDomain>
        </identifier>
    </record>

URL: /openempi-ws-rest/1.0/records/recordCountByAttributes

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

keyValString of Key, Value pairQuery ParameterRThe key value pair that will be used to constrain the set of results returned. This is a repeating parameter and the value of the parameter will be coerced into the datatype of the attribute identified by the key

Methods

GET

Returns the count of records of the entity type specified that match the query criteria provided in the request in the form of a list of attribute-value pairs.

Responses

  • 200 - Integer - Returns the record count as a single value

Example

Version 1.0

Entity id is 7650.

keyVal pairs are

          familyName,Hon

          givenName,Albert

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records/recordCountByAttributes?entityId=7650&keyVal=familyName,Hon&keyVal=givenName,Albert

Return:

1

URL: /openempi-ws-rest/1.0/records/recordCountByIdentifier

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

| | identifier | String | Query Parameter | R | The identifier is a required parameter that will be used in the query criteria to constrain the records returned | | identifierDomainId | Integer | Query Parameter | O | Optional parameter that can be used to specify the domain that assigned the identifier in the request |

Methods

GET

Returns the count of records of the entity type specified that have the identifier or partial identifier specified in the query parameter.

Responses

  • 200 - integer - Returns the record count as a single value

Example

Version 1.0

Entity id is 7650. 

Identifier is IHERED-999 and identifier domain id is 2750.

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records/recordCountByIdentifier?entityId=7650&identifier=IHERED-999&identifierDomainId=2750

Return:

1

URL: /openempi-ws-rest/1.0/records

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 | A  list of record ids. (Optional) | | firstRecord | Integer | Query Parameter | R |

The first record to return. If the value is n, then the first n-1 records are skipped (Optional)

Since 3.4.0

| | maxRecords | Integer | Query Parameter | R |

The number of records to return starting with firstRecord (Optional)

Since 3.4.0

|

Methods

GET

Returns the list of records of the entity type specified that match either the specific list of record identifiers passed in as query parameters or by paging through the parameters firstRecord and maxRecord (starting with version 3.4.0). The caller may either specify one or more record identifiers or use the paging parameters (firstRecord and maxRecords) to page through the results.

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 records in the system with that entityId and any of those record identifiers

Example

Version 1.0

Entity id is 7650.

Record ids are

          2

          4

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records/?entityId=7650&recordId=2&recordId=4

Return:

             7650                      city             OAK BROOK                               givenName             ALICE                               state             IL                               address1             820 JORIE BLVD.                               gender             F                               country             USA                               dateOfBirth             1958-01-31                               postalCode             60523                               familyName             MOHR                               2013-10-03T10:52:44.558-04:00             IHERED-994                              2013-01-17T11:33:45.903-05:00                 IHERED                 2750                 IHERED                 IHERED                 1.3.6.1.4.1.21367.13.20.1000                 ISO                          2750             5                  2                   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     

This example uses the paging form of the request to retrieve 1 record starting from the 4th record in the system.

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records/?entityId=2&firstRecord=4&maxRecords=1

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<records>
	<record>
		<entityId>2</entityId>
		<field>
			<name>gender</name>
			<value>M</value>
		</field>
		<field>
			<name>postalCode</name>
			<value>12944</value>
		</field>
		<field>
			<name>phoneNumber</name>
			<value>8387454157</value>
		</field>
		<field>
			<name>city</name>
			<value>Apache Junction</value>
		</field>
		<field>
			<name>address2</name>
			<value></value>
		</field>
		<field>
			<name>state</name>
			<value>NC</value>
		</field>
		<field>
			<name>ssn</name>
			<value>346035033</value>
		</field>
		<field>
			<name>address1</name>
			<value>70 Zeitz Court</value>
		</field>
		<field>
			<name>givenName</name>
			<value>Leon</value>
		</field>
		<field>
			<name>dateOfBirth</name>
			<value>1990-02-25</value>
		</field>
		<field>
			<name>familyName</name>
			<value>Spaninks</value>
		</field>
		<identifier>
			<dateCreated>2017-06-27T15:10:56.548-04:00</dateCreated>
			<identifier>rec-3947-org</identifier>
			<identifierDomain>
				<dateCreated>2016-09-10T15:39:19.963-04:00</dateCreated>
				<identifierDomainDescription>IHENA</identifierDomainDescription>
				<identifierDomainId>14</identifierDomainId>
				<identifierDomainName>IHENA</identifierDomainName>
				<namespaceIdentifier>IHENA</namespaceIdentifier>
				<universalIdentifier>1.3.6.1.4.1.21367.2010.1.2.300</universalIdentifier>
				<universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
			</identifierDomain>
			<identifierDomainId>14</identifierDomainId>
			<identifierId>33</identifierId>
			<internalRecordId>#33:4</internalRecordId>
		</identifier>
		<recordId>33</recordId>
	</record>
</records>

URL(POST for add): /openempi-ws-rest/1.0/records

Parameters

| Parameter

|

Value Type

|

Parameter Type

|

R/O

|

Description

| | --- | --- | --- | --- | --- | | record | Record | Body | R | A Record object which include the entity id, attribute name value pairs and identifiers |

Methods

POST

Returns the newly added record of the entity type.

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

POST

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records

Content-Type: application/xml

Body:

             familyName         Test                   givenName         Test                   address1         123                   dateOfBirth         1961-01-01T00:00:00-05:00                   2013-09-24T14:20:04.861-04:00         IHERED-Test                      2013-01-17T11:33:45.903-05:00             IHERED             2750             IHERED             IHERED             1.3.6.1.4.1.21367.13.20.1000             ISO                   7650

Return:

    7650              givenName         Test                   address1         123                   dateOfBirth         1961-01-01                   familyName         Test                   2013-10-03T13:47:39.322-04:00         IHERED-Test                     2013-01-17T11:33:45.903-05:00             IHERED             2750             IHERED             IHERED             1.3.6.1.4.1.21367.13.20.1000             ISO                 2750         20          10

Content-Type: application/json

Body:

{ “entityId” : “7650”,   “field” : [       { “name” : “givenName”,         “value” : “TestJson”       },       { “name” : “dateOfBirth”,         “value” : “1961-01-01”       },       { “name” : “familyName”,         “value” : “Test”       }     ],   “identifier” : [       { “dateCreated” : “2013-10-03T10:52:44.826-04:00”,         “identifier” : “IHERED-Test”,         “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”           }       }     ] }

Returns:

{ “entityId” : “7650”,   “field” : [ { “name” : “givenName”,         “value” : “TestJson”       },       { “name” : “dateOfBirth”,         “value” : “1961-01-01”       },       { “name” : “familyName”,         “value” : “Test”       }     ],   “identifier” : { “dateCreated” : “2013-10-03T14:30:32.701-04:00”,       “identifier” : “IHERED-Test”,       “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” : “24”     },   “recordId” : “16” }

URL(PUT for update): /openempi-ws-rest/1.0/records

Parameters

| Parameter

|

Value Type

|

Parameter Type

|

R/O

|

Description

| | --- | --- | --- | --- | --- | | record | Record | Body | R | A Record object which include the entity id, record id, attribute name value pairs and identifiers |

Methods

PUT

Returns the updated record of the entity type.

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 records in the system with that entityId and any of those record identifiers

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

Example

Version 1.0

PUT

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records

Content-Type: application/xml

Body:

    7650              givenName         UpdateTest                   address1         567                   dateOfBirth         1961-01-01                   familyName         Test                   2013-10-03T13:47:39.322-04:00         IHERED-Update                     2013-01-17T11:33:45.903-05:00             IHERED             2750             IHERED             IHERED             1.3.6.1.4.1.21367.13.20.1000             ISO                 2750         20          10

Return:

    7650              givenName         UpdateTest                   address1         567                   dateOfBirth         1961-01-01                   familyName         Test                   2013-10-03T13:47:39.322-04:00         IHERED-Update                     2013-01-17T11:33:45.903-05:00             IHERED             2750             IHERED             IHERED             1.3.6.1.4.1.21367.13.20.1000             ISO                 2750         20          10

Content-Type: application/json

Body:

{ “entityId” : “7650”,   “field” : [ { “name” : “givenName”,         “value” : “UpdateJson”       },       { “name” : “dateOfBirth”,         “value” : “1961-01-01”       },       { “name” : “familyName”,         “value” : “Test”       }     ],   “identifier” : { “dateCreated” : “2013-10-03T14:30:32.701-04:00”,       “identifier” : “IHERED-Update”,       “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” : “24”     },   “recordId” : “16” }

Return:

{ “entityId” : “7650”,   “field” : [ { “name” : “givenName”,         “value” : “UpdateJson”       },       { “name” : “dateOfBirth”,         “value” : “1961-01-01”       },       { “name” : “familyName”,         “value” : “Test”       }     ],   “identifier” : { “dateCreated” : “2013-10-03T14:30:32.701-04:00”,       “identifier” : “IHERED-Update”,       “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” : “24”     },   “recordId” : “16” }

URL(DELETE for remove): /openempi-ws-rest/1.0/records

Delete the record in the voided status as deleted in the database or remove the record permanently 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

| | recordId | Long | Path Parameter | R | The unique identifier of the record | | remove | Boolean | Query Parameter | O | Optional parameter that can be used to remove the record permanently in the database. |

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 to be deleted by recordId

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

Example

Version 1.0

Entity id is 7650.

recordId is 10

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records/10?entityId=7650

Return:

No content if delete successfully

URL: /openempi-ws-rest/1.0/records/findByBlocking

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

| | ketVal | String of Key, Value pair | Query Parameter | R | The key value pair that will be used to constrain the set of results returned. This is a repeating parameter and the value of the parameter will be coerced into the datatype of the attribute identified by the key |

Methods

GET

Returns the list of records of the entity type specified that are similar to the query criteria provided in the request in the form of a list of key-value pairs. The similarity between the record specified in the query criteria is established based on the blocking configuration of the entity. Note that if you query using attributes that are not part of your blocking configuration attributes, you will not receive any results.

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 entity known in the system with that entityId

Example

Version 1.0

Entity id is 2.

keyVal pairs are

          familyName,Dedicoat

          givenName,James

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records/findByBlocking?entityId=2&keyVal=givenName,James&keyVal=familyName,Dedicoat

Return:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<records>
    <record>
        <entityId>2</entityId>
        <field>
            <name>gender</name>
            <value>n</value>
        </field>
        <field>
            <name>postalCode</name>
            <value>60618</value>
        </field>
        <field>
            <name>phoneNumber</name>
            <value>6534628928</value>
        </field>
        <field>
            <name>city</name>
            <value>Houston</value>
        </field>
        <field>
            <name>address2</name>
            <value>Herbert River</value>
        </field>
        <field>
            <name>state</name>
            <value>MI</value>
        </field>
        <field>
            <name>ssn</name>
            <value>868066233</value>
        </field>
        <field>
            <name>address1</name>
            <value>12 Sheaffe Street</value>
        </field>
        <field>
            <name>givenName</name>
            <value>James</value>
        </field>
        <field>
            <name>dateOfBirth</name>
            <value>1948-02-24</value>
        </field>
        <field>
            <name>familyName</name>
            <value>Dedicoat</value>
        </field>
        <identifier>
            <dateCreated>2017-08-27T18:06:38.690-04:00</dateCreated>
            <identifier>rec-3044-dup-0</identifier>
            <identifierDomain>
                <dateCreated>2016-09-10T15:39:19.963-04:00</dateCreated>
                <identifierDomainDescription>IHENA</identifierDomainDescription>
                <identifierDomainId>14</identifierDomainId>
                <identifierDomainName>IHENA</identifierDomainName>
                <namespaceIdentifier>IHENA</namespaceIdentifier>
                <universalIdentifier>1.3.6.1.4.1.21367.2010.1.2.300</universalIdentifier>
                <universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
            </identifierDomain>
            <identifierDomainId>14</identifierDomainId>
            <identifierId>3843</identifierId>
            <internalRecordId>#35:480</internalRecordId>
        </identifier>
        <identifier>
            <identifier>155ee32950b6e613d514</identifier>
            <identifierDomain>
                <dateCreated>2016-09-10T15:39:19.963-04:00</dateCreated>
                <identifierDomainDescription>OpenEMPI GID</identifierDomainDescription>
                <identifierDomainId>18</identifierDomainId>
                <identifierDomainName>OpenEMPI</identifierDomainName>
                <namespaceIdentifier>2.16.840.1.113883.4.357</namespaceIdentifier>
                <universalIdentifier>2.16.840.1.113883.4.357</universalIdentifier>
                <universalIdentifierTypeCode>hl7</universalIdentifierTypeCode>
            </identifierDomain>
            <identifierDomainId>18</identifierDomainId>
            <identifierId>10497</identifierId>
            <internalRecordId>#33:1312</internalRecordId>
        </identifier>
        <recordId>3843</recordId>
    </record>
    <record>
        <entityId>2</entityId>
        <field>
            <name>gender</name>
            <value>M</value>
        </field>
        <field>
            <name>postalCode</name>
            <value>60618</value>
        </field>
        <field>
            <name>phoneNumber</name>
            <value>6534628928</value>
        </field>
        <field>
            <name>city</name>
            <value>Houston</value>
        </field>
        <field>
            <name>address2</name>
            <value>Herbert River</value>
        </field>
        <field>
            <name>state</name>
            <value>MI</value>
        </field>
        <field>
            <name>ssn</name>
            <value>868066233</value>
        </field>
        <field>
            <name>address1</name>
            <value>12 Sheaffe Street</value>
        </field>
        <field>
            <name>givenName</name>
            <value>James</value>
        </field>
        <field>
            <name>dateOfBirth</name>
            <value>1948-02-24</value>
        </field>
        <field>
            <name>familyName</name>
            <value>Dedicoat</value>
        </field>
        <identifier>
            <dateCreated>2017-08-27T18:06:33.767-04:00</dateCreated>
            <identifier>rec-3044-org</identifier>
            <identifierDomain>
                <dateCreated>2016-09-10T15:39:19.963-04:00</dateCreated>
                <identifierDomainDescription>IHENA</identifierDomainDescription>
                <identifierDomainId>14</identifierDomainId>
                <identifierDomainName>IHENA</identifierDomainName>
                <namespaceIdentifier>IHENA</namespaceIdentifier>
                <universalIdentifier>1.3.6.1.4.1.21367.2010.1.2.300</universalIdentifier>
                <universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
            </identifierDomain>
            <identifierDomainId>14</identifierDomainId>
            <identifierId>2676</identifierId>
            <internalRecordId>#36:334</internalRecordId>
        </identifier>
        <identifier>
            <identifier>155ee32950b6e613d514</identifier>
            <identifierDomain>
                <dateCreated>2016-09-10T15:39:19.963-04:00</dateCreated>
                <identifierDomainDescription>OpenEMPI GID</identifierDomainDescription>
                <identifierDomainId>18</identifierDomainId>
                <identifierDomainName>OpenEMPI</identifierDomainName>
                <namespaceIdentifier>2.16.840.1.113883.4.357</namespaceIdentifier>
                <universalIdentifier>2.16.840.1.113883.4.357</universalIdentifier>
                <universalIdentifierTypeCode>hl7</universalIdentifierTypeCode>
            </identifierDomain>
            <identifierDomainId>18</identifierDomainId>
            <identifierId>10498</identifierId>
            <internalRecordId>#34:1312</internalRecordId>
        </identifier>
        <recordId>2676</recordId>
    </record>
</records>

URL: /openempi-ws-rest/1.0/records/findByMatching

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

ketValString of Key, Value pairQuery ParameterRThe key-value pairs that will be used to constrain the set of results returned. This is a repeating parameter and the value of the parameter will be coerced into the datatype of the attribute identified by the key

Methods

GET

Returns the list of records of the entity type specified that are similar to the query criteria provided in the request in the form of a list of key-value pairs. The similarity between the record specified in the query criteria is established based on the matching configuration of the entity. Note that if you query using attributes that are not part of your matching configuration attributes, you will not receive any results. NOTE: There is another implementation of this endpoint that uses the POST method instead of the GET method. In the POST version, the body of the request contains the entire record structure that should be used as the template for matching. Using the POST method is preferred when the number of matching attributes is large, which makes the URL request string for the GET request very long.

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 entity known in the system with that entityId

Example

Version 1.0

Entity id is 2.

keyVal pairs are

          familyName,Dedicoat

          givenName,James

          postalCode,61608

          dateOfBirth,1948-02-20

          city,Houston

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records/findByMatching?entityId=2&keyVal=givenName,James&keyVal=familyName,Dedicoat&keyVal=postalCode,60618&keyVal=dateOfBirth,1948-02-24&keyVal=city,Houston

Return:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<records>
    <record>
        <entityId>2</entityId>
        <field>
            <name>gender</name>
            <value>n</value>
        </field>
        <field>
            <name>postalCode</name>
            <value>60618</value>
        </field>
        <field>
            <name>phoneNumber</name>
            <value>6534628928</value>
        </field>
        <field>
            <name>city</name>
            <value>Houston</value>
        </field>
        <field>
            <name>address2</name>
            <value>Herbert River</value>
        </field>
        <field>
            <name>state</name>
            <value>MI</value>
        </field>
        <field>
            <name>ssn</name>
            <value>868066233</value>
        </field>
        <field>
            <name>address1</name>
            <value>12 Sheaffe Street</value>
        </field>
        <field>
            <name>givenName</name>
            <value>James</value>
        </field>
        <field>
            <name>dateOfBirth</name>
            <value>1948-02-24</value>
        </field>
        <field>
            <name>familyName</name>
            <value>Dedicoat</value>
        </field>
        <identifier>
            <dateCreated>2017-08-27T18:06:38.690-04:00</dateCreated>
            <identifier>rec-3044-dup-0</identifier>
            <identifierDomain>
                <dateCreated>2016-09-10T15:39:19.963-04:00</dateCreated>
                <identifierDomainDescription>IHENA</identifierDomainDescription>
                <identifierDomainId>14</identifierDomainId>
                <identifierDomainName>IHENA</identifierDomainName>
                <namespaceIdentifier>IHENA</namespaceIdentifier>
                <universalIdentifier>1.3.6.1.4.1.21367.2010.1.2.300</universalIdentifier>
                <universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
            </identifierDomain>
            <identifierDomainId>14</identifierDomainId>
            <identifierId>3843</identifierId>
            <internalRecordId>#35:480</internalRecordId>
        </identifier>
        <identifier>
            <identifier>155ee32950b6e613d514</identifier>
            <identifierDomain>
                <dateCreated>2016-09-10T15:39:19.963-04:00</dateCreated>
                <identifierDomainDescription>OpenEMPI GID</identifierDomainDescription>
                <identifierDomainId>18</identifierDomainId>
                <identifierDomainName>OpenEMPI</identifierDomainName>
                <namespaceIdentifier>2.16.840.1.113883.4.357</namespaceIdentifier>
                <universalIdentifier>2.16.840.1.113883.4.357</universalIdentifier>
                <universalIdentifierTypeCode>hl7</universalIdentifierTypeCode>
            </identifierDomain>
            <identifierDomainId>18</identifierDomainId>
            <identifierId>10497</identifierId>
            <internalRecordId>#33:1312</internalRecordId>
        </identifier>
        <recordId>3843</recordId>
    </record>
    <record>
        <entityId>2</entityId>
        <field>
            <name>gender</name>
            <value>M</value>
        </field>
        <field>
            <name>postalCode</name>
            <value>60618</value>
        </field>
        <field>
            <name>phoneNumber</name>
            <value>6534628928</value>
        </field>
        <field>
            <name>city</name>
            <value>Houston</value>
        </field>
        <field>
            <name>address2</name>
            <value>Herbert River</value>
        </field>
        <field>
            <name>state</name>
            <value>MI</value>
        </field>
        <field>
            <name>ssn</name>
            <value>868066233</value>
        </field>
        <field>
            <name>address1</name>
            <value>12 Sheaffe Street</value>
        </field>
        <field>
            <name>givenName</name>
            <value>James</value>
        </field>
        <field>
            <name>dateOfBirth</name>
            <value>1948-02-24</value>
        </field>
        <field>
            <name>familyName</name>
            <value>Dedicoat</value>
        </field>
        <identifier>
            <dateCreated>2017-08-27T18:06:33.767-04:00</dateCreated>
            <identifier>rec-3044-org</identifier>
            <identifierDomain>
                <dateCreated>2016-09-10T15:39:19.963-04:00</dateCreated>
                <identifierDomainDescription>IHENA</identifierDomainDescription>
                <identifierDomainId>14</identifierDomainId>
                <identifierDomainName>IHENA</identifierDomainName>
                <namespaceIdentifier>IHENA</namespaceIdentifier>
                <universalIdentifier>1.3.6.1.4.1.21367.2010.1.2.300</universalIdentifier>
                <universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
            </identifierDomain>
            <identifierDomainId>14</identifierDomainId>
            <identifierId>2676</identifierId>
            <internalRecordId>#36:334</internalRecordId>
        </identifier>
        <identifier>
            <identifier>155ee32950b6e613d514</identifier>
            <identifierDomain>
                <dateCreated>2016-09-10T15:39:19.963-04:00</dateCreated>
                <identifierDomainDescription>OpenEMPI GID</identifierDomainDescription>
                <identifierDomainId>18</identifierDomainId>
                <identifierDomainName>OpenEMPI</identifierDomainName>
                <namespaceIdentifier>2.16.840.1.113883.4.357</namespaceIdentifier>
                <universalIdentifier>2.16.840.1.113883.4.357</universalIdentifier>
                <universalIdentifierTypeCode>hl7</universalIdentifierTypeCode>
            </identifierDomain>
            <identifierDomainId>18</identifierDomainId>
            <identifierId>10498</identifierId>
            <internalRecordId>#34:1312</internalRecordId>
        </identifier>
        <recordId>2676</recordId>
    </record>
</records>

URL: /openempi-ws-rest/1.0/records/findRecordPairsByMatching

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

ketValString of Key, Value pairQuery ParameterRThe key-value pairs that will be used to constrain the set of results returned. This is a repeating parameter and the value of the parameter will be coerced into the data type of the attribute identified by the key

Methods

GET

Returns the list of record pairs of the entity type specified that are similar to the query criteria provided in the request in the form of a list of key-value pairs. The similarity between the record specified in the query criteria is established based on the matching configuration of the entity. Note that if you query using attributes that are not part of your matching configuration attributes, you will not receive any results. This is identical in behavior with the endpoint findByMatching but returns pairs of records instead of just the matching records. The record pair information also includes a similarity measure between the provided record and the record found in the repository. Using the POST method is preferred when the number of matching attributes is large, which makes the URL request string for the GET request very long.

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 entity known in the system with that entityId

Example

Version 1.0

Entity id is 2.

keyVal pairs are

          familyName,dedicoat

          givenName,james

          postalCode,60618

          dateOfBirth,1948-02-24

          city,Houston

          address1,12 Sheaffe Street

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records/findRecordPairsByMatching?entityId=2&keyVal=givenName,james&keyVal=familyName,dedicoat&keyVal=postalCode,60618&keyVal=dateOfBirth,1948-02-24&keyVal=city,Houston&keyVal=address1,12+Sheaffe+Street

Return:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recordPairs>
    <recordPair>
        <leftRecord>
            <entityId>2</entityId>
            <field>
                <name>postalCode</name>
                <value>60618</value>
            </field>
            <field>
                <name>city</name>
                <value>Houston</value>
            </field>
            <field>
                <name>address1</name>
                <value>12 Sheaffe Street</value>
            </field>
            <field>
                <name>givenName</name>
                <value>james</value>
            </field>
            <field>
                <name>dateOfBirth</name>
                <value>1948-02-24</value>
            </field>
            <field>
                <name>familyName</name>
                <value>dedicoat</value>
            </field>
        </leftRecord>
        <matchOutcome>1</matchOutcome>
        <rightRecord>
            <entityId>2</entityId>
            <field>
                <name>gender</name>
                <value>n</value>
            </field>
            <field>
                <name>postalCode</name>
                <value>60618</value>
            </field>
            <field>
                <name>phoneNumber</name>
                <value>6534628928</value>
            </field>
            <field>
                <name>city</name>
                <value>Houston</value>
            </field>
            <field>
                <name>address2</name>
                <value>Herbert River</value>
            </field>
            <field>
                <name>state</name>
                <value>MI</value>
            </field>
            <field>
                <name>ssn</name>
                <value>868066233</value>
            </field>
            <field>
                <name>address1</name>
                <value>12 Sheaffe Street</value>
            </field>
            <field>
                <name>givenName</name>
                <value>James</value>
            </field>
            <field>
                <name>dateOfBirth</name>
                <value>19480224</value>
            </field>
            <field>
                <name>familyName</name>
                <value>Dedicoat</value>
            </field>
            <identifier>
                <dateCreated>2019-08-29T09:01:45.932-04:00</dateCreated>
                <identifier>rec-3044-dup-0</identifier>
                <identifierDomain>
                    <dateCreated>2018-05-26T08:29:41.518-04:00</dateCreated>
                    <identifierDomainDescription>IHENA</identifierDomainDescription>
                    <identifierDomainId>14</identifierDomainId>
                    <identifierDomainName>IHENA</identifierDomainName>
                    <namespaceIdentifier>IHENA</namespaceIdentifier>
                    <universalIdentifier>1.3.6.1.4.1.21367.2010.1.2.300</universalIdentifier>
                    <universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
                </identifierDomain>
                <identifierDomainId>14</identifierDomainId>
                <identifierId>4127</identifierId>
                <internalRecordId>#47:515</internalRecordId>
            </identifier>
            <recordId>4127</recordId>
        </rightRecord>
        <weight>30.670872662800715</weight>
    </recordPair>
    <recordPair>
        <leftRecord>
            <entityId>2</entityId>
            <field>
                <name>postalCode</name>
                <value>60618</value>
            </field>
            <field>
                <name>city</name>
                <value>Houston</value>
            </field>
            <field>
                <name>address1</name>
                <value>12 Sheaffe Street</value>
            </field>
            <field>
                <name>givenName</name>
                <value>james</value>
            </field>
            <field>
                <name>dateOfBirth</name>
                <value>1948-02-24</value>
            </field>
            <field>
                <name>familyName</name>
                <value>dedicoat</value>
            </field>
        </leftRecord>
        <matchOutcome>1</matchOutcome>
        <rightRecord>
            <entityId>2</entityId>
            <field>
                <name>gender</name>
                <value>M</value>
            </field>
            <field>
                <name>postalCode</name>
                <value>60618</value>
            </field>
            <field>
                <name>phoneNumber</name>
                <value>6534628928</value>
            </field>
            <field>
                <name>city</name>
                <value>Houston</value>
            </field>
            <field>
                <name>address2</name>
                <value>Herbert River</value>
            </field>
            <field>
                <name>state</name>
                <value>MI</value>
            </field>
            <field>
                <name>ssn</name>
                <value>868066233</value>
            </field>
            <field>
                <name>address1</name>
                <value>12 Sheaffe Street</value>
            </field>
            <field>
                <name>givenName</name>
                <value>James</value>
            </field>
            <field>
                <name>dateOfBirth</name>
                <value>19480224</value>
            </field>
            <field>
                <name>familyName</name>
                <value>Dedicoat</value>
            </field>
            <identifier>
                <dateCreated>2019-08-29T09:01:41.374-04:00</dateCreated>
                <identifier>rec-3044-org</identifier>
                <identifierDomain>
                    <dateCreated>2018-05-26T08:29:41.518-04:00</dateCreated>
                    <identifierDomainDescription>IHENA</identifierDomainDescription>
                    <identifierDomainId>14</identifierDomainId>
                    <identifierDomainName>IHENA</identifierDomainName>
                    <namespaceIdentifier>IHENA</namespaceIdentifier>
                    <universalIdentifier>1.3.6.1.4.1.21367.2010.1.2.300</universalIdentifier>
                    <universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
                </identifierDomain>
                <identifierDomainId>14</identifierDomainId>
                <identifierId>2312</identifierId>
                <internalRecordId>#48:288</internalRecordId>
            </identifier>
            <recordId>2312</recordId>
        </rightRecord>
        <weight>30.670872662800715</weight>
    </recordPair>
</recordPairs>

URL: /openempi-ws-rest/1.0/records/importFile

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

filenameStringQuery ParameterR

Specifies the name of the file to be loaded onto the repository. The file must reside on the same server as the instance of OpenEMPI handling the request

fieldMapFilenameStringQuery ParameterR

Specifies the name of the mapping file to be used to map fields from the import file into fields of the entity model. The mapping file must reside on the same server as the instance of OpenEMPI handling the request.

Methods

PUT

Imports a file specified in the request using the file loader and the mapping document specified as a required parameter.

Responses

  • 204 - no content - The file import request was successfully scheduled on the server

  • 304 - Returned if the request fails for some reason (for example the input file or file mapping document are not found)

  • 404 - Returned if there is no entity known in the system with that entityId

Example

Version 1.0

Entity id is 2.

http://localhost:8080/openempi-admin/openempi-ws-rest/1.0/records/importFile?entityId=2&filename=fileRepository%2Ftest-data-6.csv&fieldMapFilename=file-loader-map-testing.xml

Up to Entity API Documentation