Entity to ICD10 mapping


I am a Data Scientist, working with MedCAT and am trying to link the recognized entities to ICD10 codes. Similar to what the demo of MedCAT does (https://medcat.rosalind.kcl.ac.uk/).

I have considered using UMLS MRCONSO.RRF to map the cui(s) of the entities to the ICD10 vocabulary specifically. However, I suspect that it is an incomplete mapping.

I noticed that the demo links the entities to correct ICD10 codes as opposed to the mapping that I am getting based on the same test case cui(s) that I am using.

I was wondering what mapping is used to get the ICD10 codes from the cui(s) in the demo as that would be definitely helpful for my application. I request everyone to respond if you can guide me in any way possible.

Thanks in advance!

Hi @Prajwal_Khairnar !

So In the Demo application we use a UK extension of SNOMED CT provided from NHS TRUD. Inside the SNOMED CT reference files there is a mapping from SNOMED CT to ICD10. Tutorials on how to do this is found in the SNOMED CT tutorials.

As for UMLS and mappings from SNOMED CT (US edition) to ICD10. I would be surprised if it doesn’t contain the correct mapping. I’ll take a look and get back to you.

In the meantime if you want the mapping from snomed to icd10 in a processed format I can send it to you.

1 Like

Hello @anthony.shek!

Thanks for your response. It was quite helpful. I was able to obtain the mapping from SNOMED CT to ICD10. However, I am not able to follow this specific part of the tutorial regarding OPCS4:

I am not sure if the release(s) I am using are the correct UK Editions. I have tried to follow the tutorial using the following releases:

  1. SNOMED CT International
  2. SNOMED CT UK Clinical Edition, RF2: Full, Snapshot & Delta

Can you please guide me regarding this as well? I appreciate your help.

Thanks in advance.

SNOMED CT UK Clinical Edition, RF2: Full, Snapshot & Delta → Is the correct file on NHS TRUD to create a SNOMED UK MedCAT model. This has everything that you need for clinical terms. It includes an international SNOMED CT base & UK clinical ext. Note: for the snomed UK drug terms you will need to merge it with the UK drug extension or uk_sct2dr files.

As for OPCS4:
In a similar way how ICD10 was processed to create a dictionary map of sctid to icd10. {SCITD:[list of icd10 codes]}
The lines of code to map snomed to OPCS4 is as follows:

opcs_df = snomed.map_snomed2opcs4()

opcs_df = opcs_df[opcs_df['refsetId'] == '1126441000000105']

sctid2opcs4 = {k: g["mapTarget"].tolist() for k, g in opcs_df[['referencedComponentId', 'mapTarget']].groupby("referencedComponentId")}

sctid2opcs4 is now in the same structure as sctid2icd10, and you can now proceed to add the mapping to the medcat model.

Our tutorials need to be updated but we’ll make an announcement once we get around to it :slight_smile: