| 12345678910111213141516171819 |
- export interface ReportModel {
- id: string;
- time?: string;
- [ key: string ]: any;
- };
- export function transformIndicator(data: any[]) {
- return data?.map((item: any) => {
- const { patientQuotaRecordDTOS = [], ..._item } = item;
- const lest = patientQuotaRecordDTOS?.[ patientQuotaRecordDTOS?.length - 1 ] ?? {};
- const abnormal = lest.abnormal ? 1 : 0;
- return {
- ..._item,
- ...lest,
- abnormal: abnormal && lest.abnormalDesc?.includes('偏高') ? 1 : lest.abnormalDesc?.includes('偏低') ? -1 : 0,
- };
- }).filter(item => item.quotaVal != null) ?? [];
- }
|