View raw Markdown
type: fhirpath-functionfunction: distinctcategory: Existencesection: 5.1.11source: fhirpath/functions.json

FHIRPath Function: distinct

Returns a collection containing only the unique items in the input collection. To determine whether two items are the same, the equals (=) operator is used, as defined below.

If the input collection is empty ({ }), the result is empty.

Note that the order of items in the input collection is not guaranteed to be preserved in the result.

The following example returns the distinct list of tags on the given Patient:

Patient.meta.tag.distinct()

Summary

Description

Returns a collection containing only the unique items in the input collection. To determine whether two items are the same, the equals (=) operator is used.

Arguments

Type Mapping

Example

Patient.meta.tag.distinct()