Codes table and ICD10 codes

I have a script that pulls the 100 most used icd10 codes from the billing table. My goal is to have these codes show up in the icd10 section of the ‘select code’ section of the fee sheet.

My script locates the codes in the “codes” table and updates the “superbill” column to “top100” which is the identifier that i use in the service category for the icd10 button.

When i run the script i only get about 50 of the codes showing up in the icd10 section. I checked the “codes” table and sure enough only about 50 of the icd10 codes are in the ‘codes’ table.

I guess the part of oemr that fills the "billing’ table gets the codes from one of the icd10 tables and not the codes table. Which makes me wonder why there are icd10 codes in the codes table except for for showing them in the ‘select code’ section of the fee sheet.

But anyway my main question is, is there any harm in adding the 50 missing icd10 codes to the ‘codes’ table? I’m not sure what type of cascading effect this may have on other parts of oemr.

Anyone have some greater insight into what the ‘codes’ table purpose is and what trouble adding a code there might cause?

Thanks,

hi @bearzillasquatch, usually ICD10 is set up as an external data load and the latest edition of the entire codeset is imported. The fee sheet has a neat feature that calculates the most frequently justified codes and lists them just after any diagnoses that are linked to the encounter when you click on the CPT4 link.

Screenshot from 2023-02-15 22-24-40

On my sandbox server I added the missing codes to the ‘codes’ database table. Other then breaking the rules of data normalization it seems to be working fine in the limited test cases that I did.

Is there any harm in adding these idc10 codes to the ‘codes’ table? And/or is there another method by which to accomplish the original goal without using the ‘codes’ table and just using the icd10 table?

Thanks