code: func (c HealthChecks) AggregatedStatus() string {
  	var passing, warning, critical, maintenance bool
  	for _, check := range c {
  		id := string(check.CheckID)
  		if id == NodeMaint || strings.HasPrefix(id, ServiceMaintPrefix) {
  			maintenance = true
  			continue
  		}
  
  		switch check.Status {
  		case HealthPassing:
  			passing = true
  		case HealthWarning:
  			warning = true
  		case HealthCritical:
  			critical = true
  		default:
  			return ""
  		}
  	}
  
  	switch {
  	case maintenance:
  		return HealthMaint
  	case critical:
  		return HealthCritical
  	case warning:
  		return HealthWarning
  	case passing:
  		return HealthPassing
  	default:
  		return HealthPassing
  	}
  }
docs: // AggregatedStatus returns the "best" status for the list of health checks.
  // Because a given entry may have many service and node-level health checks
  // attached, this function determines the best representative of the status as
  // as single string using the following heuristic:
  //
  //  maintenance > critical > warning > passing
  //