|
@@ -26,7 +26,10 @@ export interface PatInfo {
|
|
|
consultPhysician?: string
|
|
|
deptDirector?: string
|
|
|
zkWard?: string
|
|
|
- zkWardName?: string
|
|
|
+ zkWardName?: string,
|
|
|
+ sex?: number
|
|
|
+ age?: number
|
|
|
+ admissWard?: string
|
|
|
}
|
|
|
|
|
|
// 患者信息
|
|
@@ -46,6 +49,26 @@ export const huanZheXinXi = ref<PatInfo>({
|
|
|
inpatientNo: null,
|
|
|
admissDate: ''
|
|
|
})
|
|
|
+
|
|
|
+export function clearPatInfo() {
|
|
|
+ huanZheXinXi.value = {
|
|
|
+ zkWardName: "",
|
|
|
+ zkWard: "",
|
|
|
+ consultPhysician: "",
|
|
|
+ deptDirector: "",
|
|
|
+ referPhysician: "",
|
|
|
+ groupInfoBl: "",
|
|
|
+ groupInfoFeeStand: "",
|
|
|
+ groupInfoName: "",
|
|
|
+ groupInfoWeight: "",
|
|
|
+ setGroupInfoProfit: "",
|
|
|
+ ledgerSn: 0,
|
|
|
+ admissTimes: 0,
|
|
|
+ inpatientNo: null,
|
|
|
+ admissDate: ''
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// 是否点击了修改整个模板
|
|
|
export const muBanMing = ref({})
|
|
|
// 错误信息
|
|
@@ -667,6 +690,7 @@ export const xuanZhongJianYan = ref({
|
|
|
daiXuanZhong: [],
|
|
|
})
|
|
|
|
|
|
+
|
|
|
// 检验树状图
|
|
|
export const jyTree = ref([])
|
|
|
// 检查树状图
|
|
@@ -711,11 +735,9 @@ export function clickTimeLimitReminder() {
|
|
|
export const clickOnThePatient = async (patNo: string) => {
|
|
|
switchPatients();
|
|
|
huanZheXinXi.value = await getPatientInfo(patNo) as any;
|
|
|
-
|
|
|
changePatientHook.forEach(item => {
|
|
|
item()
|
|
|
})
|
|
|
-
|
|
|
getDrgPatInfo(huanZheXinXi.value).then(res => {
|
|
|
if (res != null) {
|
|
|
huanZheXinXi.value.groupInfoName = res['name']
|
|
@@ -727,7 +749,7 @@ export const clickOnThePatient = async (patNo: string) => {
|
|
|
})
|
|
|
if (yzMitt.exists('queryYz')) {
|
|
|
await nextTick();
|
|
|
- yzMitt.emit('queryYz');
|
|
|
+ await yzMitt.emit('queryYz');
|
|
|
} else {
|
|
|
await jsQueryYzData();
|
|
|
}
|
|
@@ -770,6 +792,12 @@ const switchPatients = (): boolean => {
|
|
|
}
|
|
|
|
|
|
if (stringIsBlank(huanZheXinXi.value.inpatientNo)) {
|
|
|
+ addCheckList.value = []
|
|
|
+ xuanZhongJianYan.value = {
|
|
|
+ data: [],
|
|
|
+ weiBianMa: [],
|
|
|
+ daiXuanZhong: [],
|
|
|
+ }
|
|
|
return true
|
|
|
} else {
|
|
|
if (stringNotBlank(str)) {
|
|
@@ -832,14 +860,48 @@ export let tableHeader = [
|
|
|
{label: '药房', prop: 'groupName'},
|
|
|
]
|
|
|
|
|
|
-export const addJcCheck = async (data) => {
|
|
|
+export declare type AddJcParams = {
|
|
|
+ execDept: string,
|
|
|
+ execDeptName: string,
|
|
|
+ orderCode: string,
|
|
|
+ orderName: string,
|
|
|
+ note: string,
|
|
|
+ collectionInfo: string;
|
|
|
+ genderRestriction: number;
|
|
|
+ minAgeRestriction: number;
|
|
|
+ maxAgeRestriction: number;
|
|
|
+ startTime?: string
|
|
|
+}
|
|
|
+
|
|
|
+export const jyJcRestriction = (data: AddJcParams, error: boolean = true) => {
|
|
|
+ if (stringNotBlank(huanZheXinXi.value.inpatientNo)) {
|
|
|
+ if (data.genderRestriction && data.genderRestriction !== huanZheXinXi.value.sex) {
|
|
|
+ error && BizException(ExceptionEnum.MESSAGE_ERROR, '患者性别不允许开此项目。')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ if (data.minAgeRestriction && data.minAgeRestriction > huanZheXinXi.value.age) {
|
|
|
+ error && BizException(ExceptionEnum.MESSAGE_ERROR, "项目最小年龄限制" + data.minAgeRestriction + "岁,患者年龄不符合。")
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ if (data.maxAgeRestriction && data.maxAgeRestriction < huanZheXinXi.value.age) {
|
|
|
+ error && BizException(ExceptionEnum.MESSAGE_ERROR, "项目最大年龄限制" + data.maxAgeRestriction + "岁,患者年龄不符合。")
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true
|
|
|
+}
|
|
|
+
|
|
|
+export const addJcCheck = async (data: AddJcParams) => {
|
|
|
let temp = addCheckList.value.findIndex(item => {
|
|
|
return item.orderCode === data.orderCode
|
|
|
})
|
|
|
if (temp > -1) {
|
|
|
BizException(ExceptionEnum.MESSAGE_ERROR, '请勿重复添加。')
|
|
|
}
|
|
|
- data.startTime = await getServerDateApi()
|
|
|
+ jyJcRestriction(data)
|
|
|
+ data.startTime = await getServerDateApi();
|
|
|
addCheckList.value.push(data)
|
|
|
}
|
|
|
|