Browse Source

访视表单历史信息对接接口-功能

zhangyanfang 5 years ago
parent
commit
f8489bcff5

+ 5 - 1
api/fangshi-api.js

@ -59,7 +59,11 @@
        //完成随访 
        updateFollowStatus:function(data){
            return httpRequest.post("doctor/followup/updateFollowStatus",{data:data})
        }
        },
        //获取上一次随访内容 
        getLastVisitRecord:function(data){
            return httpRequest.get("/doctor/visitDetail/getLastVisitRecord",{data:data})
        }        
    }
    exports.fangshiAPI = fangshiAPI;
})(window)

+ 0 - 394
app/followup/v1/html/fangshi-detail-5,6.html

@ -1,394 +0,0 @@
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>产后访视+新生儿记录表</title>
	<meta name="author" content="yihu.com" />
	<meta name="format-detection" content="telephone=no" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"
	/>
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<link rel="shortcut icon" href="../../../../favicon.ico">
	<link rel="stylesheet" type="text/css" href="../../../../css/element-ui.css" />
	<link rel="stylesheet" type="text/css" href="../../../../css/cross.css" />
	<link rel="stylesheet" type="text/css" href="../../../../css/bootstrap.min.css" />
	<link href="../../../../plugins/toastr/toastr.min.css" rel="stylesheet">
	<link href="../css/fangshi-detail.css" rel="stylesheet">
</head>
<style>
	.el-radio {
		margin-bottom: 0;
	}
	.setPicker .el-input--prefix .el-input__inner {
		text-align: center
	}
	div.ui-col-1 {
		line-height: 27px;
	}
	.setinput .el-input__inner {
		padding: 0;
		border-bottom: 1px solid #e1e1e1;
		text-align: center;
	}
