---
title: Process Overview
slug: medhistory-populations-file/guide/process-overview
docTags: 
createdAt: 2026-06-10T15:14:54.039Z
---

## Process Flow

The graphic below depicts the process flow between customers in this process.

::Image[]{src="https://api.archbee.com/api/optimize/fNEeV2bO-J-V0NK1eH_VR/FHOkMCUsgQxWKEi827A1M_processoverview.png" alt="This image depicts the process flow between customers, and is described below." position="flex-start" size="60" initialPath="../../../Resources/Images/MedHistPanelMgmt/ProcessOverview.png" githubPath="Content/Resources/Images/MedHistPanelMgmt/ProcessOverview.png" width="624" height="533" darkWidth="624" darkHeight="533" showCaption="false"}

**The following steps depict the process flow:**

1. The customer generates and posts the Patient File Load (onto the SFTP site) that identifies which patients they want to enroll for Medication History for Populations.

:::Paragraph{indent="1"}
Patients enrolled for Medication History for Populations Panel Management are enrolled for a one-time medication history response.
:::

:::Paragraph{indent="1"}
**Note:&#x20;**&#x49;f a patient does not grant access to their data, then the customer is responsible for excluding the patient from the Patient File Load.
:::

2. Surescripts validates the submitted file and generates and posts a Validation Response File in the SFTP folder for retrieval. This response notifies the customer that the Patient File was received. The response file also provides details into any errors that were encountered during the input panel validation. The Panel user should plan to resubmit the records with errors after correcting the error. For example, a record rejected due to invalid zip code format.

:::Paragraph{indent="1"}
**Note:&#x20;**&#x54;o avoid a duplicative response charge, please ensure you are only resubmitting those records with errors. Do not correct the errors and resubmit the full file (i.e. if you submit a request with 100 patients and 25 errors were returned, the correction file should only contain 25 revised records).
:::

3. Surescripts locates patients using the Master Patient Index (MPI). For patients found:
   - The medication history request is routed to the appropriate PBM/payer for processing. This data will contain any claim on file for medications where the pharmacy benefit may be used and may be reversed if the medication is returned to stock.
   - The medication history request also calls on our dispensed medication fill database, which is updated regularly by pharmacies connected to Surescripts. This data will contain records for dispensed medications and includes both cash and coupon pay
4. Surescripts retrieves and aggregates available Dispensed Fill Data and claims Medication History data for all successfully loaded patients listed on the Patient File.
5. Surescripts generates and posts the Panel History File for the customer to access in the SFTP folder.
6. The customer retrieves Flat Format Panel History File from the SFTP folder.

## Patient File Load

The Medication History for Populations Patient File Load process via the SFTP folder is used by customers to enroll patients.

:::hint{type="info"}
**Note:&#x20;**&#x50;lease make sure to contact your Surescripts resource to assure you have met the requirements described in this section.
:::

| **Name**    | **Description**                                                                                                                                                                                                                                                                                                            |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Timing      | Panel user will determine the timing of sending the file to Surescripts.                                                                                                                                                                                                                                                   |
| SFTP Folder | **File locations:**<br />* Incoming files location – **/to\_surescripts** (Permission: upload)
* Outgoing files location – **/from\_surescripts** (Permission: download, delete)                                                                                                                                           |
| SFTP Tips   | - Clients will post files to the ‘to\_surescripts’ folder.
- Clients have download, delete rights on the ‘from\_surescripts’ folder. This folder contains the Surescripts response files. Clients could remove files permanently; else, the Surescripts system will automatically purge files that are older than 14 days. |

## File Validation

Surescripts will ensure that customers are in compliance with the file specifications outlined in this Guide during Integration Testing and will continue to enforce once in production.

At a minimum, Surescripts validations include:

- The sender identification and authentication
- The recipient identification
- Syntax of the message, including field lengths, data types, and code values
- Surescripts business rules

## Patient File Load Details

### Patient File Naming

The following topics describe the required naming convention

### Patient File Load Naming

