when diagnosis codes are central to cohort building, risk adjustment, or reporting
Diagnosis Code Analysis AI Prompt
This prompt helps analysts understand how diagnosis coding is being used across encounters and whether the diagnosis data is analytically reliable. It surfaces coding frequency, major disease categories, specificity problems, invalid codes, and common comorbidity combinations that shape both quality reporting and risk stratification. It is useful for both clinical analytics and revenue-cycle oriented reviews of diagnosis documentation quality.
Analyze the diagnosis codes (ICD-10-CM) in this dataset. 1. Count the total number of unique ICD-10 codes present 2. Show the top 20 most frequent primary diagnoses with code, description, count, and % of encounters 3. Group diagnoses by ICD-10 chapter (first 3 characters) — what are the top 5 disease categories? 4. Check coding quality: - What % of diagnoses use unspecified codes (codes ending in '9' or containing 'unspecified')? High rates suggest poor coding specificity. - Are there any invalid or non-existent ICD-10 codes? - Is there a mix of ICD-9 and ICD-10 codes? 5. Identify the top 10 comorbidity pairs — which two diagnoses most frequently appear together for the same patient? 6. Flag any patients with an unusually high number of diagnosis codes per encounter (>15 codes may indicate upcoding)
When to use this prompt
when you need to assess ICD coding specificity and validity
when you suspect a mix of coding systems or heavy use of unspecified diagnoses
when you want to understand the most common conditions and comorbidity patterns
What the AI should return
A diagnosis coding report with code counts, top primary diagnoses, chapter-level groupings, coding quality checks, comorbidity pairs, and flags for invalid codes, unspecified coding, or unusually dense encounters.
How to use this prompt
Open your data context
Load your dataset, notebook, or working environment so the AI can operate on the actual project context.
Copy the prompt text
Use the copy button above and paste the prompt into the AI assistant or prompt input area.
Review the output critically
Check whether the result matches your data, assumptions, and desired format before moving on.
Chain into the next prompt
Once you have the first result, continue deeper with related prompts in Patient Data Exploration.
Frequently asked questions
What does the Diagnosis Code Analysis prompt do?+
It gives you a structured patient data exploration starting point for healthcare data analyst work and helps you move faster without starting from a blank page.
Who is this prompt for?+
It is designed for healthcare data analyst workflows and marked as intermediate, so it works well as a guided starting point for that level of experience.
What type of prompt is this?+
Diagnosis Code Analysis is a single prompt. You can copy it as-is, adapt it, or use it as one step inside a larger workflow.
Can I use this outside MLJAR Studio?+
Yes. The prompt text works in other AI tools too, but MLJAR Studio is the best fit when you want local execution, visible Python code, and reusable notebooks.
What should I open next?+
Natural next steps from here are Demographics Profile, Lab Values Distribution, Patient Dataset Overview.