Pharmacy Extract File Layout
14 min
file naming and formats the input file name convention is pharmacyname yyyy mm dd xx where xx is a unique sequence for that day it is strongly recommended to compress the file prior to transmitting it to surescripts the current zip protocols that are supported are gzip, bzip2 and zip for the response file naming convention, see pharmacy extract response file docid\ zqwhcz5fdhj2tuddekt0c character set reference ncpdp xml standard version v2022071, version 2023011 sec 13 1 4 page 83 the file layout table below uses the following types type notation alphanumeric an date dt numeric n time tm alphanumeric data must only contain ascii characters with decimal values of 32 through 126, excluding the delimiter characters listed in delimiter character docid\ zqwhcz5fdhj2tuddekt0c below all characters outside this range will be rejected see http //www asciitable com/ http //www asciitable com/ for a list of valid characters numeric data is composed of the characters 0 9 and the decimal character delimiter character the following table contains delimiters used in inbound and outbound files the pharmacy should never use these delimiters in the data fields character description asterisk | pipe \ backslash colon tilde requirement designation 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 note if specific conditions in comments section are not met, field will error during validation business rule if sent, the element must be used per the surescripts business rule note not all business rules reside in this table not used not used by surescripts field will be ignored unless used outside of data type requirements if it is used outside of data type requirements, it will be rejected pharmacy extract file layout each field is delimited by the pipe character (|) each line is separated by a new line (hex 0a) character note the following are key fields and the combination of those fields must be unique prescription number, fill number, pharmacy ncpdp id, date filled, and compound ingredient sequence number header elements field # field name data type code comments examples 0 record type an 3/3 mandatory identifies record type value hdr hdr 1 version/release number an 3/3 mandatory version number of this specification values 7 0 8 0 8 0 2 receiver id an 1/30 mandatory id identifying the receiver of the file value s00000000000001 s00000000000001 3 transmission control number an 1/10 mandatory unique identifier defined by the sender note the value must be unique for each file transmission 1000001000 4 transmission timestamp dt 20/29 mandatory this field includes the date and time note time zone is required see utc time format docid\ auwkasqf9vagvuktba h for more information 2018 10 01t08 33 55 123 00 00 5 transmission file type an 1/3 mandatory identifier for the file type value pef = pharmacy extract file pef = pharmacy extract file 6 transmission action an 1/1 mandatory value a = add a 7 extract date dt 8/8 mandatory date file was created format ccyymmdd 20170630 8 file type an 1/1 mandatory values t = test p = production p 9 pharmacy dispensing software vendor an60 conditional name of software vendor the pharmacy uses 10 phone number n10 conditional detail (dtl) elements field # field name data type code comments examples 0 record type an 3/3 mandatory identifies record type value pef pef 1 record sequence number n 1/10 mandatory unique number for this detail row in the transaction 3 patient 2 pharmacy patient id an 1/35 mandatory business rule unique id assigned to the patient by the pharmacy a unique id must be sent to ensure accurate patient matching patient id cannot contain an apostrophe (‘) or double quote (“) 3 patient id medicare number an 11/11 conditional 12345678910 4 patient id medicaid number an 1/35 conditional 5 patient id social security n 9/9 conditional 756235469 6 patient id rems an 1/35 conditional risk evaluation and mitigation strategy – patient identifier assigned by the rems administrator 7 alternate patient id an 1/20 conditional unique identifier of patient as issued by governmental issuing authority and provided to the pharmacy for identification do not include punctuation required if alternate patient id qualifier is populated 8 alternate patient id qualifier an 2/2 conditional values 01 = military id 02 = state issued id 03 = unique system id 04 = permanent resident card 05 = passport id 08 = tribal id 09 = vendor specific (such as bamboo health, experian, lexisnexis) 10 = veterinary patient microchip 11 = medicaid recipient id number 99 = other (trading partner agreed upon id) required if alternate patient id is populated 05 9 customer dl number an 1/20 conditional driver’s license number the driver’s license number should be sent without dashes or spaces qby12678946 10 patient location code an 2/2 conditional values 01 = home 02 = intermediary care 03 = nursing home 04 = long term/extended care 05 = rest home 06 = boarding home 07 = skilled care facility 08 = sub acute care facility 09 = acute care facility 10 = outpatient 11 = hospice 12 = homeless/unhoused 13 = transient care 98 = unknown 99 = other 03 11 patient location facility unit an 1/35 conditional stone river ramsey 12 patient location bed an 1/10 conditional 02 13 patient location room an 1/10 conditional 1003 14 patient last name an 1/35 mandatory hanson 15 patient first name an 1/35 mandatory jane 16 patient middle name an 1/35 conditional ann 17 patient name prefix an 1/10 conditional mrs 18 patient name suffix an 1/10 conditional 6 19 patient former last name an 1/35 conditional jones 20 patient former first name an 1/35 conditional patricia 21 patient former middle name an 1/35 conditional jon 22 patient former name prefix an 1/10 conditional mr 23 patient former name suffix an 1/10 conditional ii 24 patient date of birth dt 8/8 mandatory format ccyymmdd 19841024 25 patient gestational age n 1/2 conditional gestational age at birth (number of weeks) 32 26 patient gender an 1/1 mandatory values m = male f= female u = unknown/undisclosed n = non binary x = unspecified/other m 27 sex assigned at birth an 1/1 conditional values m = male f= female 28 patient address 1 an 1/40 mandatory 1234 west ave 29 patient address 2 an 1/40 conditional ste e 30 patient city an 1/35 mandatory chicago 31 patient state/province an 2/5 mandatory postal office state abbreviation surescripts maps us state to state or translates the iso format of canadian province into currently supported values example for canadian provinces 2 character canadian province with a "ca" prefix (e g , ca ab) il 32 patient postal code an 5/9 mandatory for us postal addresses, use the format 99999 or 999999999 for canadian postal codes, use a 7 character alpha numeric string (format a0a 0a0, where a is a letter and 0 is a digit, with a space separating the third and fourth characters ) do not include punctuation 60459 604594563 y0b 0a0 33 patient country an 2/2 conditional values us = united states of america ca = canada us 34 patient primary phone number n 10/10 conditional do not include punctuation 9995551212 35 patient primary phone extension n 1/8 conditional 2389 36 patient primary phone supports sms n 1/1 conditional values 0 = false 1 = true 0 37 patient email an 1/80 conditional jane johnson55555\@gmail com 38 patient fax number n 10/10 conditional 6493206487 39 patient fax extension n 1/8 conditional 5634 40 patient home phone number n 10/10 conditional 5551061191 41 patient work phone number n 10/10 conditional 5551586487 42 patient work phone extension n 1/8 conditional 4628 43 patient other phone number n 10/10 conditional 5551586487 44 patient other phone extension n 1/8 conditional 26795 45 patient consent indicator n 1/1 conditional values 0 = patient is active and medication information can be shared 1 = the patient has requested that none of their information be shared no medication information for this patient will be shared if patient active indicator is blank, it is treated as a 0 (patient is active and medication information can be shared ) 0 46 drug record indicator an 1/1 conditional values 0 = medication information can be shared 1 = patient has requested that only this medication record not be shared if drug record indicator is blank it will be treated as 0 = medication information can be shared 0 47 allergy an 1/35 conditional used to enter patient allergy information peanut 48 species code an 2/2 conditional values 01 = human 02 = veterinary patient 01 49 name of animal an 1/30 conditional name of animal for which veterinarian has written the prescription remi 50 patient hospice indicator n 1/1 conditional indicates patient’s hospice status values 1 = enrolled in hospice 2 = not enrolled in hospice 2 pharmacy 51 pharmacy ncpdp id n 7/7 mandatory include any leading or trailing zeros in the id 0753489 52 chain site id an 1/10 conditional store number assigned by the chain to the pharmacy location 6484 53 pharmacy type n 1/1 mandatory values 1 = retail 2 = mail order 3 = specialty 4 = long term care 5 = infusion 1 54 pharmacy name an 1/70 mandatory publicly known pharmacy name walgreens 55 rxorigin code n 2/2 mandatory code indicating origin of prescription values 00 = not specified 01 = written rx 02 = telephone rx 03 = emergency phone 04 = fax 05 = electronic 06 = transferred/forwarded rx 07 = order (administered at prescriber location) 08 = dispensed from prescriber location 09 = standing order/protocol 99 = other 05 56 pharmacy dea number an 9/9 conditional dea number of pharmacy 2 alpha characters followed by 7 digits ab1234567 57 pharmacy dea suffix an 1/7 conditional 58 pharmacy specialty an 1/10 conditional see the health care provider taxonomy code set http //www nucc org/index php/code sets mainmenu 41/provider taxonomy mainmenu 40 http //www nucc org/index php/code sets mainmenu 41/provider taxonomy mainmenu 40 207nd0900x 59 pharmacy npi n 10/10 mandatory 10 digit value 1234567890 60 pharmacy id state license number an 1/35 conditional used to help identify the sending pharmacy 61 pharmacy id medicare number an 1/35 conditional cms certification number (ccn) 62 pharmacy id medicaid number an 1/35 conditional 63 pharmacy address 1 an 1/40 conditional 64 pharmacy address 2 an 1/40 conditional 65 pharmacy city an 1/35 mandatory 66 pharmacy state an 2/2 mandatory tx 68 pharmacy postal code n 5/9 mandatory use the format 99999 or 999999999 do not include punctuation note canadian postal codes do not apply only us pharmacies are applicable 55303 553034698 68 pharmacy primary phone number n 10/10 mandatory do not include punctuation 9995551212 69 pharmacy primary phone extension n 1/8 conditional 43987 70 pharmacy email an 1/80 conditional supportstore1568\@walgreens com 71 pharmacy fax number n 10/10 conditional 1468963454 72 pharmacy fax extension n 1/8 conditional 4389 73 contact name an 1/30 conditional contact name at pharmacy gloria 74 pharmacist npi n 10/10 conditional 10 digit value 1234567890 75 pharmacist last name an 1/35 conditional thunder 76 pharmacist first name an 1/35 conditional ben 77 pharmacist middle name an 1/35 conditional richard 78 pharmacist name prefix an 1/10 conditional mr 79 pharmacist name suffix an 1/10 conditional ii 80 pharmacist address line 1 an 1/40 conditional 4036 156th lane 81 pharmacist address line 2 an 1/40 conditional po box 1589 82 pharmacist address city an 1/35 conditional bloomington 83 pharmacist address state province an 2/2 conditional az 84 pharmacist address postal code n 5/9 conditional use the format 99999 or 999999999 do not include punctuation note canadian postal codes do not apply only us pharmacies are applicable 60459 604594563 y0b 0a0 85 pharmacist primary phone number n 10/10 conditional 86 pharmacist primary phone extension n 1/8 conditional 87 pharmacist email an 1/80 conditional 88 pharmacist fax number n 10/10 conditional 89 pharmacist fax extension n 1/8 conditional 90 pharmacist work phone number n 10/10 conditional 91 pharmacist work phone extension n 1/8 conditional 92 pharmacist state license number an 1/35 conditional 93 pharmacist id medicare number an 1/35 conditional 94 pharmacist id medicaid number an 1/35 conditional 95 pharmacist id dea number an 9/9 conditional dea number of pharmacy 2 alpha characters followed by 7 digits ab1234567 96 state code issuing rx serial number an 2/2 conditional state code that issued serialized prescription blank required if state issued rx serial number is populated ca 97 state issued rx serial number an 1/20 conditional number assigned to state issued serialized prescription blank required if state code issuing rx serial number is populated 98 pharmacy permit/license number an 1/20 conditional board of pharmacy number 99 pharmacy alternate license number an 1/12 conditional used for controlled substance dispensing prescriber 100 prescriber spi n 1/13 conditional surescripts prescriber identifier 101 prescriber npi n 10/10 conditional required unless the prescriber is a veterinarian 1234567890 102 prescriber id dea an 9/9 conditional dea number of prescriber 2 alpha characters followed by 7 digits if drug coded dea schedule = controlled substance, then this field is required ab1234567 103 dea suffix an 1/7 conditional surescripts will accept and load up to the maximum defined characters 104 prescriber state license number an 1/20 conditional surescripts will accept and load up to the maximum defined characters 105 prescriber id medicare number an 1/35 conditional 106 prescriber id medicaid number an 1/35 conditional 107 prescriber id upin an 6/6 conditional 108 prescriber id hin an 1/35 conditional 109 alternate prescriber id an 1/10 not used not used by surescripts 110 prescriber practice location id medicare number an 1/35 conditional 111 prescriber practice location id medicaid number an 1/35 conditional 112 prescriber practice location id upin an 1/35 conditional 113 prescriber practice location id facility id an 1/35 conditional 114 prescriber practice location id dea number an 9/9 conditional 115 prescriber practice location id npi n 10/10 conditional 116 prescriber practice location id rems healthcare provided enrollment id an 1/35 conditional 117 prescriber practice location business name an 1/70 conditional 118 prescriber last name an 1/35 mandatory 119 prescriber first name an 1/35 mandatory 120 prescriber middle name an 1/35 conditional 121 prescriber name prefix an 1/10 conditional 122 prescriber name suffix an 1/10 conditional 123 prescriber address 1 an 1/40 conditional 124 prescriber address 2 an 1/40 conditional 125 prescriber city an 1/35 conditional 126 prescriber state an 2/2 conditional postal office state abbreviation 127 prescriber postal code n 5/9 conditional use the format 99999 or 999999999 do not include punctuation note canadian postal codes do not apply only us pharmacies are applicable 128 prescriber primary phone number n 10/10 conditional do not include punctuation 9995551212 129 prescriber primary phone extension n 1/8 conditional 130 prescriber primary phone supports sms n 1/1 conditional values 0 = false 1 = true 131 prescriber email an 1/80 conditional 132 prescriber fax number n 10/10 conditional do not include punctuation 9995551212 133 prescriber fax extension n 1/8 conditional 134 prescriber work phone number n 10/10 conditional 135 prescriber work phone extension n 1/8 conditional 136 prescriber other phone number n 10/10 conditional 137 prescriber other phone extension n 1/8 conditional medication 138 prescription number an 1/35 mandatory prescription number assigned by the pharmacy surescripts will accept and load up to the maximum defined characters 139 fill number n 2/2 mandatory values 00 through 99 are valid examples include 00 = original fill 01 = 1st refill, etc 140 partial fill indicator n 2/2 conditional partial fill prescriptions filled on the same day should be summed within the same fill number values 01 = partial fill 02 = not partial fill 01 141 partial fill sequence number n 2/2 conditional unique sequence number for each part of a partial fill values less than 10 must have a leading zero values 00 through 99 are valid examples include 00 = not a partial fill 01 = first partial fill 01 142 ndc number dispensed n 11/11 mandatory include leading zeros for all sections of the ndc number ndc should be sent if it exists for compounds, populate the specific ingredient identifier(s) in the compound ingredient fields 55555444422 143 upc number dispensed n 12/12 conditional provide if available for compounds, populate the specific ingredient identifier(s) in the compound ingredient fields 144 udi dispensed an 6/75 conditional provide if available for compounds, populate the specific ingredient identifier(s) in the compound ingredient fields 145 rxnorm code an 1/35 conditional provide if available for compounds, populate the specific ingredient identifier(s) in the compound ingredient fields required if rxnorm product term type is populated 146 rxnorm product term type an 3/3 conditional value scd = semantic clinical drug sbd = semantic branded drug gpk = generic package bpk = branded package required if rxnorm code is populated 147 manufacturer name an 1/105 conditional 148 drug db code an 1/8 conditional proprietary code from third party drug database 149 drug db code qualifier an 1/3 conditional if a drugdbcode is sent, indicate the specific drug database referenced values dit = scholz databank fdb = first databank gs = elsevier ld = wolters kluwer lexi corp ms = medispan mul = cerner multum rb = ibm truven health analytics 150 drug coded dea schedule n 1/1 conditional classification level for controlled substance drugs values 0 = not a controlled substance not stated explicitly or in detail 1 = schedule i 2 = schedule ii 3 = schedule iii 4 = schedule iv 5 = schedule v if controlled substance, this is required 2 151 medication name an 1/105 mandatory for non compounds, this field should include a standardized drug name including strength and form from a drug compendia for a compound, the names of the ingredients in the compound or the prescriber’s preferred name should be communicated here amlodipine 5 mg tablet 152 treatment type n 2/2 conditional this field indicates that the prescription was for opioid dependency treatment when code 02 is used values 01 = not used for opioid dependency treatment 02 = used for opioid dependency treatment 03 = pain associated with active and aftercare cancer treatment 04 = palliative care in conjunction with a serious illness 05 = end of life and hospice care 06 = a pregnant individual with a pre existing prescription for opioids 07 = acute pain for an individual with an existing opioid prescription for chronic pain 08 = individuals pursuing an active taper of opioid medications 09 = patient is participating in a pain management contract 10 = acute opioid therapy 11 = chronic opioid therapy 99 = other (trading partner agreed upon season) 153 strength unit of measure code an 1/15 conditional for a list of fmt codes, go to http //evs nci nih gov/ftp1/ncpdp/about html http //evs nci nih gov/ftp1/ncpdp/about html this list should be updated on a monthly basis 154 strength value an 1/70 conditional 155 strength form code an 1/15 conditional for a list of fmt codes, go to http //evs nci nih gov/ftp1/ncpdp/about html http //evs nci nih gov/ftp1/ncpdp/about html this list should be updated on a monthly basis 156 sig text an 1/1000 conditional sig text is strongly recommended to be sent sig contains either completely free text with no corresponding structured content or is a generated structured sig that contains all the elements semantically captured by and corresponding to the codified elements and clarifying free text fields if you cannot fully represent the content of the prescriber’s intended directions in the structured sig only populate the free text see appendix c sigtext field best practices docid\ djq7fzbfixxmy6mbwxj0j section patient instructions should not be split between the sigtext and notes fields as this can result in an incorrect interpretation by the pharmacy staff of the prescriber’s preferred patient instructions which may result in negative therapeutic outcomes and/or patient harm sigs should not be truncated because important information can be lost text directions, no codes directions for use should be spelled out clearly in proper english the use of abbreviations (particularly latin) or symbols is unnecessary and discouraged because it can lead to medication errors reference ncpdp script structured and codified sig format implementation guide use "take 1 tablet by mouth twice a day" instead of "1 t po bid " 157 quantity prescribed n 1/11 mandatory when sending decimals, always use a leading zero and never use a trailing zero correct format 0 5, 2 5, or 12 incorrect format 5, 2 50, or 12 0 158 quantity dispensed n 1/11 mandatory for return to stocks and/or script reversals please set this field with quantity '0' see appendix b record reversals and updates docid\ wniorh6j4evyqcbom6s0e for reversal instructions when sending decimals, always use a leading zero and never use a trailing zero correct format 0 5, 2 5, or 12 incorrect format 5, 2 50, or 12 0 159 quantity qualifier units of measure an 2/2 mandatory values ea = each gr = grams ml = milliliters ea 160 days supply n 1/3 mandatory 161 substitutions n 1/1 mandatory values 0 = no product selection indicated this is the field default value that is appropriately used for prescriptions for single source brand, co branded/co licensed, or generic products 1 = substitution not allowed by prescriber note if unknown, "0" should be sent 1 162 lot number an 1/140 conditional 163 lot number expiration dt 8/8 conditional format ccyymmdd 19901217 164 date written dt 8/8 mandatory date may not be after date filled format ccyymmdd 20030803 165 date adjudicated dt 8/8 conditional format ccyymmdd 20070412 166 date filled dt 8/8 mandatory date may not be before date written note if sold date is not populated, it is recommended to send a void in the date filled field format ccyymmdd 20060224 167 sold date dt 8/8 conditional 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 format ccyymmdd 20010102 168 refills originally authorized n 1/2 mandatory 4 169 refills remaining n 1/2 mandatory 2 170 electronic rx ref number an 1/35 conditional electronic prescription reference number that links the messageid of the related newrx mandatory if rxorigin code docid\ zqwhcz5fdhj2tuddekt0c is set to ‘05’ used to provide an audit trail for electronic prescriptions when electronic prescription order number docid\ zqwhcz5fdhj2tuddekt0c is populated, the electronic rx ref number must also be populated 3971342601962144678 171 compound ingredient sequence number n 1/2 mandatory 0 = non compounds first compound ingredient to be 1 and increment by 1 for each additional ingredient compound ingredients for the same prescription should be grouped together in sequential order 172 compound ingredient ndc n 11/11 conditional provide if available ndc code for the compound ingredient include leading zeros for all sections of the ndc number ndc should be sent if it exists 173 compound ingredient upc number dispensed n 12/12 conditional provide if available 174 compound ingredient rxnorm an 1/35 conditional provide if available 175 compound ingredient rxnorm product term type an 3/3 conditional value scd = semantic clinical drug sbd = semantic branded drug gpk = generic package bpk = branded package required if compound ingredient rxnorm is populated 176 compound ingredient quantity value an 1/11 conditional if compound ingredient sequence number docid\ zqwhcz5fdhj2tuddekt0c = 1 or greater, then this field is required when sending decimals, always use a leading zero and never use a trailing zero correct format 0 5, 2 5, or 12 177 compound ingredient units of measure an 1/2 conditional values ea = each gr = grams ml = milliliters 178 compound ingredient medication name an 1/105 conditional this field should include a standardized drug name including strength and form from a drug compendia 179 compound ingredient dea schedule n 1/1 conditional if compound ingredient sequence number docid\ zqwhcz5fdhj2tuddekt0c = 1 or greater, then this field is required values 0 = not a controlled substance 1 = schedule i 2 = schedule ii 3 = schedule iii 4 = schedule iv 5 = schedule v 2 180 compound ingredient final compound pharmaceutical dosage form an 1/15 conditional for a list of fmt codes, go to http //evs nci nih gov/ftp1/ncpdp/about html http //evs nci nih gov/ftp1/ncpdp/about html this list should be updated on a monthly basis 181 compound ingredient strength value an 1/70 conditional 182 compound ingredient strength form code an 1/15 conditional for a list of fmt codes, go to http //evs nci nih gov/ftp1/ncpdp/about html http //evs nci nih gov/ftp1/ncpdp/about html this list should be updated on a monthly basis 183 compound ingredient strength unit of measure an 1/15 conditional for a list of fmt codes, go to http //evs nci nih gov/ftp1/ncpdp/about html http //evs nci nih gov/ftp1/ncpdp/about html this list should be updated on a monthly basis 184 compound ingredient quantity unit of measure code an 1/15 not used not used by surescripts 185 diagnosis primary code an 3/7 conditional required if diagnosis primary qualifier is populated note icd 10 codes do have a decimal; however, for transaction/submission of the codes, the decimal is not included in the code the reporting of the decimal between the third and fourth characters is unnecessary because it is implied 186 diagnosis primary qualifier an 2/2 conditional values 01 = icd 9 cm 02 = icd 10 cm 03 = other 04 = cdt required if diagnosis primary code is populated 02 187 diagnosis primary description an 1/500 conditional 188 diagnosis secondary code an 3/7 conditional required if diagnosis secondary qualifier is populated 189 diagnosis secondary qualifier an 2/3 conditional required if diagnosis secondary code is populated 190 diagnosis secondary description an 1/500 conditional plan information 191 plan code n 2/2 conditional type of payment plan values 01 = private pay 02 = medicaid 03 = medicare 04 = commercial pbm insurance 05 = major medical 06 = workers' compensation 01 192 payment code n 2/2 mandatory 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 01 193 bin n 1/6 conditional do not include decimals 020107 194 pcn an 1/10 conditional 01410000 195 group id an 1/35 conditional rx1011 196 cardholder number an 1/35 conditional other 197 issuing jurisdiction an 1/3 conditional code identifying jurisdiction that issues id in the drop off/pick up person id field 198 drop off/pick up person id an 1/20 conditional id of person dropping off or picking up rx do not include punctuation required if drop off/pick up id qualifier is populated 199 drop off/pick up id qualifier n 2/2 conditional used to identify type of id in the drop off/pick up person id field 01 = military id 02 = state issued id 03 = unique system id 04 = permanent resident card 05 = passport id 06 = driver’s license id 07 = social security number 08 = tribal id 99 = other (trading partner agreed upon id) required if drop off/pick up person id is populated 200 drop off/pick up person relationship n 2/2 conditional relationship of person dropping off or picking up rx values 01 = parent/legal guardian 02 = spouse 03 = caregiver 99 = other 02 201 drop off/pick up last name an 1/15 conditional last name of person dropping off or picking up rx 202 drop off/pick up first name an 1/12 conditional first name of person dropping off or picking up rx 203 drop off/pick up qualifier n 2/2 conditional identifies whether the person is dropping off or picking up the rx values 01 = person dropping off 02 = person picking up 98 = unknown/not applicable note if a patient id was collected but it is unknown if the patient was dropping off or picking up, then specify a value of 98 if no id was collected, then leave the field blank 01 204 electronic prescription order number an 1/35 conditional this is the prescription order number on the newrx when electronic prescription order number is populated, the electronic rx ref number docid\ zqwhcz5fdhj2tuddekt0c must also be populated 205 prior authorization an 1/35 conditional prior authorization number assigned by pbm/payer 206 prior authorization status an 1/1 conditional values a = approved the medication was approved by the payer d = denied the medication was not approved by the payer f = deferred the medication request being reviewed by the payer n = not required a prior authorization is not required for this medication r = requested the action of obtaining a prior authorization approval is being sought trailer elements field # field name data type code comments examples 0 record type an 3/3 mandatory identifies record type value trl trl 1 total records n 1/10 mandatory total records processed pharmacy extract response file a response file will be provided to the pharmacy after it has been loaded or attempted to load this file contains information related to any errors and correction requests encountered by recipient while attempting to load the file and will be sent with a file name similar to the following example name 2017 08 01 01 1234567890123 1234567890123 gz extract rsp (where "name" is the pharmacy name) the response file will be placed in the same ftp folder where the customer placed the inbound pharmacy extract file note the pharmacy is responsible for pulling their response files the pharmacy should resolve any errors and/or correction requests and include the corrected medications in a future medication history load file so that the medication can be loaded into the surescripts database for more detailed information on the error codes sent within the response file, refer to appendix a reject code summary docid\ nyh ngixsbpp8q7wunfyu pharmacy extract response file header must occur 1 pharmacy extract response file detail occurs 0 if no errors or system error occurs 1 to n if errors pharmacy extract response file trailer must occur 1 pharmacy extract response file header header elements field # field data type code comments examples 0r record type an 3/3 mandatory identifies record type value shd shd 1r version / release number an 3/3 mandatory version number of this specification values 7 0 8 0 8 0 2r sender id an 3/30 mandatory id as assigned by surescripts identifying surescripts value s00000000000001 s00000000000001 3r transaction control number an 1/10 mandatory unique identifier defined by the sender 4r transmission timestamp dt 20/29 mandatory date and time transaction was created note time zone is required see utc time format docid\ auwkasqf9vagvuktba h for more information 2018 10 01t08 33 55 123 00 00 5r transaction file type an 1/3 mandatory identifier telling receiver the type of file value pef pef 6r originating transaction number an 1/10 mandatory number of the original transaction 7r originating transaction timestamp dt 20/29 mandatory date and time original incoming file was created note time zone is required see utc time format docid\ auwkasqf9vagvuktba h for more information 2018 10 01t08 33 55 123 00 00 8r file type an 1/1 mandatory test or production values t=test p=production p 9r load status n 2/2 mandatory code explaining the status of the load values 01 = file loaded correctly–the entire file has loaded without any errors no detail row errors exist 02 = file loaded with errors–the file was partially loaded due to row level errors for row error information, see appendix a reject code summary docid\ nyh ngixsbpp8q7wunfyu 03 = file contains errors–file not loaded the entire file was unable to load because of errors 04 = system error–the entire file was unable to load because of errors detail elements field # field data type code comments examples 0r record type an 3/3 mandatory identifies record type value sdt sdt 1r absolute row number n 1/10 mandatory the absolute row or line number in the file that contains the error if the row number is 1, then the error is for the file header 2r section field in error n 1/2 mandatory field number that contains the error field number of error in row the first field record type is considered field number 0, the next field is considered field number 1 3r reject code an 4/4 mandatory describes error for this field note if an error occurred, the row that the error was in did not load for compound medications, the entire compound did not load see appendix a reject code summary docid\ nyh ngixsbpp8q7wunfyu 4r additional message information an 1/100 conditional free text description of the error 5r data in error an 1/100 conditional copy of the bad data if the data in error is longer than 100 characters it will be truncated if a pipe character is in the data it will be represented as \[pipe] 6r pharmacy ncpdp id n 7/7 conditional 7r chain site id an 1/10 conditional store number assigned by the chain to the pharmacy location 8r prescription number an 1/35 conditional prescription number assigned by the pharmacy 9r date filled dt 8/8 conditional date may not be before date written format ccyymmdd 10r fill number n 2/2 conditional values 00 = original fill 01 = 1st refill, etc 11r partial fill number an 2/2 conditional unique sequence number for each part of a partial fill values<10 must have a leading zero values 00 through 99 are valid examples include 00 = not a partial fill 01 = first partial fill trailer elements field # field data type code comments examples 0r record type an 3/3 mandatory identifies record type value str 1r total rows in error n 1/10 mandatory 2r total errors n 1/10 mandatory