OverviewPKB supports 3 types of identifier in the HL7 API:
See also the Identifiers section of our Data Model for more information.
Identifier type assignmentAn HL7 identifier consists of several components. PKB is only interested in the following components:
We determine which type of identifier has been provided by matching the Assigning Authority (AA) and the Identifier Type Code (TC) to known types. To provide a national ID you must provide the AA and TC corresponding to the relevant identifier. These are given in the following section. To provide a local ID, you need to first agree with us what AA and TC values you use for each of your identifier types. We need to configure these for you before the IDs will be processed by our HL7 API.
Any supplied identifier that does not match a known type will be silently ignored.
System identifiersIn order to send through the PKB ID, you need to provide:
National identifiersIn order to send through a national ID, you need to supply the Assigning Authority and Identifier Type Code as detailed in the table below.
* A note about NHS-Type Numbers. The following 3 National ID Types are drawn from the same numbering scheme, but with non-overlapping ranges. PKB considers them to be separate types. It is the responsibility of the sender to ensure the correct AA/TC values are sent.
Local identifiersYou will need to agree with PKB what local identifiers you would like to send through.Each PKB Organisation or PKB Team can be associated with multiple local identifier types, and each patient can be associated with multiple ID values for each local identifier type.
AA wildcardingA local ID type can have a wildcard for the Assigning Authority (but not the Type Code). If this is configured, then an HL7 identifier will be assigned to this type if the TC matches, regardless of the provided AA value.Restrictions & scopeThe scope of AA/TC pairs for local IDs is the whole PKB Organisation. All AA/TC pairs for a PKB Organisation (and for all PKB Teams within that PKB Organisation) must be unique across the PKB Organisation.In addition, a Type Code can only be used with a wildcarded Assigning Authority if that Type Code is not used by any other local ID within the PKB Organisation (or any PKB Teams within that PKB Organisation).
A local ID AA/TC pair must not match the AA/TC pair for any national ID.
The scope of a local ID is always the entire PKB Organisation which contains it. As such, a team-level HL7 connection can read and write local IDs of a type associated with another PKB Team (providing it is within the same PKB Organisation).
MatchingOnce all the provided identifiers have been assigned to their corresponding types, PKB will attempt to match them to an existing medical record.Hard matchingHard Matching refers to the process of identifying a medical record based on the values of the identifiers provided.National and Local Identifiers are case sensitive.
Soft matchingSoft Matching is an optional process allowing for stricter upstream system (LAB/PAS/etc.) data validation based on the following demographic fields. The more soft matched fields enabled the more stringent the upstream validation. If a message does not pass based on any of the enabled soft match criteria but does pass the hard match based on patient identifier the message will be placed in the HL7 review queue to be managed by the organisation administrator. Demographic-based soft matching is not applicable to messages which create a new patient record or update the demographics of an existing patient record (i.e. ADT A28/A31).
NHS number status checkingSome messages cannot be soft-matched based on demographics.
Auto CreateBy default, medical records for new patients are created upon receipt of an A28 or A31 message only. PID segments for other message types that do not match a medical record will return an error. If you would like to disable this strict record checking, such that a new medical record is created whenever an unmatched PID is received (in any message) then we can configure this for you. However, you will still need to send an A28 or A31 to update the demographic details about each patient.WorkflowThe diagram below demonstrates our matching workflow.![]() |
Developer documentation > HL7 API >