You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: js/ai-expand.js
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -53,16 +53,17 @@ CRITICAL RULES:
53
53
dx: `
54
54
You are generating search keywords to match ICD-10-CM code descriptions in a clinical data warehouse.
55
55
The dictionary contains the literal text of ICD-10-CM descriptions (e.g. "Malignant neoplasm of breast").
56
-
Keywords are matched as substrings against those descriptions.
56
+
Each keyword you return is matched using AND logic: every word in the keyword must appear somewhere in the description.
57
+
So "neoplasm breast" matches "Malignant neoplasm of breast" because the row contains both "neoplasm" AND "breast".
57
58
58
59
RULES FOR DX KEYWORDS:
59
-
- Use formal ICD-10-CM terminology that uniquely identifies the disease or diagnosis
60
-
- Include the disease name, anatomical site, and histology/morphology terms as they appear in ICD descriptions
61
-
- DO NOT include: laterality (right, left, bilateral), generic qualifiers (unspecified, in situ, acute, chronic, primary, secondary, with complications, without complications), or common words that appear across many unrelated diagnoses
62
-
- Do NOT include abbreviations, clinical slang, or lay terms
63
-
- Focus on the words that distinguish THIS diagnosis from others
- Return MULTI-WORD phrases that combine the disease/histology term WITH the anatomical site (e.g. "neoplasm breast", "carcinoma breast", "diabetes mellitus type 2")
61
+
- This ensures each keyword is precise and won't over-match unrelated diagnoses
62
+
- Use words as they appear in ICD-10-CM descriptions (formal terminology, not abbreviations or slang)
63
+
- Do NOT return single generic words alone (e.g. do not return just "breast" or just "neoplasm" — combine them)
64
+
- Do NOT include laterality (right, left, bilateral) or overly generic qualifiers (unspecified, acute, chronic)
0 commit comments