Skip Navigation Bar
National Library of Medicine Technical BulletinNational Library of Medicine Technical Bulletin

Table of Contents: 2019 MAY–JUNE No. 428

Previous Next


NLM Launches MAGPIE Web Tool

Fung K.-W. NLM Launches MAGPIE Web Tool. NLM Tech Bull. 2019 May-Jun;(428):e3.

2019 May 28 [posted]

On May 28, 2019, the National Library of Medicine (NLM) launched the new web tool MAGPIE (Map Assisted Generation of Procedure and Intervention Encoding). MAGPIE is an interactive tool to help users (e.g., professional coders, researchers, clinicians) find SNOMED CT and ICD-10-PCS codes for medical procedures and interventions. MAGPIE is an NLM research tool and is developed primarily for the 2018 version of ICD-10-PCS.

SNOMED CT is the designated clinical terminology in the U.S. for clinical problems and procedures in the electronic health record. The SNOMED CT United States (US) Edition is the official source of SNOMED CT for use in U.S. healthcare systems and can be accessed here. ICD-10-PCS is required under the Health Insurance Portability and Accountability Act (HIPAA) for procedures and interventions in hospital inpatient health settings.

In addition to the ICD-10-PCS coding resources (i.e., index, tables and definitions), MAGPIE also uses the Unified Medical Language System (UMLS), the General Equivalence Maps (GEM) from ICD-9-CM to ICD-10-PCS, and the ICD-9-CM Procedures index (re-purposed for ICD-10-PCS coding) to facilitate code searching. MAGPIE combines lexical and map-assisted searching strategies to look for SNOMED CT, ICD-9-CM, and ICD-10-PCS codes sequentially. Lexical matching makes use of the rich index terms in the re-purposed ICD-9-CM procedure index, synonyms in the UMLS, and the ICD-10-PCS index. Map-assisted searching relies on inter-terminology mappings from the GEM and UMLS.

MAGPIE search sequence and search methods (see Figure 1):

  • MAGPIE first finds the best matching SNOMED CT and ICD-9-CM codes, and suggests a list of ICD-10-PCS tables based on these codes and their mappings. Users can refine the search by changing the SNOMED CT and ICD-9-CM codes.
  • Next, users pick the ICD-10-PCS table to display, which will open to pre-selected codes suggested by GEM and filtered by keywords from the search phrase (e.g., open, laparoscopic, left, right).
  • Users then pick the ICD-10-PCS codes from the table.
  • If a combination of codes is suggested by GEM, users will be shown the additional clusters of codes that may be relevant. Where appropriate, MAGPIE will prompt users for refinement of the SNOMED CT code based on the chosen ICD-10-PCS codes.


diagram of overall schema of MAGPIE search sequence and search methods.
Figure 1: Overall schema of MAGPIE search sequence and search methods.

Example of MAGPIE Search Sequence and Search Methods

  1. Type in "cesarean section" (see Step 1 in Figure 2).
  2. SNOMED CT and ICD-9-CM codes are suggested by default and these codes can be changed if necessary (see Step 2 and Step 3 in Figure 2).

  3. screenshot of MAGPIE search steps 1-3.
    Figure 2: MAGPIE search steps 1-3: Map Assisted Generation of Procedure and Intervention Encoding.

  4. Candidate ICD-10-PCS tables are displayed. ICD-10-PCS codes are pre-populated and filtered in the table view. Highlights prompt users to narrow down selections (see Figure 3).

  5. screenshot of MAGPIE search steps 4-5.
    Figure 3: MAGPIE search steps 4-5: Candidate PCS Tables.

  6. Where appropriate, user is prompted to refine SNOMED CT code based on ICD-10-PCS codes selected (see Figure 4).

  7. screenshot of MAGPIE search steps 6-7.
    Figure 4: MAGPIE search steps 6-7: PCS Procedures and SNOMED CT Refinement prompt.

  8. Final SNOMED CT and ICD-10-PCS codes are displayed in Results panel (see Figure 5).


alt tag goes here.
Figure 5: Results panel for MAGPIE report.

MAGPIE is developed in collaboration with the SNOMED CT to ICD-10-PCS Mapping Project Group under SNOMED International. MAGPIE is made available as an NLM research tool and has not been tested in any real life production environment. We welcome feedback on its usability and suggestions for improvement. Any future development will depend on the level of public interest and availability of resources.

By Kin-Wah Fung
Lister Hill National Center for Biomedical Communications

NLM Technical Bulletin National Library of Medicine National Institutes of Health