2023-11-10 14:05:15 +08:00
|
|
|
import { IAnalysisService, ISampleType } from './analysis';
|
2024-07-24 17:04:53 +08:00
|
|
|
import { IUser } from './auth';
|
|
|
|
|
2023-11-10 14:05:15 +08:00
|
|
|
|
|
|
|
export interface IReflexRule {
|
|
|
|
uid?: string;
|
|
|
|
name?: string;
|
|
|
|
description?: string;
|
|
|
|
reflexActions: IReflexAction[];
|
|
|
|
createdByUid?: string;
|
|
|
|
createdBy?: IUser;
|
|
|
|
createdAt?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IReflexBrainCriteria {
|
|
|
|
analysisUid?: string;
|
|
|
|
analysis?: IAnalysisService;
|
|
|
|
reflexBrainUid?: string;
|
|
|
|
reflexBrain?: IReflexBrain;
|
|
|
|
operator?: string;
|
|
|
|
value?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IReflexBrainAddition {
|
|
|
|
analysisUid?: string;
|
|
|
|
analysis?: IAnalysisService;
|
|
|
|
reflexBrainUid?: string;
|
|
|
|
reflexBrain?: IReflexBrain;
|
|
|
|
count?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IReflexBrainFinal {
|
|
|
|
analysisUid?: string;
|
|
|
|
analysis?: IAnalysisService;
|
|
|
|
reflexBrainUid?: string;
|
|
|
|
reflexBrain?: IReflexBrain;
|
|
|
|
value?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IReflexBrain {
|
|
|
|
uid?: string;
|
|
|
|
reflexActionUid?: string;
|
|
|
|
reflexAction?: IReflexBrain;
|
|
|
|
description?: string;
|
|
|
|
analysesValues?: IReflexBrainCriteria[];
|
|
|
|
addNew?: IReflexBrainAddition[];
|
|
|
|
finalise?: IReflexBrainFinal[];
|
2024-09-21 16:20:17 +08:00
|
|
|
complexConditions?: IComplexCondition[];
|
|
|
|
customLogic?: string;
|
2023-11-10 14:05:15 +08:00
|
|
|
createdByUid?: string;
|
|
|
|
createdBy?: IUser;
|
|
|
|
createdAt?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IReflexAction {
|
|
|
|
uid?: string;
|
|
|
|
level?: number;
|
|
|
|
description?: string;
|
|
|
|
analysisUid?: string;
|
|
|
|
analyses?: IAnalysisService[];
|
|
|
|
sampleTypeUid?: string;
|
|
|
|
sampleType?: ISampleType;
|
|
|
|
reflexRuleUid?: string;
|
|
|
|
reflexRule?: IReflexRule;
|
|
|
|
brains?: IReflexBrain[];
|
|
|
|
createdByUid?: string;
|
|
|
|
createdBy?: IUser;
|
|
|
|
createdAt?: string;
|
|
|
|
}
|
2024-09-21 16:20:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
export interface IComplexCondition {
|
|
|
|
conditionType: 'AND' | 'OR';
|
|
|
|
subconditions: ISubcondition[];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ISubcondition {
|
|
|
|
analysisUid: string;
|
|
|
|
operator: 'eq' | 'neq' | 'gt' | 'lt';
|
|
|
|
value: string;
|
|
|
|
}
|