|
@@ -34,16 +34,6 @@
|
|
|
:max-height="maxHeight"/>
|
|
|
</div>
|
|
|
<emr-patient-list @rowClick="listRowClick" v-model="patientListDrawer"/>
|
|
|
-
|
|
|
- <!-- <xc-dialog-v2 v-model="dialog" title="病历限制" manual-shutdown>-->
|
|
|
- <!-- <div style="color: red;font-size: 24px">-->
|
|
|
- <!-- 请各位医生先阅读操作指南 8.15.病历限制,点击下载和在线阅读即可关闭当前弹窗。-->
|
|
|
- <!-- </div>-->
|
|
|
- <!-- <template #footer>-->
|
|
|
- <!-- <el-button @click="操作指南(1)">下载</el-button>-->
|
|
|
- <!-- <el-button @click="操作指南(2)">在线阅读</el-button>-->
|
|
|
- <!-- </template>-->
|
|
|
- <!-- </xc-dialog-v2>-->
|
|
|
</template>
|
|
|
|
|
|
<script setup name='Home'>
|
|
@@ -119,58 +109,50 @@ const disPatients = async () => {
|
|
|
const routerFunc = async () => {
|
|
|
emrMainRef.value?.closeWebSocket()
|
|
|
show = false
|
|
|
- if (router.currentRoute.value.params.pat) {
|
|
|
- resolveRoute(router.currentRoute.value.params.pat)
|
|
|
- let sid = 'emr_' + query.value.patNo.trim() + "_" + query.value.times
|
|
|
- let res = await repeatedlyOpenTheSamePatient(sid)
|
|
|
- console.log('重复打开病历 %o 连接 %s', res, sid);
|
|
|
- if (res) {
|
|
|
- show = false
|
|
|
- ElMessageBox.confirm('病历重复打开,请检查确认没有重复打开的病历,点击解锁后原患者病历会被关闭。', '提示', {
|
|
|
- type: 'warning',
|
|
|
- confirmButtonText: '解锁',
|
|
|
- }).then(() => {
|
|
|
- emrSocketUnlock()
|
|
|
- }).catch(() => {
|
|
|
-
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- console.log(query.value)
|
|
|
- let reqUnlock = await getMyUnlockByPatNo(query.value.patNo, query.value.times)
|
|
|
- console.log('申请数据 %o', reqUnlock)
|
|
|
- if (reqUnlock != null) {
|
|
|
- reqUnlock.unlockJson = JSON.parse(reqUnlock.unlockJson)
|
|
|
- applicationData.value = reqUnlock
|
|
|
- } else {
|
|
|
- applicationData.value = null
|
|
|
- }
|
|
|
- if (query.value.state !== 2) {
|
|
|
- patientInfo = await getPatientInfo(query.value.patNo);
|
|
|
- patientInfo.$inOutFlag = 1;
|
|
|
- }
|
|
|
- if (query.value.state === 1) {
|
|
|
- await queryActPatient()
|
|
|
- } else if (query.value.state === 2) {
|
|
|
- await queryDisPatient()
|
|
|
- } else if (query.value.state === 3) {
|
|
|
- await queryAllPatients(true)
|
|
|
- } else if (query.value.state === 4) {
|
|
|
- await queryAllPatients(false)
|
|
|
- } else if (query.value.state === 5) {
|
|
|
- await queryDisPatient()
|
|
|
- emrConfig.value.editor = false
|
|
|
- }
|
|
|
- await nextTick();
|
|
|
- } else {
|
|
|
+ if (!router.currentRoute.value.params.pat) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ resolveRoute(router.currentRoute.value.params.pat)
|
|
|
+ let sid = 'emr_' + query.value.patNo.trim() + "_" + query.value.times
|
|
|
+ let res = await repeatedlyOpenTheSamePatient(sid)
|
|
|
+ console.log('重复打开病历 %o 连接 %s', res, sid);
|
|
|
+ if (res) {
|
|
|
show = false
|
|
|
+ await ElMessageBox.confirm('病历重复打开,请检查确认没有重复打开的病历,点击解锁后原患者病历会被关闭。', '提示', {
|
|
|
+ type: 'warning',
|
|
|
+ confirmButtonText: '解锁',
|
|
|
+ })
|
|
|
+ await emrSocketUnlock()
|
|
|
+ }
|
|
|
+ console.log('查询数据 %o', query.value)
|
|
|
+ let reqUnlock = await getMyUnlockByPatNo(query.value.patNo, query.value.times)
|
|
|
+ console.log('申请数据 %o', reqUnlock)
|
|
|
+ if (reqUnlock != null) {
|
|
|
+ reqUnlock.unlockJson = JSON.parse(reqUnlock.unlockJson)
|
|
|
+ applicationData.value = reqUnlock
|
|
|
+ } else {
|
|
|
+ applicationData.value = null
|
|
|
+ }
|
|
|
+ // 在院编辑病历
|
|
|
+ if (query.value.state === 1) {
|
|
|
+ patientInfo = await getPatientInfo(query.value.patNo);
|
|
|
+ patientInfo.$inOutFlag = 1;
|
|
|
+ show = true
|
|
|
+ } else if (query.value.state === 2) {
|
|
|
+ // 出院编辑病历,
|
|
|
+ await queryDisPatient()
|
|
|
+ } else if (query.value.state === 4) {
|
|
|
+ // 在院只读病历
|
|
|
+ patientInfo = await getPatientInfo(query.value.patNo);
|
|
|
+ patientInfo.$inOutFlag = 1;
|
|
|
+ await queryAllPatients(false)
|
|
|
+ } else if (query.value.state === 5) {
|
|
|
+ // 出院只读病历
|
|
|
+ await queryDisPatient()
|
|
|
+ emrConfig.value.editor = false
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 查询在院患者数据
|
|
|
-const queryActPatient = async () => {
|
|
|
- show = true
|
|
|
-}
|
|
|
|
|
|
// 查询出院患者信息
|
|
|
const queryDisPatient = async () => {
|
|
@@ -193,7 +175,7 @@ const allPatientsInTheHospital = async () => {
|
|
|
if (!query.value.patNo) {
|
|
|
BizException(ExceptionEnum.MESSAGE_ERROR, '请输入住院号。 ')
|
|
|
}
|
|
|
- query.value.state = 3
|
|
|
+ query.value.state = 1
|
|
|
let te = JSON.stringify(query.value)
|
|
|
await router.push('/myEmrEditor/' + window.btoa(te))
|
|
|
location.reload()
|