---
title: Patient Response File
slug: medhistory-populations-patient-file-load/guide/patient-response-file
docTags: 
createdAt: 2026-07-10T15:52:57.867Z
---

Each Patient Response File will contain an overall file load status code, including description, within the header record. This code indicates if the file loaded with either partial or full success (i.e., patients were loaded from the file), and/or if errors were encountered.

In addition, there will be a record containing an error code and description for every error found in the file. These records will include the line number of the incoming file that had the related error. Line number starts with 1 for the header record and is incremented by 1 for every record in the incoming file.

Line number 1 will indicate an error on the incoming file header. Line numbers 2 - n will indicate errors on subsequent records in the incoming file. There may be multiple records listing an error code and description for the same line number from the incoming file.

The Patient Response File format is pipe-delimited (hex7c). Each field is delimited by the pipe character (|). If a pipe-character (hex7c) is used in field data, it will be escaped with \F\\. For example, Main | Street will be listed as Main \F\ Street. Each line will be separated by a new line (Hex 0A) character.

## Requirement Designation

**Field Attributes:**

| **Code**     | **Description**                                                               |
| ------------ | ----------------------------------------------------------------------------- |
| mandatory    | The element must be used per the specification (e.g., XML schema validation). |
| conditional  | The element is to be used per the conditions specified.                       |

## Header Information

| **Field&#x20;** | **Field Name**                            | **Type** | **Code**   | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                 | **Example**                                        |
| --------------- | ----------------------------------------- | -------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| 0               | Record Type                               | an3      | mandatory  | Identifies record type.                                                                                                                                                                                                                                                                                                                                                                                                         | SHD                                                |
| 1               | Version                                   | an3..5   | mandatory  | Version Number of this specification.                                                                                                                                                                                                                                                                                                                                                                                           | 2.0                                                |
| 2               | Receiver ID                               | an3..30  | mandatory  | ID assigned by Surescripts for the recipient of the Patient Response File (i.e., the original sender of the Patient File Load).                                                                                                                                                                                                                                                                                                 | P00000000012345                                    |
| 3               | Sender ID                                 | an3..30  | mandatory  | ID as assigned by Surescripts identifying Surescripts.                                                                                                                                                                                                                                                                                                                                                                          | S00000000000006                                    |
| 4               | Transaction Control Number                | an1..36  | mandatory  | Unique identifier defined by the sender. Will be a GUID in the response from Surescripts.                                                                                                                                                                                                                                                                                                                                       | ec622dd2-dab7-4945-bc2f-a9c0a78c64dd               |
| 5               | Transaction Date                          | dt8      | mandatory  | Date transaction was created. CCYYMMDD                                                                                                                                                                                                                                                                                                                                                                                          | 20170331                                           |
| 6               | Transaction Time                          | tm8      | mandatory  | Time transaction was created. HHMMSSDD                                                                                                                                                                                                                                                                                                                                                                                          | 13214577                                           |
| 7               | Transaction File Type                     | an3      | mandatory  | Identifier telling receiver the type of file.                                                                                                                                                                                                                                                                                                                                                                                   | PMA                                                |
| 8               | Transmission Control Number - Originating | an1..10  | mandatory  | The value will echo the Transmission Control Number sent in the patient file transmitted to Surescripts.                                                                                                                                                                                                                                                                                                                        | 1234567891                                         |
| 9               | Transmission Date- Originating            | dt8      | mandatory  | Date Original Incoming File was created (D8) CCYYMMDD.                                                                                                                                                                                                                                                                                                                                                                          | 20200331                                           |
| 10              | Transmission Time- Originating            | tm8      | mandatory  | Time Original Incoming File was created HHMMSSDD.                                                                                                                                                                                                                                                                                                                                                                               | 10443025                                           |
| 11              | File Type                                 | an1      | mandatory  | **Values**:<br />* T = Test
* P = Production                                                                                                                                                                                                                                                                                                                                                                                    | T                                                  |
| 12              | Load Status                               | an2      | mandatory  | Header Response Code explaining the status of the load.<br />**Values:**<br />* 01 = File loaded correctly.
* 02 = File loaded with errors and/or warnings.
* 03 = Failed to load file. No data was processed.<br />**Note:** If there is more than one error at the file level, there will be additional errors in detail records with a sequence of 1, null patient ID, and the header response code in the error code field. | 01                                                 |
| 13              | Load Status Description                   | an1..250 | mandatory  | Description of the status of the load                                                                                                                                                                                                                                                                                                                                                                                           | See Header Load Status Response Codes table above. |

## Detail Information

| **Field&#x20;** | **Field Name**                | **Type** | **Code**     | **Description**                                                                                                                                                                                   | **Example**                                                           |
| --------------- | ----------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| 0               | Record Type                   | an3      | mandatory    | Identifies record type                                                                                                                                                                            | SDT                                                                   |
| 1               | Record Sequence Number        | n1..10   | mandatory    | Surescripts assigned number for the record in the received file. Number starts with 1 for the first record and is incremented by 1 for each record in the file as Surescripts processes the file. | 2                                                                     |
| 2               | Source Record Sequence Number | n1..10   | conditional  | Record Sequence Number from the detail row on the incoming file. This is the value assigned by the sender of the file.                                                                            | 1                                                                     |
| 3               | Assigning Authority           | an1..64  | conditional  | ID for the organization / system that assigned the related patient ID.                                                                                                                            | 1.3.44444.666.3.2.1                                                   |
| 4               | Patient ID                    | an1..35  | conditional  | Customer's internal Patient ID from the incoming transaction.                                                                                                                                     | 58861323                                                              |
| 5               | Error Type                    | an1      | mandatory    | **Values**:<br />* W = Warning – Does not fail file or row.
* E = Error – Fails row error it is associated with.
* F = Fatal – Fails entire file load, nothing is processed.                      |                                                                       |
| 6               | Error Code                    | an10     | mandatory    | Code for the error found on this record.                                                                                                                                                          | See [Validation and Error Code Details](docId\:iPyUtx0-tUwPzg-59QWWW) |
| 7               | Error Description             | an1..250 | conditional  | Text describing the error.                                                                                                                                                                        | See [Validation and Error Code Details](docId\:iPyUtx0-tUwPzg-59QWWW) |

## Trailer Information

| **Field&#x20;** | **Field Name**         | **Type** | **Code**     | **Description**                                                                                                                                                                                       | **Example** |
| --------------- | ---------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| 0               | Record Type            | an3      | mandatory    | Identifies record type.                                                                                                                                                                               | STR         |
| 1               | Processed Record Count | n1..10   | mandatory    | Count of detail patient records processed in file.<br />Error Record Count + Loaded Record Count = Processed Record Count                                                                             | 100         |
| 2               | Error Record Count     | n1..10   | conditional  | Count of detail patient records that contained an error and did not load.                                                                                                                             | 3           |
| 3               | Loaded Record Count    | n1..10   | conditional  | Count of detail patient records that were loaded for enrollment.                                                                                                                                      | 97          |
| 4               | Total Error Count      | n1..10   | conditional  | Number of errors listed in the Patient Response File.<br />A single input record could have one or more errors listed in the response file.<br />Total Error Count will be > or = Error Record Count. | 7           |

