View raw Markdown
type: fhirpath-functionfunction: subsetOfcategory: Existencesection: 5.1.8source: fhirpath/functions.json

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

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)