felicity-lims/frontend/vite/src/models/analysis.ts

136 lines
2.8 KiB
TypeScript
Raw Normal View History

2021-11-28 18:42:56 +08:00
import { IClient, IClientContact } from "./client";
2021-11-12 05:30:10 +08:00
import { IPatient } from "./patient";
2021-11-23 05:48:31 +08:00
import { IInstrument, IMethod } from "./setup";
2021-11-12 05:30:10 +08:00
export interface ISampleType {
2021-11-28 18:42:56 +08:00
uid: number;
name: string;
abbr: string;
description: string;
active: boolean;
2021-11-12 05:30:10 +08:00
}
export interface IAnalysisService {
2021-11-28 18:42:56 +08:00
uid: number;
name: string;
keyword: string;
description: string;
unit: string;
profiles: IAnalysisProfile[];
category: IAnalysisCategory;
resultoptions: IResultOption[],
categoryUid: number,
sortKey: number;
active: boolean;
internalUse: boolean;
checked: boolean;
2021-11-12 05:30:10 +08:00
}
export interface IAnalysisResult {
2021-11-28 18:42:56 +08:00
uid: number;
analysisUid: number;
analysis: IAnalysisService;
instrumentUid: number;
instrument: IInstrument;
methodUid: number;
method: IMethod;
analystUid: number;
analyst: any;
worksheetPosition: number;
sampleUid: number;
sample: ISample;
status: string;
result: string;
retest: boolean;
reportable: boolean;
editResult: string;
createdAt: string;
checked: boolean;
editable: boolean;
2021-11-12 05:30:10 +08:00
}
export interface IAnalysisCategory {
2021-11-28 18:42:56 +08:00
uid: number;
name: string;
description: string;
active: boolean;
2021-11-12 05:30:10 +08:00
}
export interface IAnalysisProfile {
2021-11-28 18:42:56 +08:00
uid: number;
name: string;
description: string;
keyword: string,
analyses: IAnalysisService[];
active: boolean;
2021-11-12 05:30:10 +08:00
}
export interface IQCRequest {
2021-11-28 18:42:56 +08:00
qcTemplateUid: string;
qcLevels: string[]; // uids
analysisProfiles: string[]; // uids
analysisServices: string[]; // uids
2021-11-12 05:30:10 +08:00
}
export interface IQCLevel {
2021-11-28 18:42:56 +08:00
uid: number;
level: string;
2021-11-12 05:30:10 +08:00
}
export interface IQCTemplate {
2021-11-28 18:42:56 +08:00
uid: number;
name: string;
description: string;
qcLevels: IQCLevel[];
departments: any[];
2021-11-12 05:30:10 +08:00
}
export interface IResultOption {
2021-11-28 18:42:56 +08:00
uid: number;
analysisUid: number;
optionKey: number;
value: string;
2021-11-12 05:30:10 +08:00
}
export interface ISample {
2021-11-28 18:42:56 +08:00
uid: number;
sampleId: string;
2021-11-29 06:42:34 +08:00
sampletype: ISampleType | undefined;
2021-11-28 18:42:56 +08:00
profiles: IAnalysisProfile[];
analyses: IAnalysisService[];
assigned: boolean;
qcLevel: IQCLevel;
analysisrequest: IAnalysisRequest;
analysisResults: IAnalysisResult[];
status: string;
priority: number;
checked: boolean;
2021-11-12 05:30:10 +08:00
}
export interface IAnalysisRequest {
2021-11-28 18:42:56 +08:00
clinicalData: string;
patient: IPatient;
client: IClient;
clientContact?: IClientContact;
clientName?: string;
samples: ISample[];
clientRequestId: string;
priority: number;
createdAt: Date;
2021-11-12 05:30:10 +08:00
}
2021-11-23 05:48:31 +08:00
export interface IQCSet {
2021-11-28 18:42:56 +08:00
uid: number;
name: string;
samples: ISample[];
analytes:IAnalysisService
2021-11-23 05:48:31 +08:00
created_by_uid: number
created_by: any
created_at: string
updated_by_uid: number
updated_by: any
updated_at: string
}