<!--pages/sickDetail/sickDetail.wxml-->
<wxs src="../../filters/filter.wxs" module="filters"></wxs>
<nav navName="病情详情"></nav>
<view class="page">
  <view class="content">
    <view class="countcell">
    <view class="left">
    <view class="name">第{{index}}份病例 </view>
    <view class="time">填写时间：{{filters.transforDay(sickInfo.created_at,"date")}} </view>
    </view>
    <van-icon name="delete-o"  class="icon" bindtap="onDel"/>
  </view>
  <view class="infobox">
     <view class="title">基础信息</view>
     <view class="basiccell">
        <view class="namebox">
          <view class="name">{{sickInfo.name}}</view>
          <view class="age"><text wx:if="{{sickInfo.sex==1}}" decode="true">男</text><text wx:elif="{{sickInfo.sex==2}}" decode="true">女</text><text wx:else decode="true">未知</text>｜{{sickInfo.age}}岁</view>
        </view>
        <view class="info">
        <view class="infocell"  wx:if="{{!(sickInfo.height==null && sickInfo.weight==null && sickInfo.nation_name==null && sickInfo.job_name==null && sickInfo.marital_status==null)}}">
          <view class="cell">身高：<text class="desc">{{sickInfo.height}}cm</text></view>
          <view class="cell">体重：<text class="desc">{{sickInfo.weight}}kg
          </text></view>
          <view class="cell">民族：<text class="desc">{{sickInfo.nation_name}}</text></view>
          <view class="cell" >职业：<text class="desc">{{sickInfo.job_name}}</text></view>
          <view class="cell">婚姻：<text class="desc" wx:if="{{sickInfo.marital_status==0}}">未婚</text><text wx:elif="{{sickInfo.marital_status==1}}">已婚</text><text wx:elif="{{sickInfo.marital_status==2}}">离异</text></view>
        </view>
     </view>
      <view class="row" wx:if="{{sickInfo.disease_desc}}">
         <view class="name">所患疾病：</view>
         <view class="desc">{{sickInfo.disease_class_name}}</view>
      </view>
      <view class="row" wx:if="{{sickInfo.diagnosis_date}}">
         <view class="name">确诊日期：</view>
         <view class="desc">{{sickInfo.diagnosis_date}}</view>
      </view>
      <view class="row" wx:if="{{sickInfo.diagnosis_hospital}}">
         <view class="name">确诊医院：</view>
         <view class="desc">{{sickInfo.diagnosis_hospital}}</view>
      </view>
     <view class="rowtip" wx:if="{{sickInfo.is_take_medicine!=null}}">
        <view class="row">
          <view class="name">正在服用的药品信息：</view>
          <view class="desc">{{sickInfo.is_take_medicine==1?'有':'无'}}</view>
        </view>
        <view class="tip">{{sickInfo.drugs_name}};</view>
     </view>
     <view class="row top" wx:if="{{sickInfo.disease_desc}}">
         <view class="name">病情描述：</view>
         <view class="desc">{{sickInfo.disease_desc}}</view>
      </view>
      <view class="row top" wx:if="{{sickInfo.product.length>0}}">
         <view class="name">用药意向：</view>
         <view class="desc">
           <text v-for="{{sickInfo.product}}">{{item}};</text>
         </view>
      </view>
      <view class="rowtip" wx:if="{{sickInfo.diagnose_images.length > 0}}">
        <view class="row">
          <view class="name">复诊凭证（病例/处方单/检查报告/住院单)</view>
        </view>
        <view class="imgtip">
          <image src="{{sickInfo}}" class="img" wx:for="{{sickInfo.diagnose_images}}" mode="aspectFill" wx:for-index="idx" wx:key="idx" bindtap="previewImage" data-id="{{idx}}" ></image>
        </view>
      </view>
     </view>
  
  </view>
  <view class="infobox" wx:if="{{!(sickInfo.is_allergy_history==null && sickInfo.is_family_history==null && sickInfo.is_pregnant==null && sickInfo.is_operation==null && sickInfo.drink_wine_status==null && sickInfo.smoke_status==null && sickInfo.chemical_compound_status==null) }}">
    <view class="title">其他信息</view>
    <view class="basiccell">
      <view class="info">
        <view class="row top" wx:if="{{sickInfo.is_allergy_history!=null}}">
         <view class="name">过敏史：</view>
         <view class="desc">{{sickInfo.is_allergy_history==0?"无":sickInfo.allergy_history}}</view>
      </view>
     <view class="row top"  wx:if="{{sickInfo.is_family_history!=null}}">
         <view class="name">家族史：</view>
         <view class="desc">{{sickInfo.is_family_history==0?"无":sickInfo.family_history}}</view>
      </view>
     
     <view class="rowtip" wx:if="{{sickInfo.is_pregnant!=null}}">
        <view class="row">
          <view class="name">是否备孕、妊娠或者哺乳期：</view>
          <view class="desc">{{sickInfo.is_pregnant==0?"无":'是'}}</view>
        </view>
        <view class="tip" wx:if="{{sickInfo.pregnant}}">{{sickInfo.pregnant}}</view>
     </view>
     <view class="rowtip" wx:if="{{sickInfo.drink_wine_status!=null}}">
        <view class="row">
          <view class="name">饮酒史：</view>
          <view class="desc">{{sickInfo.drink_wine_status==1?'从不':sickInfo.drink_wine_status==2?'偶尔':sickInfo.drink_wine_status==3?'经常':sickInfo.drink_wine_status==4?'每天':sickInfo.drink_wine_status==5?'已戒酒':'其他'}}</view>
        </view>
     </view>
     <view class="rowtip" wx:if="{{sickInfo.smoke_status!=null}}">
        <view class="row">
          <view class="name">吸烟史：</view>
          <view class="desc">{{sickInfo.smoke_status==1?'从不':sickInfo.smoke_status==2?'偶尔':sickInfo.smoke_status==3?'经常':sickInfo.smoke_status==4?'每天':sickInfo.smoke_status==5?'已戒烟':'其他'}}</view>
        </view>
     </view>
     <view class="row top" wx:if="{{sickInfo.is_operation!=null}}">
         <view class="name">手术史：</view>
         <view class="desc">{{sickInfo.is_operation==0?'否':sickInfo.operation}}</view>
      </view>
     <view class="rowtip" wx:if="{{sickInfo.chemical_compound_status!=null}}">
        <view class="row">
          <view class="name">接触化学物：</view>
          <view class="desc">{{sickInfo.chemical_compound_status==1?'从不':sickInfo.chemical_compound_status==2?'偶尔':sickInfo.chemical_compound_status==3?'经常':sickInfo.chemical_compound_status==4?'每天':'其他'}}</view>
        </view>
        <view class="tip" wx:if="{{sickInfo.chemical_compound_status && sickInfo.chemical_compound_status!=1}}">{{sickInfo.chemical_compound_describe}}</view>
     </view>
    </view>
    </view>
  </view>
  <view class="infobox" wx:if="{{sickInfo.order_prescription}}">
    <view class="title">处方信息</view>
    <view class="basiccell" style="margin-bottom: 20rpx;">
      <view class="row">
         <view class="name">诊断：</view>
         <view class="desc">{{sickInfo.order_prescription.icd_name}}</view>
      </view>
      <view class="row">
         <view class="name">时间：</view>
         <view class="desc">{{sickInfo.order_prescription.doctor_created_time}}</view>
      </view>
      <view class="row top">
         <view class="name">药品：</view>
         <view class="desc">
            <text  wx:for="{{sickInfo.order_prescription.product}}" >{{item.product_name}}{{item.product_spec}};</text>
         </view>
      </view>
      <view class="row">
         <view class="name">医嘱：</view>
         <view class="desc">{{sickInfo.order_prescription.doctor_advice}}</view>
      </view>
    </view>
  </view>
  </view>
</view>
<dialog bind:confirm="confirm" showDialog="{{show}}" message="{{message}}"></dialog>