<answer id='answer'></answer>
<view class="patient">
	<view class="title">请选择患者信息</view>
	<view class="con">以便医生给出更准确的治疗，信息仅医生可见</view>
</view>
<view class="flex addBtn" bindtap='myDetails' data-src="/packageA/editUser/editUser">
	<image src="/images/add.png"></image>
	<text>添加患者</text>
</view>
<view style="padding-bottom:{{iPhoneX?200:120}}rpx;">
	<view wx:for='{{infoList}}' wx:for-item='item' wx:key='index' class="info {{iShow==item.id?'active':''}}" bindtap="switch" data-index="index" data-item="{{item}}" data-id="{{item.id}}">
		<view class="head flex">
			<view class="header">
				<image wx:if="{{item.sex=='男'}}" mode="aspectFit" src="/images/F.png"></image>
				<image wx:if="{{item.sex=='女'}}" mode="aspectFit" src="/images/M.png"></image>
			</view>
			<view class="name">{{item.name}}</view>
			<wxs module="m1">
				var getMax = function(card) {
					if (card == '' || card == null) {
						return "";
					}
					card = "" + card;
					var card1 = card.replace(card.substring(6, 14), "******")
					return card1;
				}
				module.exports.getMax = getMax;
			</wxs>
			<view class="card"> {{m1.getMax(item.card)}} </view>
			<view class="bianji" wx:if='{{iShow==item.id}}' bindtap="editInfo" data-item="{{item}}">编辑</view>
		</view>
		<view class="xinxi">
			<text>{{item.sex}}</text>
			<text>{{item.age}}岁</text>
			<text wx:if='{{item.weight!=null&&item.weight!=0}}'>{{item.weight}}kg</text>
		</view>
		<view class="record" wx:if="{{iShow==item.id}}">
			<view class="rNcon">
				<view>肝肾功能</view>
				<view>
					<text wx:if='{{item.liver==0}}'>肝功能正常</text>
					<text wx:else >肝功能异常</text>
					<text  wx:if='{{item.kidney==0}}'>肾功能正常</text>
					<text wx:else >肾功能异常</text>
				</view>
			</view>
			<view class="rNcon">
				<view>备孕情况</view>
				<view>
					<text wx:if='{{item.beiyun==0}}'>无</text>
					<text wx:if='{{item.beiyun==1}}'>备孕中</text>
					<text wx:if='{{item.beiyun==2}}'>怀孕中</text>
					<text wx:if='{{item.beiyun==3}}'>哺乳中</text>
				</view>
			</view>
			<view class="rNcon">
				<view>过敏史</view>
				<view>
					<text wx:if="{{item.allergy==0}}">无</text>
					<text wx:else>{{item.allergy_desc}}</text>
				</view>
			</view>
			<view class="rNcon">
				<view>过往病史</view>
				<view>
					<text wx:if="{{item.past==0}}">无</text>
					<text wx:else>{{item.past_desc}}</text>
				</view>
			</view>
		</view>
	</view>
</view>
<view class="btn flex" style="height:{{iPhoneX?200:120}}rpx;">
	<view class="flex" bindtap='next'>下一步</view>
</view>