Response File Elements
6 min
validation response header (sdh) elements field field name code comments field values/examples 0 record type an3 mandatory a single response that signifies the header row of the file value shd 1 version n3 5 mandatory indicates the version of medication history for populations value 3 0 2 receiver id an3 30 mandatory a unique identification number assigned by surescripts indicating the receiver of the file example p00000000012345 3 sender id an3 30 mandatory a unique identification number assigned by surescriptsindicating the receiver of the file note s00000000000006 has been deprecated for patient file load the following ids are used for medication history for populations (panel and prescription notifications) s00000000000003 (medication history for populations) s00000000000005 (medication history for populations for health plans) 4 transaction control number an1 36 mandatory a unique identifier defined by the sender used to map the patient file load to the patient response file this field will be a guid in the response from surescripts example ec622dd2 dab7 4945 bc2f a9c0a78c64dd 5 transaction date format ccyymmdd mandatory the date the file was transmitted to the customer example 20241022 would represent october 22, 2024 6 transaction time format hhmmssdd mandatory the time the file was transmitted to customer, example 14354587 would represent 14 35 45 and 87 hundredths of a second 7 transaction file type an3 mandatory identifier indicating the type of patient load file which can accept patient enrollment based on the recordtype value in the detail information value pma 8 transmission control number originating an1 10 mandatory value that echo’s the transmission control number sent in the patient file transmitted to surescripts example 1234567891 9 transmission date originating format ccyymmdd mandatory date original incoming file was created example 20241022 would represent october 22, 2024 10 transmission time originating format hhmmssdd mandatory time original incoming file was created example 14354587 would represent 14 35 45 and 87 hundredths of a second 11 file type an1 mandatory indicates the environment where the transaction was routed values t – test p – production 12 load status an2 mandatory codified value within the header response explaining the status of the file load 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 values 01 – file loaded correctly 02 – file loaded with errors and/or warnings 03 – failed to load file no data was processed 13 load status description an1 250 mandatory description of the status of the file load values file loaded correctly file loaded with errors and/or warnings failed to load file no data was processed validation response details (sdt) elements field field name data type code comments field values/examples 0 record type an3 mandatory a value that signifies a validation error in the details row of the file value sdt 1 record sequence number n1 10 mandatory unique number for the detail record in the validation response file where the first record begins with "1" and each subsequent record is incrementally increased by 1 as the file is processed examples • 1 • 2 • 3 2 source record sequence number n1 10 conditional record sequence number from the detail row on the request file this is the value assigned by the sender of the file examples • 1 • 2 • 3 3 assigning authority n1 64 conditional id from the request file for the organization/system that assigned the related patient id example 1 3 44444 666 3 2 1 4 patient id an1 35 conditional the patient specific unique identifier provided by the panel user in the request file example 593431 5 error type an1 mandatory a single letter categorizing the severity of an error categories include warning (w) – does not fail file or row error (e) – fails the associated row, row is not processed fatal (f) – fails entire file, nothing is processed values • w • e • f 6 error code an10 mandatory codified value indicating the error found on this record 7 error description an1 250 conditional text describing the error found in this record validation response trailer (str) elements field field name data type code comments field values/examples 0 record type an3 mandatory a single response that signifies the trailer (summary) row of the file value str 1 processed record count n1 10 mandatory count of detail patient records processed in file note error record count + loaded record count = processed record count example 100 2 error record count n1 10 conditional count of detail patient records that contained an error and did not load example 3 3 loaded record count n1 10 conditional count of detail patient records that were loaded for enrollment example 97 4 total error count n1 10 conditional number of errors listed in the patient response file note a single input record could have one or more errors listed in the response file total error count will be > or = error record count example 7 panel management response header (hdr) elements field field name data type code comments field values/examples 0 record type an3 mandatory value signifying that the following string is a part of the header value hdr 1 version an1 5 mandatory indicates the version of medication history for populations value 3 0 2 receiver id an15 mandatory a unique identification number assigned by surescripts indicating the receiver of the file example p00000000023456 3 sender id an15 mandatory a unique identification number assigned by surescriptsindicating the receiver of the file note s00000000000006 has been deprecated for patient file load the following ids are used for medication history for populations (panel and prescription notifications) s00000000000003 (medication history for populations) s00000000000005 (medication history for populations for health plans) 4 patient population id an1 35 mandatory a value assigned to a population by the customer provided in the patient file load example highrisk 5 transmission control number an1 36 mandatory a unique identifier defined by the sender used to map the patient file load to the patient response file this field can contain numerical or alphabetical characters and must be unique to each file transmission 1234567891 6 sent time format ccyymmdd thhmmss mandatory identifies the time the response is sent to the sftp for example, if the sent time is october 22, 2024, at 14 35 45, it would be written as 20241022t143545 panel management response details (dtl) elements field field name data type code comments field values/examples 0 record type an3 mandatory signifies that the following string of data is a detail record value dtl 1 record sequence number n1 10 mandatory unique number for the detail record in the received file where the first record begins with "1" and each subsequent record is incrementally increased by 1 as the file is processed examples • 1 • 2 • 3 2 messageid an1 35 mandatory unique message id for the rxhistoryresponse used as a reference for troubleshooting the medication history transaction example 12345678 12345543 1234567603128 3 sent time format ccyymmdd thhmmssnnz mandatory time that the file was generated by surescripts examples 2024 02 06t05 08 05 2024 07 14t13 13 09 679z 4 status an1 35 mandatory approval response from data suppliers value approved 5 note an 210 optional details added to the record to relay specific information values although a patient was found, no medications were returned from partners not all medication history sources were accessible at this time a processing error occurred no medication history was returned although a patient record was found, no medications were available patient not found requesting prescriber details 6 prescriber npi an10 mandatory the organizational or individual national provider identification (npi) number of the prescriber/provider associated to the patient included in the file load from panel user that is validated against the nppes registry and mapped to the outgoing medication history request to data suppliers example 1234567891 7 prescriber name an1 35 mandatory the organization name or prescriber last name of npi included in the file load example health and hospitals corp patient details 8 patient id an1 35 mandatory the patient specific unique identifier provided by the panel user example 593431 9 patient last name an2 35 mandatory the last name of the patient this field must contain more than 2 characters example wayne 10 patient first name an2 35 mandatory the first name of the patient this field must contain more than 2 characters example tom 11 patient date of birth format ccyymmdd mandatory the date of birth for the patient example 19841024 12 patient administrative gender an1 mandatory the gender as reported by the patient values m male f – female n – non binary u – unknown 13 patient zip code an1 15 mandatory the patients 5 or 9 digit zip code without punctuation examples 60459 604591258 request details 14 start date format ccyymmdd mandatory the beginning date for the desired history defined in the patient file load header 20240817 15 end date format ccyymmdd mandatory the end date for the desired history defined in the patient file load header (e g , today’s date) 20240818 16 consent an1 mandatory when marked 'y' consent has been given by the patient for the customer to receive their medication history value y yes medication details 17 drug description an1 105 optional standardized drug name including strength and form from a surescripts approved drug compendium example atorvastatin 10mg tablets 18 product code an 35 optional value used in conjunction with product code qualifier to identify the product dispensed example 55111012105 19 product code qualifier an 5 optional codified value used to indicate the type of data submitted in the product code values nd code designating the use of the national drug code (ndc), which identifies the labeler/manufacturer, product, and package size of the drug di code designating the use of a unique device identifier (udi) which identifies the specific version or model of a device and the labeler of that device up code designating the use of the universal product code (upc) defining then manufacturer and specific description of the product 20 strength value an 70 optional the strength and strength unit of measure associated with the prescribed product example 100 mg 21 drug database code an 35 optional value used in conjunction with drug database code qualifier relaying the drug concept example 58160034100320 22 drug database code qualifier an 5 optional codified value used to indicate the code set used to provide the drug db code values scd – code designating the use of rxnorm semantic clinical drug, representing the ingredient plus strength and dose form bd code designating the use of semantic branded drug, representing the ingredient, strength, and dose form plus the branded name bpck code designating the use of rxnorm branded package, representing the branded drug delivery device gpck code designating the use of rxnorm generic package, representing the generic drug delivery device 23 no longer in use, field present but will remain null 24 no longer in use, field present but will remain null 25 strength form code an 15 optional codified value that qualifies the form of the dispensed product codes can be found at https //evs nci nih gov/ftp1/ncpdp/about html example c42946 26 strength unit of measure an 15 optional codified value representing the measurable unit in which the strength is measured codes can be found at https //evs nci nih gov/ftp1/ncpdp/about html example c28253 27 dea schedule an 15 optional codified value designating the substance schedule as defined by the drug enforcement administration (dea) values c38046 – unspecified c48672 – schedule i c48675 – schedule ii c48676 – schedule iii c48677 – schedule iv c48679 – schedule v 28 quantity dispensed an 15 optional the total quantity of a single prescription filled e g the count of tablets or number of grams example 90 29 code list qualifier an 15 optional codified value qualifying the quantity values 38 = original qty 40 = remaining qty 87 = quantity received qs = quantity sufficient (long term care only) 30 unit source code an 15 optional ac code identifying the source organization value ac = potency unit code 31 quantity unit of measure an 15 optional codified value that represents the measurable unit in which the quantity to dispense is counted (e g tablets, capsules, milliliters, etc ) codes can be found at https //evs nci nih gov/ftp1/ncpdp/about html example c48480 32 days supply an 35 optional estimated number of days the prescription will last example 90 33 directions an 1000 optional sigtext contains completely free text directions with no corresponding codified content example take 1 tablet by mouth daily 34 refills remaining an 35 optional the number of refills remaining in the prescription example 3 35 no longer in use, field present but will remain null 36 substitutions an 15 optional code indicating the prescriber's instructions regarding generic or interchangeable biosimilar substitution values 0 = no product selection indicated 1 = substitution not allowed by prescriber 37 date written format ccyymmdd optional date or date and time the prescription was issued 38 last filled date format ccyymmdd optional date or date and time of the most recent fill 39 sold date format ccyymmdd optional sold date is also referred to as date picked up this is the date that the prescription was picked up at the pharmacy/delivered to the patient 40 no longer in use, field present but will remain null 41 prior authorization number an 35 optional prior authorization number assigned by pbm/payer example 1469123 dispensing pharmacy details 42 ncpdp id an 35 optional the unique ncpdp assigned national provider identification number that identifies the pharmacy where the prescription was dispensed example 1469123 43 pharmacy npi an 35 optional the organizational national provider identification (npi) number of the pharmacy that has dispensed the prescription example 1265666666 44 store number an 70 optional the name of the pharmacy where the medication was dispensed to the patient example walgreens 45 pharmacy address line 1 an 35 optional address line 1 of the dispensing pharmacy example 1525 n main pkwy 46 pharmacy address line 2 an 35 optional address line 2 of the dispensing pharmacy example unit a 47 pharmacy city an 40 optional the city where the dispensing pharmacy is located example bloomington 48 pharmacy state an 15 optional the state where the dispensing pharmacy is located example il 49 pharmacy zip code an 15 optional the postal code where the dispensing pharmacy is located example 60459 604591258 50 pharmacy phone number an 80 optional the phone number of the dispensing pharmacy example 5555555555 51 pharmacy fax number an 80 optional the fax number of the dispensing pharmacy example 7777777777 prescriber details 52 prescriber npi an 35 optional individual or organizational national provider identification (npi) of provider responsible for the prescription example 1234567891 53 prescriber dea number an 35 optional the drug enforcement administration (dea) assigned number of the provider prescribing controlled pharmaceutical prescriptions example fg1211119 54 prescriber state license number an 35 optional the number assigned and required by a state board or other state/territory regulatory agency that uniquely identifies the licensed individual responsible for the prescription example 201106119 55 prescriber last name an 35 optional the last name of the prescriber responsible for the prescription example berger 56 prescriber middle name an 35 optional middle name of the prescriber responsible for the prescription example james 57 prescriber first name an 35 optional first name of the prescriber responsible for the prescription example robert 58 prescriber prefix an 10 optional name prefix of the prescriber responsible for the prescription example dr 59 prescriber suffix an 10 optional name suffix of the prescriber responsible for the prescription example ii 60 prescriber address line 1 an 40 optional address line 1 of the prescriber responsible for the prescription example 1234 westave 61 prescriber address line 2 an 40 optional address line 2 of the prescriber responsible for the prescription example ste e 62 prescriber city an 15 optional the city where the prescriber responsible for the prescription is located example chicago 63 prescriber state an 15 optional the state where the prescriber responsible for the prescription is located example il 64 prescriber zip code an 15 optional the zip code where the prescriber responsible for the prescription is located examples 60459 604591258 65 no longer in use, field present but will remain null 66 prescriber phone number an1 80 optional ten digit phone number of the prescriber responsible for the prescription without punctuation example 5555555555 67 prescriber fax number an1 80 optional ten digit fax number of the prescriber responsible for the prescription without punctuation example 7777777777 data source details 68 history source qualifier an 3 optional indicates the data source type of the medication record values payer = pbm/payer claims data pharmacy = pharmacy dispensed fill 69 fill number n 2 optional the code indicating whether the prescription is an original or a refill values 00 = initial fill 01= first refill 02 = second refill, etc allowed values 00 thru 99 70 prescription number an 35 optional prescription number assigned to medication history record example 1515320 71 source description an 35 optional name of dispensing pharmacy or pbm/payer providing the medication record example walgreens 72 reference id value an 35 optional for pharmacy dispensed fill records (p2) this field will contain the ncpdp id for claims records (py) this field will contain the payer participant id p2 examples 4222154 py example p00000000012345 73 reference id qualifier an 2 optional codified value indicating that the reference id value is representative of the ncpdp id value d3 74 electronic rx reference number an1 35 conditional electronic prescription reference number assigned by the pharmacy system used to provide an audit trail for electronic prescriptions example 3971342601962144678 75 electronic prescription order number an1 35 conditional this is the prescription order number on the newrx created by the prescribing system when this field is populated, the electronic rx ref number must also be populated example 3558474261 76 patient primary phone number n10 conditional phone number of the patient example 9995551212 77 plancode n2 conditional codified value indicating the type of payment plan utilized by the patient type of payment plan values 01 = private pay 02 = medicaid 03 = medicare 04 = commercial pbm insurance 05 = major medical 06 = workers' compensation 78 paymentcode n2 conditional codified value indicating the type of payment received for the prescription fill as recorded by a state prescription drug monitoring program (pdmp) values 01 = private pay (cash, charge, credit card) 02 = medicaid 03 = medicare 04 = commercial insurance 05 = military installations and va 06 = workers' compensation 07 = indian nations 99 = other 79 bin n1 6 conditional plan network id used to identify how a prescription drug will be reimbursed (plan information) example 020107 80 pcn an1 10 conditional plan network id used to route pharmacy reimbursements (plan information) example 01410000 81 groupid an1 35 conditional id assigned to the cardholder group or employer group example rx1011 82 cardholdernumber an1 35 conditional insurance id assigned to the cardholder or identification number used by the plan example john h doe 83 sexassignedatbirth an1 optional the label assigned at birth based on medical factors, including hormones, chromosomes and physical characteristics values m – male f – female u – unknown i – intersex 84 diagnosisdetails an0 15 optional code identifying the diagnosis of the patient example e109 85 ndc an40 optional unique 10 digit number that identifies the medication based on manufacturer, product, and package size example 6539285415 86 expandable fields for future flat file updates over time, surescripts will continue to add new values to the end of the record it is important that the software consuming this file is designed to ignore new values until they are ready to be imported this will allow the additional fields to be included at your convenience as fields are added, this implementation guide will be updated to provide all of the necessary details for consuming the newly available records panel management response trailer (trl) elements field field name type code description example 0 record type an3 mandatory signifies that the following string of data is part of the trailer (summary) record trl 1 processed record count n1 10 mandatory count of detail records (rows) in the response file 100 2 medication count n1 10 conditional total count of medications returned 1000 3 meds from pbm count n1 10 conditional total count of medications from pbm (claims) 200 4 meds from pharmacy count n1 10 conditional total count of medications from pharmacy 800 5 patient found n1 10 conditional total count of patients found (hit rate) 90 6 some drugs returned n1 10 conditional total count of note = "not all medication history sources were accessible at this time 2 7 no meds available n1 10 conditional total count of note = "although a patient record was found, no medications were available ” 2 8 patient not found n1 10 conditional total count of note = "patient not found " 5 9 processing error n1 10 conditional total count of note = "a processing error occurred no medication history was returned " 2 10 more than 300 meds returned n1 10 conditional count of patients with more than 300 medications returned 2