#### TMS Infrastructure
Domain Message Specification

### EhrRequestAckCode

Code SystemId: | 2.16.840.1.113883.2.1.3.2.4.17.101
Version: | 2.0
Status: | active
Date: | 2006-02-07

#### Description

Assigned OID : 2.16.840.1.113883.2.1.3.2.4.17.101

Use of the codes

Positive Responses

When constructing a positive response to a received GP2GP Message no numeric error code is used, however the typeCode is used as follows:

`<acknowledgement typeCode = "AA">`

In this case the ControlActEvent will not contain a 'reason' element

Negative Responses

When constructing a negative response to a received GP2GP Message the table of numeric codes in section 3 are available for use.

Here the Acknowledgement.typeCode is used as follows:

`<acknowledgement typeCode = "AE">`

In addition the ControlActEvent.reason should be populated as follows (using the relevant code from the table, as highlighted in blue below):

#### Values

Code | Description | Note
--- | --- | ---
03 | Record available but cannot be sent | Deprecated Code : This should be used in cases where the activity of sending failed for technical reasons.
04 | record unavailable | Deprecated Code : This should be used when the record is not available for viewing by the requester. Most likely this will be as a result of the requester having no LR with the target patient, or the requester not being registered as the healthCareProvider in PDS.
05 | Record lost | Deprecated Code : This should be used when the patient is identified on the local index, but the record cannot be located on the system.
06 | Patient not at surgery | This should be used when the patient, identified by the NHS Number in the EHR Request, cannot be located in the local index of the receiving system.
07 | GP2GP Messaging is not enabled on this system | This should be used when a GP2GP message is received whilst the system is configured in the 'Disabled' mode.
08 | The system's configuration prevents it from processing this message. | This should be used when a GP2GP message is received whilst the 'Safe Exchange Framework' is enabled, and the received message breaks the processing rules.
09 | EHR Extract received without corresponding request. | This should be used when a GP2GP EHR Extract message is received by a system that has not previously sent an EHR Request message.
10 | Failed to successfully generate EHR Extract. | This should be used when a system fails to generate the EHR Extract for sending.
11 | Failed to successfully integrate EHR Extract. | This should be used when a system fails to successfully integrate the received EHR Extract into the clinical system.
12 | Duplicate EHR Extract received. | This should be used when a system receives a subsequent copy of an EHR Extract after it has previously integrated one for the current registration.
99 | Unexpected condition. | This is a code that should only be used in circumstances where the above codes cannot be used to accurately describe the condition.