LT-92: Criteria schemas
This commit is contained in:
parent
46bff61b08
commit
3fe3428ae5
@ -1,13 +1,41 @@
|
|||||||
import { BaseCriterion } from './BaseCriterion';
|
import { BaseCriterion } from './BaseCriterion';
|
||||||
import { _ } from 'meteor/underscore';
|
import { _ } from 'meteor/underscore';
|
||||||
|
|
||||||
|
export const ModalitySchema = {
|
||||||
|
properties: {
|
||||||
|
method: {
|
||||||
|
label: 'Specify if it\'s goinig to "allow" or "restrict" the modalities',
|
||||||
|
type: 'string'
|
||||||
|
},
|
||||||
|
measurementTypes: {
|
||||||
|
label: 'List of measurement types that will be evaluated',
|
||||||
|
type: 'array',
|
||||||
|
items: {
|
||||||
|
type: 'string'
|
||||||
|
},
|
||||||
|
minItems: 1,
|
||||||
|
uniqueItems: true
|
||||||
|
},
|
||||||
|
modalities: {
|
||||||
|
label: 'List of allowed/restricted modalities',
|
||||||
|
type: 'array',
|
||||||
|
items: {
|
||||||
|
type: 'string'
|
||||||
|
},
|
||||||
|
minItems: 1,
|
||||||
|
uniqueItems: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
required: ['method', 'modalities']
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ModalityCriteria
|
* ModalityCriteria
|
||||||
* Check if a modality is allowed or restricted
|
* Check if a modality is allowed or restricted
|
||||||
* Options:
|
* Options:
|
||||||
* method (string): allow, restrict
|
* method (string): Specify if it\'s goinig to "allow" or "restrict" the modalities
|
||||||
* measurementTypes (string[]): list of measurement types that will be evaluated
|
* measurementTypes (string[]): List of measurement types that will be evaluated
|
||||||
* modalities (string[]): list of allowed/restricted modalities
|
* modalities (string[]): List of allowed/restricted modalities
|
||||||
*/
|
*/
|
||||||
export class ModalityCriterion extends BaseCriterion {
|
export class ModalityCriterion extends BaseCriterion {
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
import { BaseCriterion } from './BaseCriterion';
|
import { BaseCriterion } from './BaseCriterion';
|
||||||
|
|
||||||
|
export const NonTargetResponseSchema = {
|
||||||
|
};
|
||||||
|
|
||||||
export class NonTargetResponseCriterion extends BaseCriterion {
|
export class NonTargetResponseCriterion extends BaseCriterion {
|
||||||
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
import { BaseCriterion } from './BaseCriterion';
|
import { BaseCriterion } from './BaseCriterion';
|
||||||
|
|
||||||
|
export const TargetTypeSchema = {
|
||||||
|
};
|
||||||
|
|
||||||
export class TargetTypeCriterion extends BaseCriterion {
|
export class TargetTypeCriterion extends BaseCriterion {
|
||||||
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user