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

@@ -344,9 +344,9 @@ export class AppointmentsService {
private async ensurePatientInOrg(patientId: string, _organizationId: string) {
const patient = await this.prisma.patient.findUnique({
where: { id: patientId },
select: { id: true },
select: { id: true, isWalkIn: true },
});
if (!patient) {
if (!patient || patient.isWalkIn) {
throw new AppException(ErrorCode.PATIENT_NOT_FOUND, HttpStatus.NOT_FOUND);
}
}