|
@@ -16,10 +16,10 @@ class PatientService extends CrudService {
|
|
|
this.chatModel = this.ctx.model.Chat;
|
|
|
}
|
|
|
|
|
|
- async query({ doctorid }, { skip, limit }) {
|
|
|
+ async query({ doctorid, ...query }, { skip, limit }) {
|
|
|
assert(doctorid, 'doctorid不能为空');
|
|
|
- const pdocall = await this.pDocs.find({ doctorid });
|
|
|
- const pdoc = await this.pDocs.find({ doctorid }).limit(limit).skip(skip);
|
|
|
+ const pdocall = await this.pDocs.find({ doctorid, ...query });
|
|
|
+ const pdoc = await this.pDocs.find({ doctorid, ...query }).limit(limit).skip(skip);
|
|
|
const patients = [];
|
|
|
for (const el of pdoc) {
|
|
|
const patient = await this.model.findById(el.patientid);
|