Apply clinic lab workflow feedback

This commit is contained in:
egecankomur
2026-07-15 22:13:01 +03:00
parent ac42681f7e
commit f44e07f378
9 changed files with 478 additions and 119 deletions
@@ -39,6 +39,7 @@ class ClinicJobsRepository {
perPage: limit,
filter: filterParts.join(' && '),
expand: _listExpand,
sort: '-created',
);
return (result.items.map((r) => Job.fromJson(r.toJson())).toList()
..sort((a, b) => b.dateCreated.compareTo(a.dateCreated)));
@@ -136,14 +137,14 @@ class ClinicJobsRepository {
'location': 'at_lab',
});
final updated = Job.fromJson(record.toJson());
unawaited(JobHistoryService.instance.append(
await JobHistoryService.instance.append(
jobId: jobId,
clinicTenantId: job.clinicTenantId,
labTenantId: job.labTenantId,
action: JobHistoryAction.revisionRequested,
step: job.currentStep,
note: note,
));
);
return updated;
}
@@ -195,6 +196,7 @@ class ClinicJobsRepository {
filter: 'patient_id = "$patientId"',
perPage: limit,
expand: _listExpand,
sort: '-created',
);
return (result.items.map((r) => Job.fromJson(r.toJson())).toList()
..sort((a, b) => b.dateCreated.compareTo(a.dateCreated)));