The File Load naming convention is: *\<CustomerName>\_*&#x50;M&#x41;*\_\<YYYYMMDD-XX>.\<CompressionFormat>*. Surescripts recommends compressing the file prior to transmitting it to Surescripts. The current zip protocols that are supported are gzip, bzip2 and zip.

Example: **ACOCompany\_PMA\_20201204-01.gz**

### Patient Response File Naming

The naming convention is \<*InputFileName sans extension*>.\<*sstimestamp*>.\<*sstimestamp*>.rsp.

Example: **ACOCompany\_PMA\_20201204-01.20201204012025.20201204012025.rsp**

### Patient File Load Format

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

For detailed field information, refer to the [Request File Elements](docId\:H431PeSMxPnBwXC4iiohM) and [Patient File Load Examples](docId\:EA2xedqyDEFAqsxUT_419) sections. You may also refer to [File Load Validation and Error Code Details](docId\:il6T4h86hp1oSSln-smsG) for more information.

:::hint{type="info"}
**Note:&#x20;**&#x49;f mandatory fields are not included, the Patient File Load and/or patient record will not pass validation, and the patient will not be loaded or monitored. All conditional fields must be accounted for, either with data, or a placeholder delimiter.
:::

### Patient Response File Format

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.

For detailed field information, refer to the [Response File Elements](docId\:H431PeSMxPnBwXC4iiohM) and [Patient File Load Examples](docId\:EA2xedqyDEFAqsxUT_419) sections. You may also refer to [File Load Validation and Error Code Details](docId\:il6T4h86hp1oSSln-smsG) for more information.

## Patient File Load Maintenance

Enrolled Patients across Panel Management and Prescription Notifications are designated through the use of PatientHashID, which is generated from the following fields submitted in the enrollment request:

- Patient First Name
- Patient Last Name
- Date of Birth
- Patient ID
- NPI (for treatment based use case only)

A patient is counted once as an enrolled for each unique combination of these fields. A change to any of these fields in a subsequent file, without prior unenrollment, will result in a new unique record being counted. For more information on unenrollment, see Deleting a Previously Enrolled Patient below.

### Prescription Notifications Recipient and Patient Identity&#x20;

Prescription Notifications uses the following to identify a notification recipient and each patient that recipient has enrolled.

**Intended Recipient of a Notification**&#x20;

- Sender ID&#x20;
- NPI&#x20;

**Patient the Recipient is Monitoring**&#x20;

- Assigning Authority&#x20;
- Patient ID&#x20;

:::hint{type="info"}
**Note:&#x20;**&#x53;ender ID is from the file header (HDR) record. The rest of the fields are from the patient detail record.
:::

### Updating a Previously Enrolled Patient

To change data for a patient, submit the patient in a patient file using the updated information for the patient. Updates can be made to any data in the patient details other than Patient Name, Patient Date of Birth, NPI, Assigning Authority, and Patient ID.

Updates can include:

- Change of patient demographics (address fields and gender)
- Adding / removing Notifications Requested for this Patient
- Changes to the End Monitoring Date

### Deleting a Previously Enrolled Patient

It is not possible to delete an enrolled patient; however, customers can stop receiving notifications for a patient. This is accomplished by updating the [End Monitoring Date](docId\:Efi3ElhRy4HsPPgfbu-as) of the patient to a desired future date. Once the update is processed by Surescripts and the date is reached, no notifications will be generated for the patient.

### Enrolling or Adding a New Patient or Notification Recipient

Please consider the following when enrolling or adding a new patient or notification recipient:

- New patients (Assigning Authority plus Patient ID) received in a patient file load will be validated and loaded.
- New recipients (Sender ID, NPI) with associated patient detail (PMA) records will be validated and loaded.
- A new recipient for a patient already monitored by a different recipient will be validated and loaded independently from the original recipient record. Surescripts considers the combination of Sender ID, NPI, Assigning Authority, and Patient ID to be the unique keys to a record being monitored for notifications.

