> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omophub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FHIR CodeSystem/$find-matches for property search

> Find OMOP concepts by property criteria using FHIR $find-matches - search by ingredient, dose form, lab method, or other coded property attributes.

## Overview

Returns concepts matching a set of property criteria. This is a reverse lookup -- "find me concepts with these characteristics" rather than "look up this specific code."

Maps to OMOPHub's search capabilities with domain, vocabulary, and concept class filters.

## Request

```bash theme={null}
curl -X POST "https://fhir.omophub.com/fhir/r4/CodeSystem/\$find-matches" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "resourceType": "Parameters",
    "parameter": [
      { "name": "system", "valueUri": "http://snomed.info/sct" },
      {
        "name": "property",
        "part": [
          { "name": "code", "valueCode": "domain-id" },
          { "name": "value", "valueCode": "Condition" }
        ]
      }
    ]
  }'
```

<Note>
  `$find-matches` requires structured `property` parameters with `code` and `value` parts. Use POST with a FHIR Parameters body - GET query strings cannot express this structure.
</Note>

## Parameters

| Parameter  | Type      | Required        | Description                                                                |
| ---------- | --------- | --------------- | -------------------------------------------------------------------------- |
| `system`   | uri       | No              | Code system to search within                                               |
| `property` | composite | No (repeatable) | Property criteria (code + value pair). If omitted, returns a broad search. |

### Supported Property Codes

| Property Code      | Description     | Example Value                                   |
| ------------------ | --------------- | ----------------------------------------------- |
| `domain-id`        | OMOP domain     | `Condition`, `Drug`, `Measurement`, `Procedure` |
| `vocabulary-id`    | OMOP vocabulary | `SNOMED`, `ICD10CM`, `LOINC`, `RxNorm`          |
| `concept-class-id` | Concept class   | `Clinical Finding`, `Ingredient`, `Lab Test`    |
| `standard-concept` | Standard status | `S` (Standard), `C` (Classification)            |
| `concept-name`     | Text search     | `diabetes`, `myocardial`                        |

## Response

```json theme={null}
{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "match",
      "part": [
        {
          "name": "concept",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "44054006",
            "display": "Type 2 diabetes mellitus"
          }
        }
      ]
    },
    {
      "name": "match",
      "part": [
        {
          "name": "concept",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "73211009",
            "display": "Diabetes mellitus"
          }
        }
      ]
    }
  ]
}
```
