123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>康复管理</title>
- <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css" />
- <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
- <link rel="stylesheet" type="text/css" href="../../../css/cross.ui.css" />
- <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
- <link rel="stylesheet" href="../../../plugins/toastr/toastr.min.css">
- <link rel="stylesheet" href="../../../plugins/element-ui/element-ui.css" />
- <link rel="stylesheet" href="../css/common.css" />
- <link rel="stylesheet" type="text/css" href="../../rehabilitation/css/rehabilitation_management.css" />
- <link rel="stylesheet" type="text/css" href="../css/new_recover.css" />
- <link rel="stylesheet" type="text/css" href="../css/personal-manage.css" />
- </head>
- <body class="m0">
- <div id="app" class="c-333" v-cloak>
- <div class="content ui-grid">
- <div class="ui-col-0 c-h100 w360 person_info c-border-r ui-grid ui-grid-vertical plr5">
- <h4 class="m0 pl15 lh40 c-border-b c-position-r"><em class="c-position-a set-blue-span"></em>个人基础信息</h4>
- <div class="bgc-f5f5fa mt10 ptb10 plr10">
- <div class="clearfix">
- <div class="fl w-100-66">
- <p class="m0 p0 mb10">
- <span class="c-999">姓名:</span>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.patientName?recoverPatInfo.patientInfo.patientName:''}}
- <span class="c-999 ml20">性别:</span>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.sex == 1 ? "男" : "女"}}
- <span class="c-999 ml20">年龄:</span>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.age?recoverPatInfo.patientInfo.age:0}}岁
- </p>
- <p class="m0 p0 mb10">
- <span class="c-999">健康情况:</span>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.healthyCondition?recoverPatInfo.patientInfo.healthyCondition:''}}
- </p>
- <p class="m0 p0 mb10">
- <span class="c-999">联系电话:</span><span class="c-12b7f5 cur-pit" v-if="isMobile" @click="changeStatu()">点击查看</span><span v-else>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.mobile?recoverPatInfo.patientInfo.mobile:''}}</span>
- </p>
- </div>
- <div class="fr set-photo">
- <img :src="setPatImg(recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.photo?recoverPatInfo.patientInfo.photo:'')" alt="居民头像" />
- </div>
- </div>
- <p class="m0 p0 mb10">
- <span class="c-999">签约社区:</span>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.signHospitalName?recoverPatInfo.patientInfo.signHospitalName:''}}
- </p>
- <p class="m0 p0">
- <span class="c-999">康复机构:</span>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.rehabilitationOrg&&recoverPatInfo.patientInfo.rehabilitationOrg!="null"?recoverPatInfo.patientInfo.rehabilitationOrg:''}}
- </p>
- </div>
- <h4 class="m0 pl15 lh40 c-border-b c-position-r"><em class="c-position-a set-blue-span"></em>服务医生</h4>
- <div class="pt10 pb10 ui-col-0" style="overflow: hidden; height: 190px;">
- <ul class="p0 m0 c-h100" style="overflow: auto;">
- <li class="clearfix plr20 ptb10 doc-li" v-for="(docInfo, index) in docList" :key="index">
- <div class="fl set-photo">
- <img :src="setPatImg(docInfo.photo, 1)" alt="医生头像" />
- </div>
- <div class="fl ml10 lh18">
- <p class="m0 p0 c-f16">{{docInfo.name}}</p>
- <p class="m0 p0 mt10 c-999">{{docInfo.levelName}}</p>
- </div>
- <!-- <div class="fr w100 ml40 lh18">
- <p class="m0 p0">完成项目:<span class="c-orange">{{docInfo.finishedItem}}</span></p>
- <p class="m0 p0 mt10">服务次数:<span class="c-orange">{{docInfo.serviceCount}}</span></p>
- </div> -->
- </li>
- </ul>
- </div>
- <h4 class="m0 pl15 lh40 c-border-b c-position-r"><em class="c-position-a set-blue-span"></em>康复建议</h4>
- <textarea placeholder="此处内容是康复建议" readonly class="m0 p10 c-333 mt10 bg-f5f5fa" style="outline: 0;height: 200px;border: 1px solid rgb(225, 225, 225); resize: none;">{{recentRecoverDetail?recentRecoverDetail.adviceContent:''}}</textarea>
- <!-- <ul class="m0 p0 ptb10 ui-col-1 c-border b-r-3 c-h100 mt10" style="overflow: auto;">
- <li class="pt5 plr10" v-for="(info, index) in diagnosisInformation" :key="index">
- <p class="c-999 ptb10 clearfix" style="line-height: 20px;">
- <span class="fl w-100-78"> {{info.dischargeDiagnosis}}</span>
- <span class="fr">{{info.dischargeTime}}</span>
- </p>
- <div class="bgc-f5f5fa plr5 ptb10" style="line-height: 20px;">
-   {{info.advice}}
- </div>
- </li>
- <li class="c-t-center ptb10" v-if="!diagnosisInformation.length">无医嘱小结</li>
- </ul> -->
- <h4 class="m0 pl15 lh40 c-border-b c-position-r"><em class="c-position-a set-blue-span"></em>住院病历</h4>
- <div>
- <div v-for="(o, i) in medicalRecordsList" class="flex vc c-f14 c-border plr10 ptb5 link-control mt10" @click="viewMedicalDetail(o)">
- <span class="c-666 mr15">
- {{o&&o.admissionTime?formatter(o.admissionTime):''}}
- </span>
- <div class="flex1 c-12b7f5 ellipsis-1">
- {{o&&o.hospitalName?o.hospitalName:''}}
- </div>
- </div>
- </div>
- </div>
- <div class="ui-col-1 c-h100 w-100-360 ui-grid">
- <div class="ui-col-1 c-h100 ui-grid ui-grid-vertical">
- <div class="m0 pl15 lh40 c-border-b c-position-r clearfix">
- <em class="c-position-a set-blue-span"></em>
- <span class="fl">康复计划</span>
- <span class="fl plr20 ml20 c-f12 bgc-12b7f5 c-fff cur-pit" @click="gotoNewplan()" v-if="doctorType == 1">新建计划</span>
- <span class="fr w80 c-333 c-f12 c-t-center">进行中:{{recoverPatInfo.planUnderway}}</span>
- <span class="fr w80 c-333 c-f12 c-t-center">已完成:{{recoverPatInfo.planFinish}}</span>
- </div>
- <div class="pb10" style="overflow: hidden; height: 230px;">
- <ul class="p0 plr5 m0 c-h100" style="overflow: auto;">
- <li class="plr5 ptb10 mt10 plan-li cur-pit c-border b-r-3 ui-grid link-control" :class="{'bd-12b7f5': planId==plan.id}" v-for="(plan, index) in planList" :key="index" @click="jumpPlan(plan)">
- <!-- <div class="ui-col-1">
- <p class="p0 m0 lh22 clearfix">
- <span class="fl">{{plan.planTypeName}}</span>
- <span class="fr c-999">{{plan.time}}</span>
- </p>
- <div class="ui-grid">
- <p class="ui-col-1 bgc-c1c1c1 lh22 b-r-11 c-position-r c-t-center">
- <span class="c-position-a bgc-orange lh22 b-r-11 c-t-center c-fff" :style="{width: setPercent(plan), left: 0}"></span>
- <span class="c-position-r w-100 c-t-center">{{setPercent(plan)}}</span>
- </p>
- <div class="ui-col-0 ml10 c-999 lh22">{{plan.allFinishCount}}/{{plan.allCount}}</div>
- </div>
- </div> -->
- <!-- <div class="ui-col-0 ml15 c-007cd9 lh40">{{plan.statusName}}</div> -->
- <div class="ui-col-1">
- <div class="ui-grid ui-grid-middle">
- <img :src="setPatImg(plan.photo)" class="mr10" style="width: 45px; height: 45px; border-radius: 100%;"/>
- <div class="ui-col-1">
- <p>{{plan.doctorName}}</p>
- <p class="mt5">{{plan.deptName}}/{{plan.hospitalName}}</p>
- </div>
- </div>
- </div>
- <div class="c-999 ui-grid ui-grid-middle">
- {{formatter(plan.createTime)}}
- </div>
- </li>
- <li class="ptb10 c-t-center" v-if="!planList || !planList.length">暂无相关计划</li>
- </ul>
- </div>
- <h4 class="m0 pl15 pr5 lh40 c-border-tb clearfix c-position-r"><em class="c-position-a set-blue-span"></em>康复相关记录<span class="fr w80 c-333 c-f12 c-t-center">已完成:{{finishData.planDetailFinish}}</span></h4>
- <div style="height:calc(100% - 271px);overflow: hidden; overflow-y: auto;">
- <server-items-detail ref="serverItemsDetail" v-if="showServerItemDetail" :patientname="recoverPatInfo.patientInfo.patientName" :patientcode="recoverPatInfo.patientInfo.patientCode" :planid="planId" :plandetailid="serverItemInfo.id" @onclose="showServerItemDetail=false"></server-items-detail>
- <div v-if="!showServerItemDetail" style="height:calc(100% - 100px);overflow: hidden; overflow-y: auto;" class="recover-list">
- <ul class="p0 m0 c-h100 c-999">
- <li class="clearfix plr10 cur-pit record-li" v-for="(plan, index) in planDetailList" :class="{'bgc-dff5fc c-12b7f5':plan.istaDay}" @click="lookProject(plan)">
- <div class="fl w80 ptb10 c-t-right">
- <p class="p0 m0 lh18">{{plan.executeTime}}</p>
- </div>
- <div class="fl set-dianxian plr20 ptb10 clerfix">
- <span class="fl set-taday mt8 c-t-center c-fff" v-if="plan.istaDay">今</span>
- <span class="fl mlr5 mt13 set-row bgc-e1e1e1" v-else></span>
- </div>
- <div class="fl ptb10 w-100-220">
- <div class="ui-grid ui-grid-middle" style="height: 36px;">
- <p class="p0 m0 lh18">{{plan.title}}</p>
- </div>
- </div>
- <div class="fr ptb10 w60 c-t-center">
- <p class="p0 m0 lh18">已完成</p>
- <p class="p0 m0 lh18">查看</p>
- </div>
- </li>
- <li class="plr20" v-if="isFinishMore">
- <div class="c-border lh40 b-r-3 c-t-center cur-pit" @click="addEventPage()">点击查看更早时间</div>
- </li>
- <li class="ptb10 c-t-center c-333" v-if="!planDetailList.length">暂无相关记录</li>
- </ul>
- </div>
- <!-- 服务项列表 -->
- <div v-if="!showServerItemDetail" class="plr10 pb10">
- <div v-for="(o, i) in limitlessItems" class="flex vc c-f14 c-border plr10 ptb5 mt10 link-control" @click="viewServerItemsDetail(o)">
- <div class="flex1 c-12b7f5 ellipsis-1">
- {{o.name}}
- </div>
- <div style="width: 250px;">
- <div class="flex lh28">
- <span>完成情况:</span>
- <div class="flex1" v-if="!o.frequency_code"><span class="c-FF0000">{{o.compeletTotal}}</span>次</div>
- <div class="flex1" v-else><span class="c-FF0000">{{o.compeletTotal}}/{{o.total}}</span></div>
- </div>
- <div v-if="o.code!='3'" class="flex lh28">
- <span>上次完成:</span>
- <div class="flex1">{{o.firstDate?o.firstDate:'--'}}</div>
- </div>
- <div v-if="o.frequency_code" class="flex lh28">
- <span>下次计划:</span>
- <div class="flex1">{{o.lastDate?o.lastDate:'--'}}</div>
- </div>
- <div v-if="o.code=='3'" class="flex lh28">
- <!-- o.type 1: 血糖 2: 血压 -->
- <span>最近体征:</span>
- <div v-if="!o.type || o.compeletTotal==0" class="">--</div>
- <div v-else-if="o.type==1">
- <span class="zhibiao_icon" :class="{'low':o.levelClazz1=='low', 'high':o.levelClazz1=='high'}">{{o.levelName}}血糖:{{o.value1}}</span>
- </div>
- <div v-else-if="o.type==2" class="flex vc">
- <span class="zhibiao_icon" :class="{'low':o.levelClazz1=='low', 'high':o.levelClazz1=='high'}">收缩压:{{o.value1}}</span>
- <span class="zhibiao_icon" :class="{'low':o.levelClazz2=='low', 'high':o.levelClazz2=='high'}">舒张压:{{o.value2}}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="ui-col-0 w360 c-h100 c-border-l ui-grid ui-grid-vertical">
- <div class="plr5 ui-col-0">
- <h4 class="m0 pl15 pr5 lh40 c-border-b clearfix c-position-r"><em class="c-position-a set-blue-span"></em>体征记录</h4>
- <div class="h380">
- <div class="pt10 pb10 ui-grid ui-grid-middle c-t-center type">
- <div class="ui-col-0 over-hidden lh30 c-border b-r-5">
- <span class="c-inline-block w130 bgc-fff c-666 cur-pit" :class="{'active': recordType == 1}" @click="changeType(0,1)">血糖记录</span>
- <span class="c-inline-block w130 bgc-fff c-666 cur-pit" :class="{'active': recordType == 2}" @click="changeType(0,2)">血压记录</span>
- </div>
- </div>
- <div class="pt10 bgc-f5f5fa c-t-center">
- <div class="ui-grid ui-grid-middle lh22 type">
- <div class="ui-col-0 clearfix">
- <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': rangeType == 6}" @click="changeType(1,6)">7天</div>
- <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': rangeType == 29}" @click="changeType(1,29)">30天</div>
- <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': rangeType == 89}" @click="changeType(1,89)">90天</div>
- <div class="fl b-r-15 w60 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': rangeType == 182}" @click="changeType(1,182)">半年</div>
- </div>
- </div>
- <div class="ui-grid ui-grid-middle lh22 type c-border-t mtb10 pt10" v-if="recordType == 1">
- <div class="ui-col-0 clearfix">
- <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 1}" @click="changeType(2,1)">早餐前</div>
- <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 2}" @click="changeType(2,2)">早餐后</div>
- <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 3}" @click="changeType(2,3)">午餐前</div>
- <div class="fl b-r-15 w60 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 4}" @click="changeType(2,4)">午餐后</div>
- </div>
- </div>
- <div class="ui-grid ui-grid-middle type lh22" v-if="recordType == 1">
- <div class="ui-col-0 clearfix">
- <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 5}" @click="changeType(2,5)">晚餐前</div>
- <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 6}" @click="changeType(2,6)">晚餐后</div>
- <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 7}" @click="changeType(2,7)">睡前</div>
- </div>
- </div>
- </div>
- <div class="ui-grid ui-grid-middle lh30 bgc-f5f5fa c-t-center" :class="{'pt10': recordType == 2}">
- <div class="ui-col-2" v-if="recordType == 2">收缩压</div>
- <div class="ui-col-2 c-12b7f5">正常:{{toNormal}}次</div>
- <div class="ui-col-2 c-ff3b30">偏高:{{toHigh}}次</div>
- <div class="ui-col-2 c-2dbe55">偏低:{{toLow}}次</div>
- </div>
- <div class="ui-grid ui-grid-middle pb10 lh30 bgc-f5f5fa c-t-center" v-if="recordType == 2">
- <div class="ui-col-2">舒张压</div>
- <div class="ui-col-2 c-12b7f5">正常:{{toNormal2}}次</div>
- <div class="ui-col-2 c-ff3b30">偏高:{{toHigh2}}次</div>
- <div class="ui-col-2 c-2dbe55">偏低:{{toLow2}}次</div>
- </div>
- <div style="height: 200px;">
- <my-chart :chart-data="chartData"></my-chart>
- </div>
- </div>
- </div>
- <div class="plr5 ui-col-1 ui-grid ui-grid-vertical">
- <h4 class="ui-col-0 m0 pl15 pr5 lh40 c-border-b clearfix c-position-r"><em class="c-position-a set-blue-span"></em>就诊记录</h4>
- <div class="ui-col-0 ui-grid ui-grid-middle lh30 c-border-b c-t-center clearfix">
- <div class="ui-col-2 w96 cur-pit" :class="{'active':eventType == 1}" @click="selectType(1)">门诊</div>
- <div class="ui-col-2 w96 cur-pit c-border-l" :class="{'active':eventType == 2}" @click="selectType(2)">住院</div>
- <div class="ui-col-2 w96 cur-pit c-border-l" :class="{'active':eventType == 3}" @click="selectType(3)">体检</div>
- </div>
- <ul class="ui-col-1 p0 m0" style="overflow: auto;">
- <li class="clearfix" v-for="(record, index) in seeRecord" :key="index">
- <div class="fl set-dianxian h73 plr10 pt20 clerfix">
- <span class="fl mlr5 set-row bgc-red" v-if="record.eventType == 2"></span>
- <span class="fl mlr5 set-row bgc-green" v-if="record.eventType == 3"></span>
- <span class="fl mlr5 set-row bgc-orange" v-if="record.eventType == 1"></span>
- </div>
- <div class="fl w-100-60 pt15">
- <div class=" c-border b-r-3">
- <p class="m0 p0 plr5 c-fff bgc-red lh22 clearfix" v-if="record.eventType == 2">住院<span class="fr">{{record.eventDate}}</span></p>
- <p class="m0 p0 plr5 c-fff bgc-green lh22 clearfix" v-if="record.eventType == 3">体检<span class="fr">{{record.eventDate}}</span></p>
- <p class="m0 p0 plr5 c-fff bgc-orange lh22 clearfix" v-if="record.eventType == 1">门诊<span class="fr">{{record.eventDate}}</span></p>
- <p class="m0 p0 plr5 pt5 lh22">{{record.dianosis}}</p>
- <p class="m0 p0 pr5 pb5 pl20 set-hospital">{{record.orgName}}</p>
- </div>
- </div>
- </li>
- <li class="c-t-center c-12b7f5" v-if="hasMoreRecord">查看更多</li>
- <li class="c-t-center ptb10" v-if="!seeRecord.length">无就诊记录</li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script src="../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
- <script src="../../../js/jquery-2.2.4.js"></script>
- <script src="../../../plugins/layer/layer.min.js"></script>
- <script src="../../../plugins/toastr/toastr.min.js"></script>
- <script type="text/javascript" src="../../../plugins/element-ui/element-ui.js"></script>
- <script src="../../../plugins/echarts/3.8.5/echarts.js" type="text/javascript"></script>
- <script src="../../../component/rehabilitation/my-echart.js"></script>
- <script src="../../../js/bootstrap.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/util.js" type="text/javascript" charset="utf-8"></script>
- <script src="../../../api/http-request.js" type="text/javascript"></script>
- <script type="text/javascript" src="../../../component/rehabilitation/server-items-detail.js"></script>
- <script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
- <script src="../../../api/recover_api.js" type="text/javascript"></script>
- <script type="text/javascript">
- var doctorType = (JSON.parse(window.localStorage.getItem('wlyyAgent'))||{}).doctorType
- var httpData=GetRequest()
- function showSuccessMessage(msg) {
- layer.msg(msg, {
- icon: 1
- })
- }
-
- function showErrorMessage(msg) {
- layer.msg(msg, {
- icon: 5
- })
- }
-
- function showWarningMessage(msg) {
- layer.msg(msg, {
- icon: 2
- })
- }
-
- function showInfoMessage(msg) {
- layer.msg(msg, {
- icon: 6
- })
- }
- var nowDate = new Date().format("yyyy/MM/dd")
- var xuetangDuring = ['', '早餐前', '早餐后', '午餐前', '午餐后', '晚餐前', '晚餐后', '睡前'];
- var normalLevel = [
- [],
- [7, 4],
- [11.1, 4],
- [7, 4],
- [11.1, 4],
- [7, 4],
- [11.1, 4],
- [7, 4]
- ];
- var docInfo = JSON.parse(window.localStorage.getItem("wlyyAgent"));
- recoverVue = new Vue({
- el: "#app",
- data: {
- doctorType: doctorType,
- isMobile: true,
- recoverPatInfo: {},
- finishData: {},
- diagnosisInformation: [],
- seeRecord: [],
- planDetailList: [],
- isFinishMore: false,
- page: 1,
- eventPage: 1,
- eventType: 1,
- hasMoreRecord: null,
- chartData: {},
- lastXT: '', // 最近一次血糖记录
- lastXY: '', // 最近一次血压记录
- recordType: 1, // 1血糖2血压
- rangeType: 6, // 日期
- xtStatu: 1, // 状态血糖
- toNormal: 0, // 正常
- toLow: 0, // 偏低
- toHigh: 0, // 偏高
- toNormal2: 0, // 正常
- toLow2: 0, // 偏低
- toHigh2: 0, // 偏高
- xtMax: 0, // 血糖最高
- xtMin: 0, // 血糖最低
- xyMax: [139, 89], // 血压最高
- xyMin: [90, 60], // 血压最低
- planList: [], // 计划列表
- recentRecoverDetail: undefined,
- medicalRecordsList: [], // 住院病历列表
- limitlessItems: [], // 不限频次服务项列表
- showServerItemDetail: false,
- serverItemInfo: undefined,
- docList: [],
- planId: httpData['planId'],
- islimit: false
- },
- mounted: function() {
- this.patientRehabilitationDetail()
- this.selectPlanByPatient()
- this.recentPlanDetailRecord()
- this.archivesEvent()
- // 获取最新的诊疗信息2条
- this.findDiagnosisInformationByPatient()
- // 获取体征记录
- this.getBodyRecoredLast()
- },
- methods: {
- // 获取服务医生列表
- selectPlanServerDoctor: function(id){
- var vm = this,
- params = {
- planId: id
- }
- rehaAPI.selectPlanServerDoctor(params).then(function(res){
- if(res.status==200){
- vm.docList = res.data
- }else{
- layer.msg(res.msg,{icon:5});
- }
- })
- },
- changeStatu: function() {
- this.isMobile = false
- },
- gotoNewplan: function() {
- location.href = "new_recover.html?patient=" + httpData.patientCode
- },
- jumpPlan: function(plan) {
- location.href = "../../rehabilitation/html/rehabilitation_management.html?planId=" + plan.id + "&patientCode=" + httpData.patientCode
- },
- lookProject: function(obj) {
- var vm = this
- // layer.open({
- // type: 2,
- // area: ['600px', '500px'],
- // shade: 0.5,
- // title: '服务项目内容',
- // closeBtn: 1,
- // shift: 5,
- // shadeClose: false, //点击遮罩关闭层
- // content: "project-detail.html?planId=" + obj.id
- // });
- top.layer.open({
- type: 2,
- area: ['800px', '650px'],
- shade: 0.5,
- title: '服务项目内容',
- fixed: true, //不固定
- maxmin: true,
- closeBtn:1,
- shift: 5,
- shadeClose: false, //点击遮罩关闭层
- content: '../../rehabilitation/html/guide_the_message.html?planid='+obj.id+'&pId='+vm.planList[0].planId+'&patient='+httpData.patientCode
- });
- },
- // 获取最新的诊疗消息
- findDiagnosisInformationByPatient: function() {
- var vm = this,
- loading = layer.load(0, {shade: false}),params = {
- patient: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c",
- page: 0,
- size: 2
- }
- recoverAPI.findDiagnosisInformationByPatient(params).then(function(res) {
- layer.close(loading)
- if(res.status == 200) {
- vm.diagnosisInformation = res.data.detailModelList
- } else {
- showErrorMessage(res.msg);
- }
- })
- },
- // 获取住院病历
- selectByMedicalCode: function(medicalRecordsCode){
- var vm = this;
- var params = {
- medical: medicalRecordsCode
- };
- rehaAPI.selectByMedicalCode(params).then(function(res){
- if(res.status==200){
- vm.medicalRecordsList = res.data
- }else {
- showErrorMessage(res.msg);
- }
- })
- },
- // 查看住院病历详情
- viewMedicalDetail: function(o){
- layer.open({
- type: 2,
- area: ['600px', '600px'],
- shade: 0.5,
- title: '住院病历详情',
- fixed: true, //不固定
- maxmin: true,
- closeBtn:1,
- shift: 5,
- shadeClose: false, //点击遮罩关闭层
- content: '../../rehabilitation/html/medical-records-detail.html?medicalRecordsCode='+ o.code,
- });
- },
- formatter: function(time){
- return new Date(time).format('yyyy-MM-dd')
- },
- // 获取康复计划信息
- patientRehabilitationDetail: function() {
- var vm = this,
- loadding = layer.load(0, {shade: false}),
- params = {
- patientCode: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c"
- }
- recoverAPI.patientRehabilitationDetail(params).then(function(res) {
- layer.close(loadding)
- if(res.status == 200) {
- vm.recoverPatInfo = res.data
- } else {
- showErrorMessage(res.msg);
- }
- })
- },
- // 所有康复计划列表
- selectPlanByPatient: function(){
- var vm = this,
- loadding = layer.load(0, {shade: false}),
- params = {
- patient: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c"
- }
- rehaAPI.selectPlanByPatient(params).then(function(res) {
- layer.close(loadding)
- if(res.status == 200) {
- if(res.data&&res.data.length>0){
- var list = res.data
- $.each(list, function(index, item){
- if(item.id == vm.planId){
- vm.recentRecoverDetail = item
- }
- })
- vm.planList = res.data
- vm.selectByMedicalCode(vm.recentRecoverDetail.medicalRecordsCode)
- vm.calendarPlanDetailItems(vm.recentRecoverDetail.id)
- vm.selectPlanServerDoctor(vm.recentRecoverDetail.id)
- }
- } else {
- showErrorMessage(res.msg);
- }
- })
- },
- viewServerItemsDetail: function(o){
- if(o.code=='2'){
- showInfoMessage('请从“消息-患者消息列表”中查看患者的康复咨询记录')
- return
- }
- if(o.code=='3'){
- return
- }
- this.serverItemInfo = o
- this.showServerItemDetail = true
- this.islimit = o.frequency_code?true:false
- },
- calendarPlanDetailItems: function(planId){
- var vm=this;
- var year = new Date().getFullYear()
- var params={
- executeStartTime: year+'-01-01'+' 00:00:00',//日历开始时间(格式:yyyy-MM-dd HH:mm:ss)
- executeEndTime: year+'-12-31'+' 23:59:59',//日历结束时间(格式:yyyy-MM-dd HH:mm:ss)
- planId: planId,//计划id
- searchTask: '',//快速查找任务:(1、我的任务,2、随访,3、复诊,4、健康教育)
- status: '',//任务状态(0未完成,1已完成,2已预约)
- }
- rehaAPI.calendarPlanDetailItems(params).then(function(res){
- if(res.status==200){
- var arr = []
- $.each(res.data, function(i, o){
- if(o.code=='3'&&o.type){
- if(o.type==2){
- o.levelClazz = vm.getLevelClazz(o.value1, 139, 90) || vm.getLevelClazz(o.value2, 89, 60)
- o.levelClazz1 = vm.getLevelClazz(o.value1, 139, 90)
- o.levelClazz2 = vm.getLevelClazz(o.value2, 89, 60)
- o.levelClazz3 = vm.getLevelClazz(o.value3, 100, 60)
- } else {
- var num = parseInt(o.value2)
- var max = normalLevel[num][0],
- min = normalLevel[num][1];
- o.levelClazz1 = vm.getLevelClazz(o.value1, max, min)
- o.levelName = xuetangDuring[o.value2]
- }
- }
- arr.push(o)
-
- })
- vm.limitlessItems = arr
- }
- })
- },
- getLevelClazz: function(value,max,min) {
- if(!value||(!max && !min)) {
- return '';
- }
- var value = parseFloat(value);
- if(value < min) {
- return 'low';
- } else if(value > max) {
- return 'high';
- } else {
- return ''
- }
- },
- // 获取已完成的康复服务项
- recentPlanDetailRecord: function() {
- var vm = this,
- loadding = layer.load(0, {shade: false}),
- params = {
- patientCode: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c",
- page: vm.eventPage,
- pageSize: 10
- }
- recoverAPI.recentPlanDetailRecord(params).then(function(res) {
- layer.close(loadding)
- if(res.status == 200) {
- vm.finishData = res.data
- vm.planDetailList = vm.planDetailList.concat(vm.finishData.planDetailList)
- vm.planDetailList = $.each(vm.planDetailList, function(index, o) {
- var executeTime = new Date(o.executeTime).format("yyyy/MM/dd")
- if(nowDate == executeTime) {
- o.istaDay = true
- }
- return o
- });
- if(vm.finishData.planDetailList.length >= 10) {
- vm.isFinishMore = true
- } else {
- vm.isFinishMore = false
- }
- } else {
- showErrorMessage(res.msg);
- }
- })
- },
- goConsulting: function(){
- showInfoMessage('请从“消息-患者消息列表”中查看患者的康复咨询记录')
- },
- selectType: function(type) {
- this.eventType = type
- this.seeRecord = []
- this.page = 1
- this.archivesEvent()
- },
- archivesEvent: function() {
- var vm = this,
- loadding = layer.load(0, {shade: false}),
- params = {
- patient: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c",
- type: vm.eventType,
- page: vm.page,
- pageSize: 20
- }
- recoverAPI.archivesEvent(params).then(function(res) {
- layer.close(loadding)
- if(res.status == 200) {
- this.hasMoreRecord = res.data.length == 20 ? true : false
- vm.seeRecord = vm.seeRecord.concat(res.data)
- } else {
- showErrorMessage(res.msg);
- }
- })
- },
- setPatImg: function(src, doc) {
- if(!src) {
- if(doc) {
- return "../../../images/d-default.png"
- } else {
- return "../../../images/p-female.png"
- }
- } else {
- var str = httpRequest.getImgUrl(src);
- return str
- }
- },
- addEventPage: function() {
- this.eventPage++;
- this.recentPlanDetailRecord()
- },
- addPage: function() {
- this.page++;
- this.archivesEvent()
- },
- setPercent: function(plan) {
- return Math.floor(plan.allFinishCount / plan.allCount * 100) + "%"
- },
- // 时间推算
- getDateFromCurrentDate: function() {
- var fromDate = this.recordType == 1 ? this.lastXT : this.lastXY,
- dayInterval = -this.rangeType;
- var curDate = new Date(Date.parse(fromDate.replace(/-/g, "/")));
- curDate.setDate(curDate.getDate() + dayInterval);
- var year = curDate.getFullYear();
- var month = (curDate.getMonth() + 1) < 10 ? "0" + (curDate.getMonth() + 1) : (curDate.getMonth() + 1);
- var day = curDate.getDate() < 10 ? "0" + curDate.getDate() : curDate.getDate();
- return year + "-" + month + "-" + day + " 00:00:00";
- },
- // 血糖最高值最低值
- getNormalLevel: function() {
- var arr = [
- [],
- [6.1, 3.9],
- [7.8, 4.4],
- [6.1, 3.9],
- [7.8, 4.4],
- [6.1, 3.9],
- [7.8, 4.4],
- [6.1, 3.9]
- ][this.xtStatu];
- this.xtMax = arr[0]
- this.xyMax = arr[1]
- },
- // 处理数据偏高、偏低、正常
- judgeDataDif: function(val, val2) {
- // 血糖判断
- if(this.recordType == 1) {
- if(val > this.xtMax) {
- ++this.toHigh;
- } else if(val < this.xtMin) {
- ++this.toLow;
- } else {
- ++this.toNormal;
- };
- } else {
- // 血压判断
- if(val > this.xyMax[0]) {
- ++this.toHigh;
- } else if(val < this.xyMin[0]) {
- ++this.toLow;
- } else {
- ++this.toNormal;
- }
- // 血压判断
- if(val2 > this.xyMax[1]) {
- ++this.toHigh2;
- } else if(val2 < this.xyMin[1]) {
- ++this.toLow2;
- } else {
- ++this.toNormal2;
- }
- }
- },
- // 体征记录
- changeType: function(judge, num) {
- if(judge) {
- if(judge == 1) {
- this.rangeType = num
- } else {
- this.xtStatu = num
- }
- } else {
- this.recordType = num
- }
- this.getHealthIndex()
- },
- // 获取上次体检
- getBodyRecoredLast: function() {
- var vm = this,
- loading = layer.load(0, {shade: false}),
- params = {
- patient: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c"
- }
- recoverAPI.getBodyRecoredLast(params).then(function(res) {
- layer.close(loading)
- if(res.status == 200){
- vm.lastXT = res.data.xt ? res.data.xt.recordDate : null;
- vm.lastXY = res.data.xy ? res.data.xy.recordDate : null;
- // 初始化执行
- vm.getHealthIndex();
- }else{
- showErrorMessage(res.msg)
- }
- })
- },
- // 获取体征数据
- getHealthIndex: function() {
- this.toNormal = 0;
- this.toHigh = 0;
- this.toLow = 0;
- if(this.recordType == 2) {
- this.toNormal = 0;
- this.toHigh = 0;
- this.toLow = 0;
- }
- var endDate = this.recordType == 1 ? this.lastXT : this.lastXY
- if(!endDate) {
- showErrorMessage("暂无体征数据");
- this.chartData = {
- opinion:[],
- opinionData:[],
- recordType: this.recordType,
- opinionData2: [],
- }
- return false;
- }
- if(this.recordType == 1) { this.getNormalLevel(); }
- var vm = this,
- loading = layer.load(0, {shade: false}),
- startDate = vm.getDateFromCurrentDate(),
- params = {
- patient: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c",
- type: vm.recordType,
- begin: startDate,
- end: endDate,
- gi_type: vm.recordType == 1 ? vm.xtStatu : 0
- }
- recoverAPI.getHealthIndex(params).then(function(res) {
- layer.close(loading)
- if(res.status == 200) {
- var arr1 = [], arr2 = [], arr3 = []
- for(var i = 0, len = res.list.length; i < len; i++) {
- vm.judgeDataDif(res.list[i].value1, res.list[i].value2)
- arr1.push(res.list[i].date)
- var obj = {value: res.list[i].value1, name: res.list[i].date},
- obj2 = {value: res.list[i].value2, name: res.list[i].date};
- arr2.push(obj)
- arr3.push(obj2)
- }
- vm.chartData = {
- opinion: arr1.length ? arr1 : [],
- opinionData: arr2.length ? arr2 : [],
- recordType: vm.recordType,
- opinionData2: vm.recordType == 2 ? arr3 : [],
- }
- } else {
- showErrorMessage(res.msg);
- }
- })
- }
- }
- })
- </script>
- </body>
- </html>
|