package com.yidianling.medical.archives.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.yidianling.im.R
import com.yidianling.medical.archives.bean.MedicalArchivesListBean


/**
 * 问诊人列表adapter
 * */
class MedicalUserArchivesAdapter :
    BaseQuickAdapter<MedicalArchivesListBean?, BaseViewHolder>(R.layout.medical_item_archives_list) {

    override fun convert(helper: BaseViewHolder, item: MedicalArchivesListBean?) {
        helper.setText(R.id.name, item?.name)
        helper.setText(R.id.sex, item?.genderName)
        helper.setText(R.id.age, "${item?.age}岁")
        if (item?.needEdit == 1){
            helper.setGone(R.id.id_card,false)
            helper.setGone(R.id.perfect,true)
        }else{
            helper.setGone(R.id.id_card,true)
            helper.setGone(R.id.perfect,false)
            helper.setText(R.id.id_card, item?.idcardNo)
        }

    }

}