improvement: v1 standalone treatment/case creation made possible.

This commit is contained in:
2026-08-19 15:05:58 +03:30
parent e5c39c6b7e
commit 8bfa8c88fe
39 changed files with 3296 additions and 387 deletions

View File

@@ -1243,6 +1243,7 @@ export class TodayService {
},
select: {
destinationOrganizationId: true,
partnerClinicOrganizationId: true,
tasks: { select: { status: true } },
treatment: { select: { organizationId: true } },
},
@@ -1254,7 +1255,7 @@ export class TodayService {
const partnerId =
orgType === 'CLINIC'
? labCase.destinationOrganizationId
: labCase.treatment.organizationId;
: labCase.treatment?.organizationId ?? labCase.partnerClinicOrganizationId;
if (!partnerId) continue;
const isCompleted =