|
@@ -55,7 +55,7 @@ class PatientService extends CrudService {
|
|
|
} else {
|
|
|
console.log(group.patients);
|
|
|
console.log(entity._id);
|
|
|
- const groupPatient = group.patients.filter(fil => fil.patientid === entity._id);
|
|
|
+ const groupPatient = group.patients.find(fil => ObjectId(fil.patientid).equals(entity._id));
|
|
|
if (groupPatient) {
|
|
|
throw new BusinessError(ErrorCode.DATA_EXIST, '已经注册,无需重复注册');
|
|
|
} else {
|