<!--
{
  "availability" : [
    "iOS: 15.4.0 -",
    "iPadOS: 15.4.0 -",
    "macCatalyst: 15.4.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKVerifiableClinicalRecordQuery/init(recordTypes:sourceTypes:predicate:resultsHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKVerifiableClinicalRecordQuery(im)initWithRecordTypes:sourceTypes:predicate:resultsHandler:"
  },
  "title" : "init(recordTypes:sourceTypes:predicate:resultsHandler:)"
}
-->

# init(recordTypes:sourceTypes:predicate:resultsHandler:)

Creates a query for one-time access to a verifiable clinical record.

```
init(recordTypes: [String], sourceTypes: [HKVerifiableClinicalRecordSourceType], predicate: NSPredicate?, resultsHandler: @escaping @Sendable (HKVerifiableClinicalRecordQuery, [HKVerifiableClinicalRecord]?, (any Error)?) -> Void)
```

## Parameters

`recordTypes`

The types of records that this query returns. For a list of valid record types, see [`HKVerifiableClinicalRecordCredentialType`](/documentation/HealthKit/HKVerifiableClinicalRecordCredentialType).

`sourceTypes`

The format of the verifiable clinical records. For a list of valid sources, see [`HKVerifiableClinicalRecordSourceType`](/documentation/HealthKit/HKVerifiableClinicalRecordSourceType).

`predicate`

A predicate that limits the results that this query returns. Pass `nil` to receive all records of the specified source and record type.

`resultsHandler`

A block that the HealthKit store calls after it finishes executing the query.

    This block takes the following parameters:

- `query`: A reference to the query that called this block.
- `records`: An array containing the verifiable health records found by the query, or `nil` if an error occurs.
- `error`: If an error occurs, an object describing the error; otherwise, it’s `nil`.

---

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)