diff --git a/.vscode/settings.json b/.vscode/settings.json
index 9378abd..1d954e3 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -25,6 +25,7 @@
"SFXHCZ",
"SFYNCZ",
"splashscreen",
+ "Thrombolysis",
"TZCZYS",
"TZJL",
"uniui",
diff --git a/TODO.md b/TODO.md
new file mode 100644
index 0000000..4fc358c
--- /dev/null
+++ b/TODO.md
@@ -0,0 +1,14 @@
+# TODOList
+
+1. 配置路径的使用
+2. 代理路径的加入, 在http 或 post方法封装的地方统一修改就行
+3. token过期重新请求的问题
+4. 节点列表 服务端数据不全 没写
+5. 详情直接显示对应的模块 url里填个type的参数 onLoad根据参数显示
+6. 辅助工具 与 签名的默认显示
+7. 签名的上传? 没有接口
+ H5默认生成的是base64
+ APP端生成的是文件路径
+ 建议根据条件 两种上传方式
+8. 详情表单里 如: 选了其他 需要填写的 建议将其他填写的内容独立为一个字段 前端好回显
+ ra(mg) 那个也是一样的道理
diff --git a/api/modules/service.ts b/api/modules/service.ts
index dad6596..b7a130f 100644
--- a/api/modules/service.ts
+++ b/api/modules/service.ts
@@ -1,4 +1,5 @@
import { post } from '@/api/base'
+
// import { useUserStoreWidthOut } from '@/store/modules/user'
// const userStore = useUserStoreWidthOut()
@@ -33,4 +34,10 @@ export const serviceApi = {
// 查 下一个节点
getNextNode: (firstAidId: string) => post('/firstAid/next', { param: { firstAidId } }),
+
+ // 查溶栓记录
+ getThrombolysisRecord: (firstAidId: string) => post('/firstAid/queryThrombolysisRecord', { param: { firstAidId } }),
+
+ // 导出溶栓记录
+ exportThrombolysisRecord: (firstAidId: string) => post('/firstAid/exportThrombolysisRecord', { param: { firstAidId } }),
}
diff --git a/components/CodeFormItem/CodeFormItem.vue b/components/CodeFormItem/CodeFormItem.vue
index 1a372f7..56ec206 100644
--- a/components/CodeFormItem/CodeFormItem.vue
+++ b/components/CodeFormItem/CodeFormItem.vue
@@ -1,28 +1,34 @@
+
+
+
+
+
+
+ @click="$emit('on-click', code)">
{{ value }}
-
+
{{ value || config.rightText }}
@@ -44,7 +50,7 @@ interface IProps {
const firstAidId = inject[>('firstAidId')
const props = defineProps()
-defineEmits(['on-change'])
+defineEmits(['on-change', 'on-click'])
const config = computed(() => CODE_DICT[props.code])
diff --git a/components/DetailAidRecord/DetailAidRecord.vue b/components/DetailAidRecord/DetailAidRecord.vue
index f8d66c5..3fb125a 100644
--- a/components/DetailAidRecord/DetailAidRecord.vue
+++ b/components/DetailAidRecord/DetailAidRecord.vue
@@ -52,6 +52,8 @@
]
+
+
@@ -120,10 +122,7 @@ async function onChange(code: string, value: string) {
}
}
-
function init() {
-
-
// 同步store里的急救信息
if (!currentPatient.value) return
// console.log('aid record init', currentPatient.value.recordValDict['RYPG-NIHSS'][0]);
diff --git a/components/JMRS/JMRS.vue b/components/JMRS/JMRS.vue
index 630f22c..dd4ffcf 100644
--- a/components/JMRS/JMRS.vue
+++ b/components/JMRS/JMRS.vue
@@ -1,7 +1,7 @@
-
+
@@ -35,12 +35,26 @@
+
+
+
+
+ 家属签名
+ 辅助工具
+
+
+
+
+
+
+
+
+
+
diff --git a/components/Sign/Sign.vue b/components/Sign/Sign.vue
new file mode 100644
index 0000000..969970e
--- /dev/null
+++ b/components/Sign/Sign.vue
@@ -0,0 +1,120 @@
+
+
+
+
+ 知情同意书内容
+
+
+
+
+
+
+ 重写
+ 确认签名
+
+
+
+
+
diff --git a/components/Tool/Tool.vue b/components/Tool/Tool.vue
new file mode 100644
index 0000000..a1344c7
--- /dev/null
+++ b/components/Tool/Tool.vue
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/config/code.ts b/config/code.ts
index 94f80c3..4d14209 100644
--- a/config/code.ts
+++ b/config/code.ts
@@ -199,10 +199,9 @@ export const AID_RECORD_DICT = {
export const CODE_JMRS = {
'JMRS-TOOL': {
text: '辅助工具',
- type: 'page',
+ type: 'text',
rightText: '去查看',
rightArrow: true,
- page: { name: 'JMRS-TOOL' },
},
'JMRS-TH-TIME': {
text: '谈话开始时间',
@@ -212,10 +211,9 @@ export const CODE_JMRS = {
},
'JMRS-SIGN': {
text: '签署知情同意书',
- type: 'page',
+ type: 'text',
rightText: '去签署',
rightArrow: true,
- page: { name: 'JMRS-SIGN' },
},
'JMRS-Q-NIHSS': {
text: 'NIHSS评分',
diff --git a/hooks/useNextNode.ts b/hooks/useNextNode.ts
index ff9c453..e35de07 100644
--- a/hooks/useNextNode.ts
+++ b/hooks/useNextNode.ts
@@ -24,7 +24,7 @@ export function useNextNode() {
async function getNextNode() {
if (!currentFirstAidId.value) {
- uni.$u.alertError('没有急救id信息')
+ uni.$u.toast('没有急救id信息')
return
}
try {
@@ -50,6 +50,7 @@ export function useNextNode() {
// 循环查下个节点
function intervalGetNextCode() {
+ getNextNode()
timer && clearInterval(timer)
timer = setInterval(() => {
getNextNode()
diff --git a/pages.json b/pages.json
index 97471d8..3ab7317 100644
--- a/pages.json
+++ b/pages.json
@@ -64,6 +64,12 @@
"style": {
"navigationBarTitleText": "JMRS-SIGN"
}
+ },
+ {
+ "path": "pages/thrombolysisRecord/thrombolysisRecord",
+ "style": {
+ "navigationBarTitleText": "thrombolysisRecord"
+ }
}
],
"globalStyle": {
diff --git a/pages/detail1/detail1.vue b/pages/detail1/detail1.vue
index 75aebf1..c57ab48 100644
--- a/pages/detail1/detail1.vue
+++ b/pages/detail1/detail1.vue
@@ -16,7 +16,7 @@
高效 便捷 精准
-
+
急诊溶栓记录
@@ -36,7 +36,7 @@
-
+
@@ -69,16 +69,16 @@
-
+
- 身高:1222222222
- 体重:1222222222
- BMI:1222222222
+ 身高:{{ height }}
+ 体重:{{ weight }}
+ BMI:{{ bmi }}
- 脉搏:1222222222
+ 脉搏:{{ pulse }}
@@ -131,7 +131,7 @@
-
+
@@ -140,15 +140,29 @@ import { onLoad } from '@dcloudio/uni-app';
import { ref, computed } from 'vue';
import { useServiceStore } from '@/store/modules/service';
import { GET_GENDER_TEXT_BY_CODE } from '@/config/service';
+import { computeBMI } from '@/utils/common';
+import { FIRST_AID_ZL_TYPE } from '@/config/service'
+
const serviceStore = useServiceStore()
const firstAidId = ref('')
const currentPatient = computed(() => serviceStore.currentPatient)
-const mrs = computed(() => serviceStore.getMRS)
-const nihss = computed(() => serviceStore.getNIHSS)
-const ssy = computed(() => serviceStore.getSSY)
-const szy = computed(() => serviceStore.getSZY)
+const mrs = computed(() => serviceStore.getCodeValue('RYPG-MRS'))
+const nihss = computed(() => serviceStore.getCodeValue('RYPG-NIHSS'))
+const ssy = computed(() => serviceStore.getCodeValue('RYPG-SYSTOLIC-PRESSURE')) // 收缩压
+const szy = computed(() => serviceStore.getCodeValue('RYPG-DIASTOLIC-PRESSURE')) // 舒张压
+const height = computed(() => serviceStore.getCodeValue('RYPG-HEIGHT'))
+const weight = computed(() => serviceStore.getCodeValue('RYPG-WEIGHT'))
+const bmi = computed(() => computeBMI(height.value, weight.value))
+const pulse = computed(() => serviceStore.getCodeValue("RYPG-PULSE")) // 脉搏
+const zdjg = computed(() => serviceStore.getCodeValue("RYPG-ZDJG")) // 初步诊断
+// 疑似诊断
+const firstAidZlType = computed(() => {
+ const value = currentPatient.value?.firstAidZlType
+ return value === undefined ? '' : FIRST_AID_ZL_TYPE[value].text
+})
+
function onClickLeft() {
@@ -171,6 +185,11 @@ async function getAidInfo(firstAidId: string) {
}
}
+// 打开急诊溶栓记录
+function openThrombolysisRecord() {
+ uni.$u.openPage('thrombolysisRecord', false, `firstAidId=${firstAidId.value}`)
+}
+
onLoad((option) => {
if (!option?.firstAidId) {
uni.$u.toast('url中缺少急救id参数')
diff --git a/pages/detail2/detail2.vue b/pages/detail2/detail2.vue
index b0168f9..8baef63 100644
--- a/pages/detail2/detail2.vue
+++ b/pages/detail2/detail2.vue
@@ -70,7 +70,7 @@
-
+
急诊溶栓记录
@@ -126,10 +126,9 @@ async function getAidInfo(firstAidId: string) {
function onClickRight() {
uni.$u.openPage('detail1', true, `firstAidId=${firstAidId.value}`)
}
-
-// 急诊溶栓记录
-function onCreateRecord() {
-
+// 打开急诊溶栓记录
+function openThrombolysisRecord() {
+ uni.$u.openPage('thrombolysisRecord', false, `firstAidId=${firstAidId.value}`)
}
onBackPress(() => {
diff --git a/pages/thrombolysisRecord/thrombolysisRecord.vue b/pages/thrombolysisRecord/thrombolysisRecord.vue
new file mode 100644
index 0000000..468d23c
--- /dev/null
+++ b/pages/thrombolysisRecord/thrombolysisRecord.vue
@@ -0,0 +1,106 @@
+
+
+
+
+ 溶栓记录
+ 导出
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+ {{ item.text }}
+
+
+
+
+
+
+
+
+
+
diff --git a/store/modules/service.ts b/store/modules/service.ts
index 4c952f7..f60636e 100644
--- a/store/modules/service.ts
+++ b/store/modules/service.ts
@@ -47,48 +47,18 @@ export const useServiceStore = defineStore({
host: ({ device }) => device?.host || '',
carNo: ({ currentCar }) => currentCar?.carNo || '', // 平车编号
currentFirstAidId: ({ currentPatient }) => currentPatient?.firstAidId,
- // 查mrs NIHSS评分
- getScore:
- ({ score }) =>
- (type: string) =>
- score[type],
-
- getMRS({ currentPatient }) {
- if (!currentPatient?.recordValDict || !currentPatient.recordValDict['RYPG-MRS'] || !currentPatient.recordValDict['RYPG-MRS'][0]) {
- return ''
- }
- return currentPatient?.recordValDict['RYPG-MRS'][0]?.answer[0] || ''
- },
- getNIHSS({ currentPatient }) {
- if (!currentPatient?.recordValDict || !currentPatient.recordValDict['RYPG-NIHSS'] || !currentPatient.recordValDict['RYPG-NIHSS'][0]) {
- return ''
- }
- return currentPatient?.recordValDict['RYPG-NIHSS'][0]?.answer[0] || ''
- },
- // 收缩压
- getSSY({ currentPatient }) {
- const code = 'RYPG-SYSTOLIC-PRESSURE'
- if (!currentPatient?.recordValDict || !currentPatient.recordValDict[code] || !currentPatient.recordValDict[code][0]) {
- return ''
+ // 获取急救信息 code 对应的answer
+ getCodeValue({ currentPatient }) {
+ return (code: string) => {
+ if (!currentPatient?.recordValDict || !currentPatient.recordValDict[code] || !currentPatient.recordValDict[code][0]) {
+ return ''
+ }
+ return currentPatient?.recordValDict[code][0]?.answer[0] || ''
}
- return currentPatient?.recordValDict[code][0]?.answer[0] || ''
- },
- // 舒张压压
- getSZY({ currentPatient }) {
- const code = 'RYPG-DIASTOLIC-PRESSURE'
- if (!currentPatient?.recordValDict || !currentPatient.recordValDict[code] || !currentPatient.recordValDict[code][0]) {
- return ''
- }
- return currentPatient?.recordValDict[code][0]?.answer[0] || ''
},
},
actions: {
- // 设置 mrs NIHSS评分
- setScore(type: string, value: string) {
- this.score[type] = value
- },
-
setCurrentPatient(patient: IPatient | null) {
this.currentPatient = patient
},