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";
|
2022-02-23 18:35:43 +08:00
|
|
|
import { IInstrument, IMethod, IUnit } from "./setup";
|
2021-11-12 05:30:10 +08:00
|
|
|
|
|
|
|
export interface ISampleType {
|
2022-02-06 23:56:47 +08:00
|
|
|
uid?: number;
|
|
|
|
name?: string;
|
|
|
|
abbr?: string;
|
|
|
|
description?: string;
|
|
|
|
active?: boolean;
|
2021-11-12 05:30:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisService {
|
2022-02-06 23:56:47 +08:00
|
|
|
uid?: number;
|
|
|
|
name?: string;
|
|
|
|
keyword?: string;
|
|
|
|
description?: string;
|
|
|
|
unit?: string;
|
|
|
|
profiles?: IAnalysisProfile[];
|
|
|
|
category?: IAnalysisCategory;
|
2022-02-24 05:07:31 +08:00
|
|
|
resultOptions?: IResultOption[];
|
|
|
|
interims?: IAnalysisInterim[];
|
|
|
|
correctionFactors?: IAnalysisCorrectionFactor[];
|
|
|
|
specifications?: IAnalysisSpecification[];
|
|
|
|
detectionLimits?: IAnalysisSpecification[];
|
|
|
|
uncertainties?: IAnalysisUncertainty[];
|
2022-02-06 23:56:47 +08:00
|
|
|
categoryUid?: number,
|
|
|
|
sortKey?: number;
|
|
|
|
active?: boolean;
|
|
|
|
internalUse?: boolean;
|
|
|
|
checked?: boolean;
|
2021-11-12 05:30:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisResult {
|
2022-02-06 23:56:47 +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 {
|
2022-02-06 23:56:47 +08:00
|
|
|
uid?: number;
|
|
|
|
name?: string;
|
|
|
|
description?: string;
|
|
|
|
active?: boolean;
|
2021-11-12 05:30:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisProfile {
|
2022-02-06 23:56:47 +08:00
|
|
|
uid?: number;
|
|
|
|
name?: string;
|
|
|
|
description?: string;
|
|
|
|
keyword?: string,
|
|
|
|
analyses?: IAnalysisService[] | number[];
|
|
|
|
active?: boolean;
|
2021-11-12 05:30:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface IQCRequest {
|
2022-02-06 23:56:47 +08:00
|
|
|
qcTemplateUid?: string;
|
|
|
|
qcLevels?: string[]; // uids
|
|
|
|
analysisProfiles?: string[]; // uids
|
|
|
|
analysisServices?: string[]; // uids
|
2021-11-12 05:30:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface IQCLevel {
|
2022-02-06 23:56:47 +08:00
|
|
|
uid?: number;
|
|
|
|
level?: string;
|
2021-11-12 05:30:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IQCTemplate {
|
2022-02-06 23:56:47 +08:00
|
|
|
uid?: number;
|
|
|
|
name?: string;
|
|
|
|
description?: string;
|
|
|
|
qcLevels?: IQCLevel[];
|
|
|
|
departments?: any[];
|
2021-11-12 05:30:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IResultOption {
|
2022-01-15 21:37:44 +08:00
|
|
|
uid?: number;
|
2022-02-06 23:56:47 +08:00
|
|
|
analysisUid?: number;
|
|
|
|
optionKey?: number;
|
|
|
|
value?: string;
|
2021-11-12 05:30:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ISample {
|
2022-02-06 23:56:47 +08:00
|
|
|
uid?: number;
|
|
|
|
sampleId?: string;
|
|
|
|
sampleType?: ISampleType | undefined;
|
|
|
|
profiles?: IAnalysisProfile[];
|
|
|
|
analyses?: IAnalysisService[];
|
|
|
|
assigned?: boolean;
|
|
|
|
qcLevel?: IQCLevel;
|
|
|
|
analysisRequest?: IAnalysisRequest;
|
|
|
|
analysisResults?: IAnalysisResult[];
|
|
|
|
rejectionReasons?: IRejectionReason[];
|
|
|
|
status?: string;
|
|
|
|
priority?: number;
|
|
|
|
checked?: boolean;
|
2021-11-12 05:30:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisRequest {
|
2022-02-06 23:56:47 +08:00
|
|
|
clinicalData?: string;
|
|
|
|
patient?: IPatient;
|
|
|
|
cientUid?: number;
|
|
|
|
client?: IClient;
|
2021-12-23 21:27:51 +08:00
|
|
|
clientContactUid?: number,
|
2021-11-28 18:42:56 +08:00
|
|
|
clientContact?: IClientContact;
|
|
|
|
clientName?: string;
|
2022-02-06 23:56:47 +08:00
|
|
|
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 {
|
2022-02-06 23:56:47 +08:00
|
|
|
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
|
2021-11-23 05:48:31 +08:00
|
|
|
}
|
2021-11-29 18:51:20 +08:00
|
|
|
|
|
|
|
export interface IRejectionReason {
|
2022-02-06 23:56:47 +08:00
|
|
|
uid?: number;
|
|
|
|
reason?: string;
|
2021-11-29 18:51:20 +08:00
|
|
|
}
|
2022-02-23 18:35:43 +08:00
|
|
|
|
|
|
|
export interface IAnalysisInterim {
|
|
|
|
uid?: number,
|
|
|
|
key?: number,
|
|
|
|
value?: string,
|
|
|
|
analysisUid?: number,
|
|
|
|
instrumentUid?: number,
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisCorrectionFactor {
|
|
|
|
uid?: number,
|
|
|
|
factor?: string,
|
|
|
|
analysisUid?: number,
|
|
|
|
instrumentUid?: number,
|
|
|
|
methodUid?: number,
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisDetectionLimit {
|
|
|
|
uid?: number,
|
2022-02-24 05:07:31 +08:00
|
|
|
lowerLimit?: number,
|
|
|
|
upperLimit?: number,
|
2022-02-23 18:35:43 +08:00
|
|
|
analysisUid?: number,
|
|
|
|
instrumentUid?: number,
|
|
|
|
methodUid?: number,
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisUncertainty {
|
|
|
|
uid?: number,
|
|
|
|
min?: number,
|
|
|
|
max?: number,
|
|
|
|
value?: number,
|
|
|
|
analysisUid?: number,
|
|
|
|
instrumentUid?: number,
|
|
|
|
methodUid?: number,
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IAnalysisSpecification {
|
|
|
|
uid?: number,
|
|
|
|
analysisUid?: number,
|
|
|
|
unitUid?: number,
|
|
|
|
unit?: IUnit[],
|
|
|
|
min?: number,
|
|
|
|
max?: number,
|
|
|
|
minWarn?: number,
|
|
|
|
maxWarn?: number,
|
|
|
|
minReport?: string,
|
|
|
|
maxReport?: string,
|
|
|
|
warnValues?: string,
|
|
|
|
warnReport?: string,
|
|
|
|
gender?: string,
|
|
|
|
ageMin?: number,
|
|
|
|
ageMax?: number,
|
|
|
|
methodUid?: number,
|
|
|
|
}
|
|
|
|
|