filters field accepts a list of system-scoped filter objects, one per coding system:
Condition groups
The condition groups used ininclude and exclude combine conditions with AND or OR logic. A ConditionGroup has two fields:
Conditions
Each condition has the following fields:op supports:
is-aanddescendent-ofonly apply to thecodeproperty. Using them on any other property returns a 400 error.is-aandinaccept arrays, so usevalue: ["E11", "E13"]instead ofmatch: "any"with multiple conditions on the same property.
Filterable properties
Additional properties exist on some systems’ code models but are not officially supported and may change. If you need to filter on a property not listed here, contact us.
Examples
AND: match all
SNOMED-CT
SNOMED-CT
Predict diabetes mellitus SNOMED-CT codes AND limit results to codes with semantic tag “disorder”
OR: match any
SNOMED-CT
SNOMED-CT
Predict SNOMED-CT codes for diabetes OR any procedure codes
Nested groups: mixed AND/OR
SNOMED-CT
SNOMED-CT
Predict SNOMED-CT codes for diabetes disorders OR hypertension findings
Specific inclusion/exclusion criteria
ICD-10-CM
ICD-10-CM
Limit code predict results to type 2 diabetes mellitus (E11) and its descendants, but never the specific code for diabetes with hyperosmolarity (E11.00) or diabetes with hyperosmolarity with coma (E11.01)
Hierarchy filtering
ICD-10
ICD-10
Predict ICD-10 codes for diabetes mellitus (E11), but do not include results that are descendants of diabetes with hyperosmolarity (E11.0)
SNOMED-CT
SNOMED-CT
Filter SNOMED-CT concepts by See SNOMED CT for the full list of supported
semantic_tag, the clinical category a concept belongs to. Use op: "in" to restrict predictions to one or more categories:semantic_tag values.Multi-system requests
SNOMED-CT and ICD-10-CM
SNOMED-CT and ICD-10-CM
When requesting multiple coding systems in a single request, provide one filter object per system. Each system only applies its own filter:The SNOMED-CT system only applies the
semantic_tag filter, and the ICD-10-CM system only applies the is-a E11 filter. Each system ignores filters scoped to other systems.Empty filter
Omit thefilters field entirely for open-ended prediction. The API predicts across the full coding system.
Filter validation
Filter conditions are validated before prediction runs. A request is rejected with a 400 error if:propertyisn’t a supported attribute for the coding system (code, or a system-specific attribute likesemantic_tag).valuedoesn’t match the typeopexpects: a string or list of strings foris-a/descendent-of, a boolean forexists, a list forin.is-aordescendent-ofis used on a property other thancode.- A code referenced in a condition (directly, or as the ancestor in an
is-a/descendent-ofcondition) doesn’t exist in the coding system. - An attribute value doesn’t match any known value for that property (e.g.
semantic_tagset to an unsupported value). - A
ConditionGrouphas an emptyconditionsarray. ConditionGroupnesting exceeds depth 3.
When requesting multiple coding systems, each system validates only its own filter. A filter for a system that isn’t in the
system field is ignored. If a system has no corresponding filter object, no filtering is applied to it.Error response
semantic_tag on ICD-10-CM or CPT fails validation because those systems do not define a semantic_tag attribute. See Errors for the full error response shape.
Please contact us if you need help configuring your requests or have questions about advanced usage.