What is everyone doing to populate missing ICD10 codes in the problems list? If I understand correctly, GE's solution is to use the ICD10 preload form which is a lot of work on or MA's.
We ran a query on the DB to find the top problems that do not have ICD10 codes on them and were thinking about updating them using sql. I just ran the following SQL query in our test environment and so far it seems to have worked for the problem in it.
update problem set icd10masterdiagnosisid = (select masterdiagnosisid from masterdiagnosis where code = 'Z79.899')
where problem.code = 'ICD-V58.69'
and PROBLEM.ICD10MASTERDIAGNOSISID is null
and problem.description = 'TAKING HIGH-RISK MEDICATION'
Does anyone have any thoughts or a better solution?
I am interested as well
I'm doing this. I also always run it in a transaction so I make sure I get the right about then I'll change the rollback to a commit and run it again.
--Blank Update
BEGIN TRAN;
UPDATE dbo.PROBLEM
SET ICD10MasterDiagnosisId = ( SELECT MasterDiagnosisId
FROM MasterDiagnosis
WHERE Code LIKE ''
AND CodeType = 8 --ICD10 Code Type
)
WHERE ICD9MasterDiagnosisId = ( SELECT MasterDiagnosisId
FROM MasterDiagnosis
WHERE Code LIKE ''
AND CodeType = 1 --ICD9 Code Type
)
AND ICD10MasterDiagnosisId IS NULL;
ROLLBACK TRAN;
--COMMIT TRAN;
Here is an example in action
BEGIN TRAN;
UPDATE dbo.PROBLEM
SET ICD10MasterDiagnosisId = ( SELECT MasterDiagnosisId
FROM MasterDiagnosis
WHERE Code LIKE 'D12.6'
AND CodeType = 8 --ICD10 Code Type
)
WHERE ICD9MasterDiagnosisId = ( SELECT MasterDiagnosisId
FROM MasterDiagnosis
WHERE Code LIKE '211.3'
AND CodeType = 1 --ICD9 Code Type
)
AND ICD10MasterDiagnosisId IS NULL
AND DESCRIPTION NOT LIKE 'NEOP, BNG, LARGE INTESTINE'
AND DESCRIPTION NOT LIKE 'SIGMOID POLYP'
AND DESCRIPTION NOT LIKE 'FAMILIAL ADENOMATOUS POLYPOSIS'
AND DESCRIPTION NOT LIKE 'NEOP, BNG, LARGE INTESTINE'
AND DESCRIPTION NOT LIKE 'ANGIOECTASIA OF CECUM'
AND DESCRIPTION NOT LIKE 'COLON RESECTION'
AND DESCRIPTION NOT LIKE 'DUODENAL ADENOMA'
AND DESCRIPTION NOT LIKE '%SIGMOID%';
ROLLBACK TRAN;
--COMMIT TRAN;
Here is another helpful query which will count descriptions for you. You and add AND's to you where clause then take those and use it for the update queries I already posted.
SELECT COUNT(*) AS Count ,
p.DESCRIPTION ,
p.QUALIFIER
FROM PROBLEM p
INNER JOIN MasterDiagnosis md9 ON p.ICD9MasterDiagnosisId = md9.MasterDiagnosisId
WHERE md9.Code = ''
GROUP BY p.DESCRIPTION ,
p.QUALIFIER
ORDER BY COUNT(*) DESC ,
p.DESCRIPTION;
This is just a query that will show patients for you.
SELECT pp.PatientId ,
pp.First ,
pp.Last ,
p.QUALIFIER ,
p.CODE ,
p.DESCRIPTION ,
p.ICD9MasterDiagnosisId ,
p.ICD10MasterDiagnosisId ,
p.SNOMEDMasterDiagnosisId
FROM PROBLEM p
INNER JOIN MasterDiagnosis md9 ON p.ICD9MasterDiagnosisId = md9.MasterDiagnosisId
INNER JOIN PatientProfile pp ON p.PID = pp.PId
WHERE md9.Code = ''
AND ICD10MasterDiagnosisId IS NULL
ORDER BY DESCRIPTION;
The query I am using to decide which problems need to be updated is below. It is modified from a query from another chug thread recently.
select count(p.pid),p.Code,p.DESCRIPTION, md9.Code as md9Code, md10.Code as md10Code
from PERSON patient
JOIN PROBLEM p on patient.PID = p.PID
left join MasterDiagnosis md9 on p.ICD9MASTERDIAGNOSISID=md9.MasterDiagnosisId
left join MasterDiagnosis md10 on p.ICD10MasterDiagnosisId=md10.MasterDiagnosisId
where(NOT p.code LIKE '%CPT%' or p.code is null)
and md10.MasterDiagnosisId is null
group by (p.Code),p.DESCRIPTION, md9.Code, md10.Code
order by count(p.pid) desc
Is this query for Oracle or SQL Server ?
Both of mine are for Microsoft SQL.
We used this one to find what we needed to address
--Count Problems with Blank ICD10 Codes by description - See Notes
SELECT COUNT(*) AS #, p.DESCRIPTION AS Chart_Description, md.Code, md.ShortDescription, md.LongDescription
FROM PROBLEM p
FULL OUTER JOIN PatientProfile pp ON p.PID = pp.PId
FULL OUTER JOIN DoctorFacility df ON pp.DoctorId = df.DoctorFacilityId
FULL OUTER JOIN dbo.DoctorFacility dff ON pp.FacilityId = dff.DoctorFacilityId
FULL OUTER JOIN dbo.MasterDiagnosis md ON p.ICD9MasterDiagnosisId = md.MasterDiagnosisId
WHERE p.ICD10MasterDiagnosisId IS NULL --ICD10 is Blank
AND (p.STOPREASON IS NULL OR p.STOPREASON LIKE '') --Null stop reason or blank stop reason
AND pp.DoctorId IS NOT NULL --Has Doctor
AND pp.DeathDate IS NULL --No Death Date
AND p.ICD9MasterDiagnosisId IS NOT NULL --Has ICD9MasterDiagnosisId
GROUP BY p.DESCRIPTION, md.Code, md.ShortDescription, md.LongDescription
ORDER BY # DESC;
Mine are all written for Oracle, but I do not see anything in them that would not work in SQL.
It looks like Bovie's SQL would work in Oracle as well as long as you removed the BEGIN TRAN, ROLLBACK TRAN and COMMIT TRAN lines from the code. (or you could replace them with START TRANSACTION, ROLLBACK, and COMMIT)