|
@@ -212,6 +212,50 @@ export namespace PrescriptionReviewModel {
|
|
|
topUnqualifiedReasons: string[];
|
|
topUnqualifiedReasons: string[];
|
|
|
topExcessDosageHerbs: string[];
|
|
topExcessDosageHerbs: string[];
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /** 已归档处方列表行 */
|
|
|
|
|
+ export interface ArchivedPrescriptionRow extends TransformRecord {
|
|
|
|
|
+ prescriptionDate: string;
|
|
|
|
|
+ prescriptionNo: string;
|
|
|
|
|
+ institutionName: string;
|
|
|
|
|
+ campusName?: string;
|
|
|
|
|
+ departmentName: string;
|
|
|
|
|
+ doctorName: string;
|
|
|
|
|
+ reviewTime: string;
|
|
|
|
|
+ reviewExpert: string;
|
|
|
|
|
+ result: 'qualified' | 'unqualified';
|
|
|
|
|
+ samplingName: string;
|
|
|
|
|
+ taskId?: string;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /** 已归档处方 - 点评日志条目 */
|
|
|
|
|
+ export interface ArchivedPrescriptionReviewLogEntry extends TransformRecord {
|
|
|
|
|
+ reviewDate: string;
|
|
|
|
|
+ samplingName: string;
|
|
|
|
|
+ samplingTime: string;
|
|
|
|
|
+ reviewExpert: string;
|
|
|
|
|
+ reviewTime: string;
|
|
|
|
|
+ qualified: boolean;
|
|
|
|
|
+ comment?: string;
|
|
|
|
|
+ indicatorIds?: string[];
|
|
|
|
|
+ herbIndicatorMap?: Record<string, string[]>;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /** 已归档处方 - 点评日志详情 */
|
|
|
|
|
+ export interface ArchivedPrescriptionReviewLog {
|
|
|
|
|
+ prescription: ReviewStatisticsPrescriptionDetail;
|
|
|
|
|
+ entries: ArchivedPrescriptionReviewLogEntry[];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /** 已归档处方列表筛选项 */
|
|
|
|
|
+ export interface ArchivedPrescriptionFilterOptions {
|
|
|
|
|
+ samplingNames: string[];
|
|
|
|
|
+ institutions: string[];
|
|
|
|
|
+ campuses: string[];
|
|
|
|
|
+ departments: string[];
|
|
|
|
|
+ doctors: string[];
|
|
|
|
|
+ experts: string[];
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/** 点评专家列表(userType=01) */
|
|
/** 点评专家列表(userType=01) */
|
|
@@ -2083,3 +2127,317 @@ export function getReviewStatisticsSummaryMethod(
|
|
|
topExcessDosageHerbs: ['秦艽', '知柏', '甘草', '黄芩', '当归'],
|
|
topExcessDosageHerbs: ['秦艽', '知柏', '甘草', '黄芩', '当归'],
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+const MOCK_ARCHIVED_PRESCRIPTIONS: PrescriptionReviewModel.ArchivedPrescriptionRow[] =
|
|
|
|
|
+ [
|
|
|
|
|
+ {
|
|
|
|
|
+ id: 'arch-1',
|
|
|
|
|
+ prescriptionDate: '2023-09-23',
|
|
|
|
|
+ prescriptionNo: '2023092323945',
|
|
|
|
|
+ institutionName: '蒋村社区卫生服务中心',
|
|
|
|
|
+ campusName: '',
|
|
|
|
|
+ departmentName: '全科医疗科',
|
|
|
|
|
+ doctorName: '虞毛瑾',
|
|
|
|
|
+ reviewTime: '2023-09-23 14:00:39',
|
|
|
|
|
+ reviewExpert: '于沐',
|
|
|
|
|
+ result: 'qualified',
|
|
|
|
|
+ samplingName: '2023年月度',
|
|
|
|
|
+ taskId: 'task-4',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ id: 'arch-2',
|
|
|
|
|
+ prescriptionDate: '2023-09-23',
|
|
|
|
|
+ prescriptionNo: '2023092323934',
|
|
|
|
|
+ institutionName: '同仁堂',
|
|
|
|
|
+ campusName: '萧山馆',
|
|
|
|
|
+ departmentName: '中医专家',
|
|
|
|
|
+ doctorName: '郭可新',
|
|
|
|
|
+ reviewTime: '2023-09-23 15:29:38',
|
|
|
|
|
+ reviewExpert: '于沐',
|
|
|
|
|
+ result: 'qualified',
|
|
|
|
|
+ samplingName: '2023年月度',
|
|
|
|
|
+ taskId: 'task-4',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ id: 'arch-3',
|
|
|
|
|
+ prescriptionDate: '2023-09-23',
|
|
|
|
|
+ prescriptionNo: '2023092323917',
|
|
|
|
|
+ institutionName: '浙江省中医院',
|
|
|
|
|
+ campusName: '湘湖院区',
|
|
|
|
|
+ departmentName: '中医妇科',
|
|
|
|
|
+ doctorName: '沈慧',
|
|
|
|
|
+ reviewTime: '2023-09-23 16:29:38',
|
|
|
|
|
+ reviewExpert: '于沐',
|
|
|
|
|
+ result: 'unqualified',
|
|
|
|
|
+ samplingName: '2022年度处方点评',
|
|
|
|
|
+ taskId: 'task-4',
|
|
|
|
|
+ },
|
|
|
|
|
+ ];
|
|
|
|
|
+
|
|
|
|
|
+const MOCK_ARCHIVED_REVIEW_LOGS: Record<
|
|
|
|
|
+ string,
|
|
|
|
|
+ PrescriptionReviewModel.ArchivedPrescriptionReviewLog
|
|
|
|
|
+> = {
|
|
|
|
|
+ 'arch-1': {
|
|
|
|
|
+ prescription: {
|
|
|
|
|
+ id: 'arch-1',
|
|
|
|
|
+ prescriptionNo: '2023092323945',
|
|
|
|
|
+ institutionName: '蒋村社区卫生服务中心',
|
|
|
|
|
+ departmentName: '全科医疗科',
|
|
|
|
|
+ doctorName: '虞毛瑾',
|
|
|
|
|
+ pharmacistName: '崔红',
|
|
|
|
|
+ result: 'qualified',
|
|
|
|
|
+ unitDoseAmount: 28.5,
|
|
|
|
|
+ patientName: '张三',
|
|
|
|
|
+ patientGender: '男',
|
|
|
|
|
+ patientAge: 52,
|
|
|
|
|
+ pregnancy: false,
|
|
|
|
|
+ lactation: false,
|
|
|
|
|
+ tcmDisease: '感冒',
|
|
|
|
|
+ tcmSyndrome: '风寒束表证',
|
|
|
|
|
+ treatmentPrinciple: '辛温解表',
|
|
|
|
|
+ administrationMethod: '内服',
|
|
|
|
|
+ herbCount: 12,
|
|
|
|
|
+ doseCount: 5,
|
|
|
|
|
+ totalAmount: 142.5,
|
|
|
|
|
+ herbs: [
|
|
|
|
|
+ '麻黄 6g',
|
|
|
|
|
+ '桂枝 6g',
|
|
|
|
|
+ '杏仁 10g',
|
|
|
|
|
+ '甘草 6g',
|
|
|
|
|
+ '生姜 3片',
|
|
|
|
|
+ '大枣 3枚',
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+ entries: [
|
|
|
|
|
+ {
|
|
|
|
|
+ id: 'log-1-1',
|
|
|
|
|
+ reviewDate: '2023.09.23',
|
|
|
|
|
+ samplingName: '2023年月度',
|
|
|
|
|
+ samplingTime: '2023-09-23 10:00:23',
|
|
|
|
|
+ reviewExpert: '于沐',
|
|
|
|
|
+ reviewTime: '2023-09-23 14:00:39',
|
|
|
|
|
+ qualified: true,
|
|
|
|
|
+ comment: '处方用药合理,符合诊疗规范。',
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+ 'arch-2': {
|
|
|
|
|
+ prescription: {
|
|
|
|
|
+ id: 'arch-2',
|
|
|
|
|
+ prescriptionNo: '2023092323934',
|
|
|
|
|
+ institutionName: '同仁堂',
|
|
|
|
|
+ departmentName: '中医专家',
|
|
|
|
|
+ doctorName: '郭可新',
|
|
|
|
|
+ pharmacistName: '',
|
|
|
|
|
+ result: 'qualified',
|
|
|
|
|
+ unitDoseAmount: 22.8,
|
|
|
|
|
+ patientName: '李四',
|
|
|
|
|
+ patientGender: '女',
|
|
|
|
|
+ patientAge: 38,
|
|
|
|
|
+ pregnancy: false,
|
|
|
|
|
+ lactation: false,
|
|
|
|
|
+ tcmDisease: '失眠',
|
|
|
|
|
+ tcmSyndrome: '心脾两虚证',
|
|
|
|
|
+ treatmentPrinciple: '补益心脾',
|
|
|
|
|
+ administrationMethod: '内服',
|
|
|
|
|
+ herbCount: 10,
|
|
|
|
|
+ doseCount: 7,
|
|
|
|
|
+ totalAmount: 159.6,
|
|
|
|
|
+ herbs: ['酸枣仁 15g', '茯苓 15g', '知母 10g', '川芎 10g'],
|
|
|
|
|
+ },
|
|
|
|
|
+ entries: [
|
|
|
|
|
+ {
|
|
|
|
|
+ id: 'log-2-1',
|
|
|
|
|
+ reviewDate: '2023.09.23',
|
|
|
|
|
+ samplingName: '2023年月度',
|
|
|
|
|
+ samplingTime: '2023-09-23 10:00:23',
|
|
|
|
|
+ reviewExpert: '于沐',
|
|
|
|
|
+ reviewTime: '2023-09-23 15:29:38',
|
|
|
|
|
+ qualified: true,
|
|
|
|
|
+ comment: '处方结构合理,用药得当。',
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+ 'arch-3': {
|
|
|
|
|
+ prescription: {
|
|
|
|
|
+ id: 'arch-3',
|
|
|
|
|
+ prescriptionNo: '2023092323917',
|
|
|
|
|
+ institutionName: '浙江省中医院',
|
|
|
|
|
+ departmentName: '中医妇科',
|
|
|
|
|
+ doctorName: '沈慧',
|
|
|
|
|
+ pharmacistName: '崔红',
|
|
|
|
|
+ result: 'unqualified',
|
|
|
|
|
+ unqualifiedDetail: '剂量超标',
|
|
|
|
|
+ comment:
|
|
|
|
|
+ '点评意见和说明点评意见和说明点评意见和说明点评意见和说明点评意见和说明点评意见和说明点评意见和说明点评意见和说明',
|
|
|
|
|
+ unitDoseAmount: 33.43,
|
|
|
|
|
+ patientName: '鹿熙',
|
|
|
|
|
+ patientGender: '女',
|
|
|
|
|
+ patientAge: 48,
|
|
|
|
|
+ pregnancy: false,
|
|
|
|
|
+ lactation: false,
|
|
|
|
|
+ tcmDisease: '腰痛',
|
|
|
|
|
+ tcmSyndrome: '肝肾亏虚证',
|
|
|
|
|
+ treatmentPrinciple: '补益肝肾',
|
|
|
|
|
+ administrationMethod: '内服',
|
|
|
|
|
+ herbCount: 18,
|
|
|
|
|
+ doseCount: 7,
|
|
|
|
|
+ totalAmount: 234.01,
|
|
|
|
|
+ herbs: [
|
|
|
|
|
+ '熟地黄 15g',
|
|
|
|
|
+ '山茱萸 15g',
|
|
|
|
|
+ '山药 15g',
|
|
|
|
|
+ '茯苓 15g',
|
|
|
|
|
+ '泽泻 10g',
|
|
|
|
|
+ '牡丹皮 10g',
|
|
|
|
|
+ '秦艽 20g',
|
|
|
|
|
+ '杜仲 15g',
|
|
|
|
|
+ '续断 15g',
|
|
|
|
|
+ '牛膝 15g',
|
|
|
|
|
+ '当归 12g',
|
|
|
|
|
+ '白芍 12g',
|
|
|
|
|
+ '川芎 10g',
|
|
|
|
|
+ '甘草 6g',
|
|
|
|
|
+ '陈皮 10g',
|
|
|
|
|
+ '半夏 10g',
|
|
|
|
|
+ '生姜 3片',
|
|
|
|
|
+ '大枣 3枚',
|
|
|
|
|
+ ],
|
|
|
|
|
+ reviewExpert: '于沐',
|
|
|
|
|
+ reviewTime: '2023-09-23 14:00:39',
|
|
|
|
|
+ herbIssueLabels: { 秦艽: '剂量超标' },
|
|
|
|
|
+ },
|
|
|
|
|
+ entries: [
|
|
|
|
|
+ {
|
|
|
|
|
+ id: 'log-3-1',
|
|
|
|
|
+ reviewDate: '2022.03.30',
|
|
|
|
|
+ samplingName: '2023年月度',
|
|
|
|
|
+ samplingTime: '2023-09-23 10:00:23',
|
|
|
|
|
+ reviewExpert: '于沐',
|
|
|
|
|
+ reviewTime: '2023-09-23 14:00:39',
|
|
|
|
|
+ qualified: false,
|
|
|
|
|
+ comment:
|
|
|
|
|
+ '点评意见和说明点评意见和说明点评意见和说明点评意见和说明点评意见和说明点评意见和说明点评意见和说明点评意见和说明',
|
|
|
|
|
+ indicatorIds: ['ind-dose-exceed'],
|
|
|
|
|
+ herbIndicatorMap: { 'ind-dose-exceed': ['秦艽'] },
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ id: 'log-3-2',
|
|
|
|
|
+ reviewDate: '2022.12.31',
|
|
|
|
|
+ samplingName: '2022年度处方点评',
|
|
|
|
|
+ samplingTime: '2022-12-31 09:00:00',
|
|
|
|
|
+ reviewExpert: '于沐',
|
|
|
|
|
+ reviewTime: '2022-12-31 16:20:15',
|
|
|
|
|
+ qualified: true,
|
|
|
|
|
+ comment: '本次复查处方用药基本合理。',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ id: 'log-3-3',
|
|
|
|
|
+ reviewDate: '2023.02.20',
|
|
|
|
|
+ samplingName: '2023年月度',
|
|
|
|
|
+ samplingTime: '2023-02-20 08:30:00',
|
|
|
|
|
+ reviewExpert: '专家2',
|
|
|
|
|
+ reviewTime: '2023-02-20 11:45:22',
|
|
|
|
|
+ qualified: false,
|
|
|
|
|
+ comment: '秦艽用量仍偏高,建议调整。',
|
|
|
|
|
+ indicatorIds: ['ind-dose-exceed'],
|
|
|
|
|
+ herbIndicatorMap: { 'ind-dose-exceed': ['秦艽'] },
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+function buildArchivedPrescriptionFilterOptions(): PrescriptionReviewModel.ArchivedPrescriptionFilterOptions {
|
|
|
|
|
+ const unique = (values: string[]) =>
|
|
|
|
|
+ [...new Set(values.filter(Boolean))].map((value) => value);
|
|
|
|
|
+ return {
|
|
|
|
|
+ samplingNames: unique(
|
|
|
|
|
+ MOCK_ARCHIVED_PRESCRIPTIONS.map((item) => item.samplingName),
|
|
|
|
|
+ ),
|
|
|
|
|
+ institutions: unique(
|
|
|
|
|
+ MOCK_ARCHIVED_PRESCRIPTIONS.map((item) => item.institutionName),
|
|
|
|
|
+ ),
|
|
|
|
|
+ campuses: unique(
|
|
|
|
|
+ MOCK_ARCHIVED_PRESCRIPTIONS.map((item) => item.campusName ?? ''),
|
|
|
|
|
+ ),
|
|
|
|
|
+ departments: unique(
|
|
|
|
|
+ MOCK_ARCHIVED_PRESCRIPTIONS.map((item) => item.departmentName),
|
|
|
|
|
+ ),
|
|
|
|
|
+ doctors: unique(
|
|
|
|
|
+ MOCK_ARCHIVED_PRESCRIPTIONS.map((item) => item.doctorName),
|
|
|
|
|
+ ),
|
|
|
|
|
+ experts: unique(
|
|
|
|
|
+ MOCK_ARCHIVED_PRESCRIPTIONS.map((item) => item.reviewExpert),
|
|
|
|
|
+ ),
|
|
|
|
|
+ };
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/** 已归档处方列表筛选项(当前为本地 mock) */
|
|
|
|
|
+export function listArchivedPrescriptionFilterOptionsMethod() {
|
|
|
|
|
+ return Promise.resolve(buildArchivedPrescriptionFilterOptions());
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/** 已归档处方列表(当前为本地 mock) */
|
|
|
|
|
+export function listArchivedPrescriptionsMethod(
|
|
|
|
|
+ page = 1,
|
|
|
|
|
+ size = 10,
|
|
|
|
|
+ query?: {
|
|
|
|
|
+ campusName?: string;
|
|
|
|
|
+ departmentName?: string;
|
|
|
|
|
+ doctorName?: string;
|
|
|
|
|
+ institutionName?: string;
|
|
|
|
|
+ reviewDateEnd?: string;
|
|
|
|
|
+ reviewDateStart?: string;
|
|
|
|
|
+ reviewExpert?: string;
|
|
|
|
|
+ samplingName?: string;
|
|
|
|
|
+ },
|
|
|
|
|
+): Promise<TransformList<PrescriptionReviewModel.ArchivedPrescriptionRow>> {
|
|
|
|
|
+ let rows = [...MOCK_ARCHIVED_PRESCRIPTIONS];
|
|
|
|
|
+ if (query?.reviewDateStart) {
|
|
|
|
|
+ rows = rows.filter(
|
|
|
|
|
+ (item) => item.reviewTime.slice(0, 10) >= query.reviewDateStart!,
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ if (query?.reviewDateEnd) {
|
|
|
|
|
+ rows = rows.filter(
|
|
|
|
|
+ (item) => item.reviewTime.slice(0, 10) <= query.reviewDateEnd!,
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ if (query?.samplingName) {
|
|
|
|
|
+ rows = rows.filter((item) => item.samplingName === query.samplingName);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (query?.institutionName) {
|
|
|
|
|
+ rows = rows.filter(
|
|
|
|
|
+ (item) => item.institutionName === query.institutionName,
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ if (query?.campusName) {
|
|
|
|
|
+ rows = rows.filter((item) => (item.campusName ?? '') === query.campusName);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (query?.departmentName) {
|
|
|
|
|
+ rows = rows.filter(
|
|
|
|
|
+ (item) => item.departmentName === query.departmentName,
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ if (query?.doctorName) {
|
|
|
|
|
+ rows = rows.filter((item) => item.doctorName === query.doctorName);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (query?.reviewExpert) {
|
|
|
|
|
+ rows = rows.filter((item) => item.reviewExpert === query.reviewExpert);
|
|
|
|
|
+ }
|
|
|
|
|
+ const start = (page - 1) * size;
|
|
|
|
|
+ return Promise.resolve({
|
|
|
|
|
+ items: rows.slice(start, start + size),
|
|
|
|
|
+ total: rows.length,
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/** 已归档处方 - 点评日志详情(当前为本地 mock) */
|
|
|
|
|
+export function getArchivedPrescriptionReviewLogMethod(id: string) {
|
|
|
|
|
+ const log = MOCK_ARCHIVED_REVIEW_LOGS[id];
|
|
|
|
|
+ if (!log) {
|
|
|
|
|
+ return Promise.reject(new Error('点评日志不存在'));
|
|
|
|
|
+ }
|
|
|
|
|
+ return Promise.resolve(log);
|
|
|
|
|
+}
|