</style>
<body>
	<div id="app">
		<button class="button" @click="editBtn()">编辑</button>
		<finish-followup-btn :followupId="followupId" :finishedBtn="finishedBtn" v-on:getfinish="getFinishfChild($event)"></finish-followup-btn>
		<p class="c-f20 mb10" style="text-align: center;">产后访视记录表</p>
		<div class="ui-grid p10">
			<div class="ui-col-1">
				<div class="ui-grid">
					<div class="ui-col-0">姓名:</div>
					<div class="ui-col-1">
						<el-input :readonly="!editable" v-model="postpartumVisitDetails.name" placeholder="" clearable></el-input>
					</div>
				</div>
			</div>
			<div class="ui-col-1">
				<div class="ui-grid">
					<div class="ui-col-0">编号:</div>
					<div class="ui-col-1">
						<el-input :readonly="!editable" v-model="postpartumVisitDetails.number" placeholder="" clearable></el-input>
					</div>
				</div>
			</div>
		</div>
		<table class="table table-bordered">
			<tr>
				<td class="col-w120 c-t-center">随访日期</td>
				<td colspan="3">
					<el-date-picker :readonly="!editable" v-model="postpartumVisitDetails.followup_date" type="date" value-format="yyyy-MM-dd"
					 placeholder="选择日期">
					</el-date-picker>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">分娩日期</td>
				<td>
					<el-date-picker type="date" :readonly="!editable" v-model="postpartumVisitDetails.parturition_date" value-format="yyyy-MM-dd"
					 placeholder="选择日期">
					</el-date-picker>
				</td>
				<td class="col-w120 c-t-center">出院日期</td>
				<td>
					<el-date-picker :readonly="!editable" v-model="postpartumVisitDetails.discharged_date" value-format="yyyy-MM-dd" type="date"
					 placeholder="选择日期">
					</el-date-picker>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">体 温(℃)</td>
				<td colspan="3">
					<el-input type="number" :readonly="!editable" v-model="postpartumVisitDetails.body_temperature" placeholder=""></el-input>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">一般健康情况</td>
				<td colspan="3">
					<el-input type="textarea" :readonly="!editable" v-model="postpartumVisitDetails.healthy_condition" placeholder="" clearable></el-input>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">一般心理状况</td>
				<td colspan="3">
					<el-input :readonly="!editable" v-model="postpartumVisitDetails.psychologic_status" placeholder="" clearable></el-input>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">血 压(mmHg)</td>
				<td colspan="3">
					<div class="setinput">
						<el-input type="number" class="col-w80" :readonly="!editable" v-model="postpartumVisitDetails.blood_pressure_low" placeholder=""></el-input>mmHg /
						<el-input type="number" class="col-w80" :readonly="!editable" v-model="postpartumVisitDetails.blood_pressure_high" placeholder=""></el-input>mmHg
					</div>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">乳 房</td>
				<td colspan="3">
					<el-radio-group v-model="postpartumVisitDetails.breast_status">
						<el-radio :disabled="!editable" label="1">未见异常</el-radio>
						<el-radio :disabled="!editable" label="2">异常</el-radio>
					</el-radio-group>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">恶 露</td>
				<td colspan="3">
					<el-radio-group v-model="postpartumVisitDetails.lochia_status">
						<el-radio :disabled="!editable" label="1">未见异常</el-radio>
						<el-radio :disabled="!editable" label="2">异常</el-radio>
					</el-radio-group>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">子 宫</td>
				<td colspan="3">
					<el-radio-group v-model="postpartumVisitDetails.uterus_status">
						<el-radio :disabled="!editable" label="1">未见异常</el-radio>
						<el-radio :disabled="!editable" label="2">异常</el-radio>
					</el-radio-group>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">伤 口</td>
				<td colspan="3">
					<el-radio-group v-model="postpartumVisitDetails.wound_status">
						<el-radio :disabled="!editable" label="1">未见异常</el-radio>
						<el-radio :disabled="!editable" label="2">异常</el-radio>
					</el-radio-group>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">其 他</td>
				<td colspan="3">
					<el-input type="textarea" :readonly="!editable" v-model="postpartumVisitDetails.other" placeholder="" clearable></el-input>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">分 类</td>
				<td colspan="3">
					<el-radio-group v-model="postpartumVisitDetails.category">
						<el-radio :disabled="!editable" label="1">未见异常</el-radio>
						<el-radio :disabled="!editable" label="2">异常</el-radio>
					</el-radio-group>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">指 导</td>
				<td colspan="3">
					<el-checkbox-group v-model="check" :disabled="!editable">
						<el-checkbox label="1">个人卫生</el-checkbox>
						<el-checkbox label="2">心理</el-checkbox>
						<el-checkbox label="3">营养</el-checkbox>
						<el-checkbox label="4">母乳喂养</el-checkbox>
						<el-checkbox label="5">新生儿护理与喂养</el-checkbox>
						<el-checkbox class="setinput" label="6">
							<el-input type="text" :readonly="other_guide||!editable" v-model="postpartumVisitDetails.other_guide_content" placeholder="其他"
							 clearable></el-input>
						</el-checkbox>
					</el-checkbox-group>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">转 诊</td>
				<td colspan="3">
					<el-radio-group v-model="postpartumVisitDetails.referral">
						<el-radio :disabled="!editable" :label="0">无</el-radio>
						<el-radio :disabled="!editable" :label="1">有</el-radio>
					</el-radio-group>
					<div class="mt20 ui-grid">
						<div class="ui-col-0" for="">原因:</div>
						<div class="ui-col-1">
							<el-input :readonly="!editable" v-model="postpartumVisitDetails.referral_REASON" placeholder="" clearable></el-input>
						</div>
					</div>
					<div class="mt20 ui-grid">
						<div class="ui-col-0">机构:</div>
						<div class="ui-col-1">
							<el-input :readonly="!editable" v-model="postpartumVisitDetails.organization_ORG_NAME" placeholder="" clearable></el-input>
						</div>
						<div class="ui-col-0">科室:</div>
						<div class="ui-col-1">
							<el-input :readonly="!editable" v-model="postpartumVisitDetails.organization" placeholder="" clearable></el-input>
						</div>
					</div>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">下次随访日期</td>
				<td colspan="3">
					<el-date-picker :readonly="!editable" v-model="postpartumVisitDetails.next_visiting_date" value-format="yyyy-MM-dd" type="date"
					 placeholder="选择日期">
					</el-date-picker>
				</td>
			</tr>
			<tr>
				<td class="col-w120 c-t-center">随访医生签名</td>
				<td colspan="3">
					<el-input :readonly="!editable" v-model="postpartumVisitDetails.visiting_doctor_name" placeholder="" clearable></el-input>
				</td>
			</tr>
		</table>
		<fangshi-detail-6 :followupId="followupId" :version="version"></fangshi-detail-6>
		<follow-bottom :followupId="followupId"></follow-bottom>
	</div>
	<script src="../../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../js/jquery-2.2.4.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../js/util.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../plugins/toastr/toastr.min.js"></script>
	<script src="../../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../js/element-ui.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../component/followup/follow-bottom.js"></script>
	<script src="../../../../component/followup/fangshi-detail-6.js"></script>
	<script src="../../../../component/followup/finish-followup-btn.js"></script>
	<script src="../../../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../../api/fangshi-api.js"></script>
	<script>
		var Request = GetRequest();
		new Vue({
			el: "#app",
			data: function () {
				return {
					finishedBtn: true,
					editable: false,
					other_guide: true,
					isEditBtn: true,
					data2: "",
					radio: "",
					input: '',
					check: [],
					postpartumVisitDetails: {
						personal_hygiene: '0',
						mentality: '0',
						nutrition: '0',
						breast_feeding: '0',
						newborn_care_and_feeding: '0',
						other_guide: '0',
					},
					followupId: Request['id'],
					version: Request['version']
				}
			},
			mounted: function () {
				this.getData()
				//获取随访详情
				this.getStatus()
			},
			watch: {
				check: function (i) {
					var a = i.indexOf('6')
					if (a > -1) {
						this.other_guide = false
					} else {
						this.other_guide = true
						this.postpartumVisitDetails.other_guide_content = ''
					}
				}
			},
			methods: {
				getData: function () {
					var vm = this
					fangshiAPI.getPostpartumVisitDetails({ followupId: this.followupId || '3' }).then(function (res) {
						if (res.status == 200) {
							var data = res.data
							if (data != null) {
								vm.postpartumVisitDetails = data
								var vmP = vm.postpartumVisitDetails
								vmP.breast_status = data.breast_status ? data.breast_status.toString() : ''
								vmP.lochia_status = data.lochia_status ? data.lochia_status.toString() : ''
								vmP.uterus_status = data.uterus_status ? data.uterus_status.toString() : ''
								vmP.wound_status = data.wound_status ? data.wound_status.toString() : ''
								vmP.category = data.category ? data.category.toString() : ''
								vmP.other = data.other
								if (data.personal_hygiene == '1') {
									vm.check.push('1')
								} if (data.mentality == '1') {
									vm.check.push('2')
								} if (data.nutrition == '1') {
									vm.check.push('3')
								} if (data.breast_feeding == '1') {
									vm.check.push('4')
								} if (data.newborn_care_and_feeding == '1') {
									vm.check.push('5')
								} if (data.other_guide == '1') {
									vm.check.push('6')
								}
								vmP.other_guide_content = data.other_guide_content
								// vmP.REFERRAL_REASON = data.referral_REASON
								vmP.organization_ORG_NAME = data.organization_ORG_NAME
								vmP.organization = data.organization
								vmP.next_visiting_date = data.next_visiting_date
								vmP.visiting_doctor_name = data.visiting_doctor_name
							}
						} else {
							top.toastr.error(res.msg);
						}
					})
				},
				editData: function () {
					var vm = this
					vm.check.map(function(i) {
						if (i == '1') {
							vm.postpartumVisitDetails.personal_hygiene = '1'
						} else if (i == '2') {
							vm.postpartumVisitDetails.mentality = '1'
						} else if (i == '3') {
							vm.postpartumVisitDetails.nutrition = '1'
						} else if (i == '4') {
							vm.postpartumVisitDetails.breast_feeding = '1'
						} else if (i == '5') {
							vm.postpartumVisitDetails.newborn_care_and_feeding = '1'
						} else if (i == '6') {
							vm.postpartumVisitDetails.other_guide = '1'
						}
					})
					this.postpartumVisitDetails.create_time = null
					this.postpartumVisitDetails.version = this.version	//版本号
					fangshiAPI.savePostpartumVisitDetails({ followupId: this.followupId || '3', postpartumVisitDetails: JSON.stringify(this.postpartumVisitDetails) }).then(function (res) {
						if (res.status == 200) {
							//判断是否完成随访,未完成则将完成按钮显示出来
							var btn=document.getElementById('isfinish')
							if (vm.sfStatus != 1) {
								vm.finishedBtn = false
								btn.innerText='完成随访'
							} else {
								vm.finishedBtn = true
								btn.innerText='已完成'
							}
							vm.getStatus()
							top.toastr.info('保存成功')
						} else {
							top.toastr.error(res.msg);
						}
					})
				},
				//获取当前随访状态信息  Request['id']||'1'
				getStatus: function () {
					var vm = this
					fangshiAPI.getFollowupInfo({ followupId: this.followupId || '1888107' }).then(function (res) {
						if (res.status == 200) {
							vm.sfStatus = res.data.status
							var btn=document.getElementById('isfinish')
								if (vm.sfStatus != 1) {
									btn.innerText='完成随访'
								} else {
									btn.innerText='已完成'
								}
						} else {
							top.toastr.error(res.msg);
						}
					})
				},
				getFinishfChild: function (msg) {
					this.finishedBtn = msg
					this.getStatus()
				},
				editBtn: function () {
					this.isEditBtn = !this.isEditBtn
					if (this.isEditBtn == true) {
						var btn = document.getElementsByClassName('button')[0]
						btn.innerHTML = '编辑'
						this.editable = false
						this.editData()
					} else if (this.isEditBtn == false) {
						var btn = document.getElementsByClassName('button')[0]
						btn.innerHTML = '保存'
						this.editable = true
					}
				}
			}
		})
	</script>
