improvement: v1 standalone treatment/case creation made possible.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user