|
@@ -1,282 +1,288 @@
|
|
|
-import {MedicalTrack} from "@/views/view/patient360/src/index";
|
|
|
-import requestV2, {AxiosRequestConfigV2} from "@/utils/request-v2";
|
|
|
-import {Ref, ref, reactive, computed} from 'vue'
|
|
|
-import {selectBriefPatInfo, selectChargeList} from "@/api/inpatient/charge-list";
|
|
|
-import {elDateRangeAddTime} from "@/utils/moment-utils";
|
|
|
+import { MedicalTrack } from "@/views/view/patient360/src/index";
|
|
|
+import requestV2, { AxiosRequestConfigV2 } from "@/utils/request-v2";
|
|
|
+import { computed, reactive, Ref, ref } from "vue";
|
|
|
+import {
|
|
|
+ selectBriefPatInfo,
|
|
|
+ selectChargeList,
|
|
|
+} from "@/api/inpatient/charge-list";
|
|
|
+import { elDateRangeAddTime } from "@/utils/moment-utils";
|
|
|
import CyDialog from "@/components/cy/dialog/src/CyDialog.vue";
|
|
|
import OrderTable from "@/components/order-table/OrderTable.vue";
|
|
|
import setDialogToJs from "@/components/js-dialog-comp/useDialogToJs";
|
|
|
import OrderFeeTable from "@/components/order-table/OrderFeeTable.vue";
|
|
|
|
|
|
function request(options: AxiosRequestConfigV2) {
|
|
|
- return requestV2({...options, showLoading: false})
|
|
|
+ return requestV2({ ...options, showLoading: false });
|
|
|
}
|
|
|
|
|
|
-export const yzData = ref([])
|
|
|
-export const emrData = ref([])
|
|
|
-export const jySrc = ref('http://172.16.32.178/apps/elims/#/query/report?mode=lis&rightId=1')
|
|
|
-export const jcSrc = ref('http://172.16.32.122:8099/index.htm')
|
|
|
+export const yzData = ref([]);
|
|
|
+export const emrData = ref([]);
|
|
|
+export const jySrc = ref(
|
|
|
+ "http://172.16.32.178/apps/elims/#/query/report?mode=lis&rightId=1"
|
|
|
+);
|
|
|
+export const jcSrc = ref("http://172.16.32.122:8099/index.htm");
|
|
|
|
|
|
interface MedicalTrackHosp extends MedicalTrack {
|
|
|
- patNo: string;
|
|
|
- times: number
|
|
|
+ patNo: string;
|
|
|
+ times: number;
|
|
|
}
|
|
|
|
|
|
export const patInfo = ref<MedicalTrackHosp>({
|
|
|
- admissDate: "",
|
|
|
- date: "",
|
|
|
- deptName: "",
|
|
|
- disDate: "",
|
|
|
- outOrHosp: 0,
|
|
|
- patNo: "",
|
|
|
- times: 0,
|
|
|
- uid: ""
|
|
|
-})
|
|
|
+ admissDate: "",
|
|
|
+ date: "",
|
|
|
+ deptName: "",
|
|
|
+ disDate: "",
|
|
|
+ outOrHosp: 0,
|
|
|
+ patNo: "",
|
|
|
+ times: 0,
|
|
|
+ uid: "",
|
|
|
+});
|
|
|
export const feeQuery = reactive({
|
|
|
- chargeCode: '',
|
|
|
- dateRange: [],
|
|
|
- dateDefault: null
|
|
|
-})
|
|
|
+ chargeCode: "",
|
|
|
+ dateRange: [],
|
|
|
+ dateDefault: null,
|
|
|
+});
|
|
|
|
|
|
export const orderQuery = reactive({
|
|
|
- dateRange: [],
|
|
|
-})
|
|
|
+ dateRange: [],
|
|
|
+});
|
|
|
|
|
|
interface PatInfo360Data {
|
|
|
- sheetData: any;
|
|
|
- yzTemperatureData: any[];
|
|
|
- yzTemperatureMap: any;
|
|
|
+ sheetData: any;
|
|
|
+ yzTemperatureData: any[];
|
|
|
+ yzTemperatureMap: any;
|
|
|
|
|
|
- // 会诊
|
|
|
- consultationData: any[]
|
|
|
- briefPatInfo: any,
|
|
|
- sumsMap: any,
|
|
|
- chargeListMap: any,
|
|
|
- zyFeeDetail: any[]
|
|
|
- size: {
|
|
|
- height: number,
|
|
|
- width: number,
|
|
|
- }
|
|
|
+ // 会诊
|
|
|
+ consultationData: any[];
|
|
|
+ briefPatInfo: any;
|
|
|
+ sumsMap: any;
|
|
|
+ chargeListMap: any;
|
|
|
+ zyFeeDetail: any[];
|
|
|
+ size: {
|
|
|
+ height: number;
|
|
|
+ width: number;
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
export const patInfo360Data: PatInfo360Data = reactive({
|
|
|
- sheetData: {},
|
|
|
- yzTemperatureData: [],
|
|
|
- yzTemperatureMap: {},
|
|
|
- consultationData: [],
|
|
|
- briefPatInfo: {},
|
|
|
- sumsMap: {},
|
|
|
- chargeListMap: {},
|
|
|
- zyFeeDetail: [],
|
|
|
- size: {
|
|
|
- height: 0,
|
|
|
- width: 0,
|
|
|
- }
|
|
|
-})
|
|
|
+ sheetData: {},
|
|
|
+ yzTemperatureData: [],
|
|
|
+ yzTemperatureMap: {},
|
|
|
+ consultationData: [],
|
|
|
+ briefPatInfo: {},
|
|
|
+ sumsMap: {},
|
|
|
+ chargeListMap: {},
|
|
|
+ zyFeeDetail: [],
|
|
|
+ size: {
|
|
|
+ height: 0,
|
|
|
+ width: 0,
|
|
|
+ },
|
|
|
+});
|
|
|
|
|
|
-
|
|
|
-export function patInfo360Computed(name: keyof PatInfo360Data, data: Ref<any>, isPatInfo360: boolean) {
|
|
|
- return computed({
|
|
|
- get() {
|
|
|
- if (isPatInfo360) {
|
|
|
- return patInfo360Data[name]
|
|
|
- }
|
|
|
- return data.value
|
|
|
- },
|
|
|
- set(val) {
|
|
|
- if (isPatInfo360) {
|
|
|
- patInfo360Data[name] = val
|
|
|
- } else {
|
|
|
- data.value = val
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
+export function patInfo360Computed(
|
|
|
+ name: keyof PatInfo360Data,
|
|
|
+ data: Ref<any>,
|
|
|
+ isPatInfo360: boolean
|
|
|
+) {
|
|
|
+ return computed({
|
|
|
+ get() {
|
|
|
+ if (isPatInfo360) {
|
|
|
+ return patInfo360Data[name];
|
|
|
+ }
|
|
|
+ return data.value;
|
|
|
+ },
|
|
|
+ set(val) {
|
|
|
+ if (isPatInfo360) {
|
|
|
+ patInfo360Data[name] = val;
|
|
|
+ } else {
|
|
|
+ data.value = val;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
-
|
|
|
function getSheetInfo() {
|
|
|
- request({
|
|
|
- method: 'post',
|
|
|
- url: '/patient360/hosp/getSheetInfo',
|
|
|
- data: {
|
|
|
- bah: patInfo.value.patNo,
|
|
|
- times: patInfo.value.times,
|
|
|
- inOutFlag: patInfo.value.inTheHospital
|
|
|
- }
|
|
|
- }).then((res) => {
|
|
|
- patInfo360Data.sheetData = res
|
|
|
- })
|
|
|
+ request({
|
|
|
+ method: "post",
|
|
|
+ url: "/patient360/hosp/getSheetInfo",
|
|
|
+ data: {
|
|
|
+ bah: patInfo.value.patNo,
|
|
|
+ times: patInfo.value.times,
|
|
|
+ inOutFlag: patInfo.value.inTheHospital,
|
|
|
+ },
|
|
|
+ }).then(res => {
|
|
|
+ patInfo360Data.sheetData = res;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
export async function getYzTemperatureData(start: string, end: string) {
|
|
|
- const param = {
|
|
|
- startTime: start ?? patInfo.value.admissDate,
|
|
|
- endTime: end ?? patInfo.value.disDate,
|
|
|
- patNo: patInfo.value.patNo,
|
|
|
- times: patInfo.value.times
|
|
|
- }
|
|
|
- await get360YzTemperature(param).catch(() => {
|
|
|
- return {list: [], map: {}}
|
|
|
- }).then(res => {
|
|
|
- patInfo360Data.yzTemperatureData = res.list
|
|
|
- patInfo360Data.yzTemperatureMap = res.map
|
|
|
+ const param = {
|
|
|
+ startTime: start ?? patInfo.value.admissDate,
|
|
|
+ endTime: end ?? patInfo.value.disDate,
|
|
|
+ patNo: patInfo.value.patNo,
|
|
|
+ times: patInfo.value.times,
|
|
|
+ };
|
|
|
+ await get360YzTemperature(param)
|
|
|
+ .catch(() => {
|
|
|
+ return { list: [], map: {} };
|
|
|
})
|
|
|
+ .then(res => {
|
|
|
+ patInfo360Data.yzTemperatureData = res.list;
|
|
|
+ patInfo360Data.yzTemperatureMap = res.map;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
export function getYz() {
|
|
|
- const {start, end} = elDateRangeAddTime(orderQuery.dateRange)
|
|
|
- request({
|
|
|
- method: 'post',
|
|
|
- url: '/patient360/hosp/getYz',
|
|
|
- data: {
|
|
|
- startTime: start,
|
|
|
- endTime: end,
|
|
|
- ...patInfo.value
|
|
|
- }
|
|
|
- }).then((res) => {
|
|
|
- yzData.value = res
|
|
|
- })
|
|
|
+ const { start, end } = elDateRangeAddTime(orderQuery.dateRange);
|
|
|
+ request({
|
|
|
+ method: "post",
|
|
|
+ url: "/patient360/hosp/getYz",
|
|
|
+ data: {
|
|
|
+ startTime: start,
|
|
|
+ endTime: end,
|
|
|
+ ...patInfo.value,
|
|
|
+ },
|
|
|
+ }).then(res => {
|
|
|
+ yzData.value = res;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
export function get360YzTemperature(data: any) {
|
|
|
- return request({
|
|
|
- method: 'post',
|
|
|
- url: '/patient360/hosp/getYzTemperature',
|
|
|
- data: data
|
|
|
- })
|
|
|
+ return request({
|
|
|
+ method: "post",
|
|
|
+ url: "/patient360/hosp/getYzTemperature",
|
|
|
+ data: data,
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
function getEmrData() {
|
|
|
- request({
|
|
|
- method: 'POST',
|
|
|
- url: '/patient360/hosp/electronicMedicalRecords',
|
|
|
- data: {
|
|
|
- patNo: patInfo.value.patNo,
|
|
|
- times: patInfo.value.times
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- emrData.value = res
|
|
|
- })
|
|
|
+ request({
|
|
|
+ method: "POST",
|
|
|
+ url: "/patient360/hosp/electronicMedicalRecords",
|
|
|
+ data: {
|
|
|
+ patNo: patInfo.value.patNo,
|
|
|
+ times: patInfo.value.times,
|
|
|
+ },
|
|
|
+ }).then(res => {
|
|
|
+ emrData.value = res;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
function getHzInfo() {
|
|
|
- request({
|
|
|
- method: 'get',
|
|
|
- url: '/patient360/hosp/hzInfo',
|
|
|
- params: {inpatientNo: patInfo.value.patNo, admissTimes: patInfo.value.times}
|
|
|
- }).then(res => {
|
|
|
- patInfo360Data.consultationData = res
|
|
|
- })
|
|
|
+ request({
|
|
|
+ method: "get",
|
|
|
+ url: "/patient360/hosp/hzInfo",
|
|
|
+ params: {
|
|
|
+ inpatientNo: patInfo.value.patNo,
|
|
|
+ admissTimes: patInfo.value.times,
|
|
|
+ },
|
|
|
+ }).then(res => {
|
|
|
+ patInfo360Data.consultationData = res;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
export function getHzDetails(params) {
|
|
|
- return request({
|
|
|
- method: 'get',
|
|
|
- url: '/patient360/hosp/hzDetails',
|
|
|
- params: params
|
|
|
- })
|
|
|
+ return request({
|
|
|
+ method: "get",
|
|
|
+ url: "/patient360/hosp/hzDetails",
|
|
|
+ params: params,
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
async function getFyqd() {
|
|
|
- const data = {
|
|
|
- patNo: patInfo.value.patNo,
|
|
|
- times: patInfo.value.times,
|
|
|
- }
|
|
|
- await selectBriefPatInfo(data).then(res => {
|
|
|
- patInfo360Data.briefPatInfo = res
|
|
|
- })
|
|
|
- await selectChargeList(data).then(res => {
|
|
|
- patInfo360Data.chargeListMap = res.chargeList
|
|
|
- patInfo360Data.sumsMap = res.sumsMap
|
|
|
- })
|
|
|
+ const data = {
|
|
|
+ patNo: patInfo.value.patNo,
|
|
|
+ times: patInfo.value.times,
|
|
|
+ };
|
|
|
+ await selectBriefPatInfo(data).then(res => {
|
|
|
+ patInfo360Data.briefPatInfo = res;
|
|
|
+ });
|
|
|
+ await selectChargeList(data).then(res => {
|
|
|
+ patInfo360Data.chargeListMap = res.chargeList;
|
|
|
+ patInfo360Data.sumsMap = res.sumsMap;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
export function getZyFeeDetail(clear: boolean = false) {
|
|
|
- if (clear) {
|
|
|
- feeQuery.dateRange = [];
|
|
|
- feeQuery.chargeCode = '';
|
|
|
- feeQuery.dateDefault = [patInfo.value.admissDate, patInfo.value.disDate ?? new Date()]
|
|
|
- }
|
|
|
- request({
|
|
|
- method: 'post',
|
|
|
- url: '/patient360/hosp/getZyFeeDetail',
|
|
|
- data: {
|
|
|
- patNo: patInfo.value.patNo,
|
|
|
- times: patInfo.value.times,
|
|
|
- ...elDateRangeAddTime(feeQuery.dateRange),
|
|
|
- chargeCodeMx: feeQuery.chargeCode
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- patInfo360Data.zyFeeDetail = res
|
|
|
- });
|
|
|
+ if (clear) {
|
|
|
+ feeQuery.dateRange = [];
|
|
|
+ feeQuery.chargeCode = "";
|
|
|
+ feeQuery.dateDefault = [
|
|
|
+ patInfo.value.admissDate,
|
|
|
+ patInfo.value.disDate ?? new Date(),
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ request({
|
|
|
+ method: "post",
|
|
|
+ url: "/patient360/hosp/getZyFeeDetail",
|
|
|
+ data: {
|
|
|
+ patNo: patInfo.value.patNo,
|
|
|
+ times: patInfo.value.times,
|
|
|
+ ...elDateRangeAddTime(feeQuery.dateRange),
|
|
|
+ chargeCodeMx: feeQuery.chargeCode,
|
|
|
+ },
|
|
|
+ }).then(res => {
|
|
|
+ patInfo360Data.zyFeeDetail = res;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
-
|
|
|
const 打开费用关联的医嘱明细 = {
|
|
|
- orderNo: '',
|
|
|
- data: {},
|
|
|
-}
|
|
|
+ orderNo: "",
|
|
|
+ data: {},
|
|
|
+};
|
|
|
|
|
|
interface OrderDetailByOrderNo {
|
|
|
- yzList: any[];
|
|
|
- feeList: any[]
|
|
|
+ yzList: any[];
|
|
|
+ feeList: any[];
|
|
|
}
|
|
|
|
|
|
const open = (data: OrderDetailByOrderNo) => (
|
|
|
- <CyDialog title="医嘱费用详情"
|
|
|
- full-screen
|
|
|
- body-padding="0"
|
|
|
- ignore-error>
|
|
|
- {{
|
|
|
- default({height}: { height: number }) {
|
|
|
- return [
|
|
|
- <OrderTable pat-info360={true}
|
|
|
- height={height / 2}
|
|
|
- data={data.yzList}/>,
|
|
|
- <OrderFeeTable
|
|
|
- data={data.feeList}
|
|
|
- height={height / 2}
|
|
|
- />
|
|
|
- ]
|
|
|
- }
|
|
|
- }}
|
|
|
-
|
|
|
- </CyDialog>
|
|
|
-)
|
|
|
+ <CyDialog title="医嘱费用详情" full-screen body-padding="0" ignore-error>
|
|
|
+ {{
|
|
|
+ default({ height }: { height: number }) {
|
|
|
+ return [
|
|
|
+ <OrderTable
|
|
|
+ pat-info360={true}
|
|
|
+ height={height / 2}
|
|
|
+ data={data.yzList}
|
|
|
+ />,
|
|
|
+ <OrderFeeTable data={data.feeList} height={height / 2} />,
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ }}
|
|
|
+ </CyDialog>
|
|
|
+);
|
|
|
|
|
|
export async function getOrderDetailByOrderNo(orderNo: string) {
|
|
|
- let data = {}
|
|
|
- if (orderNo === 打开费用关联的医嘱明细.orderNo) {
|
|
|
- data = 打开费用关联的医嘱明细.data
|
|
|
- } else {
|
|
|
- await request<OrderDetailByOrderNo>({
|
|
|
- method: 'get',
|
|
|
- url: '/patient360/hosp/getOrderDetailByOrderNo',
|
|
|
- params: {orderNo: orderNo}
|
|
|
- }).then(res => {
|
|
|
- data = res
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- 打开费用关联的医嘱明细.orderNo = orderNo
|
|
|
- 打开费用关联的医嘱明细.data = data
|
|
|
- setDialogToJs(open(data), {}).then(res => {
|
|
|
+ let data = {};
|
|
|
+ if (orderNo === 打开费用关联的医嘱明细.orderNo) {
|
|
|
+ data = 打开费用关联的医嘱明细.data;
|
|
|
+ } else {
|
|
|
+ await request<OrderDetailByOrderNo>({
|
|
|
+ method: "get",
|
|
|
+ url: "/patient360/hosp/getOrderDetailByOrderNo",
|
|
|
+ params: { orderNo: orderNo },
|
|
|
+ }).then(res => {
|
|
|
+ data = res;
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- })
|
|
|
+ 打开费用关联的医嘱明细.orderNo = orderNo;
|
|
|
+ 打开费用关联的医嘱明细.data = data;
|
|
|
+ setDialogToJs(open(data), {}).then(res => {});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
function hosp(medicalTrack: MedicalTrack) {
|
|
|
- patInfo.value = medicalTrack
|
|
|
- getYz()
|
|
|
- getEmrData()
|
|
|
- getSheetInfo()
|
|
|
- getYzTemperatureData()
|
|
|
- getHzInfo()
|
|
|
- getFyqd();
|
|
|
- getZyFeeDetail(true)
|
|
|
- jcSrc.value = `http://172.16.32.122:8099/index.htm?INHOSPITALNUM=${patInfo.value.patNo}`
|
|
|
- // jySrc.value =
|
|
|
+ patInfo.value = medicalTrack;
|
|
|
+ getYz();
|
|
|
+ getEmrData();
|
|
|
+ getSheetInfo();
|
|
|
+ getYzTemperatureData();
|
|
|
+ getHzInfo();
|
|
|
+ getFyqd();
|
|
|
+ getZyFeeDetail(true);
|
|
|
+ jcSrc.value = `http://172.16.32.122:8099/index.htm?INHOSPITALNUM=${patInfo.value.patNo}`;
|
|
|
+ // jySrc.value =
|
|
|
}
|
|
|
|
|
|
-export default hosp
|
|
|
+export default hosp;
|