Browse Source

大肠癌筛查ob

hd 3 months ago
parent
commit
bc420839ac

+ 36 - 36
api/jbsc-api.js

@ -6,7 +6,7 @@
    },
    //统计模型
    screenStatics: function (data) {
      return httpRequest.post('doctor/screen/screenStatics',{ data: data })
      return httpRequest.post('doctor/screen/screenStatics', { data: data })
    },
    //专科疾病列表
    getSpecialDisease: function (data) {
@ -16,18 +16,18 @@
    getResultList: function (data) {
      return httpRequest.get('doctor/screen/getResultList', { data: data })
    },
	//专科获取筛查列表
	getList: function (data) {
	  return httpRequest.get('doctor/specialist/screen/getList', { data: data })
	},
	// 获取ASCVD居民
	getPatientSignByTwoDoctor: function (data) {
	  return httpRequest.get('doctor/patient/getPatientSignByDoctor', { data: data })
	},
	// ASCVD   社区随访
	changeSurveyState: function (data) {
	  return httpRequest.post('doctor/screen/changeSurveyState', { data: data })
	},
    //专科获取筛查列表
    getList: function (data) {
      return httpRequest.get('doctor/specialist/screen/getList', { data: data })
    },
    // 获取ASCVD居民
    getPatientSignByTwoDoctor: function (data) {
      return httpRequest.get('doctor/patient/getPatientSignByDoctor', { data: data })
    },
    // ASCVD   社区随访
    changeSurveyState: function (data) {
      return httpRequest.post('doctor/screen/changeSurveyState', { data: data })
    },
    //		获取筛查问卷列表
    getScreenList: function (data) {
      return httpRequest.post('doctor/screen/getScreenList', { data: data })
@ -97,16 +97,16 @@
    getHospitalInfoByMappingId: function (data) {
      return httpRequest.get('/hospitals/getHospitalInfoByMappingId', { data: data })
    },
	getHospitalSpecialistList: function (data) {
	  return httpRequest.get('/doctor/specialist/screen/getHospitalSpecialistList', { data: data })
	},
    getHospitalSpecialistList: function (data) {
      return httpRequest.get('/doctor/specialist/screen/getHospitalSpecialistList', { data: data })
    },
    getOrgList: function (data) {
      return httpRequest.post('/doctor/guahao/GetOrgListToMysql', { data: data })
    },
	GetOrgListToMysqlByDisease: function (data) {
	  return httpRequest.post('/doctor/guahao/GetOrgListToMysqlByDisease', { data: data })
	},
	
    GetOrgListToMysqlByDisease: function (data) {
      return httpRequest.post('/doctor/guahao/GetOrgListToMysqlByDisease', { data: data })
    },
    GetOrgDepListToMysql: function (data) {
      return httpRequest.post('/doctor/guahao/GetOrgDepListToMysql', { data: data })
    },
@ -122,27 +122,27 @@
    getOrgDeptList: function (data) {
      return httpRequest.post('/doctor/guahao/GetOrgDepListToMysql', { data: data })
    },
	listMedical: function (data) {
	  return httpRequest.post('/doctor/health_record/list_medical', { data: data })
	},
	findMedicalDetail: function(data) {
		return httpRequest.post("doctor/health_record/medical_detail", { data: data })
	},
  getScreenList: function (data) {
    return httpRequest.post('/doctor/screen/getScreenList', { data: data })
  },
    listMedical: function (data) {
      return httpRequest.post('/doctor/health_record/list_medical', { data: data })
    },
    findMedicalDetail: function (data) {
      return httpRequest.post('doctor/health_record/medical_detail', { data: data })
    },
    getScreenList: function (data) {
      return httpRequest.post('/doctor/screen/getScreenList', { data: data })
    },
    //导出
    exportScreenResultList: function (data, filename) {
      return httpRequest.downLoadFileForAjax('doctor/screen/exportScreenResultList', filename, data)
    },
    getSignInfo(data){
			return httpRequest.get('doctor/specialist/rehabilitation/getSignInfo',{data:data})
		},
    getSurveyMessage(data){
      return httpRequest.post('doctor/screen/getSurveyMessage',{data:data})
    getSignInfo(data) {
      return httpRequest.get('doctor/specialist/rehabilitation/getSignInfo', { data: data })
    },
    getSurveyMessage(data) {
      return httpRequest.post('doctor/screen/getSurveyMessage', { data: data })
    },
    getDictDataByName(name){
      return httpRequest.get("common/getDictByDictName",{data:{name:name}})
    getDictDataByName(name) {
      return httpRequest.get('common/getDictByDictName', { data: { name: name } })
    }
  }

+ 3 - 0
app/jbsc/css/questionnaire.css

@ -74,3 +74,6 @@ p{word-break: break-all;}
.wenjuan-textarea{padding: 8px 12px;width: 100%;border-radius: 4px;}
.submit-btn{background-color: #12b7f5;color: #fff;}
.submit-btn:hover,.submit-btn:link{color: #fff;background-color: #00adee;}
.required-icon {
    color: red;
  }

+ 165 - 24
app/jbsc/html/questionnaire.html

@ -24,7 +24,30 @@
        <div class="single-choice-question">
          <div class="question-title">问卷题目</div>
          <div class="question-content">
            <ul class="question-list">
            <div v-if="screeningType == 'aa9bd609fd8b492296f6a34849b76520'" class="question-list">
              <!-- 大肠癌筛查OB -->
              <div class="pt10 pb5 pr10" v-for="(item,index) in questionList" :key="item.field">
                <div class="question-name">
                  {{index + 1}}、{{item.label}}
                  <span class="required-icon" v-if="item.required">*</span>
                </div>
                <div class="daan-list" v-if="item.type== 'input'">
                  <textarea class="wenjuan-textarea" rows="1" v-model="answer[item.field]"></textarea>
                </div>
                <div class="daan-list" v-if="item.type =='radio'">
                  <el-radio-group v-model="answer[item.field]">
                    <el-radio :label="el.value" v-for="(el,i) in item.options" style="display: block; margin-left: 0" :key="i">{{el.label}}</el-radio>
                  </el-radio-group>
                </div>
                <div class="daan-list" v-if="item.type =='checkbox'">
                  <el-checkbox-group v-model="answer[item.field]">
                    <el-checkbox :label="el.value" v-for="(el,i) in item.options" style="display: block; margin-left: 0" :key="i">{{el.label}}</el-checkbox>
                  </el-checkbox-group>
                </div>
              </div>
            </div>
            <ul class="question-list" v-else>
              <li v-for="(qst,key,index) in questions">
                <p class="question-name" v-text="key+'、'+qst.question.title"></p>
                <div class="daan-list" v-if="qst.question.questionType!=2">
@ -216,6 +239,7 @@
    <script src="../../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="../../../api/jbsc-api.js"></script>
    <script type="text/javascript" src="../component/canvas-progress.js"></script>
    <script type="text/javascript" src="../js/questionList.js"></script>
    <script type="text/javascript">
      var httpData = GetRequest()
      var docInfo = JSON.parse(window.localStorage.getItem('docInfo'))
@ -233,6 +257,8 @@
          age: decodeURI(httpData['age']),
          doctorInfo: { code: docInfo.code },
          surveyStatus: httpData['surveyStatus'] || '',
          idCard: httpData['idcard'],
          mobile: httpData['mobile'],
          questions: [],
          tizhongRecord: {},
          labelType: 5, //问卷筛查labelType=5
@ -246,19 +272,71 @@
          smoke: '',
          hypertension: '',
          diabetes: '',
          noswitch: httpData['noswitch']
          questionList: [],
          noswitch: httpData['noswitch'],
          dictData: [
            {
              name: 'obScreen_isMerge',
              field: 'isMerge'
            },
            {
              name: 'obScreen_eduState',
              field: 'eduState'
            },
            {
              name: 'obScreen_jobState',
              field: 'jobState'
            },
            {
              name: 'obScreen_ksDrugName1',
              field: 'ksDrugName1'
            }
          ],
          answer: {},
          progress1: 0
        },
        mounted: function () {
          // if (this.screeningType != '6bcd306aaafb4e4381071346d86fadbb1') {
          this.getHealth()
          // console.log(123456);
          var vm = this
          // }
          this.getQuestion()
          this.getDoctorInfo()
          if (this.screeningType == 'aa9bd609fd8b492296f6a34849b76520') this.getDictData()
          else {
            this.getHealth()
            this.getQuestion()
            this.getDoctorInfo()
          }
        },
        methods: {
          getDictData() {
            this.questionList = questionList
            this.answer = {
              belongCommunity: docInfo.hospitalName,
              doctorName: docInfo.name,
              doctorPhoneNo: docInfo.mobile,
              userName: this.screeningResidentsName,
              idNoType: '身份证',
              idNo: this.idCard,
              phoneNo: this.mobile,
              age: this.age,
              sex: this.sex,
              ksDrugName1: []
            }
            var vm = this
            this.dictData.forEach(function (item) {
              jbscAPI.getDictDataByName(item.name).then(function (res) {
                var index = vm.questionList.findIndex(function (el) {
                  return el.field == item.field
                })
                vm.questionList[index].options = res.list.map(function (el) {
                  return {
                    label: el.value,
                    value: el.code
                  }
                })
                vm.$forceUpdate()
              })
            })
          },
          getInitData() {
            var vm = this
            httpRequest.get('doctor/screen/physicalList', { data: { patient: vm.screeningResidents } }).then(function (res) {
@ -316,7 +394,6 @@
                    vm.selectItem(vm.questions[i].question, vm.questions[i].option[Number(index)])
                  }
                  if (vm.questions[i].question.title == '缺血性脑卒中病史' && data.CerebralIschemicStroke) {
                    console.log('缺血性脑卒中病史', vm.questions[i], data.CerebralIschemicStroke)
                    var index = data.CerebralIschemicStroke == 1 ? 0 : data.CerebralIschemicStroke == 2 ? 1 : ''
                    vm.selectItem(vm.questions[i].question, vm.questions[i].option[Number(index)])
                  }
@ -325,7 +402,6 @@
                    vm.selectItem(vm.questions[i].question, vm.questions[i].option[index])
                  }
                  if (vm.questions[i].question.title == '糖尿病' && data.Diabetes) {
                    console.log('vm.questions[i]', vm.questions[i])
                    var index = data.Diabetes == 1 ? 0 : data.Diabetes == 2 ? 1 : ''
                    vm.selectItem(vm.questions[i].question, vm.questions[i].option[Number(index)])
                  }
@ -644,7 +720,6 @@
            }
            jbscAPI.getAllQuestions(data).then(function (res) {
              if (res.status == 200) {
                // console.log(res.data,"res.data")
                for (var i in res.data) {
                  if (res.data[i].isThird == 3) {
                    if (res.data[i].question.questionType == '1') {
@ -762,7 +837,6 @@
                      .then(function (res) {
                        if (res.status == 200) {
                          var data = res.medical_detail
                          console.log(data, 'data')
                          for (var i in vm.questions) {
                            if (vm.questions[i].question.thirdKey == 'height') {
@ -892,21 +966,38 @@
                v.content = new Date(v.content).format('yyyy-MM-dd HH:mm')
              }
            })
            var data = {
              patientCode: vm.screeningResidents,
              labelType: vm.labelType,
              isAgain: vm.isAgain,
              source: 1,
              surveyStatus: vm.surveyStatus,
              jsonData: JSON.stringify({
                surveyCode: vm.screeningType,
                questions: vm.selectArr
              })
            var data
            if (vm.screeningType == 'aa9bd609fd8b492296f6a34849b76520') {
              var formData = JSON.parse(JSON.stringify(this.answer))
              formData.ksDrugName1 = (formData.ksDrugName1 ?? []).join(',')
              data = {
                patientCode: vm.screeningResidents,
                labelType: vm.labelType,
                isAgain: vm.isAgain,
                source: 1,
                jsonData: JSON.stringify({
                  surveyCode: vm.screeningType,
                  surveyData: formData
                })
              }
            } else {
              data = {
                patientCode: vm.screeningResidents,
                labelType: vm.labelType,
                isAgain: vm.isAgain,
                source: 1,
                surveyStatus: vm.surveyStatus,
                jsonData: JSON.stringify({
                  surveyCode: vm.screeningType,
                  questions: vm.selectArr
                })
              }
            }
            jbscAPI.saveAnswer(data).then(function (res) {
              top.layer.close(loadding)
              if (res.status == 200) {
                if (vm.questions[1].isThird == 3) {
                if (vm.screeningType == 'aa9bd609fd8b492296f6a34849b76520' || vm.questions[1].isThird == 3) {
                  top.layer.open({
                    type: 2,
                    //				  offset: ['100px'], //右下角弹出
@ -984,6 +1075,56 @@
        watch: {
          screeningType: function () {
            $('.daan-list input').attr('checked', false)
          },
          answer: {
            handler(nv) {
              var vm = this
              if (nv.isFuyongks) {
                var obj = this.questionList.find(function (el) {
                  return el.field == 'ksDrugName1'
                })
                obj.required = nv.isFuyongks == 1 ? true : false
              }
              if (nv.isEndoscopy) {
                var obj1 = this.questionList.find(function (el) {
                  return el.field == 'endoscopyTime'
                })
                var obj2 = this.questionList.find(function (el) {
                  return el.field == 'endoscopyResult'
                })
                var obj3 = this.questionList.find(function (el) {
                  return el.field == 'endoscopyHospitalName'
                })
                obj1.required = nv.isEndoscopy == 1 ? true : false
                obj2.required = nv.isEndoscopy == 1 ? true : false
                obj3.required = nv.isEndoscopy == 1 ? true : false
              }
              var all = 0
              var have = 0
              this.questionList.forEach(function (item) {
                if (item.required) {
                  all++
                  if (item.field == 'ksDrugName1' && vm.answer.ksDrugName1 && vm.answer.ksDrugName1.length > 0) {
                    have++
                  } else if (item.field != 'ksDrugName1' && vm.answer[item.field]) {
                    have++
                  }
                }
              })
              var progress = Math.floor((have / all) * 100)
              if (progress != vm.progress1) {
                vm.$refs.progress.dataFunction(progress)
                vm.progress1 = progress
              }
              if (progress == 100) {
                vm.progress = progress
              }
              this.$forceUpdate()
            },
            deep: true
          }
        }
      })

+ 13 - 14
app/jbsc/html/view_screening_results.html

@ -578,11 +578,7 @@
        </span>
      </el-dialog>
      <el-dialog title="消息提醒" :visible.sync="messageVisible" @close="closeMessageDialog" width="540px">
        <div>尊敬的签约居民,您好!我是您的签约家庭医师。根据您的健康档案情况,我们对您进行了冠心病风险评估,目前评估等级是{{messInfo.screen_result}},为此提供如下建议:</div>
        <div>1、请积极联系您的家庭医师{{messInfo.doctName}},进行咨询转诊,进一步检查;</div>
        <div>2、可致电厦门市冠心病防治中心挂靠单位厦门大学附属心血管病医院,进行咨询就诊,咨询电话:0592968120;</div>
        <div>3、您也可以通过:厦门i健康或者美丽厦门、智慧健康平台进行预约就诊。</div>
        <div>您的健康是我们最大的心愿。</div>
        <div v-html="messInfo"></div>
        <span slot="footer" class="dialog-footer">
          <el-button @click="messageVisible = false">取消</el-button>
          <el-button type="primary" @click="messageWarn">确定</el-button>
@ -625,7 +621,7 @@
          jiayiShow: false,
          showOpt: httpData['opt'],
          messageVisible: false,
          messInfo: {},
          messInfo: "",
          questionList: [],
          dictData: [
            {
@ -773,7 +769,6 @@
              if (res.status == 200) {
                var data = res.data
                vm.surveyCode = data.info.template_code
                console.log(vm.surveyCode,"vm.surveyCode");
                
                vm.getScreenData = res.data
                data && ((vm.answer = data.answer), (vm.userInfo = data.info), (vm.result = data.result))
@ -951,15 +946,19 @@
          },
          openMessageDialog() {
            var vm = this
            jbscAPI.getSignInfo({ idcard: this.userInfo.idcard }).then(function (res) {
            jbscAPI.getSurveyMessage({ surveyResultCode: this.userInfo.code }).then(function(res){
              vm.messageVisible = true
              if (res.data) {
                vm.messInfo.doctName = res.data.doctorName
              } else {
                vm.messInfo.doctName = ''
              }
              vm.$forceUpdate()
              vm.messInfo = res.data
            })
            // jbscAPI.getSignInfo({ idcard: this.userInfo.idcard }).then(function (res) {
            //   vm.messageVisible = true
            //   if (res.data) {
            //     vm.messInfo.doctName = res.data.doctorName
            //   } else {
            //     vm.messInfo.doctName = ''
            //   }
            //   vm.$forceUpdate()
            // })
          },
          closeMessageDialog() {
            this.messageVisible = false