Skip to content

Commit 924fbb2

Browse files
committed
refactor: Rename 'isNormal' field to 'status' in MedicalDocumentAnalysis and Report models for consistency
1 parent 418db7c commit 924fbb2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

backend/src/document-processor/services/aws-bedrock.service.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ vi.mock('@aws-sdk/client-bedrock-runtime', () => {
7777
value: '14.2',
7878
unit: 'g/dL',
7979
normalRange: '13.5-17.5',
80-
isNormal: 'normal',
80+
status: 'normal',
8181
conclusion:
8282
'Normal hemoglobin levels indicate adequate oxygen-carrying capacity.',
8383
suggestions: 'Continue regular health maintenance.',
@@ -143,7 +143,7 @@ describe('AwsBedrockService', () => {
143143
value: '14.2',
144144
unit: 'g/dL',
145145
normalRange: '13.5-17.5',
146-
isNormal: 'normal',
146+
status: 'normal',
147147
conclusion: 'Normal hemoglobin levels indicate adequate oxygen-carrying capacity.',
148148
suggestions: 'Continue regular health maintenance.',
149149
},

backend/src/document-processor/services/aws-bedrock.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface MedicalDocumentAnalysis {
2020
value: string;
2121
unit: string;
2222
normalRange: string;
23-
isNormal: 'normal' | 'high' | 'low';
23+
status: 'normal' | 'high' | 'low';
2424
conclusion: string;
2525
suggestions: string;
2626
}>;
@@ -62,7 +62,7 @@ Format the response as a JSON object with the following structure:
6262
"title": string,
6363
"category": string,
6464
"keyMedicalTerms": [{"term": string, "definition": string}],
65-
"labValues": [{"name": string, "value": string, "unit": string, "normalRange": string, "isNormal": "normal" | "high" | "low", "conclusion": string, "suggestions": string}],
65+
"labValues": [{"name": string, "value": string, "unit": string, "normalRange": string, "status": "normal" | "high" | "low", "conclusion": string, "suggestions": string}],
6666
"diagnoses": [{"condition": string, "details": string, "recommendations": string}],
6767
"metadata": {
6868
"isMedicalReport": boolean,
@@ -86,7 +86,7 @@ This is extremely important: If you see ANY lab values, numbers with units, or m
8686
When extracting lab values:
8787
1. Look for tables with numeric values and reference ranges
8888
2. Include any values even if you're not sure of the meaning
89-
3. For each lab value, use "isNormal" field with values "normal", "high", or "low" based on whether the value falls within, above, or below the normal range
89+
3. For each lab value, use "status" field with values "normal", "high", or "low" based on whether the value falls within, above, or below the normal range
9090
4. Include a "conclusion" field that provides a brief interpretation of what this value indicates about the patient's health
9191
5. Include a "suggestions" field that provides brief recommendations based on this value
9292
@@ -144,7 +144,7 @@ CORRECT FORMAT (DO THIS):
144144
"value": "14.2",
145145
"unit": "g/dL",
146146
"normalRange": "13.5-17.5",
147-
"isNormal": "normal",
147+
"status": "normal",
148148
"conclusion": "Normal hemoglobin levels indicate adequate oxygen-carrying capacity.",
149149
"suggestions": "Continue regular health maintenance."
150150
}

backend/src/reports/models/report.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class Report {
3030
value: string;
3131
unit: string;
3232
normalRange: string;
33-
isNormal: 'normal' | 'high' | 'low';
33+
status: 'normal' | 'high' | 'low';
3434
conclusion: string;
3535
suggestions: string;
3636
}>;

0 commit comments

Comments
 (0)