<!--
{
  "availability" : [
    "iOS: 15.4.0 -",
    "iPadOS: 15.4.0 -",
    "macCatalyst: 15.4.0 -",
    "macOS: 13.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKSamplePredicate/clinicalRecord(type:predicate:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "s:9HealthKit17HKSamplePredicateV14clinicalRecord4type9predicateACySo010HKClinicalF0CGSo0I4TypeC_So11NSPredicateCSgtFZ"
  },
  "title" : "clinicalRecord(type:predicate:)"
}
-->

# clinicalRecord(type:predicate:)

Returns a sample predicate that matches clinical record samples.

```
static func clinicalRecord(type clinicalType: HKClinicalType, predicate: NSPredicate? = nil) -> HKSamplePredicate<HKClinicalRecord>
```

## Parameters

`clinicalType`

A type that matches samples that contain clinical record data.

`predicate`

An optional predicate that further restricts the results that the query returns.

## Discussion

Use this method to create an [`HKSamplePredicate`](/documentation/HealthKit/HKSamplePredicate) instance that you can use to query for [`HKClinicalRecord`](/documentation/HealthKit/HKClinicalRecord) objects.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)