From ProfilesGroupRuleset.schema.yaml (einstein/ProfilesGroupRuleset.schema
)
---
$id: https://skeleton.botmd.io/einstein/ProfilesGroupRuleset.schema
$schema: http://json-schema.org/draft-07/schema#
title: Profiles Group Ruleset
description: Define rules to return a subset of profiles. Used for broadcast groups, etc.
type: object
additionalProperties: false
anyOf:
- required: [uid]
- required: [directory_profile_uids]
- required: [profile_uids]
- required: [filters]
- required: [all_active]
properties:
uid:
title: UID
description: UID of the `ProfilesGroup` this ruleset is derived from. If not set, it means that the ruleset is a custom one.
type: string
minLength: 1
name:
title: Name
description: Name of this ruleset.
type: string
minLength: 1
description:
title: Description
description: Description of this ruleset.
type: string
from_model_on:
title: From Model On
description: Date/time where this ProfilesGroupRuleset is initialized from a `ProfilesGroup` model instance.
type: string
format: date-time
all_active:
title: All Active
description: If `true`, then all active profiles are returned for this ruleset. This field is mutually exclusive to the other rule fields. Defaults to `false`.
type: boolean
directory_profile_uids:
title: Directory Profile UIDs
description: UID of directory profiles that is part of this ruleset.
type: array
minItems: 1
uniqueItems: true
items:
type: string
minLength: 1
profile_uids:
title: Profile UIDs
description: UID of profiles that is part of this ruleset.
type: array
minItems: 1
uniqueItems: true
items:
type: string
minLength: 1
filters:
title: Filter
description: Additional filters for profiles that is part of this ruleset. The presence of this field implies a `dynamic` ProfileGroupType.
type: object
anyOf:
- required: [department__in]
- required: [designation__in]
- required: [tags__has_any_keys]
additionalProperties: false
properties:
department__in:
title: Department In
description: Department is one of the items in the array.
type: array
uniqueItems: true
minItems: 1
items:
type: string
minLength: 1
#end department__in
designation__in:
title: Designation In
description: Designation is one of the items in the array.
type: array
uniqueItems: true
minItems: 1
items:
type: string
minLength: 1
#end designation__in
tags__has_any_keys:
title: Tags In
description: Profile's tags is any one of the items in the array. Note that the plural `tags` here is intentional.
$ref: "/hospital/ProfileTags.schema"
#end tags__in
#end properties
#end filters
#end properties