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
Add category determination guidelines and refactor report category logic
- Introduced a new section in general.mdc outlining guidelines for determining categories based on keywords.
- Refactored the determineCategory function in reportService.ts to utilize a constant mapping object for improved readability and maintainability.
- Replaced multiple if-else statements with a more efficient approach using Array methods for keyword matching.
Copy file name to clipboardExpand all lines: .cursor/rules/general.mdc
+29-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
description: Follow this rules for every request
3
3
globs:
4
+
alwaysApply: false
4
5
---
5
6
6
7
- Project Proposal Overview: This project proposes an AI-powered medical report translator that simplifies complex medical documents for patients and caregivers. By leveraging AI-driven text extraction and natural language processing (NLP), the system translates medical jargon into plain language, helping users understand their health conditions, diagnoses, and test results without relying on unreliable online searches.
return matchedCategory ? (matchedCategory[0] as Category) : Category.DEFAULT;
153
+
};
154
+
```
155
+
127
156
# Typescript rules
128
157
129
158
- Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.
130
159
131
160
This rule provides clear guidelines on what units to use, how to convert between units, and why it's important for your project. You can add this to your general rules to ensure consistency across the codebase.
132
161
133
-
Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.
0 commit comments