</body>
</html>

+ 59 - 32
app/followup/v1/html/fangshi-detail-5.html

@ -3,7 +3,7 @@
<head>
	<meta charset="UTF-8">
	<title>产后访视+新生儿记录表</title>
	<title>产后访视记录表</title>
	<meta name="author" content="yihu.com" />
	<meta name="format-detection" content="telephone=no" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"
@ -254,12 +254,13 @@
						other_guide: '0',
					},
					followupId: Request['id'],
					version: Request['version']
					version: Request['version'],
					patientCode:'',
                    followupClass:''
				}
			},
			mounted: function () {
				//获取随访详情
				this.getData()
				this.getStatus() //获取随访状态
			},
			watch: {
				check: function (i) {
@ -280,41 +281,64 @@
							var data = res.data
							if (data != null) {											
								vm.postpartumVisitDetails = data
								var vmP = vm.postpartumVisitDetails
								vmP.breast_status = data.breast_status ? data.breast_status.toString() : ''
								vmP.lochia_status = data.lochia_status ? data.lochia_status.toString() : ''
								vmP.uterus_status = data.uterus_status ? data.uterus_status.toString() : ''
								vmP.wound_status = data.wound_status ? data.wound_status.toString() : ''
								vmP.category = data.category ? data.category.toString() : ''
								vmP.other = data.other
								if (data.personal_hygiene == '1') {
									vm.check.push('1')
								} if (data.mentality == '1') {
									vm.check.push('2')
								} if (data.nutrition == '1') {
									vm.check.push('3')
								} if (data.breast_feeding == '1') {
									vm.check.push('4')
								} if (data.newborn_care_and_feeding == '1') {
									vm.check.push('5')
								} if (data.other_guide == '1') {
									vm.check.push('6')
								}
								vmP.other_guide_content = data.other_guide_content
								// vmP.REFERRAL_REASON = data.referral_REASON
								vmP.organization_ORG_NAME = data.organization_ORG_NAME
								vmP.organization = data.organization
								vmP.next_visiting_date = data.next_visiting_date
								vmP.visiting_doctor_name = data.visiting_doctor_name
								vm.dealData(data)
							}
							vm.getStatus() //获取随访状态
						} else {
							top.toastr.error(res.msg);
						}
					})
				},
				dealData: function (data) {
					var vm=this
					var vmP = vm.postpartumVisitDetails
					vmP.breast_status = data.breast_status ? data.breast_status.toString() : ''
					vmP.lochia_status = data.lochia_status ? data.lochia_status.toString() : ''
					vmP.uterus_status = data.uterus_status ? data.uterus_status.toString() : ''
					vmP.wound_status = data.wound_status ? data.wound_status.toString() : ''
					vmP.category = data.category ? data.category.toString() : ''
					vmP.other = data.other
					if (data.personal_hygiene == '1') {
						vm.check.push('1')
					} if (data.mentality == '1') {
						vm.check.push('2')
					} if (data.nutrition == '1') {
						vm.check.push('3')
					} if (data.breast_feeding == '1') {
						vm.check.push('4')
					} if (data.newborn_care_and_feeding == '1') {
						vm.check.push('5')
					} if (data.other_guide == '1') {
						vm.check.push('6')
					}
					vmP.other_guide_content = data.other_guide_content
					// vmP.REFERRAL_REASON = data.referral_REASON
					vmP.organization_ORG_NAME = data.organization_ORG_NAME
					vmP.organization = data.organization
					vmP.next_visiting_date = data.next_visiting_date
					vmP.visiting_doctor_name = data.visiting_doctor_name
				},
				getLastData:function(){
                    var vm=this
                    fangshiAPI.getLastVisitRecord({ followupClass: vm.followupClass,patientCode:vm.patientCode }).then(function (res) {
						if (res.status == 200) {
							var data = res.data.detail
							// finishedStatus:true 随访完成,false 随访未完成
							if (vm.finishedStatus) {
								vm.getData()
							} else {
								// 居民存在上次历史记录,则代入默认信息
								if (res.data.detail) {
									vm.postpartumVisitDetails = res.data.detail
									vm.dealData(data)
								}
							}
						}
                    })
                },
				// 完成随访状态修改
				finish: function () {
					var vm=this
					fangshiAPI.updateFollowStatus({ followupId: this.followupId }).then(function (res) {
						if (res.status == 200) {
                            vm.getStatus()
@ -345,7 +369,7 @@
					this.postpartumVisitDetails.version = this.version	//版本号
					fangshiAPI.savePostpartumVisitDetails({ followupId: this.followupId || '3', postpartumVisitDetails: JSON.stringify(this.postpartumVisitDetails) }).then(function (res) {
						if (res.status == 200) {
							vm.finishedStatus ?  vm.getStatus() :  vm.finish()
							vm.finishedStatus ? '' : vm.finish()
							vm.finishedStatus ? top.toastr.info('保存成功') :''
						} else {
							top.toastr.error(res.msg);
@ -358,6 +382,9 @@
					fangshiAPI.getFollowupInfo({ followupId: this.followupId || '1888107' }).then(function (res) {
						if (res.status == 200) {
							res.data.status!=1?vm.finishedStatus=false:vm.finishedStatus=true
							vm.patientCode=res.data.patientCode
							vm.followupClass=res.data.followupClass
							vm.getLastData()//获取patientCode,followupClass 获取上一次数据
							vm.setEditBtn()
						} else {
							top.toastr.error(res.msg);

+ 95 - 69
app/followup/v1/html/fangshi-detail-7.html

@ -646,7 +646,9 @@
                        followup_date:new Date().format("yyyy-MM-dd")
                    },
                    followupId: Request['id'],
                    version: Request['version']
                    version: Request['version'],
                    patientCode:'',
                    followupClass:''
                }
            },
            computed: {
@ -745,8 +747,7 @@
                },
            },
            mounted: function () {
                //获取随访详情
				this.getData()
				this.getStatus() //获取随访状态
            },
            methods: {
                getData: function () {
@ -757,75 +758,97 @@
                            var data = res.data
                            if (data != null) {
                                vm.severeMentalDisorderData = res.data
                                var vmS = vm.severeMentalDisorderData
                                vm.followup_object_check = data.followup_object ? data.followup_object.split(',') : []
                                if (data.physical_disease_type) {
                                    vm.death_reason_type_check = data.physical_disease_type.split(',')
                                }
                                vmS.dangerous_level = data.dangerous_level+''
                                if (data.illusion == '1') {
                                    vm.symptom_check.push('1')
                                } if (data.communication_difficulty == '1') {
                                    vm.symptom_check.push('2')
                                } if (data.suspicious == '1') {
                                    vm.symptom_check.push('3')
                                } if (data.moods == '1') {
                                    vm.symptom_check.push('4')
                                } if (data.weird == '1') {
                                    vm.symptom_check.push('5')
                                } if (data.talkative == '1') {
                                    vm.symptom_check.push('6')
                                } if (data.smashing_objects == '1') {
                                    vm.symptom_check.push('7')
                                } if (data.profoundly_pessimistic == '1') {
                                    vm.symptom_check.push('8')
                                } if (data.outside_without_cause == '1') {
                                    vm.symptom_check.push('9')
                                } if (data.to_myself_from_laughing == '1') {
                                    vm.symptom_check.push('10')
                                } if (data.withdrawn_lazy == '1') {
                                    vm.symptom_check.push('11')
                                } if (data.other_symptom == '1') {
                                    vm.symptom_check.push('12')
                                }
                                if (vmS.rehabilitation_work_ability == '1') {
                                    vm.rehabilitation_check.push('1')
                                } if (vmS.rehabilitation_training == '1') {
                                    vm.rehabilitation_check.push('2')
                                } if (vmS.rehabilitation_learning_ability == '1') {
                                    vm.rehabilitation_check.push('3')
                                } if (vmS.rehabilitation_sociability == '1') {
                                    vm.rehabilitation_check.push('4')
                                } if (vmS.rehabilitation_other == '1') {
                                    vm.rehabilitation_check.push('5')
                                }
                                vmS.death_reason_type = data.death_reason_type ? data.death_reason_type.toString() : ''
                                vmS.intelligence = data.intelligence ? data.intelligence.toString() : ''
                                vmS.sleep_condition = data.sleep_condition ? data.sleep_condition.toString() : ''
                                vmS.dietary_status = data.dietary_status ? data.dietary_status.toString() : ''
                                vmS.selfcare_ability = data.selfcare_ability ? data.selfcare_ability.toString() : ''
                                vmS.housework = data.housework ? data.housework.toString() : ''
                                vmS.work = data.work ? data.work.toString() : ''
                                vmS.learning_ability = data.learning_ability ? data.learning_ability.toString() : ''
                                vmS.sociability = data.sociability ? data.sociability.toString() : ''
                                vmS.captivity_case = data.captivity_case ? data.captivity_case.toString() : ''
                                // vmS.in_hospital_case = data.in_hospital_case ? data.in_hospital_case.toString() : ''
                                vmS.laboratory_examination = data.laboratory_examination ? data.laboratory_examination.toString() : ''
                                vmS.compliance = data.compliance ? data.compliance.toString() : ''
                                vmS.adverse_drug_reaction = data.adverse_drug_reaction ? data.adverse_drug_reaction.toString() : ''
                                vmS.treatment_effects = data.treatment_effects ? data.treatment_effects.toString() : ''
                                vmS.referral = data.referral ? data.referral.toString() : ''
                                vmS.is_referral = data.is_referral ? data.is_referral.toString() : ''
								vmS.followup_class = data.followup_class? data.followup_class.toString() : ""
	                    		vmS.followup_next_date = data.followup_next_date || ""
	                    		vmS.doctor_name = data.doctor_name || ""
                                vm.dealData(data)
                            }
							vm.getStatus() //获取随访状态
                        } else {
                            top.toastr.error(res.msg);
                        }
                    })
                },
                dealData: function (data) {
                    var vm=this
                    var vmS = vm.severeMentalDisorderData
                    vm.followup_object_check = data.followup_object ? data.followup_object.split(',') : []
                    if (data.physical_disease_type) {
                        vm.death_reason_type_check = data.physical_disease_type.split(',')
                    }
                    vmS.dangerous_level = data.dangerous_level + ''
                    if (data.illusion == '1') {
                        vm.symptom_check.push('1')
                    } if (data.communication_difficulty == '1') {
                        vm.symptom_check.push('2')
                    } if (data.suspicious == '1') {
                        vm.symptom_check.push('3')
                    } if (data.moods == '1') {
                        vm.symptom_check.push('4')
                    } if (data.weird == '1') {
                        vm.symptom_check.push('5')
                    } if (data.talkative == '1') {
                        vm.symptom_check.push('6')
                    } if (data.smashing_objects == '1') {
                        vm.symptom_check.push('7')
                    } if (data.profoundly_pessimistic == '1') {
                        vm.symptom_check.push('8')
                    } if (data.outside_without_cause == '1') {
                        vm.symptom_check.push('9')
                    } if (data.to_myself_from_laughing == '1') {
                        vm.symptom_check.push('10')
                    } if (data.withdrawn_lazy == '1') {
                        vm.symptom_check.push('11')
                    } if (data.other_symptom == '1') {
                        vm.symptom_check.push('12')
                    }
                    if (vmS.rehabilitation_work_ability == '1') {
                        vm.rehabilitation_check.push('1')
                    } if (vmS.rehabilitation_training == '1') {
                        vm.rehabilitation_check.push('2')
                    } if (vmS.rehabilitation_learning_ability == '1') {
                        vm.rehabilitation_check.push('3')
                    } if (vmS.rehabilitation_sociability == '1') {
                        vm.rehabilitation_check.push('4')
                    } if (vmS.rehabilitation_other == '1') {
                        vm.rehabilitation_check.push('5')
                    }
                    vmS.death_reason_type = data.death_reason_type ? data.death_reason_type.toString() : ''
                    vmS.intelligence = data.intelligence ? data.intelligence.toString() : ''
                    vmS.sleep_condition = data.sleep_condition ? data.sleep_condition.toString() : ''
                    vmS.dietary_status = data.dietary_status ? data.dietary_status.toString() : ''
                    vmS.selfcare_ability = data.selfcare_ability ? data.selfcare_ability.toString() : ''
                    vmS.housework = data.housework ? data.housework.toString() : ''
                    vmS.work = data.work ? data.work.toString() : ''
                    vmS.learning_ability = data.learning_ability ? data.learning_ability.toString() : ''
                    vmS.sociability = data.sociability ? data.sociability.toString() : ''
                    vmS.captivity_case = data.captivity_case ? data.captivity_case.toString() : ''
                    // vmS.in_hospital_case = data.in_hospital_case ? data.in_hospital_case.toString() : ''
                    vmS.laboratory_examination = data.laboratory_examination ? data.laboratory_examination.toString() : ''
                    vmS.compliance = data.compliance ? data.compliance.toString() : ''
                    vmS.adverse_drug_reaction = data.adverse_drug_reaction ? data.adverse_drug_reaction.toString() : ''
                    vmS.treatment_effects = data.treatment_effects ? data.treatment_effects.toString() : ''
                    vmS.referral = data.referral ? data.referral.toString() : ''
                    vmS.is_referral = data.is_referral ? data.is_referral.toString() : ''
                    vmS.followup_class = data.followup_class ? data.followup_class.toString() : ""
                    vmS.followup_next_date = data.followup_next_date || ""
                    vmS.doctor_name = data.doctor_name || ""
                },
                getLastData: function () {
                    var vm = this
                    fangshiAPI.getLastVisitRecord({ followupClass: vm.followupClass, patientCode: vm.patientCode }).then(function (res) {
                        if (res.status == 200) {
                            var data = res.data.detail
                            // finishedStatus:true 随访完成,false 随访未完成
                            if (vm.finishedStatus) {
                                vm.getData()
                            } else {
                                // 居民存在上次历史记录,则代入默认信息
                                if (res.data.detail) {
                                    vm.severeMentalDisorderData = res.data.detail
                                    vm.dealData(data)
                                }
                            }
                        }
                    })
                },
                // 完成随访状态修改
                finish: function () {
                    var vm=this
@ -892,7 +915,7 @@
                    this.severeMentalDisorderData.version = this.version
                    fangshiAPI.saveFollowupSevereMentalDisorder({ followupId: this.followupId || '1', severeMentalDisorderData: JSON.stringify(this.severeMentalDisorderData) }).then(function (res) {
                        if (res.status == 200) {
							vm.finishedStatus ?  vm.getStatus() :  vm.finish()
							vm.finishedStatus ? '' : vm.finish()
							vm.finishedStatus ? top.toastr.info('保存成功') : ''
                        } else {
                            top.toastr.error(res.msg);
@ -919,8 +942,11 @@
                    var vm = this
                    fangshiAPI.getFollowupInfo({ followupId: this.followupId || '1888107' }).then(function (res) {
                        if (res.status == 200) {
							res.data.status!=1?vm.finishedStatus=false:vm.finishedStatus=true
							vm.setEditBtn()
                            res.data.status!=1?vm.finishedStatus=false:vm.finishedStatus=true
							vm.patientCode=res.data.patientCode
							vm.followupClass=res.data.followupClass
							vm.getLastData()//获取patientCode,followupClass 获取上一次数据
                            vm.setEditBtn()
                        } else {
                            top.toastr.error(res.msg);
                        }

+ 47 - 22
app/followup/v1/html/fangshi-detail-8.html

@ -2100,12 +2100,13 @@
						input: null,
						radio: "",
						followupId: Request['id'],
						version: Request['version']
						version: Request['version'],
						patientCode:'',
                    	followupClass:''
					}
				},
				mounted: function () {
					//获取随访详情
					this.getData()
					this.getStatus() //获取随访状态
				},
				computed: {
					rale: function () {
@ -2552,30 +2553,51 @@
								var data = res.data
								if (data != null) {
									vm.oldmanData = data
									var vmO = vm.oldmanData
									var arr = "symptom,breast,drinking_type,dietary_habit,cerebrovascular_disease,nephropathy,heart_disease,eye_disease,vascular_disease".split(",")
									for (var i = 0; i < arr.length; i++) {
										vm[arr[i] + "_check"] = data[arr[i]] ? data[arr[i]].split(',') : []
									}
									var arr2 = "regular_followup,chronic_health_management,suggest_recheck,suggest_referral,other_health_guidance".split(",")
									for (var i = 0; i < arr2.length; i++) {
										if (data[arr2[i]] == 2) {
											vm.suggest_recheck_check.push((i + 1 + ''))
											console.log(vm.suggest_recheck_check)
										}
									}
									var arr3 = "stop_smoking,healthy_drinking,diet,exercise,lose_weight,recommended_vaccination,other_advice".split(",")
									for (var i = 0; i < arr3.length; i++) {
										if (data[arr3[i]] == 2) { vm.dangerFacter_check.push((i + 1 + '')) }
									}
									vm.dealData(data)
								}
								vm.getStatus() //获取随访状态
							} else {
								top.toastr.error(res.msg);
							}
						})
					},
					dealData: function (data) {
						var vm=this
						var vmO = vm.oldmanData
						var arr = "symptom,breast,drinking_type,dietary_habit,cerebrovascular_disease,nephropathy,heart_disease,eye_disease,vascular_disease".split(",")
						for (var i = 0; i < arr.length; i++) {
							vm[arr[i] + "_check"] = data[arr[i]] ? data[arr[i]].split(',') : []
						}
						var arr2 = "regular_followup,chronic_health_management,suggest_recheck,suggest_referral,other_health_guidance".split(",")
						for (var i = 0; i < arr2.length; i++) {
							if (data[arr2[i]] == 2) {
								vm.suggest_recheck_check.push((i + 1 + ''))
								console.log(vm.suggest_recheck_check)
							}
						}
						var arr3 = "stop_smoking,healthy_drinking,diet,exercise,lose_weight,recommended_vaccination,other_advice".split(",")
						for (var i = 0; i < arr3.length; i++) {
							if (data[arr3[i]] == 2) { vm.dangerFacter_check.push((i + 1 + '')) }
						}
					},
					getLastData: function () {
						var vm = this
						fangshiAPI.getLastVisitRecord({ followupClass: vm.followupClass, patientCode: vm.patientCode }).then(function (res) {
							if (res.status == 200) {
								var data = res.data.detail
								// finishedStatus:true 随访完成,false 随访未完成
								if (vm.finishedStatus) {
									vm.getData()
								} else {
									// 居民存在上次历史记录,则代入默认信息
									if (res.data.detail) {
										vm.oldmanData = res.data.detail
										vm.dealData(data)
									}
								}
							}
						})
					},
					// 完成随访状态修改
					finish: function () {
						var vm = this
@ -2614,7 +2636,7 @@
						this.oldmanData.version = this.version || 'v1'	//版本号
						fangshiAPI.saveOlderPeopleHealthCheckRecord({ followupId: this.followupId || '2', olderPeopleHealthCheckData: JSON.stringify(this.oldmanData) }).then(function (res) {
							if (res.status == 200) {
								vm.finishedStatus ? vm.getStatus() : vm.finish()
								vm.finishedStatus ? '' : vm.finish()
								vm.finishedStatus ? top.toastr.info('保存成功') : ''
							} else {
								top.toastr.error(res.msg);
@ -2649,6 +2671,9 @@
						fangshiAPI.getFollowupInfo({ followupId: this.followupId || '1888107' }).then(function (res) {
							if (res.status == 200) {
								res.data.status != 1 ? vm.finishedStatus = false : vm.finishedStatus = true
								vm.patientCode = res.data.patientCode
								vm.followupClass = res.data.followupClass
								vm.getLastData()//获取patientCode,followupClass 获取上一次数据
								vm.setEditBtn()
							} else {
								top.toastr.error(res.msg);

+ 54 - 34
app/followup/v1/html/fangshi-detail-9.html

@ -355,12 +355,13 @@
                        input: '',
                        check: [],
                        followupId: Request['id'] || '1888113',
                        version: Request['version'] || "v1"
                        version: Request['version'] || "v1",
                        patientCode:'',
                        followupClass:''
                    }
                },
                mounted: function () {
					//获取随访详情
					this.getData()
                    this.getStatus() //获取随访状态
                },
                methods: {
                    getData: function () {
@ -376,42 +377,58 @@
                                    }
                                }
                                if (!isEmpty) {
                                    if (!data.symptom) {
                                        data.symptom = []
                                    } else {
                                        data.symptom = data.symptom.split(",")
                                    }
                                    if (!data.patient) {
                                        data.patient = {}
                                    }
                                    if (!data.drug_use) {
                                        data.drug_use = {}
                                    }
                                    if (!data.superviser) {
                                        data.superviser = {}
                                    }
                                    if (!data.home_environment) {
                                        data.home_environment = {}
                                    }
                                    if (!data.life_style) {
                                        data.life_style = {}
                                    }
                                    if (!data.health_edu) {
                                        data.health_edu = {}
                                    }
                                    vm.data2 = data
                                } else {
                                    var btn = document.getElementsByClassName('button')[0]
                                    btn.innerHTML = '保存'
                                    vm.isEditBtn = false
                                    vm.editable = true
                                    vm.dealData(data)
                                }
                                vm.getStatus() //获取随访状态
                            } else {
                                top.toastr.error(res.msg);
                            }
                        })
                    },
                    dealData: function () {
                        if (!data.symptom) {
                            data.symptom = []
                        } else {
                            data.symptom = data.symptom.split(",")
                        }
                        if (!data.patient) {
                            data.patient = {}
                        }
                        if (!data.drug_use) {
                            data.drug_use = {}
                        }
                        if (!data.superviser) {
                            data.superviser = {}
                        }
                        if (!data.home_environment) {
                            data.home_environment = {}
                        }
                        if (!data.life_style) {
                            data.life_style = {}
                        }
                        if (!data.health_edu) {
                            data.health_edu = {}
                        }
                    },
                    getLastData: function () {
                        var vm = this
                        fangshiAPI.getLastVisitRecord({ followupClass: vm.followupClass, patientCode: vm.patientCode }).then(function (res) {
                            if (res.status == 200) {
                                var data = res.data.detail
                                // finishedStatus:true 随访完成,false 随访未完成
                                if (vm.finishedStatus) {
                                    vm.getData()
                                } else {
                                    // 居民存在上次历史记录,则代入默认信息
									if (res.data.detail) {
                                        vm.data2 = res.data.detail
                                        vm.dealData(data)
                                    }
                                }
                            }
                        })
                    },
                    // 完成随访状态修改
                    finish: function () {
                        var vm = this
@ -438,7 +455,7 @@
                        fangshiAPI.savePhthisisFirstCheckRecord({ jsonData: JSON.stringify(data) }).then(function (res) {
                            if (res.status == 200) {
								vm.finishedStatus ? vm.getStatus() : vm.finish()
                                vm.finishedStatus ? '' : vm.finish()
								vm.finishedStatus ? top.toastr.info('保存成功') : ''
                            } else {
                                top.toastr.error(res.msg);
@ -472,7 +489,10 @@
                        var vm = this
                        fangshiAPI.getFollowupInfo({ followupId: this.followupId || '1888107' }).then(function (res) {
                            if (res.status == 200) {
								res.data.status != 1 ? vm.finishedStatus = false : vm.finishedStatus = true
                                res.data.status != 1 ? vm.finishedStatus = false : vm.finishedStatus = true
                                vm.patientCode = res.data.patientCode
                                vm.followupClass = res.data.followupClass
                                vm.getLastData()//获取patientCode,followupClass 获取上一次数据
								vm.setEditBtn()
                            } else {
                                top.toastr.error(res.msg);

+ 88 - 63
component/followup/fangshi-detail-6.js

@ -690,6 +690,8 @@ Vue.component('fangshi-detail-6', {
            name: '',
            number: '',
            newbornData: {},
            patientCode:'',
            followupClass:''
        }
    },
    computed: {
@ -930,8 +932,7 @@ Vue.component('fangshi-detail-6', {
    },
    mounted: function () {
        //获取随访详情
        this.getData()
        this.getStatus() //获取随访状态
    },
    methods: {
        getData: function () {
@ -941,72 +942,93 @@ Vue.component('fangshi-detail-6', {
                    var data = res.data
                    if (data != null) {
                        vm.newbornData = data
                        var vmN = vm.newbornData
                        vmN.help_ORGANIZATION_FLAG = data.help_ORGANIZATION_FLAG ? data.help_ORGANIZATION_FLAG.toString() : ''
                        vmN.sick_SEX = data.sick_SEX ? data.sick_SEX.toString() : ''
                        vmN.pregnancy_SICK = data.pregnancy_SICK ? data.pregnancy_SICK.toString() : ''
                        vm.delivery_WAY_check = data.delivery_WAY ? data.delivery_WAY.split(',') : [];
                        vmN.suffocation = data.suffocation ? data.suffocation.toString() : ''
                        vmN.plan_IMMUNE = data.plan_IMMUNE ? data.plan_IMMUNE.toString() : ''
                        vmN.deformity_NULL = data.deformity_NULL ? data.deformity_NULL.toString() : ''
                        vmN.hearing = data.hearing ? data.hearing.toString() : ''
                        vmN.feed_TYPE = data.feed_TYPE ? data.feed_TYPE.toString() : ''
                        vmN.vomit = data.vomit ? data.vomit.toString() : ''
                        vmN.vulnus = data.vulnus ? data.vulnus.toString() : ''
                        vmN.vulnus_TIME = data.vulnus_TIME ? data.vulnus_TIME.toString() : ''
                        vmN.body_TEMPERATURE = data.body_TEMPERATURE ? data.body_TEMPERATURE.toString() : ""
                        vmN.complexion = data.complexion ? data.complexion.toString() : ""
                        vmN.face = data.face ? data.face.toString() : ''
                        vmN.bregma = data.bregma ? data.bregma.toString() : ''
                        vmN.eye = data.eye ? data.eye.toString() : ''
                        vmN.limbs = data.limbs ? data.limbs.toString() : ''
                        vmN.ear = data.ear ? data.ear.toString() : ''
                        vmN.nose = data.nose ? data.nose.toString() : ''
                        vmN.neck_PACK = data.neck_PACK ? data.neck_PACK.toString() : ''
                        vmN.skin = data.skin ? data.skin.toString() : ""
                        vmN.oral = data.oral ? data.oral.toString() : ''
                        vmN.anus = data.anus ? data.anus.toString() : ""
                        vmN.heart = data.heart ? data.heart.toString() : ''
                        vmN.genitalia = data.genitalia ? data.genitalia.toString() : ''
                        vmN.abdomen = data.abdomen ? data.abdomen.toString() : ""
                        vmN.vertebral = data.vertebral ? data.vertebral.toString() : ''
                        vmN.referral = data.referral ? data.referral.toString() : ''
                        vmN.umbilical = data.umbilical ? data.umbilical.toString() : ''
                        if (data.screening_4 == 1) {
                            vm.SCREENING_check.push('1')
                        } if (data.screening_5 == 1) {
                            vm.SCREENING_check.push('2')
                        } if (data.screening_1 == 1) {
                            vm.SCREENING_check.push('3')
                        } if (data.screening_2 == 1) {
                            vm.SCREENING_check.push('4')
                        } if (data.screening_3 == 1) {
                            vm.SCREENING_check.push('5')
                        } if (data.screening_6 == 1) {
                            vm.SCREENING_check.push('6')
                        }
                        if (data.feed_GUID == 1) {
                            vm.guide_check.push('1')
                        } if (data.growup_GUID == 1) {
                            vm.guide_check.push('2')
                        } if (data.prevention_DEFORMITY_GUID == 1) {
                            vm.guide_check.push('3')
                        } if (data.prevention_HURT_GUID == 1) {
                            vm.guide_check.push('4')
                        } if (data.oral_CAVITY_GUID == 1) {
                            vm.guide_check.push('5')
                        } if (data.other_GUIDE == 1) {
                            vm.guide_check.push('6')
                        }
                        vm.dealData(data)
                    }
                    vm.getStatus() //获取随访状态
                } else {
                    top.toastr.error(res.msg);
                }
            })
        },
        dealData:function(data){
            var vm=this
            var vmN = vm.newbornData
            vmN.help_ORGANIZATION_FLAG = data.help_ORGANIZATION_FLAG ? data.help_ORGANIZATION_FLAG.toString() : ''
            vmN.sick_SEX = data.sick_SEX ? data.sick_SEX.toString() : ''
            vmN.pregnancy_SICK = data.pregnancy_SICK ? data.pregnancy_SICK.toString() : ''
            vm.delivery_WAY_check = data.delivery_WAY ? data.delivery_WAY.split(',') : [];
            vmN.suffocation = data.suffocation ? data.suffocation.toString() : ''
            vmN.plan_IMMUNE = data.plan_IMMUNE ? data.plan_IMMUNE.toString() : ''
            vmN.deformity_NULL = data.deformity_NULL ? data.deformity_NULL.toString() : ''
            vmN.hearing = data.hearing ? data.hearing.toString() : ''
            vmN.feed_TYPE = data.feed_TYPE ? data.feed_TYPE.toString() : ''
            vmN.vomit = data.vomit ? data.vomit.toString() : ''
            vmN.vulnus = data.vulnus ? data.vulnus.toString() : ''
            vmN.vulnus_TIME = data.vulnus_TIME ? data.vulnus_TIME.toString() : ''
            vmN.body_TEMPERATURE = data.body_TEMPERATURE ? data.body_TEMPERATURE.toString() : ""
            vmN.complexion = data.complexion ? data.complexion.toString() : ""
            vmN.face = data.face ? data.face.toString() : ''
            vmN.bregma = data.bregma ? data.bregma.toString() : ''
            vmN.eye = data.eye ? data.eye.toString() : ''
            vmN.limbs = data.limbs ? data.limbs.toString() : ''
            vmN.ear = data.ear ? data.ear.toString() : ''
            vmN.nose = data.nose ? data.nose.toString() : ''
            vmN.neck_PACK = data.neck_PACK ? data.neck_PACK.toString() : ''
            vmN.skin = data.skin ? data.skin.toString() : ""
            vmN.oral = data.oral ? data.oral.toString() : ''
            vmN.anus = data.anus ? data.anus.toString() : ""
            vmN.heart = data.heart ? data.heart.toString() : ''
            vmN.genitalia = data.genitalia ? data.genitalia.toString() : ''
            vmN.abdomen = data.abdomen ? data.abdomen.toString() : ""
            vmN.vertebral = data.vertebral ? data.vertebral.toString() : ''
            vmN.referral = data.referral ? data.referral.toString() : ''
            vmN.umbilical = data.umbilical ? data.umbilical.toString() : ''
            if (data.screening_4 == 1) {
                vm.SCREENING_check.push('1')
            } if (data.screening_5 == 1) {
                vm.SCREENING_check.push('2')
            } if (data.screening_1 == 1) {
                vm.SCREENING_check.push('3')
            } if (data.screening_2 == 1) {
                vm.SCREENING_check.push('4')
            } if (data.screening_3 == 1) {
                vm.SCREENING_check.push('5')
            } if (data.screening_6 == 1) {
                vm.SCREENING_check.push('6')
            }
            if (data.feed_GUID == 1) {
                vm.guide_check.push('1')
            } if (data.growup_GUID == 1) {
                vm.guide_check.push('2')
            } if (data.prevention_DEFORMITY_GUID == 1) {
                vm.guide_check.push('3')
            } if (data.prevention_HURT_GUID == 1) {
                vm.guide_check.push('4')
            } if (data.oral_CAVITY_GUID == 1) {
                vm.guide_check.push('5')
            } if (data.other_GUIDE == 1) {
                vm.guide_check.push('6')
            }
        },
        getLastData:function(){
            var vm=this
            fangshiAPI.getLastVisitRecord({ followupClass: vm.followupClass,patientCode:vm.patientCode }).then(function (res) {
                if (res.status == 200) {
                    var data = res.data.detail
                    // finishedStatus:true 随访完成,false 随访未完成
                    if (vm.finishedStatus) {
                        vm.getData()
                    } else {
                        // 居民存在上次历史记录,则代入默认信息
                        if (res.data.detail) {
                            vm.newbornData = res.data.detail
                            vm.dealData(data)
                        }
                    }
                }
            })
        },
        // 完成随访状态修改
        finish: function () {
            var vm = this
@ -1057,7 +1079,7 @@ Vue.component('fangshi-detail-6', {
            vmN.version = this.version
            fangshiAPI.saveNewbornFamilyVisitRecord({ followupId: this.followupid || '2', newbornFamilyVisitRecordData: JSON.stringify(vmN) }).then(function (res) {
                if (res.status == 200) {
                    vm.finishedStatus ? vm.getStatus() : vm.finish()
                    vm.finishedStatus ? '' : vm.finish()
                    vm.finishedStatus ? top.toastr.info('保存成功') : ''
                } else {
                    top.toastr.error(res.msg);
@ -1092,6 +1114,9 @@ Vue.component('fangshi-detail-6', {
            fangshiAPI.getFollowupInfo({ followupId: this.followupid || '1888107' }).then(function (res) {
                if (res.status == 200) {
                    res.data.status!=1?vm.finishedStatus=false:vm.finishedStatus=true
                    vm.patientCode=res.data.patientCode
                    vm.followupClass=res.data.followupClass
                    vm.getLastData()//获取patientCode,followupClass 获取上一次数据
                    vm.setEditBtn()
                } else {
                    top.toastr.error(res.msg);