Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/diabetes risk prediction enhance prediction quality #49 #56

Merged

Conversation

EveCrystali
Copy link
Owner

  • fix diabetes risk prediction logic to return good result
  • fix SeedPatients to reset initial Test Patients

- rename and refactor `DiabetesRiskPredictionSingleNoteAnalysis` to `DiabetesRiskPredictionNotesAnalysis`
- remove redundant method `DiabetesRiskPredictionNotesAnalysis` that called the refactored method unnecessarily
- update parameters in the refactored method to pass correct values directly to `CountUniqueWordsInNotes`
- propagate changes to `DiabetesRiskPrediction`
- add logs

fixes an issue where `triggersDiabetesRiskFromNotes` was overcounted. previously, notes were analyzed individually despite `CountUniqueWordsInNotes` already accounting for all unique words across a patient's notes, resulting in double counting.
…to 4)

- add logic to seed database with predefined test patients
- ensure test patients are reset to default data at each application start
- handle updates for existing test patients and add missing ones
- use identity_insert to allow manual insertion of specific IDs (1 to 4)
- propagate change in FormatPatient method to handle manual Id

this ensures consistent test data for IDs 1 to 4 while preserving other patient records in the database
@EveCrystali EveCrystali added bug Something isn't working enhancement New feature or request invalid This doesn't seem right labels Nov 14, 2024
@EveCrystali EveCrystali self-assigned this Nov 14, 2024
@EveCrystali EveCrystali merged commit 75b4ba4 into main Nov 14, 2024
1 check passed
Copy link

Copy link

Qodana for .NET

704 new problems were found

Inspection name Severity Problems
Invalid property value 🔴 Failure 122
Unresolved custom property 🔴 Failure 8
Invalid pseudo-selector 🔴 Failure 5
Annotator 🔴 Failure 1
Redundant measure unit 🔶 Warning 36
Auto-property accessor is never used (non-private accessibility) 🔶 Warning 35
Redundant character escape 🔶 Warning 27
Unnecessary non-capturing group 🔶 Warning 15
Missing generic font family name 🔶 Warning 14
Overwritten property 🔶 Warning 8
Unknown property 🔶 Warning 8
Namespace does not correspond to file location 🔶 Warning 7
Dereference of a possibly null reference. 🔶 Warning 6
Possible null reference argument for a parameter. 🔶 Warning 5
Non-nullable member is uninitialized. 🔶 Warning 5
Expression is always 'true' or 'false' according to nullable reference types' annotations 🔶 Warning 5
Conditional access qualifier expression is not null according to nullable reference types' annotations 🔶 Warning 5
Possible performance issues caused by unlimited string length 🔶 Warning 5
Conditional access qualifier expression is known to be null or not null 🔶 Warning 3
Begin or end anchor in unexpected position 🔶 Warning 3
Unused parameter (private accessibility) 🔶 Warning 3
Variable can be declared as non-nullable 🔶 Warning 3
Async function without await expression 🔶 Warning 2
Unknown ID 🔶 Warning 2
Missing required 'lang' attribute 🔶 Warning 2
Invalid XML documentation comment 🔶 Warning 2
Non-accessed field (private accessibility) 🔶 Warning 2
Possible multiple enumeration 🔶 Warning 2
Annotator 🔶 Warning 1
Possible null reference return. 🔶 Warning 1
Expression is always 'true' or always 'false' 🔶 Warning 1
Unused selector 🔶 Warning 1
Empty statement is redundant 🔶 Warning 1
Unknown attribute 🔶 Warning 1
MVC (unknown view) 🔶 Warning 1
Non-accessed local variable only used to discard the 'out' parameter value 🔶 Warning 1
Redundant argument with default value 🔶 Warning 1
Duplicate character in character class 🔶 Warning 1
Type member is never used (private accessibility) 🔶 Warning 1
Unused local variable 🔶 Warning 1
Variable in local function hides variable from outer scope 🔶 Warning 1
Use preferred 'var' style (when type is simple) ◽️ Notice 105
Property can be made init-only (non-private accessibility) ◽️ Notice 40
Use preferred 'var' style (for built-in types) ◽️ Notice 36
Use preferred 'var' style (elsewhere) ◽️ Notice 33
Non-integer length in pixels ◽️ Notice 20
Replace with primary constructor parameter ◽️ Notice 18
RoslynAnalyzers Template should be a static expression ◽️ Notice 14
Invert 'if' statement to reduce nesting ◽️ Notice 10
Regular expression can be simplified ◽️ Notice 8
Type member is never used (non-private accessibility) ◽️ Notice 7
Redundant verbatim string prefix ◽️ Notice 6
Route parameter constraint can be added due to type of method argument ◽️ Notice 6
Use collection expression syntax ◽️ Notice 6
Convert constructor into primary constructor ◽️ Notice 4
Member can be made private (non-private accessibility) ◽️ Notice 4
RoslynAnalyzers Unused route parameter ◽️ Notice 3
Class is never instantiated (non-private accessibility) ◽️ Notice 3
Not all route parameters are passed to method ◽️ Notice 3
Route parameter can be passed to method ◽️ Notice 3
'if' statement can be rewritten as '??=' assignment ◽️ Notice 2
Convert local variable or field into constant (private accessibility) ◽️ Notice 2
Loop can be converted into LINQ-expression ◽️ Notice 2
RoslynAnalyzers Instantiate argument exceptions correctly ◽️ Notice 1
RoslynAnalyzers Named placeholders should not be numeric values ◽️ Notice 1
Class with virtual (overridable) members never inherited (non-private accessibility) ◽️ Notice 1
Convert 'if' statement into 'switch' ◽️ Notice 1
Convert into lambda expression ◽️ Notice 1
Inline temporary variable ◽️ Notice 1
Member can be made static (shared) (non-private accessibility) ◽️ Notice 1
Merge conditional ?: expression into conditional access ◽️ Notice 1
Merge null/pattern/value checks into 'or'/'and' patterns ◽️ Notice 1
Merge null/pattern checks into complex pattern ◽️ Notice 1
Parameter's type can be made stricter due to applied constraints ◽️ Notice 1
Local variable has too wide declaration scope ◽️ Notice 1
Type member is never accessed via base type (non-private accessibility) ◽️ Notice 1
Unused parameter (non-private accessibility) ◽️ Notice 1
Replace if statement with null-propagating code ◽️ Notice 1

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant