{
  "name": "query/af/document/document_query_reclamation.json",
  "database": "4d",
  "parameter": {
    "no_empty_parameter": ["reclamation"],
    "state": 0,
    "reclamation": "",
    "subquery": "SELECT SUBSTRING(link2, 4) FROM _link WHERE (link1 = (SELECT CONCAT('rcl_', record_id) FROM reclamation WHERE reclamation_id = '{{reclamation}}')) AND link2 LIKE 'af_%'"
  },
  "query": [
    ["af_record_id", "in", "subquery"], "and",
    ["af_state",  ">=", "state"]
  ]
}
