|
@@ -46,6 +46,7 @@ function getRecordDetail(){
|
|
|
post(api.getRecordDetail,{'behospitalCode':global_id}).then(function(res){
|
|
|
if(res.data.code==='0'){
|
|
|
const data = res.data.data;
|
|
|
+
|
|
|
const {beHospital,result,msg} = data;
|
|
|
const info=Object.assign(beHospital,result);
|
|
|
initMenu(JSON.parse(result.menuData));
|
|
@@ -58,6 +59,7 @@ function getRecordDetail(){
|
|
|
global_flawData=msg;
|
|
|
|
|
|
let obj = JSON.parse(result.pageData)
|
|
|
+
|
|
|
wardRound(obj['查房记录'],'查房记录')
|
|
|
preoperation(obj['术前讨论、术前小结'],'术前讨论、术前小结')
|
|
|
summary(obj['阶段小结'],'阶段小结')
|
|
@@ -71,7 +73,7 @@ function getRecordDetail(){
|
|
|
}
|
|
|
//填充患者信息
|
|
|
function initPatientInfo(data){
|
|
|
- const date = data.birthday.substr(0,10);
|
|
|
+ const date = data.birthday&&data.birthday.substr(0,10);
|
|
|
const age=new Date(date).getTime()/(365*24*60*60*1000);
|
|
|
const obj=Object.assign({},data,{age:global_age});
|
|
|
$("#infoTmpl").tmpl(obj).appendTo("#patientInfo");
|
|
@@ -96,7 +98,7 @@ function initContent(data){
|
|
|
"死亡病例讨论记录":"#discusionAboutDeathTmpl",
|
|
|
"病理检验送检单":"#pathologicTestTmpl"
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
for(let k in obj){
|
|
|
for(let i in obj[k]){
|
|
|
info=formatInfoData(k,obj[k][i]);
|