---
title: "init(recordTypes:sourceTypes:predicate:resultsHandler:)"
framework: healthkit
role: symbol
role_heading: Initializer
path: "healthkit/hkverifiableclinicalrecordquery/init(recordtypes:sourcetypes:predicate:resultshandler:)"
---

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

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

## Declaration

```swift
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 doc://com.apple.healthkit/documentation/HealthKit/HKVerifiableClinicalRecordCredentialType.
- `sourceTypes`: The format of the verifiable clinical records. For a list of valid sources, see doc://com.apple.healthkit/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:

## See Also

### Creating Queries

- [init(recordTypes:predicate:resultsHandler:)](healthkit/hkverifiableclinicalrecordquery/init(recordtypes:predicate:resultshandler:).md)
