Parcourir la source

康复计划同步病历

chenyue il y a 4 ans
Parent
commit
94858eb0ca
2 fichiers modifiés avec 85 ajouts et 16 suppressions
  1. 4 1
      api/recover_api.js
  2. 81 15
      app/recover/html/new_recover.html

+ 4 - 1
api/recover_api.js

@ -111,7 +111,10 @@
		// 获取体征数据doctor/health_index/chart
		getHealthIndex: function(data) {
			return httpRequest.post("doctor/health_index/chart", {data: data})
		},
		},	
    	getPatientAccetokenByIdcard:function(data) {
            return httpRequest.post("doctor/archives/getPatientAccetokenByIdcard", {data: data})
    	},	
	}
    exports.recoverAPI = recoverAPI;
})(window)

+ 81 - 15
app/recover/html/new_recover.html

@ -8,7 +8,7 @@
		<link rel="stylesheet" type="text/css" href="../../../css/cross.ui.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
		<link href="../../../plugins/toastr/toastr.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/element-ui.css" />
		<link rel="stylesheet" type="text/css" href="../css/new_recover.css" />
		<script src="../../../js/esModule.js" type="text/javascript"></script>
		<style>
@ -73,7 +73,7 @@
					<div v-if="medicalRecordsList.length>0" v-for="(o, i) in medicalRecordsList" class="mt10">
						<div class="flex vc c-f14 c-border plr10 ptb5 link-control" style="cursor: pointer;" @click="editMedicalRecords(o, i)" :class="{'bd-12b7f5': curMedicalRecordsIndex==i}">
							<span class="c-666 mr15">
								{{formatter(o.admissionTime)}}
								{{formatter(o.admissionTime||o.createTime)}}
							</span>
							<div class="flex1 c-12b7f5 ellipsis-1">
								{{o.hospitalName}}
@ -380,6 +380,7 @@
					patient: httpData.patient || undefined
				},
                mounted: function() {
                	debugger
                	this.selectFrequencys()
                	if(this.patient) {
                		this.isPlan = false
@ -487,9 +488,70 @@
							}
						})
					},
					comMedicalRecords:function(){
					comMedicalRecords:function(record){
						var vm = this
						showInfoMessage("暂未开发")
						var loading = layer.load(0, {shade: false})
						var event=record&&record.event?record.event:""
						recoverAPI.getPatientAccetokenByIdcard({idcard:vm.pati.idcard}).then(function(res){
							layer.close(loading)
							if(res.status==200){
								this.selectPatientIndex = layer.open({
									type: 2,
									area: ['75%', '650px'],
									shade: 0.5,
									title: '住院病历',
									closeBtn: 1,
									shift: 5,
									shadeClose: false, //点击遮罩关闭层
									content: httpRequest.server+"profileweb/#/zhuyuan?patientCode="+res.data.patientCode+'&hospital='+docInfo.hospital+"&recoverDown=true&event='+event,
									end: function(){
										var comProfile = sessionStorage.getItem("comProfile")
										if(comProfile){
											sessionStorage.removeItem("comProfile")
						                	vm.comMedicalRecordsBack(JSON.parse(comProfile),event); //同步住院病历
										}
						            }
								});
							}else{
								showErrorMessage(res.msg);
							}
						})
						
					},
					comMedicalRecordsBack:function(comProfile,event){
						var vm = this
						var jsonData = {
							admissionTime: comProfile.data['入院时间']||"",
							dischargeTime: comProfile.data['出院时间']||"",
							admittingDiagnosis: "", // 入院诊断
							admittingDiagnosisName: comProfile.data['入院诊断']||"", //入院诊断名称
							dischargeDiagnosis: "", // 出院诊断
							dischargeDiagnosisName: comProfile.data['出院诊断']||"", // 出院诊断名称,多个用逗号
							advice: comProfile.data['出院医嘱']||"出院继续观察",
							images: "",								
						    "event": comProfile.event,
						    "dataFrom":comProfile.dataFrom,
						    "hospital":docInfo.hospital,
						}
						var params = {
							doctorCode: docInfo.uid,
							patient: vm.pati.patient,
							patientName: vm.pati.patientName,
							jsonData: JSON.stringify(jsonData)
						}
						var loading = layer.load(0, {shade: false})
						rehaAPI.createMedicalRecords(params).then(function(res){
							layer.close(loading)
							if(res.status==200){
								if(!event){
									vm.medicalRecordsList.unshift(res.data)
								}else{
									vm.$set(vm.medicalRecordsList, vm.curMedicalRecordsIndex, res.data)
								}
							}else{
								showErrorMessage(res.msg);
							}
						})
					},
					// 添加住院病历
					addMedicalRecords: function(){
@ -509,17 +571,21 @@
					editMedicalRecords: function(o, i){
						var vm = this
						vm.curMedicalRecordsIndex = i
						window.localStorage.setItem('curMedicalRecords', JSON.stringify(o))
						this.selectPatientIndex = layer.open({
							type: 2,
							area: ['480px', '650px'],
							shade: 0.5,
							title: '添加住院病历',
							closeBtn: 1,
							shift: 5,
							shadeClose: false, //点击遮罩关闭层
							content: "medical-records.html?patient="+vm.pati.patient+'&patientName='+vm.pati.patientName+'&medicalRecordsId='+o.id
						});
						if(o.event){
							vm.comMedicalRecords(o)
						}else{
							window.localStorage.setItem('curMedicalRecords', JSON.stringify(o))
							this.selectPatientIndex = layer.open({
								type: 2,
								area: ['480px', '650px'],
								shade: 0.5,
								title: '添加住院病历',
								closeBtn: 1,
								shift: 5,
								shadeClose: false, //点击遮罩关闭层
								content: "medical-records.html?patient="+vm.pati.patient+'&patientName='+vm.pati.patientName+'&medicalRecordsId='+o.id
							});
						}
					},
					//关闭添加住院病历弹框
					closeMedicalRecords: function(){