ZE1 Errors

ZE1, Field 12, pertains specifically to PBM request errors or "MedHub" Errors.
ZE1, Field 13, pertains specifically to Drug History requested from the PBM in the current ZE1 or "Provider" Errors

The format for fields 12 and 13 is:
[Med Hub error code]^[Med Hub error text]^RIMH^[message error code]^[error text we map(segment location)]^Provider

segment location = ([info to identify segment where error occurred])^[additional message error code]

These are the enumerated errors I have defined (first element is the code, second is the text):

    OK                  ("OK", "No errors occurred"),
    CONFIGURATION       ("CF", "There is a problem with the configuration of the system"),
    DATE_TIME           ("DT", "Date/time was missing or improperly formatted"),
    HL7_PARSE           ("HL", "Error parsing an HL7 message"),
    INTERNAL_FORMAT     ("IF", "Error in the format of an internal message"),
    MAX_DAT             ("MD", "The maximum amount from provider has been exceeded"),
    MESSAGE_PARSE       ("MP", "Error parsing a message"),
    NACK                ("NK", "A NACK was returned from provider"),
    NCPDP_PARSE         ("NP", "Error parsing an NCPDP message"),
    NETWORK_ERROR       ("IO", "An network error occurred"),
    NO_ELIGIBILITY      ("NE", "No patient eligibility was found"),
    NO_HISTORY          ("NH", "No patient history was returned"),
    NO_PROVIDER         ("UP", "No provider is associated with the given institution/application"),
    PBM_ERROR           ("PB", "The PBM returned an error"),
    PHYSICIAN_ID        ("PH", "The physician ID is invalid"),
    PROVIDER_ERROR      ("PV", "The provider returned an unknown error"),
    REJECTED_TRANSACTION("RT", "The transaction was rejected"),
    TERM_MAPPING_ERROR  ("TM", "An error occurred while mapping drug terms"),
    UNKNOWN             ("UK", "An unknown error occurred"),
    UNSPECIFIED         ("US", "An unspecified error occurred"),
    UNSUPPORTED_MESSAGE ("UM", "The message type being translated is unsupported"),
    WEB_ERROR           ("WB", "An error occurred retrieving web data"),
    X12_PARSE           ("XP", "Error parsing an X12 message");

Field 12 Example:
PB^The PBM returned an error^RIMH^67^Patient Not Found, Resubmission Not Allowed (NM1, IL)N^RxHub

Component 1: Med Hub error code = PB
Component 2: Med Hub error text = The PBM returned an error
Component 3: Med Hub Name       = RIMH
Component 4: Message error code = 67
Component 5: Error text we map  = Patient Not Found, Resubmission Not Allowed (NM1, IL)
Component 6: Provider Name      = RxHub