OHDSI Home | Forums | Wiki | Github

Historic HCPCS and CPT4 codes

@dblatt:

Your confidence in my memory is impressive. :slight_smile: But I don’t. Have you guys dropped a list of ancient codes somewhere? @aostropolets needs you to fish them out of the old data, because the AMA or the CMS don’t carry old deprecated codes. They let them disappear. As horrible that is from an ontology management perspective, I have empathy with them because unless they totally annihilate the codes some dumb*** will keep using them.

Something like the following. Please run on your data:

-- Fishing HCPCS (1 letter, 4 digits):
select h.<code>, h.<description>, min(h.<date_stamp>) as start_date, max(h.<date_stamp>) as end_date 
from (
	select 
		t.<code>, -- the field containing the code
		t.<description>, -- the field containing the description
		t.<date_stamp>, -- the field containing the time stamp
		substr(t.<code>, 1, 1) as l, 
		substr(t.<code>, 2, 1) as n1,
		substr(t.<code>, 3, 1) as n2,
		substr(t.<code,> 4, 1) as n3,
		substr(t.<code>, 5, 1) as n4
	from <your source table> as t-- where you are fishing, containing the fields code, description and date_stamp
	left join concept as c on concept_code=t.<code>
	where length(t.<code>)=5 -- is 5 letters long
	and c.concept_id is null -- can't find it in the vocabulary
) as h
where h.l>='A' and h.l<='Z' 
and h.n1>='0' and h.n1<='9'
and h.n2>='0' and h.n2<='9'
and h.n3>='0' and h.n3<='9'
and h.n4>='0' and h.n4<='9'
group by h.<code>, h.<description>
;

-- Fishing CPT-4 (3 digits and 2 alphanumerics)
select h.<code>, h.<description>, min(h.<date_stamp>) as start_date, max(h.<date_stamp>) as end_date 
	select
		t.<code>, -- the field containing the code
		t.<description>, -- the field containing the description
		t.<date_stamp>, -- the field containing the time stamp
	substr(t.<code>, 1, 1) as n1,
	substr(t.<code>, 2, 1) as n2,
	substr(t.<code>, 3, 1) as n3,
	substr(t.<code>, 4, 1) as l1,
	substr(t.<code>, 5, 1) as l2
	from <your source table> as t-- where you are fishing, containing the fields code, description and date_stamp
	left join concept as c on concept_code=t.<code>
	where length(t.<code>)=5 -- is 5 letters long
	and c.concept_id is null -- can't find it in the vocabulary
) as h
where h.n1>='0' and h.n1<='9'
	and h.n2>='0' and h.n2<='9'
	and h.n3>='0' and h.n3<='9'
	and (h.l1>='A' and h.l1<='Z' or h.l1>='0' and h.l1<='9') 
	and (h.l2>='A' and h.l2<='Z' or h.l2>='0' and h.l2<='9')
group by h.<code>, h.<description>
;

@Christian_Reich @aostropolets I may still have the file and/or can regenerate per the above spec. Will let you know!

1 Like

Just tweaked these queries and ran them against our data. Looks like we have a fair amount of them in our source data - @aostropolets, @Christian_Reich, how would you like me to send them over?

1 Like

Just out of curiosity, I found 883 CPT4 and 2,010 HCPCS codes in a versioned non-CDM code database I keep that were not found in a recently installed CONCEPT. If interested, I can email directly. --Jeff

1 Like

@esholle, @jeffmillstein Great! You can send them to anna.ostropolets@odysseusinc.com

@aostropolets I met with the NCI/SEER about the Observational Research in Oncology Toolbox. They were saying that they have worked with CMS and the CanMED database contains all Cancer-related Drug HCPCS back to 1978. See here:
https://seer.cancer.gov/oncologytoolbox/canmed/hcpcs/. Perhaps it might give you some more that are missing.

I posted this before, but attached are all of the HCPCS codes back to 2000 that I got from CMS.
Retired AN_HCPC with Term Date GT 01_01_2000.xlsx (113.1 KB)

2 Likes

@Christian_Reich @aostropolets where are we sending the “fish” ?

@Christian_Reich @aostropolets I posted the file to

Thanks a lot to all of you! We’ll work on them and let you know when ready.
@Mark_Danese you don’t have the time frames for you codes, only the dates they appeared in the source data, correct?

CMS only gave us the end date. It took a lot of emails just to get this, so I don’t think we will get any more detail. It should be a complete list (except dental codes) from 2000 and later.

Ha! So that’s the end date? Sounds perfect! :smile:
And thanks for ’ lot of emails’ again.

Hi,

We also have historic codes in addition to HCPCS and CPT4, for example:
ICD10PCS, ICD10CM, NDC, LOINC, SNOMED, DRG, APC, CIEL, DPD, Read, NDFRT, Mesh

Should we post all of them here?

Thanks,
Amy

@amy_chuang:

Bring them on, please. Same thing: code, name, timing.

Hi @Christian_Reich,

Here is the list of invalid concepts those can not be mapped to valid ones, There are no concept names for CPT4 as I posted in another thread about missing concept names issue for cpt4 codes.

Thanks,
AmyInvalid Concepts.xlsx (33.6 KB)

Thanks, Amy. I checked a couple of CPT4: they are standard and valid.
And how come you have DPD? Have you worked with this vocabulary?

Thanks Anna for checking on this. Would you please send me a few codes that you found which are standard and valid.
I will look into DPD codes and get back to you.

Thanks,
Amy

CPT4, randomly: 40756908, 2110800, 2103493; seems like all your CPTs just don’t have the names but are standard.
SNOMED: 40314677,4115343 have relationships to standard ones.
Although deprecated concepts with no mapping to standard ones in another big problem, here we focus on those CPT4 and HCPCS that aren’t in the concept table as the sources have never given them to us

Hi Anna,

For CPT4

  • 40756908: Standard but expired : end date is 2017-05-07, Maps to/ Maps from itself in concept_relationship
  • 2110800: Standard but expired : end date is 2014-04-15, Maps to/ Maps from itself in concept_relationship
  • 2103493: Standard but expired : end date is 2015-05-10, Maps to/ Maps from itself in concept_relationship
    For SNOMED:
  • 40314677: Non Standard and expired : end date is 2018-01-30 and No map to in concept_Relationship table.
  • 4115343: Non Standard and expired : end date is 2018-01-30 and No map to in concept_Relationship table.

Thanks,
Amy

@amy you might be using an outdated version.
For instance, http://athena.ohdsi.org/search-terms/terms/40314677

t