Appendix B: NHIN Code Tables


Table NHIN_0001—Reporting Department Codes

Code Name Description
MEDICATIONS DISPENSED Pharmacy-dispensed medications Medication dispensing transactions
LABORATORY Clinical Laboratory Clinical laboratory results and reports
NURSING Nursing Nursing observations
RADIOLOGY Radiology X-Ray reports and images
VITAL SIGNS Vital Signs Recorded vital signs


Table NHIN_0002—Time Filter Direction

Code Name Description
EARLIEST Earliest When a limit is placed on the number of returned results and reports, the limit N will cause the N earliest (oldest) values to be returned by the query
LATEST Latest When a limit is placed on the number of returned results and reports, the limit N will cause the N latest (most recent) values to be returned by the query

Appendix C: EvaluationSettings Elements in
SOAP Header

Element Name Data Type Default Description

Max Response Interval

Integer unlimited The server is instructed to wait no longer than this number of seconds before responding to the client query. If the server cannot respond fully with this interval, it should return whatever partial results it has gathered so far. If no query data has been gathered so far, the server should generate the SOAP fault “Server.WAIT INTERVAL EXPIRED.”
Patient Identified yes/no no Value of “yes” indicates patient registration information has already been resolved to a single registration instance, probably by a previous “Patient Identities” query. In the case of a “yes” value here, all PID(s) supplied in the query must already contain valid medical record numbers and institution identifiers.
Response Style String D

D = deferred (asynchronous)
I = immediate (synchronous)
This value is a copy of RCP.1 value from the HL7 query. It is duplicated in the message header for convenience.

Appendix D: NHIN-Specific SOAP 1.1 Faults

SOAP faultcode  SOAP faultstring  Description 
Client INVALID QUERY DATA The fault message text will describe the query data value that could not be understood.
Client INVALID QUERY FORMAT The format and/or version specified in the <Query> node is not supported by this NHIN server.
Client INVALID QUERY NAME The HL7 query name was not in the list of supported queries.
Server WAIT INTERVAL EXPIRED The NHIN server was not able to respond to the query within the specified response interval.

The SOAP “faultstring” specifies the type of fault/error that occurred, but does not tell one the exact data value that was responsible for the fault. Fortunately, SOAP provides a way to do so. Consider the following example. An NHIN server receives a “Patient Identities” query. No person first name is specified in the query message and the target person’s date of birth is not a valid date. The NHIN server returns the following SOAP fault:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ https://connectingforhealth.regenstrief.org:8443/NHIN/services/NHINQueryEnvelope.xsd">
    <soapenv:Body>
        <soapenv:Fault>
            <faultcode>Client</faultcode>
            <faultstring>INVALID QUERY DATA</faultstring>
            <detail>
                        <NHINFault xmlns="http://www.nhin.gov/messaging">
                            <ErrorMessage>No person name was specified.<br/>Person date of birth was not a valid
                             date.</ErrorMessage>
                            <ErrorData>
                                        <Field>PID.5 XPN.2</Field>
                                         <Reason>Person first name missing</Reason>
                            </ErrorData>
                            <ErrorData>
                                        <Field>PID.7 TS.1</Field>
                                        <Value>19009999</Value>
                                        <Reason>Invalid person date of date</Reason>
                            </ErrorData>
                        </NHINFault>
            </detail>
        </soapenv:Fault>
    </soapenv:Body>
</soapenv:Envelope>

Any number of <ErrorData> elements can be added to the NHIN SOAP fault <detail>.  Each <ErrorData> node must contain a <Reason> element defining the exact fault or error.  When applicable, the <Field> node defines exactly what field in the message contained the invalid, missing, incomplete, or incompatible value.  The value itself appears in the <Value> element.

Appendix E: Query Response Format and Version Identifiers

The table below describes the currently recognized contents of the format and version attributes used in the XML representation of a <nhin:Response> node.

Format  Version   Description
 HL7  2.4  XML representation of HL7 2.4
 HL7  3.0  HL7 3.0 (natively XML)
 NCPDP Scripts  8.1  XML version of NCPDP medication dispensing information