2021-11-12 05:30:10 +08:00
|
|
|
import { IClient } from "./client";
|
|
|
|
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 {
|
|
|
|
uid?: number;
|
|
|
|
name?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ISampleRequest extends ISample {
|
|
|
|
uid?: number;
|
|
|
|
sampleId?: string;
|
2021-11-23 05:48:31 +08:00
|
|
|
priority?: number;
|
2021-11-12 05:30:10 +08:00
|
|
|
status?: string;
|
2021-11-23 05:48:31 +08:00
|
|
|
analysisrequest?: IAnalysisRequest;
|
|
|
|
sampletype?: ISampleType;
|
2021-11-12 05:30:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisService {
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisResult {
|
|
|
|
uid?: number;
|
2021-11-23 05:48:31 +08:00
|
|
|
analysisUid?: number;
|
2021-11-12 05:30:10 +08:00
|
|
|
analysis?: IAnalysisService;
|
2021-11-23 05:48:31 +08:00
|
|
|
instrumentUid?: number;
|
|
|
|
instrument?: IInstrument;
|
|
|
|
methodUid?: number;
|
|
|
|
method?: IMethod;
|
|
|
|
analystUid?: number;
|
|
|
|
analyst?: any;
|
2021-11-12 05:30:10 +08:00
|
|
|
worksheetPosition?: number;
|
2021-11-23 05:48:31 +08:00
|
|
|
sampleUid?: number;
|
2021-11-12 05:30:10 +08:00
|
|
|
sample?: ISampleRequest;
|
|
|
|
status?: string;
|
|
|
|
result?: string;
|
2021-11-23 05:48:31 +08:00
|
|
|
retest?: boolean;
|
|
|
|
reportable?: boolean;
|
2021-11-12 05:30:10 +08:00
|
|
|
editResult?: string;
|
|
|
|
createdAt?: string;
|
|
|
|
checked?: boolean;
|
|
|
|
editable?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisCategory {
|
|
|
|
uid?: number;
|
|
|
|
name?: string;
|
|
|
|
description?: string;
|
|
|
|
active?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IResultOption {
|
|
|
|
uid?: number;
|
|
|
|
analysisUid?: number;
|
|
|
|
optionKey?: number;
|
|
|
|
value?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisService {
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisProfile {
|
|
|
|
uid?: number;
|
|
|
|
name?: string;
|
|
|
|
description?: string;
|
|
|
|
keyword?: string,
|
|
|
|
analyses?: IAnalysisService[];
|
|
|
|
active?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface ISample {
|
2021-11-23 05:48:31 +08:00
|
|
|
uid?: number;
|
2021-11-12 05:30:10 +08:00
|
|
|
sampleType?: ISampleType | undefined;
|
|
|
|
profiles?: IAnalysisProfile[];
|
|
|
|
analyses?: IAnalysisService[];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface IAnalysisRequest {
|
2021-11-23 05:48:31 +08:00
|
|
|
uid?: number;
|
2021-11-12 05:30:10 +08:00
|
|
|
patient?: IPatient;
|
|
|
|
client?: IClient;
|
|
|
|
samples?: ISample[];
|
|
|
|
clientRequestId?: string;
|
|
|
|
priority?: number;
|
|
|
|
createdAt?: Date;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface IQCRequest {
|
|
|
|
qcTemplateUid?: string;
|
|
|
|
qcLevels?: string[]; // uids
|
|
|
|
analysisProfiles?: string[]; // uids
|
|
|
|
analysisServices?: string[]; // uids
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface IQCLevel {
|
|
|
|
uid?: number;
|
|
|
|
level?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IQCTemplate {
|
|
|
|
uid?: number;
|
|
|
|
name?: string;
|
|
|
|
description?: string;
|
|
|
|
qcLevels?: IQCLevel[];
|
|
|
|
departments?: any[];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface IAnalysisCategory {
|
|
|
|
uid?: number;
|
|
|
|
name?: string;
|
|
|
|
description?: string;
|
|
|
|
active?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IResultOption {
|
|
|
|
uid?: number;
|
|
|
|
analysisUid?: number;
|
|
|
|
optionKey?: number;
|
|
|
|
value?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisService {
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisProfile {
|
|
|
|
uid?: number;
|
|
|
|
name?: string;
|
|
|
|
description?: string;
|
|
|
|
keyword?: string,
|
|
|
|
analyses?: IAnalysisService[];
|
|
|
|
active?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ISample {
|
2021-11-23 05:48:31 +08:00
|
|
|
uid?: number;
|
|
|
|
sampleId?: string;
|
2021-11-12 05:30:10 +08:00
|
|
|
sampleType?: ISampleType | undefined;
|
|
|
|
profiles?: IAnalysisProfile[];
|
|
|
|
analyses?: IAnalysisService[];
|
2021-11-23 05:48:31 +08:00
|
|
|
assigned?: boolean;
|
|
|
|
qcLevel?: IQCLevel;
|
|
|
|
analysisResults?: IAnalysisResult[];
|
|
|
|
status?: string;
|
2021-11-12 05:30:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface IAnalysisRequest {
|
|
|
|
patient?: IPatient;
|
|
|
|
client?: IClient;
|
|
|
|
samples?: ISample[];
|
|
|
|
clientRequestId?: string;
|
|
|
|
priority?: number;
|
|
|
|
createdAt?: Date;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface IQCRequest {
|
|
|
|
qcTemplateUid?: string;
|
|
|
|
qcLevels?: string[]; // uids
|
|
|
|
analysisProfiles?: string[]; // uids
|
|
|
|
analysisServices?: string[]; // uids
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IQCLevel {
|
|
|
|
uid?: number;
|
|
|
|
level?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IQCTemplate {
|
|
|
|
uid?: number;
|
|
|
|
name?: string;
|
|
|
|
description?: string;
|
|
|
|
qcLevels?: IQCLevel[];
|
|
|
|
departments?: any[];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-11-23 05:48:31 +08:00
|
|
|
export interface IQCSet {
|
|
|
|
uid?: number;
|
|
|
|
name?: string;
|
|
|
|
samples?: ISample[];
|
|
|
|
analytes?:IAnalysisService
|
|
|
|
created_by_uid: number
|
|
|
|
created_by: any
|
|
|
|
created_at: string
|
|
|
|
updated_by_uid: number
|
|
|
|
updated_by: any
|
|
|
|
updated_at: string
|
|
|
|
}
|