FHIRPath Function: subsetOf
Returns true if all items in the input collection are members of the collection passed as the other argument. Membership is determined using the equals (=) operation.
Conceptually, this function is evaluated by testing each item in the input collection for membership in the other collection, with a default of true. This means that if the input collection is empty ({ }), the result is true, otherwise if the other collection is empty ({ }), the result is false.
The following example returns true if the tags defined in any contained resource are a subset of the tags defined in the MedicationRequest resource:
MedicationRequest.contained.meta.tag.subsetOf(MedicationRequest.meta.tag)
Summary
- Category: Existence
- Section:
5.1.8 - Return Type:
Boolean - Empty Input Result:
true - Errors on Multiple Input:
false
Description
Returns true if all items in the input collection are members of the collection passed as the other argument. Membership is determined using the equals (=) operation.
Arguments
Type Mapping
Example
MedicationRequest.contained.meta.tag.subsetOf(MedicationRequest.meta.tag)