Patient Response File
5 min
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 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 t = test p = production t 12 load status an2 mandatory header response code explaining the status of the load values 01 = file loaded correctly 02 = file loaded with errors and/or warnings 03 = failed to load file no data was processed 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 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 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 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 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 a single input record could have one or more errors listed in the response file total error count will be > or = error record count 7