LT-92: Criteria schemas

This commit is contained in:
Leonardo Campos 2017-01-13 16:29:17 -02:00 committed by Bruno Alves de Faria
parent 46bff61b08
commit 3fe3428ae5
3 changed files with 37 additions and 3 deletions

View File

@ -1,13 +1,41 @@
import { BaseCriterion } from './BaseCriterion';
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
* Check if a modality is allowed or restricted
* Options:
* method (string): allow, restrict
* measurementTypes (string[]): list of measurement types that will be evaluated
* modalities (string[]): list of allowed/restricted modalities
* method (string): Specify if it\'s goinig to "allow" or "restrict" the modalities
* measurementTypes (string[]): List of measurement types that will be evaluated
* modalities (string[]): List of allowed/restricted modalities
*/
export class ModalityCriterion extends BaseCriterion {

View File

@ -1,5 +1,8 @@
import { BaseCriterion } from './BaseCriterion';
export const NonTargetResponseSchema = {
};
export class NonTargetResponseCriterion extends BaseCriterion {
constructor(options) {

View File

@ -1,5 +1,8 @@
import { BaseCriterion } from './BaseCriterion';
export const TargetTypeSchema = {
};
export class TargetTypeCriterion extends BaseCriterion {
constructor(options) {