--- type: "fhirpath-function" title: "FHIRPath Function: supersetOf" function: "supersetOf" category: "Existence" section: "5.1.9" source: "fhirpath/functions.json" --- # FHIRPath Function: supersetOf Returns `true` if all items in the collection passed as the `other` argument are members of the input collection. Membership is determined using the [equals](#equals) (`=`) operation. Conceptually, this function is evaluated by testing each item in the `other` collection for membership in the input collection, with a default of `true`. This means that if the `other` collection is empty (`{ }`), the result is `true`, otherwise if the input collection is empty (`{ }`), the result is `false`. The following example returns `true` if the tags defined in any contained resource are a superset of the tags defined in the MedicationRequest resource: ``` fhirpath MedicationRequest.contained.meta.tag.supersetOf(MedicationRequest.meta.tag) ``` ## Summary - **Category**: Existence - **Section**: `5.1.9` - **Return Type**: `Boolean` - **Empty Input Result**: `true` - **Errors on Multiple Input**: `false` ## Description Returns `true` if all items in the collection passed as the `other` argument are members of the input collection. Membership is determined using the equals (`=`) operation. ## Arguments - `other`: `collection` - Collection to check membership against ## Type Mapping - `Any-Boolean` ## Example ```fhirpath MedicationRequest.contained.meta.tag.supersetOf(MedicationRequest.meta.tag) ```