Patient.telecom.rank.aggregate($total+$this, 0)
Patient.select(telecom.rank.aggregate($total+$this, 0) / telecom.rank.count())
Patient.telecom.rank.aggregate(iif($total.empty(), $this, iif($this < $total, $this, $total)))
These are aggregates from the fhirpath spec