Skip to content

Commit

Permalink
Fixed performance issue of feature tab
Browse files Browse the repository at this point in the history
  • Loading branch information
rupali-inflection committed Dec 12, 2024
1 parent cee35d2 commit 4c509c7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
17 changes: 17 additions & 0 deletions src/routes/users/[userId]/home/feature-engagement/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,26 @@ export const load: PageServerLoad = async (event: RequestEvent) => {
event
);
}
const data = response.Data;
const medicationManagementdata = data.MedicationManagementMetrics?.[0] ?? {};
const healthJourneyWiseTask = data.HealthJourneyMetrics?.CareplanSpecific?.HealthJourneyWiseTask ?? [];
const healthJourneyWiseCompletedTask =
data.HealthJourneyMetrics?.CareplanSpecific?.HealthJourneyWiseCompletedTask ?? [];
const overallHealthJourneyTaskData = data.HealthJourneyMetrics?.Overall ?? {};
const patientTaskMetrics = data.PatientTaskMetrics ?? {};
const vitalMetrics = data.VitalMetrics ?? [];
const assessmentMetrics = data.AssessmentMetrics ?? {};

return {
sessionId,
statistics: response.Data,
medicationManagementdata,
healthJourneyWiseTask,
healthJourneyWiseCompletedTask,
overallHealthJourneyTaskData,
patientTaskMetrics,
vitalMetrics,
assessmentMetrics,
title:'Dashboard-Home-Feature'
};
};
14 changes: 7 additions & 7 deletions src/routes/users/[userId]/home/feature-engagement/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
export let data;
let medicationManagementdata = data.statistics.MedicationManagementMetrics?.[0] ?? {};
let healthJourneyWiseTask = data.statistics.HealthJourneyMetrics?.CareplanSpecific?.HealthJourneyWiseTask ?? [];
let medicationManagementdata = data.medicationManagementdata ?? {};
let healthJourneyWiseTask = data.healthJourneyWiseTask ?? [];
let healthJourneyWiseCompletedTask =
data.statistics.HealthJourneyMetrics?.CareplanSpecific?.HealthJourneyWiseCompletedTask ?? [];
let overallHealthJourneyTaskData = data.statistics.HealthJourneyMetrics?.Overall ?? {};
let patientTaskMetrics = data.statistics.PatientTaskMetrics ?? {};
let vitalMetrics = data.statistics.VitalMetrics ?? [];
let assessmentMetrics = data.statistics.AssessmentMetrics ?? {};
data.healthJourneyWiseCompletedTask ?? [];
let overallHealthJourneyTaskData = data.overallHealthJourneyTaskData ?? {};
let patientTaskMetrics = data.patientTaskMetrics ?? {};
let vitalMetrics = data.vitalMetrics ?? [];
let assessmentMetrics = data.assessmentMetrics ?? {};
healthJourneyWiseTask = (healthJourneyWiseTask ?? []).map((task) => {
const completedTask = (healthJourneyWiseCompletedTask ?? []).find(
Expand Down

0 comments on commit 4c509c7

Please sign in to comment.