Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/middleware/batchAuthMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function authenticateBatchOperation(

// 4. Validate request size (batch operations can be large)
const MAX_PAYLOAD_SIZE = 10 * 1024 * 1024; // 10MB
const contentLength = parseInt(req.get("content-length") || "0", 10);
const contentLength = parseInt(req.get("content-length", 10) || "0", 10);
if (contentLength > MAX_PAYLOAD_SIZE) {
const userId = req.session.user.id;
logger.warn(
Expand Down
2 changes: 1 addition & 1 deletion server/routes/upload.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ uploadRouter.post(
...row,
hypertension: hypertensionVal === 'true' || hypertensionVal === 'yes' || hypertensionVal === '1',
heartDisease: heartDiseaseVal === 'true' || heartDiseaseVal === 'yes' || heartDiseaseVal === '1',
age: parseInt(String(row.age ?? ''), 10) || 0,
age: parseInt(String(row.age ?? '', 10), 10) || 0,
bmi: parseFloat(String(row.bmi ?? '')) || 0,
hba1cLevel: parseFloat(String(row.hba1cLevel ?? '')) || 0,
bloodGlucoseLevel: parseFloat(String(row.bloodGlucoseLevel ?? '')) || 0,
Expand Down
2 changes: 1 addition & 1 deletion server/services/clinical-attention-navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function buildPriority(factor: string, priority: "high" | "moderate" | "monitor"
}

function admissionPriority(value: number | undefined, threshold: number, keyLabel: string): "high" | "moderate" | "monitor" {
if (value == null || Number.isNaN(value)) return "monitor";
if (value === null || Number.isNaN(value)) return "monitor";
if (value >= threshold * 1.25) return "high";
if (value >= threshold) return "moderate";
return "monitor";
Expand Down
2 changes: 1 addition & 1 deletion server/services/mlService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ const activeInferenceRequests = new Set<string>();
function canonicalStringify(obj: unknown): string {
if (obj === null || typeof obj !== "object") return JSON.stringify(obj);
if (Array.isArray(obj)) return "[" + obj.map(canonicalStringify).join(",") + "]";
const keys = Object.keys(obj as Record<string, unknown>).sort();
const keys = Object.keys(obj as Record<string, unknown>).sort((a, b) => a - b);
const pairs = keys.map(k => JSON.stringify(k) + ":" + canonicalStringify((obj as Record<string, unknown>)[k]));
return "{" + pairs.join(",") + "}";
}
Expand Down
Loading