Coded data support


PKB accepts coded data sent via HL7 in ADT A28 and ADT A31 messages and from the EMIS extract service for allergies, diagnoses and medications.

All local codes may be sent as a 'code' and 'code system' pair. Where provided PKB displays the code and the coding system on screen as additional details with the allergy, diagnosis or medication. We will display 'code' value if no 'code system' provided, but if no 'code' provided then the 'code system' will not display.

All code systems are supported for receipt and display, including SNOMED CT, Read v2, and Dm+D.

Mapping to privacy labels

PKB maps each coded data to a pre-set default privacy label. Code to privacy mappings are only currently available for Read V2 codes with SNOMED CT mappings to come in 2019.

If you would like to send Read V2 codes to PKB for allergies and diagnoses:

  • The "code system" must be sent as "Read V2". Any other variation on this will be accepted and displayed on screen but the privacy label look-up will only work if the code system is sent exactly as specified.

  • The Read V2 code must have 5 characters.

  • PKB will show the term as sent. The Read code look-up will not select a term only a privacy label and datatype.

HL7 mappings

For HL7 messages with a Read V2 code PKB maps using the Read V2 codes mapping table. PKB does not yet have a Snomed code mapping.

For unmapped codes, PKB defaults to the 'General Health' privacy label.

EMIS GP medical record mappings

Each EMIS data point has a Read V2 code or EMIS proprietary code. PKB maps these to privacy labels using the Read V2 codes mapping table or the EMIS proprietary codes mapping table.

As PKB is moving toward supporting privacy label mapping for SNOMED CT codes, the SNOMED CT concept ids are included in these tables. If you have any feedback or suggestions on the mapping tables please contact the PKB team.

The principles we've followed in determining these mappings for diagnoses are:

  • Mental - all items in Chapter E of Read V2 (Mental disorders) EXCEPT those falling under Sexual

    • mental health symptoms and conditions

    • substance dependence

    • mental development disorders

    • dementia

    • autism

  • Sexual

    • sexually transmitted infections incl. neonatal e.g. chlamydia, gonorrhoea, trichomonas, HIV

    • fertility related (K26.., K5B..) e.g. IVF, sperm motility issues

    • sexual disorders e.g. dyspareunia

    • female genital mutilation

    • termination of pregnancy

    • gender identity related

    • sexual preference related

    • NOT pregnancy, miscarriage or childbirth related (general)

  • Social

    • non-accidental injury / abuse

    • General - everything else including

    • alcohol related organic illness (e.g. cirrhosis)

    • poisoning - any chemical, drug or medication

    • cancer

    • any allergy or adverse event

All medications and allergies are assigned 'General' privacy label. The patient can modify this if preferred manually in PKB.

More information on how privacy labels are applied can be found on our developer wiki page.

Mapping to data type

This currently only applies to data received from the EMIS extract service. For HL7 the datatype is implied by the segment, for consistency we recommend matching the PKB datatype mappings.

HL7 mappings

PKB stores data received via HL7 according to the mappings specified in the HL7 message.

EMIS GP medical record mappings

For Read V2 codes PKB mapped datatype using these principles:

  • 'diagnosis' for Read V2 codes A-S

  • 'allergy' for EmisCodeCategoryDescription is one of

    • Allergy and adverse drug reactions

    • Allergy and adverse reactions

  • 'unmapped' for all other Read V2 codes. These are not processed or stored.

For EMIS proprietary codes PKB mapped using these principles

  • Allergy for EmisCodeCategoryDescription is one of

    • Allergy and adverse drug reactions

      • Allergy and adverse reactions

  • Diagnosis where EmisCodeCategoryDescription is a diagnosis in one of these categories

    • Conditions, operations and procedures

    • KC60

    • Obstetrics and birth

The Read V2 codes which are 'unmapped' and thus not currently processed or stored are those where EmisCodeCategoryDescription is one of:

  • Administration, documents and attachments

  • Biochemistry

  • Biological values

  • Body structure

  • Care episode outcome

  • Cytology/Histology

  • Dental disorder

  • Dental finding

  • Dental procedure

  • Diagnostics

  • Discharged from service

  • EMIS qualifier

  • Ethnicity

  • Family history

  • Haematology

  • Health management, screening and monitoring

  • HMP

  • Immunisations

  • Immunology

  • Intervention category

  • Intervention target

  • Investigation requests

  • Marital status

  • Microbiology

  • Nationality

  • Nursing problem

  • Nursing problem domain

  • Pathology specimen

  • Personal health and social

  • Planned dental intervention

  • Problem rating scale for outcomes

  • Procedure code

  • Radiology

  • Reason for care

  • Referral

  • Referral activity

  • Referral rejected

  • Referral withdrawn

  • Regiment

  • Religion

  • Symptoms and findings

  • Trade/branch

  • Unset (drugs and devices)

  • Observation types that are not being processed in the initial integration will be added in subsequent phases.