In OpenEMR, on adding diagnosis form the encounter screen, instead of searching code each time and entering it, is there an option to configure a favourite list or have any one tried about having a favourite list that holds all the ICD codes that more commonly used.
I see favourites under the feesheet, but I look something like the same under the Encounter Diagnosis screen.
Issues tend to cluster depending on type of practice and nature of patient population. So solution has to continuously update itself resulting in clinicians being offered more accurate choices at every stage.
Two parts to this problem are Diagnosis title and actual codes. This is more so with the really long descriptions of ICD10. We found titles to be shorter and many times describing compound conditions e.g. CKD II Sec 2 DM2. These were then associated with a specific ICD10 if available (e.g. E11.22) or multiple codes in a given order.
Previously we had a weekly batch job that would update clickoptions with Top n (title - codes) pairs for the practice by issue type. However the “favorite lists” did not go far enough when you have Google guessing patient’s problem correctly at the end of typing 2nd word!
Our current solution offers Top 10 matches when user starts typing diagnosis title and continues to narrow down for list of titles in the database. If options run out, user enters full title/description.
Once a title is selected, codes box offers Top 15 or less of prior ICD10s related to that title from the database. User entry matches the descriptions and when options run out, switches to searching for entire ICD10 codes. Here is the SQL:
// When issue title is set, offer most commonly used diagnosis codes.
$sql = <<<MATCH_ISSUE_TITLE
SELECT diagnosis, COUNT(diagnosis) FROM code_types ct, lists
WHERE type=? AND title=? AND IFNULL(diagnosis,"")>""
AND ct.ct_active=1 and diagnosis like CONCAT(ct_key,":%")
GROUP BY 1
ORDER BY 2 DESC
LIMIT 15
MATCH_ISSUE_TITLE;
$rs = sqlStatement ( $sql, array ($ltype, $ltitle) );
$iss_diags = array();
while ( $row = sqlFetchArray ( $rs ) ) {
$mdiags = explode(";", $row['diagnosis']);
foreach ($mdiags as $diag) {
$cd_parts = explode(":", $diag);
// Using code value as index to eliminate duplicates
if (count($cd_parts)>1) {
$iss_diags[$cd_parts[1]] = $cd_parts[0];
}
}
}
foreach ($iss_diags as $cd => $cd_type) {
$rs = return_code_information($cd_type,$cd);
while ($rec = sqlFetchArray($rs)) {
$resp [] = array (
"id" => $rec['code_type_name'].":".$rec['code'],
"text" => $rec['code']."-".$rec ['code_text']
);
}
}