我有一个问题,我想对所包含的数据应用过滤器,但它无效
这是方案
API:
/patient/257?include=patientdiagnosis&filter[patientdiagnosis.IsDeleted]=0
或
/patient/257?include=patientdiagnosis&filter[patientdiagnosis.IsDeleted]=false
但作为回应,我没有得到过滤数据
包含数据
"included": [ { "type": "patient-diagnosis", "id": "17", "attributes": { "PatientDiagnosisId": 17, "PatientID": 257, "ICDID": 2, "IsActive": false, "DiagnosisDate": "0001-01-01T00:00:00", "CreatedDate": "2017-08-25T03:37:46.0239768", "CreatedBy": 1, "UpdatedBy": null, **"IsDeleted": true**, "DeletedBy": null },
答案 0 :(得分:0)
include
参数旨在包含主数据的所有相关资源。如果您的意思是获取患者257尚未删除的所有patient-diagnosis
资源,也许您应该采用另一种方式构建您的请求:
/patient/257/patient-diagnosis?filter[isdeleted]=false&include=patient