Record Domain Resource
Record Domain Resource
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 |
firstResult | Integer | Query Parameter | O | The number of records to skip before the first result record |
maxResults | Integer | Query Parameter | O | The maximum number of records that should be returned |
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 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
Return:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><records>
<record>
<entityId>7650</entityId>
<field>
<name>city</name>
<value>Tucson</value>
</field>
<field>
<name>givenName</name>
<value>Albert</value>
</field>
<field>
<name>state</name>
<value>AZ</value>
</field>
<field>
<name>address1</name>
<value>15 N Saguaro</value>
</field>
<field>
<name>gender</name>
<value>M</value>
</field>
<field>
<name>country</name>
<value>USA</value>
</field>
<field>
<name>dateOfBirth</name>
<value>1961-01-01</value>
</field>
<field>
<name>postalCode</name>
<value>85701</value>
</field>
<field>
<name>familyName</name>
<value>Hon</value>
</field>
<identifier>
<dateCreated>2013-10-03T10:52:44.826-04:00</dateCreated>
<identifier>IHERED-999</identifier>
<identifierDomain>
<dateCreated>2013-01-17T11:33:45.903-05:00</dateCreated>
<identifierDomainDescription>IHERED</identifierDomainDescription>
<identifierDomainId>2750</identifierDomainId>
<identifierDomainName>IHERED</identifierDomainName>
<namespaceIdentifier>IHERED</namespaceIdentifier>
<universalIdentifier>1.3.6.1.4.1.21367.13.20.1000</universalIdentifier>
<universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
</identifierDomain>
<identifierDomainId>2750</identifierDomainId>
<identifierId>9</identifierId>
</identifier>
<recordId>4</recordId>
</record>
</records>
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 |
firstResult | Integer | Query Parameter | O | The number of records to skip before the first result record. Uses 0 if the value is unspecified. |
maxResults | Integer | Query Parameter | O | The maximum number of records that should be returned. Uses 10 if the value is unspecified. |
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 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.
Return:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><records>
<record>
<entityId>7650</entityId>
<field>
<name>city</name>
<value>Tucson</value>
</field>
<field>
<name>givenName</name>
<value>Albert</value>
</field>
<field>
<name>state</name>
<value>AZ</value>
</field>
<field>
<name>address1</name>
<value>15 N Saguaro</value>
</field>
<field>
<name>gender</name>
<value>M</value>
</field>
<field>
<name>country</name>
<value>USA</value>
</field>
<field>
<name>dateOfBirth</name>
<value>1961-01-01</value>
</field>
<field>
<name>postalCode</name>
<value>85701</value>
</field>
<field>
<name>familyName</name>
<value>Hon</value>
</field>
<identifier>
<dateCreated>2013-10-03T10:52:44.826-04:00</dateCreated>
<identifier>IHERED-999</identifier>
<identifierDomain>
<dateCreated>2013-01-17T11:33:45.903-05:00</dateCreated>
<identifierDomainDescription>IHERED</identifierDomainDescription>
<identifierDomainId>2750</identifierDomainId>
<identifierDomainName>IHERED</identifierDomainName>
<namespaceIdentifier>IHERED</namespaceIdentifier>
<universalIdentifier>1.3.6.1.4.1.21367.13.20.1000</universalIdentifier>
<universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
</identifierDomain>
<identifierDomainId>2750</identifierDomainId>
<identifierId>9</identifierId>
</identifier>
<recordId>4</recordId>
</record>
</records>
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 |
identifier | String | Query Parameter | O | The identifier is an optional parameter that will be used in the query criteria to constrain the records identified |
identifierDomainId | Integer | Query Parameter | O | Optional parameter that can be used to specify the domain that assigned the identifier in the request |
record | Record | Body | R | A 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 |
keyVal | 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 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
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.
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
Return:
<records>
<record>
<entityId>7650</entityId>
<field>
<name>city</name>
<value>OAK BROOK</value>
</field>
<field>
<name>givenName</name>
<value>ALICE</value>
</field>
<field>
<name>state</name>
<value>IL</value>
</field>
<field>
<name>address1</name>
<value>820 JORIE BLVD.</value>
</field>
<field>
<name>gender</name>
<value>F</value>
</field>
<field>
<name>country</name>
<value>USA</value>
</field>
<field>
<name>dateOfBirth</name>
<value>1958-01-31</value>
</field>
<field>
<name>postalCode</name>
<value>60523</value>
</field>
<field>
<name>familyName</name>
<value>MOHR</value>
</field>
<identifier>
<dateCreated>2013-10-03T10:52:44.558-04:00</dateCreated>
<identifier>IHERED-994</identifier>
<identifierDomain>
<dateCreated>2013-01-17T11:33:45.903-05:00</dateCreated>
<identifierDomainDescription>IHERED</identifierDomainDescription>
<identifierDomainId>2750</identifierDomainId>
<identifierDomainName>IHERED</identifierDomainName>
<namespaceIdentifier>IHERED</namespaceIdentifier>
<universalIdentifier>1.3.6.1.4.1.21367.13.20.1000</universalIdentifier>
<universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
</identifierDomain>
<identifierDomainId>2750</identifierDomainId>
<identifierId>5</identifierId>
</identifier>
<recordId>2</recordId>
</record>
<record>
<entityId>7650</entityId>
<field>
<name>city</name>
<value>Tucson</value>
</field>
<field>
<name>givenName</name>
<value>Albert</value>
</field>
<field>
<name>state</name>
<value>AZ</value>
</field>
<field>
<name>address1</name>
<value>15 N Saguaro</value>
</field>
<field>
<name>gender</name>
<value>M</value>
</field>
<field>
<name>country</name>
<value>USA</value>
</field>
<field>
<name>dateOfBirth</name>
<value>1961-01-01</value>
</field>
<field>
<name>postalCode</name>
<value>85701</value>
</field>
<field>
<name>familyName</name>
<value>Hon</value>
</field>
<identifier>
<dateCreated>2013-10-03T10:52:44.826-04:00</dateCreated>
<identifier>IHERED-999</identifier>
<identifierDomain>
<dateCreated>2013-01-17T11:33:45.903-05:00</dateCreated>
<identifierDomainDescription>IHERED</identifierDomainDescription>
<identifierDomainId>2750</identifierDomainId>
<identifierDomainName>IHERED</identifierDomainName>
<namespaceIdentifier>IHERED</namespaceIdentifier>
<universalIdentifier>1.3.6.1.4.1.21367.13.20.1000</universalIdentifier>
<universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
</identifierDomain>
<identifierDomainId>2750</identifierDomainId>
<identifierId>9</identifierId>
</identifier>
<recordId>4</recordId>
</record>
</records>
<?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:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><record>
<field>
<name>familyName</name>
<value>Test</value>
</field>
<field>
<name>givenName</name>
<value>Test</value>
</field>
<field>
<name>address1</name>
<value>123</value>
</field>
<field>
<name>dateOfBirth</name>
<value>1961-01-01T00:00:00-05:00</value>
</field>
<identifier>
<dateCreated>2013-09-24T14:20:04.861-04:00</dateCreated>
<identifier>IHERED-Test</identifier>
<identifierDomain>
<dateCreated>2013-01-17T11:33:45.903-05:00</dateCreated>
<identifierDomainDescription>IHERED</identifierDomainDescription>
<identifierDomainId>2750</identifierDomainId>
<identifierDomainName>IHERED</identifierDomainName>
<namespaceIdentifier>IHERED</namespaceIdentifier>
<universalIdentifier>1.3.6.1.4.1.21367.13.20.1000</universalIdentifier>
<universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
</identifierDomain>
</identifier>
<entityId>7650</entityId>
</record>
Return:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<record>
<entityId>7650</entityId>
<field>
<name>givenName</name>
<value>Test</value>
</field>
<field>
<name>address1</name>
<value>123</value>
</field>
<field>
<name>dateOfBirth</name>
<value>1961-01-01</value>
</field>
<field>
<name>familyName</name>
<value>Test</value>
</field>
<identifier>
<dateCreated>2013-10-03T13:47:39.322-04:00</dateCreated>
<identifier>IHERED-Test</identifier>
<identifierDomain>
<dateCreated>2013-01-17T11:33:45.903-05:00</dateCreated>
<identifierDomainDescription>IHERED</identifierDomainDescription>
<identifierDomainId>2750</identifierDomainId>
<identifierDomainName>IHERED</identifierDomainName>
<namespaceIdentifier>IHERED</namespaceIdentifier>
<universalIdentifier>1.3.6.1.4.1.21367.13.20.1000</universalIdentifier>
<universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
</identifierDomain>
<identifierDomainId>2750</identifierDomainId>
<identifierId>20</identifierId>
</identifier>
<recordId>10</recordId>
</record>
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:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<record>
<entityId>7650</entityId>
<field>
<name>givenName</name>
<value>UpdateTest</value>
</field>
<field>
<name>address1</name>
<value>567</value>
</field>
<field>
<name>dateOfBirth</name>
<value>1961-01-01</value>
</field>
<field>
<name>familyName</name>
<value>Test</value>
</field>
<identifier>
<dateCreated>2013-10-03T13:47:39.322-04:00</dateCreated>
<identifier>IHERED-Update</identifier>
<identifierDomain>
<dateCreated>2013-01-17T11:33:45.903-05:00</dateCreated>
<identifierDomainDescription>IHERED</identifierDomainDescription>
<identifierDomainId>2750</identifierDomainId>
<identifierDomainName>IHERED</identifierDomainName>
<namespaceIdentifier>IHERED</namespaceIdentifier>
<universalIdentifier>1.3.6.1.4.1.21367.13.20.1000</universalIdentifier>
<universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
</identifierDomain>
<identifierDomainId>2750</identifierDomainId>
<identifierId>20</identifierId>
</identifier>
<recordId>10</recordId>
</record>
Return:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<record>
<entityId>7650</entityId>
<field>
<name>givenName</name>
<value>UpdateTest</value>
</field>
<field>
<name>address1</name>
<value>567</value>
</field>
<field>
<name>dateOfBirth</name>
<value>1961-01-01</value>
</field>
<field>
<name>familyName</name>
<value>Test</value>
</field>
<identifier>
<dateCreated>2013-10-03T13:47:39.322-04:00</dateCreated>
<identifier>IHERED-Update</identifier>
<identifierDomain>
<dateCreated>2013-01-17T11:33:45.903-05:00</dateCreated>
<identifierDomainDescription>IHERED</identifierDomainDescription>
<identifierDomainId>2750</identifierDomainId>
<identifierDomainName>IHERED</identifierDomainName>
<namespaceIdentifier>IHERED</namespaceIdentifier>
<universalIdentifier>1.3.6.1.4.1.21367.13.20.1000</universalIdentifier>
<universalIdentifierTypeCode>ISO</universalIdentifierTypeCode>
</identifierDomain>
<identifierDomainId>2750</identifierDomainId>
<identifierId>20</identifierId>
</identifier>
<recordId>10</recordId>
</record>
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
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 |
ketVal | String of Key, Value pair | Query Parameter | R | The 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
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 |
ketVal | String of Key, Value pair | Query Parameter | R | The 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
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 |
filename | String | Query Parameter | R | 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 |
fieldMapFilename | String | Query Parameter | R | 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.