<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKQuery/predicateForUserAnnotatedMedications(hasSchedule:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKQuery(cm)predicateForUserAnnotatedMedicationsWithHasSchedule:"
  },
  "title" : "predicateForUserAnnotatedMedications(hasSchedule:)"
}
-->

# predicateForUserAnnotatedMedications(hasSchedule:)

```
class func predicateForUserAnnotatedMedications(hasSchedule: Bool) -> NSPredicate
```

## Parameters

`hasSchedule`

The schedule status of the medication. Ex: True will match medications that have a reminders schedule set up in the Health App.

## Discussion

\abstract Creates a predicate for use with HKUserAnnotatedMedicationQuery.
\discussion Creates a query predicate that matches HKUserAnnotatedMedication objects that match the schedule status specified.

---

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)