// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: user.proto

package com.ywt.gapi.user;

/**
 * <pre>
 *诊疗卡
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.user.MedicalCard}
 */
public  final class MedicalCard extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.user.MedicalCard)
    MedicalCardOrBuilder {
  // Use MedicalCard.newBuilder() to construct.
  private MedicalCard(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private MedicalCard() {
    patientId_ = "";
    patientName_ = "";
    sex_ = 0;
    birthday_ = "";
    telephoneNo_ = "";
    mobile_ = "";
    documentId_ = "";
    address_ = "";
    idTypeCode_ = "";
    idTypeDesc_ = "";
    idNo_ = "";
    insureCardNo_ = "";
    accInfo_ = "";
    cardNo_ = "";
    cardType_ = "";
    patientType_ = "";
    balance_ = 0;
    userId_ = 0;
    hospitalId_ = 0;
    cardId_ = 0;
    hospitalName_ = "";
    hisPatientId_ = "";
    guardian_ = "";
    flag_ = 0;
    lastChoice_ = 0;
    freeMedicalTreat_ = false;
    lastChosenTime_ = 0L;
    isDefault_ = false;
    relationship_ = 0;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private MedicalCard(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    int mutable_bitField0_ = 0;
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!input.skipField(tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            patientId_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();

            patientName_ = s;
            break;
          }
          case 24: {

            sex_ = input.readInt32();
            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();

            birthday_ = s;
            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();

            telephoneNo_ = s;
            break;
          }
          case 50: {
            java.lang.String s = input.readStringRequireUtf8();

            mobile_ = s;
            break;
          }
          case 58: {
            java.lang.String s = input.readStringRequireUtf8();

            documentId_ = s;
            break;
          }
          case 66: {
            java.lang.String s = input.readStringRequireUtf8();

            address_ = s;
            break;
          }
          case 74: {
            java.lang.String s = input.readStringRequireUtf8();

            idTypeCode_ = s;
            break;
          }
          case 82: {
            java.lang.String s = input.readStringRequireUtf8();

            idTypeDesc_ = s;
            break;
          }
          case 90: {
            java.lang.String s = input.readStringRequireUtf8();

            idNo_ = s;
            break;
          }
          case 98: {
            java.lang.String s = input.readStringRequireUtf8();

            insureCardNo_ = s;
            break;
          }
          case 106: {
            java.lang.String s = input.readStringRequireUtf8();

            accInfo_ = s;
            break;
          }
          case 114: {
            java.lang.String s = input.readStringRequireUtf8();

            cardNo_ = s;
            break;
          }
          case 122: {
            java.lang.String s = input.readStringRequireUtf8();

            cardType_ = s;
            break;
          }
          case 130: {
            java.lang.String s = input.readStringRequireUtf8();

            patientType_ = s;
            break;
          }
          case 136: {

            balance_ = input.readInt32();
            break;
          }
          case 144: {

            userId_ = input.readInt32();
            break;
          }
          case 152: {

            hospitalId_ = input.readInt32();
            break;
          }
          case 160: {

            cardId_ = input.readInt32();
            break;
          }
          case 170: {
            java.lang.String s = input.readStringRequireUtf8();

            hospitalName_ = s;
            break;
          }
          case 178: {
            java.lang.String s = input.readStringRequireUtf8();

            hisPatientId_ = s;
            break;
          }
          case 186: {
            java.lang.String s = input.readStringRequireUtf8();

            guardian_ = s;
            break;
          }
          case 192: {

            flag_ = input.readInt32();
            break;
          }
          case 200: {

            lastChoice_ = input.readInt32();
            break;
          }
          case 208: {

            freeMedicalTreat_ = input.readBool();
            break;
          }
          case 216: {

            lastChosenTime_ = input.readInt64();
            break;
          }
          case 224: {

            isDefault_ = input.readBool();
            break;
          }
          case 232: {

            relationship_ = input.readInt32();
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.user.UserOuterClass.internal_static_com_ywt_gapi_user_MedicalCard_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.user.UserOuterClass.internal_static_com_ywt_gapi_user_MedicalCard_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.user.MedicalCard.class, com.ywt.gapi.user.MedicalCard.Builder.class);
  }

  public static final int PATIENTID_FIELD_NUMBER = 1;
  private volatile java.lang.Object patientId_;
  /**
   * <code>string patientId = 1;</code>
   */
  public java.lang.String getPatientId() {
    java.lang.Object ref = patientId_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      patientId_ = s;
      return s;
    }
  }
  /**
   * <code>string patientId = 1;</code>
   */
  public com.google.protobuf.ByteString
      getPatientIdBytes() {
    java.lang.Object ref = patientId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      patientId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PATIENTNAME_FIELD_NUMBER = 2;
  private volatile java.lang.Object patientName_;
  /**
   * <code>string patientName = 2;</code>
   */
  public java.lang.String getPatientName() {
    java.lang.Object ref = patientName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      patientName_ = s;
      return s;
    }
  }
  /**
   * <code>string patientName = 2;</code>
   */
  public com.google.protobuf.ByteString
      getPatientNameBytes() {
    java.lang.Object ref = patientName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      patientName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SEX_FIELD_NUMBER = 3;
  private int sex_;
  /**
   * <code>int32 sex = 3;</code>
   */
  public int getSex() {
    return sex_;
  }

  public static final int BIRTHDAY_FIELD_NUMBER = 4;
  private volatile java.lang.Object birthday_;
  /**
   * <code>string birthday = 4;</code>
   */
  public java.lang.String getBirthday() {
    java.lang.Object ref = birthday_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      birthday_ = s;
      return s;
    }
  }
  /**
   * <code>string birthday = 4;</code>
   */
  public com.google.protobuf.ByteString
      getBirthdayBytes() {
    java.lang.Object ref = birthday_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      birthday_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TELEPHONENO_FIELD_NUMBER = 5;
  private volatile java.lang.Object telephoneNo_;
  /**
   * <code>string telephoneNo = 5;</code>
   */
  public java.lang.String getTelephoneNo() {
    java.lang.Object ref = telephoneNo_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      telephoneNo_ = s;
      return s;
    }
  }
  /**
   * <code>string telephoneNo = 5;</code>
   */
  public com.google.protobuf.ByteString
      getTelephoneNoBytes() {
    java.lang.Object ref = telephoneNo_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      telephoneNo_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MOBILE_FIELD_NUMBER = 6;
  private volatile java.lang.Object mobile_;
  /**
   * <code>string mobile = 6;</code>
   */
  public java.lang.String getMobile() {
    java.lang.Object ref = mobile_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      mobile_ = s;
      return s;
    }
  }
  /**
   * <code>string mobile = 6;</code>
   */
  public com.google.protobuf.ByteString
      getMobileBytes() {
    java.lang.Object ref = mobile_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      mobile_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DOCUMENTID_FIELD_NUMBER = 7;
  private volatile java.lang.Object documentId_;
  /**
   * <code>string documentId = 7;</code>
   */
  public java.lang.String getDocumentId() {
    java.lang.Object ref = documentId_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      documentId_ = s;
      return s;
    }
  }
  /**
   * <code>string documentId = 7;</code>
   */
  public com.google.protobuf.ByteString
      getDocumentIdBytes() {
    java.lang.Object ref = documentId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      documentId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ADDRESS_FIELD_NUMBER = 8;
  private volatile java.lang.Object address_;
  /**
   * <code>string address = 8;</code>
   */
  public java.lang.String getAddress() {
    java.lang.Object ref = address_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      address_ = s;
      return s;
    }
  }
  /**
   * <code>string address = 8;</code>
   */
  public com.google.protobuf.ByteString
      getAddressBytes() {
    java.lang.Object ref = address_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      address_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int IDTYPECODE_FIELD_NUMBER = 9;
  private volatile java.lang.Object idTypeCode_;
  /**
   * <code>string idTypeCode = 9;</code>
   */
  public java.lang.String getIdTypeCode() {
    java.lang.Object ref = idTypeCode_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      idTypeCode_ = s;
      return s;
    }
  }
  /**
   * <code>string idTypeCode = 9;</code>
   */
  public com.google.protobuf.ByteString
      getIdTypeCodeBytes() {
    java.lang.Object ref = idTypeCode_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      idTypeCode_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int IDTYPEDESC_FIELD_NUMBER = 10;
  private volatile java.lang.Object idTypeDesc_;
  /**
   * <code>string idTypeDesc = 10;</code>
   */
  public java.lang.String getIdTypeDesc() {
    java.lang.Object ref = idTypeDesc_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      idTypeDesc_ = s;
      return s;
    }
  }
  /**
   * <code>string idTypeDesc = 10;</code>
   */
  public com.google.protobuf.ByteString
      getIdTypeDescBytes() {
    java.lang.Object ref = idTypeDesc_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      idTypeDesc_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int IDNO_FIELD_NUMBER = 11;
  private volatile java.lang.Object idNo_;
  /**
   * <code>string idNo = 11;</code>
   */
  public java.lang.String getIdNo() {
    java.lang.Object ref = idNo_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      idNo_ = s;
      return s;
    }
  }
  /**
   * <code>string idNo = 11;</code>
   */
  public com.google.protobuf.ByteString
      getIdNoBytes() {
    java.lang.Object ref = idNo_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      idNo_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int INSURECARDNO_FIELD_NUMBER = 12;
  private volatile java.lang.Object insureCardNo_;
  /**
   * <code>string insureCardNo = 12;</code>
   */
  public java.lang.String getInsureCardNo() {
    java.lang.Object ref = insureCardNo_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      insureCardNo_ = s;
      return s;
    }
  }
  /**
   * <code>string insureCardNo = 12;</code>
   */
  public com.google.protobuf.ByteString
      getInsureCardNoBytes() {
    java.lang.Object ref = insureCardNo_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      insureCardNo_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ACCINFO_FIELD_NUMBER = 13;
  private volatile java.lang.Object accInfo_;
  /**
   * <code>string accInfo = 13;</code>
   */
  public java.lang.String getAccInfo() {
    java.lang.Object ref = accInfo_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      accInfo_ = s;
      return s;
    }
  }
  /**
   * <code>string accInfo = 13;</code>
   */
  public com.google.protobuf.ByteString
      getAccInfoBytes() {
    java.lang.Object ref = accInfo_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      accInfo_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CARDNO_FIELD_NUMBER = 14;
  private volatile java.lang.Object cardNo_;
  /**
   * <code>string cardNo = 14;</code>
   */
  public java.lang.String getCardNo() {
    java.lang.Object ref = cardNo_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      cardNo_ = s;
      return s;
    }
  }
  /**
   * <code>string cardNo = 14;</code>
   */
  public com.google.protobuf.ByteString
      getCardNoBytes() {
    java.lang.Object ref = cardNo_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      cardNo_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CARDTYPE_FIELD_NUMBER = 15;
  private volatile java.lang.Object cardType_;
  /**
   * <code>string cardType = 15;</code>
   */
  public java.lang.String getCardType() {
    java.lang.Object ref = cardType_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      cardType_ = s;
      return s;
    }
  }
  /**
   * <code>string cardType = 15;</code>
   */
  public com.google.protobuf.ByteString
      getCardTypeBytes() {
    java.lang.Object ref = cardType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      cardType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PATIENTTYPE_FIELD_NUMBER = 16;
  private volatile java.lang.Object patientType_;
  /**
   * <code>string patientType = 16;</code>
   */
  public java.lang.String getPatientType() {
    java.lang.Object ref = patientType_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      patientType_ = s;
      return s;
    }
  }
  /**
   * <code>string patientType = 16;</code>
   */
  public com.google.protobuf.ByteString
      getPatientTypeBytes() {
    java.lang.Object ref = patientType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      patientType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int BALANCE_FIELD_NUMBER = 17;
  private int balance_;
  /**
   * <code>int32 balance = 17;</code>
   */
  public int getBalance() {
    return balance_;
  }

  public static final int USERID_FIELD_NUMBER = 18;
  private int userId_;
  /**
   * <pre>
   *用户Id
   * </pre>
   *
   * <code>int32 userId = 18;</code>
   */
  public int getUserId() {
    return userId_;
  }

  public static final int HOSPITALID_FIELD_NUMBER = 19;
  private int hospitalId_;
  /**
   * <pre>
   *医院Id
   * </pre>
   *
   * <code>int32 hospitalId = 19;</code>
   */
  public int getHospitalId() {
    return hospitalId_;
  }

  public static final int CARDID_FIELD_NUMBER = 20;
  private int cardId_;
  /**
   * <pre>
   *卡Id
   * </pre>
   *
   * <code>int32 cardId = 20;</code>
   */
  public int getCardId() {
    return cardId_;
  }

  public static final int HOSPITALNAME_FIELD_NUMBER = 21;
  private volatile java.lang.Object hospitalName_;
  /**
   * <pre>
   *医院名称
   * </pre>
   *
   * <code>string hospitalName = 21;</code>
   */
  public java.lang.String getHospitalName() {
    java.lang.Object ref = hospitalName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      hospitalName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *医院名称
   * </pre>
   *
   * <code>string hospitalName = 21;</code>
   */
  public com.google.protobuf.ByteString
      getHospitalNameBytes() {
    java.lang.Object ref = hospitalName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      hospitalName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int HISPATIENTID_FIELD_NUMBER = 22;
  private volatile java.lang.Object hisPatientId_;
  /**
   * <pre>
   *his的病人ID
   * </pre>
   *
   * <code>string hisPatientId = 22;</code>
   */
  public java.lang.String getHisPatientId() {
    java.lang.Object ref = hisPatientId_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      hisPatientId_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *his的病人ID
   * </pre>
   *
   * <code>string hisPatientId = 22;</code>
   */
  public com.google.protobuf.ByteString
      getHisPatientIdBytes() {
    java.lang.Object ref = hisPatientId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      hisPatientId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int GUARDIAN_FIELD_NUMBER = 23;
  private volatile java.lang.Object guardian_;
  /**
   * <pre>
   *监护人（家长姓名）
   * </pre>
   *
   * <code>string guardian = 23;</code>
   */
  public java.lang.String getGuardian() {
    java.lang.Object ref = guardian_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      guardian_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *监护人（家长姓名）
   * </pre>
   *
   * <code>string guardian = 23;</code>
   */
  public com.google.protobuf.ByteString
      getGuardianBytes() {
    java.lang.Object ref = guardian_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      guardian_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FLAG_FIELD_NUMBER = 24;
  private int flag_;
  /**
   * <pre>
   *加号标识 1-是 0-否
   * </pre>
   *
   * <code>int32 flag = 24;</code>
   */
  public int getFlag() {
    return flag_;
  }

  public static final int LASTCHOICE_FIELD_NUMBER = 25;
  private int lastChoice_;
  /**
   * <pre>
   * 最后（上一次）的选择，0-否，1-是
   * </pre>
   *
   * <code>int32 lastChoice = 25;</code>
   */
  public int getLastChoice() {
    return lastChoice_;
  }

  public static final int FREEMEDICALTREAT_FIELD_NUMBER = 26;
  private boolean freeMedicalTreat_;
  /**
   * <pre>
   * 是否是公医
   * </pre>
   *
   * <code>bool freeMedicalTreat = 26;</code>
   */
  public boolean getFreeMedicalTreat() {
    return freeMedicalTreat_;
  }

  public static final int LASTCHOSENTIME_FIELD_NUMBER = 27;
  private long lastChosenTime_;
  /**
   * <pre>
   * 上次选择时间
   * </pre>
   *
   * <code>int64 lastChosenTime = 27;</code>
   */
  public long getLastChosenTime() {
    return lastChosenTime_;
  }

  public static final int ISDEFAULT_FIELD_NUMBER = 28;
  private boolean isDefault_;
  /**
   * <pre>
   * 是否是默认诊疗卡
   * </pre>
   *
   * <code>bool isDefault = 28;</code>
   */
  public boolean getIsDefault() {
    return isDefault_;
  }

  public static final int RELATIONSHIP_FIELD_NUMBER = 29;
  private int relationship_;
  /**
   * <pre>
   * 与本人关系
   * </pre>
   *
   * <code>int32 relationship = 29;</code>
   */
  public int getRelationship() {
    return relationship_;
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!getPatientIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, patientId_);
    }
    if (!getPatientNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, patientName_);
    }
    if (sex_ != 0) {
      output.writeInt32(3, sex_);
    }
    if (!getBirthdayBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, birthday_);
    }
    if (!getTelephoneNoBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, telephoneNo_);
    }
    if (!getMobileBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, mobile_);
    }
    if (!getDocumentIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, documentId_);
    }
    if (!getAddressBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, address_);
    }
    if (!getIdTypeCodeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, idTypeCode_);
    }
    if (!getIdTypeDescBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, idTypeDesc_);
    }
    if (!getIdNoBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, idNo_);
    }
    if (!getInsureCardNoBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, insureCardNo_);
    }
    if (!getAccInfoBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 13, accInfo_);
    }
    if (!getCardNoBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 14, cardNo_);
    }
    if (!getCardTypeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 15, cardType_);
    }
    if (!getPatientTypeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 16, patientType_);
    }
    if (balance_ != 0) {
      output.writeInt32(17, balance_);
    }
    if (userId_ != 0) {
      output.writeInt32(18, userId_);
    }
    if (hospitalId_ != 0) {
      output.writeInt32(19, hospitalId_);
    }
    if (cardId_ != 0) {
      output.writeInt32(20, cardId_);
    }
    if (!getHospitalNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 21, hospitalName_);
    }
    if (!getHisPatientIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 22, hisPatientId_);
    }
    if (!getGuardianBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 23, guardian_);
    }
    if (flag_ != 0) {
      output.writeInt32(24, flag_);
    }
    if (lastChoice_ != 0) {
      output.writeInt32(25, lastChoice_);
    }
    if (freeMedicalTreat_ != false) {
      output.writeBool(26, freeMedicalTreat_);
    }
    if (lastChosenTime_ != 0L) {
      output.writeInt64(27, lastChosenTime_);
    }
    if (isDefault_ != false) {
      output.writeBool(28, isDefault_);
    }
    if (relationship_ != 0) {
      output.writeInt32(29, relationship_);
    }
  }

  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!getPatientIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, patientId_);
    }
    if (!getPatientNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, patientName_);
    }
    if (sex_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(3, sex_);
    }
    if (!getBirthdayBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, birthday_);
    }
    if (!getTelephoneNoBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, telephoneNo_);
    }
    if (!getMobileBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, mobile_);
    }
    if (!getDocumentIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, documentId_);
    }
    if (!getAddressBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, address_);
    }
    if (!getIdTypeCodeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, idTypeCode_);
    }
    if (!getIdTypeDescBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, idTypeDesc_);
    }
    if (!getIdNoBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, idNo_);
    }
    if (!getInsureCardNoBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, insureCardNo_);
    }
    if (!getAccInfoBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, accInfo_);
    }
    if (!getCardNoBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, cardNo_);
    }
    if (!getCardTypeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, cardType_);
    }
    if (!getPatientTypeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, patientType_);
    }
    if (balance_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(17, balance_);
    }
    if (userId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(18, userId_);
    }
    if (hospitalId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(19, hospitalId_);
    }
    if (cardId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(20, cardId_);
    }
    if (!getHospitalNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, hospitalName_);
    }
    if (!getHisPatientIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, hisPatientId_);
    }
    if (!getGuardianBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(23, guardian_);
    }
    if (flag_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(24, flag_);
    }
    if (lastChoice_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(25, lastChoice_);
    }
    if (freeMedicalTreat_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(26, freeMedicalTreat_);
    }
    if (lastChosenTime_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(27, lastChosenTime_);
    }
    if (isDefault_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(28, isDefault_);
    }
    if (relationship_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(29, relationship_);
    }
    memoizedSize = size;
    return size;
  }

  private static final long serialVersionUID = 0L;
  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.ywt.gapi.user.MedicalCard)) {
      return super.equals(obj);
    }
    com.ywt.gapi.user.MedicalCard other = (com.ywt.gapi.user.MedicalCard) obj;

    boolean result = true;
    result = result && getPatientId()
        .equals(other.getPatientId());
    result = result && getPatientName()
        .equals(other.getPatientName());
    result = result && (getSex()
        == other.getSex());
    result = result && getBirthday()
        .equals(other.getBirthday());
    result = result && getTelephoneNo()
        .equals(other.getTelephoneNo());
    result = result && getMobile()
        .equals(other.getMobile());
    result = result && getDocumentId()
        .equals(other.getDocumentId());
    result = result && getAddress()
        .equals(other.getAddress());
    result = result && getIdTypeCode()
        .equals(other.getIdTypeCode());
    result = result && getIdTypeDesc()
        .equals(other.getIdTypeDesc());
    result = result && getIdNo()
        .equals(other.getIdNo());
    result = result && getInsureCardNo()
        .equals(other.getInsureCardNo());
    result = result && getAccInfo()
        .equals(other.getAccInfo());
    result = result && getCardNo()
        .equals(other.getCardNo());
    result = result && getCardType()
        .equals(other.getCardType());
    result = result && getPatientType()
        .equals(other.getPatientType());
    result = result && (getBalance()
        == other.getBalance());
    result = result && (getUserId()
        == other.getUserId());
    result = result && (getHospitalId()
        == other.getHospitalId());
    result = result && (getCardId()
        == other.getCardId());
    result = result && getHospitalName()
        .equals(other.getHospitalName());
    result = result && getHisPatientId()
        .equals(other.getHisPatientId());
    result = result && getGuardian()
        .equals(other.getGuardian());
    result = result && (getFlag()
        == other.getFlag());
    result = result && (getLastChoice()
        == other.getLastChoice());
    result = result && (getFreeMedicalTreat()
        == other.getFreeMedicalTreat());
    result = result && (getLastChosenTime()
        == other.getLastChosenTime());
    result = result && (getIsDefault()
        == other.getIsDefault());
    result = result && (getRelationship()
        == other.getRelationship());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + PATIENTID_FIELD_NUMBER;
    hash = (53 * hash) + getPatientId().hashCode();
    hash = (37 * hash) + PATIENTNAME_FIELD_NUMBER;
    hash = (53 * hash) + getPatientName().hashCode();
    hash = (37 * hash) + SEX_FIELD_NUMBER;
    hash = (53 * hash) + getSex();
    hash = (37 * hash) + BIRTHDAY_FIELD_NUMBER;
    hash = (53 * hash) + getBirthday().hashCode();
    hash = (37 * hash) + TELEPHONENO_FIELD_NUMBER;
    hash = (53 * hash) + getTelephoneNo().hashCode();
    hash = (37 * hash) + MOBILE_FIELD_NUMBER;
    hash = (53 * hash) + getMobile().hashCode();
    hash = (37 * hash) + DOCUMENTID_FIELD_NUMBER;
    hash = (53 * hash) + getDocumentId().hashCode();
    hash = (37 * hash) + ADDRESS_FIELD_NUMBER;
    hash = (53 * hash) + getAddress().hashCode();
    hash = (37 * hash) + IDTYPECODE_FIELD_NUMBER;
    hash = (53 * hash) + getIdTypeCode().hashCode();
    hash = (37 * hash) + IDTYPEDESC_FIELD_NUMBER;
    hash = (53 * hash) + getIdTypeDesc().hashCode();
    hash = (37 * hash) + IDNO_FIELD_NUMBER;
    hash = (53 * hash) + getIdNo().hashCode();
    hash = (37 * hash) + INSURECARDNO_FIELD_NUMBER;
    hash = (53 * hash) + getInsureCardNo().hashCode();
    hash = (37 * hash) + ACCINFO_FIELD_NUMBER;
    hash = (53 * hash) + getAccInfo().hashCode();
    hash = (37 * hash) + CARDNO_FIELD_NUMBER;
    hash = (53 * hash) + getCardNo().hashCode();
    hash = (37 * hash) + CARDTYPE_FIELD_NUMBER;
    hash = (53 * hash) + getCardType().hashCode();
    hash = (37 * hash) + PATIENTTYPE_FIELD_NUMBER;
    hash = (53 * hash) + getPatientType().hashCode();
    hash = (37 * hash) + BALANCE_FIELD_NUMBER;
    hash = (53 * hash) + getBalance();
    hash = (37 * hash) + USERID_FIELD_NUMBER;
    hash = (53 * hash) + getUserId();
    hash = (37 * hash) + HOSPITALID_FIELD_NUMBER;
    hash = (53 * hash) + getHospitalId();
    hash = (37 * hash) + CARDID_FIELD_NUMBER;
    hash = (53 * hash) + getCardId();
    hash = (37 * hash) + HOSPITALNAME_FIELD_NUMBER;
    hash = (53 * hash) + getHospitalName().hashCode();
    hash = (37 * hash) + HISPATIENTID_FIELD_NUMBER;
    hash = (53 * hash) + getHisPatientId().hashCode();
    hash = (37 * hash) + GUARDIAN_FIELD_NUMBER;
    hash = (53 * hash) + getGuardian().hashCode();
    hash = (37 * hash) + FLAG_FIELD_NUMBER;
    hash = (53 * hash) + getFlag();
    hash = (37 * hash) + LASTCHOICE_FIELD_NUMBER;
    hash = (53 * hash) + getLastChoice();
    hash = (37 * hash) + FREEMEDICALTREAT_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getFreeMedicalTreat());
    hash = (37 * hash) + LASTCHOSENTIME_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getLastChosenTime());
    hash = (37 * hash) + ISDEFAULT_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getIsDefault());
    hash = (37 * hash) + RELATIONSHIP_FIELD_NUMBER;
    hash = (53 * hash) + getRelationship();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.ywt.gapi.user.MedicalCard parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.user.MedicalCard parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.user.MedicalCard parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.user.MedicalCard parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.user.MedicalCard parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.user.MedicalCard parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.user.MedicalCard parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.user.MedicalCard parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.ywt.gapi.user.MedicalCard parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.user.MedicalCard parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.ywt.gapi.user.MedicalCard parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.user.MedicalCard parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.ywt.gapi.user.MedicalCard prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   *诊疗卡
   * </pre>
   *
   * Protobuf type {@code com.ywt.gapi.user.MedicalCard}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.user.MedicalCard)
      com.ywt.gapi.user.MedicalCardOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.user.UserOuterClass.internal_static_com_ywt_gapi_user_MedicalCard_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.user.UserOuterClass.internal_static_com_ywt_gapi_user_MedicalCard_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.user.MedicalCard.class, com.ywt.gapi.user.MedicalCard.Builder.class);
    }

    // Construct using com.ywt.gapi.user.MedicalCard.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      patientId_ = "";

      patientName_ = "";

      sex_ = 0;

      birthday_ = "";

      telephoneNo_ = "";

      mobile_ = "";

      documentId_ = "";

      address_ = "";

      idTypeCode_ = "";

      idTypeDesc_ = "";

      idNo_ = "";

      insureCardNo_ = "";

      accInfo_ = "";

      cardNo_ = "";

      cardType_ = "";

      patientType_ = "";

      balance_ = 0;

      userId_ = 0;

      hospitalId_ = 0;

      cardId_ = 0;

      hospitalName_ = "";

      hisPatientId_ = "";

      guardian_ = "";

      flag_ = 0;

      lastChoice_ = 0;

      freeMedicalTreat_ = false;

      lastChosenTime_ = 0L;

      isDefault_ = false;

      relationship_ = 0;

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.user.UserOuterClass.internal_static_com_ywt_gapi_user_MedicalCard_descriptor;
    }

    public com.ywt.gapi.user.MedicalCard getDefaultInstanceForType() {
      return com.ywt.gapi.user.MedicalCard.getDefaultInstance();
    }

    public com.ywt.gapi.user.MedicalCard build() {
      com.ywt.gapi.user.MedicalCard result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.ywt.gapi.user.MedicalCard buildPartial() {
      com.ywt.gapi.user.MedicalCard result = new com.ywt.gapi.user.MedicalCard(this);
      result.patientId_ = patientId_;
      result.patientName_ = patientName_;
      result.sex_ = sex_;
      result.birthday_ = birthday_;
      result.telephoneNo_ = telephoneNo_;
      result.mobile_ = mobile_;
      result.documentId_ = documentId_;
      result.address_ = address_;
      result.idTypeCode_ = idTypeCode_;
      result.idTypeDesc_ = idTypeDesc_;
      result.idNo_ = idNo_;
      result.insureCardNo_ = insureCardNo_;
      result.accInfo_ = accInfo_;
      result.cardNo_ = cardNo_;
      result.cardType_ = cardType_;
      result.patientType_ = patientType_;
      result.balance_ = balance_;
      result.userId_ = userId_;
      result.hospitalId_ = hospitalId_;
      result.cardId_ = cardId_;
      result.hospitalName_ = hospitalName_;
      result.hisPatientId_ = hisPatientId_;
      result.guardian_ = guardian_;
      result.flag_ = flag_;
      result.lastChoice_ = lastChoice_;
      result.freeMedicalTreat_ = freeMedicalTreat_;
      result.lastChosenTime_ = lastChosenTime_;
      result.isDefault_ = isDefault_;
      result.relationship_ = relationship_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.ywt.gapi.user.MedicalCard) {
        return mergeFrom((com.ywt.gapi.user.MedicalCard)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.user.MedicalCard other) {
      if (other == com.ywt.gapi.user.MedicalCard.getDefaultInstance()) return this;
      if (!other.getPatientId().isEmpty()) {
        patientId_ = other.patientId_;
        onChanged();
      }
      if (!other.getPatientName().isEmpty()) {
        patientName_ = other.patientName_;
        onChanged();
      }
      if (other.getSex() != 0) {
        setSex(other.getSex());
      }
      if (!other.getBirthday().isEmpty()) {
        birthday_ = other.birthday_;
        onChanged();
      }
      if (!other.getTelephoneNo().isEmpty()) {
        telephoneNo_ = other.telephoneNo_;
        onChanged();
      }
      if (!other.getMobile().isEmpty()) {
        mobile_ = other.mobile_;
        onChanged();
      }
      if (!other.getDocumentId().isEmpty()) {
        documentId_ = other.documentId_;
        onChanged();
      }
      if (!other.getAddress().isEmpty()) {
        address_ = other.address_;
        onChanged();
      }
      if (!other.getIdTypeCode().isEmpty()) {
        idTypeCode_ = other.idTypeCode_;
        onChanged();
      }
      if (!other.getIdTypeDesc().isEmpty()) {
        idTypeDesc_ = other.idTypeDesc_;
        onChanged();
      }
      if (!other.getIdNo().isEmpty()) {
        idNo_ = other.idNo_;
        onChanged();
      }
      if (!other.getInsureCardNo().isEmpty()) {
        insureCardNo_ = other.insureCardNo_;
        onChanged();
      }
      if (!other.getAccInfo().isEmpty()) {
        accInfo_ = other.accInfo_;
        onChanged();
      }
      if (!other.getCardNo().isEmpty()) {
        cardNo_ = other.cardNo_;
        onChanged();
      }
      if (!other.getCardType().isEmpty()) {
        cardType_ = other.cardType_;
        onChanged();
      }
      if (!other.getPatientType().isEmpty()) {
        patientType_ = other.patientType_;
        onChanged();
      }
      if (other.getBalance() != 0) {
        setBalance(other.getBalance());
      }
      if (other.getUserId() != 0) {
        setUserId(other.getUserId());
      }
      if (other.getHospitalId() != 0) {
        setHospitalId(other.getHospitalId());
      }
      if (other.getCardId() != 0) {
        setCardId(other.getCardId());
      }
      if (!other.getHospitalName().isEmpty()) {
        hospitalName_ = other.hospitalName_;
        onChanged();
      }
      if (!other.getHisPatientId().isEmpty()) {
        hisPatientId_ = other.hisPatientId_;
        onChanged();
      }
      if (!other.getGuardian().isEmpty()) {
        guardian_ = other.guardian_;
        onChanged();
      }
      if (other.getFlag() != 0) {
        setFlag(other.getFlag());
      }
      if (other.getLastChoice() != 0) {
        setLastChoice(other.getLastChoice());
      }
      if (other.getFreeMedicalTreat() != false) {
        setFreeMedicalTreat(other.getFreeMedicalTreat());
      }
      if (other.getLastChosenTime() != 0L) {
        setLastChosenTime(other.getLastChosenTime());
      }
      if (other.getIsDefault() != false) {
        setIsDefault(other.getIsDefault());
      }
      if (other.getRelationship() != 0) {
        setRelationship(other.getRelationship());
      }
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.ywt.gapi.user.MedicalCard parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.user.MedicalCard) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private java.lang.Object patientId_ = "";
    /**
     * <code>string patientId = 1;</code>
     */
    public java.lang.String getPatientId() {
      java.lang.Object ref = patientId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        patientId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string patientId = 1;</code>
     */
    public com.google.protobuf.ByteString
        getPatientIdBytes() {
      java.lang.Object ref = patientId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        patientId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string patientId = 1;</code>
     */
    public Builder setPatientId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      patientId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string patientId = 1;</code>
     */
    public Builder clearPatientId() {
      
      patientId_ = getDefaultInstance().getPatientId();
      onChanged();
      return this;
    }
    /**
     * <code>string patientId = 1;</code>
     */
    public Builder setPatientIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      patientId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object patientName_ = "";
    /**
     * <code>string patientName = 2;</code>
     */
    public java.lang.String getPatientName() {
      java.lang.Object ref = patientName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        patientName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string patientName = 2;</code>
     */
    public com.google.protobuf.ByteString
        getPatientNameBytes() {
      java.lang.Object ref = patientName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        patientName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string patientName = 2;</code>
     */
    public Builder setPatientName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      patientName_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string patientName = 2;</code>
     */
    public Builder clearPatientName() {
      
      patientName_ = getDefaultInstance().getPatientName();
      onChanged();
      return this;
    }
    /**
     * <code>string patientName = 2;</code>
     */
    public Builder setPatientNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      patientName_ = value;
      onChanged();
      return this;
    }

    private int sex_ ;
    /**
     * <code>int32 sex = 3;</code>
     */
    public int getSex() {
      return sex_;
    }
    /**
     * <code>int32 sex = 3;</code>
     */
    public Builder setSex(int value) {
      
      sex_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 sex = 3;</code>
     */
    public Builder clearSex() {
      
      sex_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object birthday_ = "";
    /**
     * <code>string birthday = 4;</code>
     */
    public java.lang.String getBirthday() {
      java.lang.Object ref = birthday_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        birthday_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string birthday = 4;</code>
     */
    public com.google.protobuf.ByteString
        getBirthdayBytes() {
      java.lang.Object ref = birthday_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        birthday_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string birthday = 4;</code>
     */
    public Builder setBirthday(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      birthday_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string birthday = 4;</code>
     */
    public Builder clearBirthday() {
      
      birthday_ = getDefaultInstance().getBirthday();
      onChanged();
      return this;
    }
    /**
     * <code>string birthday = 4;</code>
     */
    public Builder setBirthdayBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      birthday_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object telephoneNo_ = "";
    /**
     * <code>string telephoneNo = 5;</code>
     */
    public java.lang.String getTelephoneNo() {
      java.lang.Object ref = telephoneNo_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        telephoneNo_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string telephoneNo = 5;</code>
     */
    public com.google.protobuf.ByteString
        getTelephoneNoBytes() {
      java.lang.Object ref = telephoneNo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        telephoneNo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string telephoneNo = 5;</code>
     */
    public Builder setTelephoneNo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      telephoneNo_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string telephoneNo = 5;</code>
     */
    public Builder clearTelephoneNo() {
      
      telephoneNo_ = getDefaultInstance().getTelephoneNo();
      onChanged();
      return this;
    }
    /**
     * <code>string telephoneNo = 5;</code>
     */
    public Builder setTelephoneNoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      telephoneNo_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object mobile_ = "";
    /**
     * <code>string mobile = 6;</code>
     */
    public java.lang.String getMobile() {
      java.lang.Object ref = mobile_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        mobile_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string mobile = 6;</code>
     */
    public com.google.protobuf.ByteString
        getMobileBytes() {
      java.lang.Object ref = mobile_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        mobile_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string mobile = 6;</code>
     */
    public Builder setMobile(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      mobile_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string mobile = 6;</code>
     */
    public Builder clearMobile() {
      
      mobile_ = getDefaultInstance().getMobile();
      onChanged();
      return this;
    }
    /**
     * <code>string mobile = 6;</code>
     */
    public Builder setMobileBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      mobile_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object documentId_ = "";
    /**
     * <code>string documentId = 7;</code>
     */
    public java.lang.String getDocumentId() {
      java.lang.Object ref = documentId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        documentId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string documentId = 7;</code>
     */
    public com.google.protobuf.ByteString
        getDocumentIdBytes() {
      java.lang.Object ref = documentId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        documentId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string documentId = 7;</code>
     */
    public Builder setDocumentId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      documentId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string documentId = 7;</code>
     */
    public Builder clearDocumentId() {
      
      documentId_ = getDefaultInstance().getDocumentId();
      onChanged();
      return this;
    }
    /**
     * <code>string documentId = 7;</code>
     */
    public Builder setDocumentIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      documentId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object address_ = "";
    /**
     * <code>string address = 8;</code>
     */
    public java.lang.String getAddress() {
      java.lang.Object ref = address_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        address_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string address = 8;</code>
     */
    public com.google.protobuf.ByteString
        getAddressBytes() {
      java.lang.Object ref = address_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        address_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string address = 8;</code>
     */
    public Builder setAddress(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      address_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string address = 8;</code>
     */
    public Builder clearAddress() {
      
      address_ = getDefaultInstance().getAddress();
      onChanged();
      return this;
    }
    /**
     * <code>string address = 8;</code>
     */
    public Builder setAddressBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      address_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object idTypeCode_ = "";
    /**
     * <code>string idTypeCode = 9;</code>
     */
    public java.lang.String getIdTypeCode() {
      java.lang.Object ref = idTypeCode_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        idTypeCode_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string idTypeCode = 9;</code>
     */
    public com.google.protobuf.ByteString
        getIdTypeCodeBytes() {
      java.lang.Object ref = idTypeCode_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        idTypeCode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string idTypeCode = 9;</code>
     */
    public Builder setIdTypeCode(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      idTypeCode_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string idTypeCode = 9;</code>
     */
    public Builder clearIdTypeCode() {
      
      idTypeCode_ = getDefaultInstance().getIdTypeCode();
      onChanged();
      return this;
    }
    /**
     * <code>string idTypeCode = 9;</code>
     */
    public Builder setIdTypeCodeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      idTypeCode_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object idTypeDesc_ = "";
    /**
     * <code>string idTypeDesc = 10;</code>
     */
    public java.lang.String getIdTypeDesc() {
      java.lang.Object ref = idTypeDesc_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        idTypeDesc_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string idTypeDesc = 10;</code>
     */
    public com.google.protobuf.ByteString
        getIdTypeDescBytes() {
      java.lang.Object ref = idTypeDesc_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        idTypeDesc_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string idTypeDesc = 10;</code>
     */
    public Builder setIdTypeDesc(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      idTypeDesc_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string idTypeDesc = 10;</code>
     */
    public Builder clearIdTypeDesc() {
      
      idTypeDesc_ = getDefaultInstance().getIdTypeDesc();
      onChanged();
      return this;
    }
    /**
     * <code>string idTypeDesc = 10;</code>
     */
    public Builder setIdTypeDescBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      idTypeDesc_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object idNo_ = "";
    /**
     * <code>string idNo = 11;</code>
     */
    public java.lang.String getIdNo() {
      java.lang.Object ref = idNo_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        idNo_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string idNo = 11;</code>
     */
    public com.google.protobuf.ByteString
        getIdNoBytes() {
      java.lang.Object ref = idNo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        idNo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string idNo = 11;</code>
     */
    public Builder setIdNo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      idNo_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string idNo = 11;</code>
     */
    public Builder clearIdNo() {
      
      idNo_ = getDefaultInstance().getIdNo();
      onChanged();
      return this;
    }
    /**
     * <code>string idNo = 11;</code>
     */
    public Builder setIdNoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      idNo_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object insureCardNo_ = "";
    /**
     * <code>string insureCardNo = 12;</code>
     */
    public java.lang.String getInsureCardNo() {
      java.lang.Object ref = insureCardNo_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        insureCardNo_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string insureCardNo = 12;</code>
     */
    public com.google.protobuf.ByteString
        getInsureCardNoBytes() {
      java.lang.Object ref = insureCardNo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        insureCardNo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string insureCardNo = 12;</code>
     */
    public Builder setInsureCardNo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      insureCardNo_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string insureCardNo = 12;</code>
     */
    public Builder clearInsureCardNo() {
      
      insureCardNo_ = getDefaultInstance().getInsureCardNo();
      onChanged();
      return this;
    }
    /**
     * <code>string insureCardNo = 12;</code>
     */
    public Builder setInsureCardNoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      insureCardNo_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object accInfo_ = "";
    /**
     * <code>string accInfo = 13;</code>
     */
    public java.lang.String getAccInfo() {
      java.lang.Object ref = accInfo_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        accInfo_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string accInfo = 13;</code>
     */
    public com.google.protobuf.ByteString
        getAccInfoBytes() {
      java.lang.Object ref = accInfo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        accInfo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string accInfo = 13;</code>
     */
    public Builder setAccInfo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      accInfo_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string accInfo = 13;</code>
     */
    public Builder clearAccInfo() {
      
      accInfo_ = getDefaultInstance().getAccInfo();
      onChanged();
      return this;
    }
    /**
     * <code>string accInfo = 13;</code>
     */
    public Builder setAccInfoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      accInfo_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object cardNo_ = "";
    /**
     * <code>string cardNo = 14;</code>
     */
    public java.lang.String getCardNo() {
      java.lang.Object ref = cardNo_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        cardNo_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string cardNo = 14;</code>
     */
    public com.google.protobuf.ByteString
        getCardNoBytes() {
      java.lang.Object ref = cardNo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        cardNo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string cardNo = 14;</code>
     */
    public Builder setCardNo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      cardNo_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string cardNo = 14;</code>
     */
    public Builder clearCardNo() {
      
      cardNo_ = getDefaultInstance().getCardNo();
      onChanged();
      return this;
    }
    /**
     * <code>string cardNo = 14;</code>
     */
    public Builder setCardNoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      cardNo_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object cardType_ = "";
    /**
     * <code>string cardType = 15;</code>
     */
    public java.lang.String getCardType() {
      java.lang.Object ref = cardType_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        cardType_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string cardType = 15;</code>
     */
    public com.google.protobuf.ByteString
        getCardTypeBytes() {
      java.lang.Object ref = cardType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        cardType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string cardType = 15;</code>
     */
    public Builder setCardType(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      cardType_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string cardType = 15;</code>
     */
    public Builder clearCardType() {
      
      cardType_ = getDefaultInstance().getCardType();
      onChanged();
      return this;
    }
    /**
     * <code>string cardType = 15;</code>
     */
    public Builder setCardTypeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      cardType_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object patientType_ = "";
    /**
     * <code>string patientType = 16;</code>
     */
    public java.lang.String getPatientType() {
      java.lang.Object ref = patientType_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        patientType_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string patientType = 16;</code>
     */
    public com.google.protobuf.ByteString
        getPatientTypeBytes() {
      java.lang.Object ref = patientType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        patientType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string patientType = 16;</code>
     */
    public Builder setPatientType(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      patientType_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string patientType = 16;</code>
     */
    public Builder clearPatientType() {
      
      patientType_ = getDefaultInstance().getPatientType();
      onChanged();
      return this;
    }
    /**
     * <code>string patientType = 16;</code>
     */
    public Builder setPatientTypeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      patientType_ = value;
      onChanged();
      return this;
    }

    private int balance_ ;
    /**
     * <code>int32 balance = 17;</code>
     */
    public int getBalance() {
      return balance_;
    }
    /**
     * <code>int32 balance = 17;</code>
     */
    public Builder setBalance(int value) {
      
      balance_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 balance = 17;</code>
     */
    public Builder clearBalance() {
      
      balance_ = 0;
      onChanged();
      return this;
    }

    private int userId_ ;
    /**
     * <pre>
     *用户Id
     * </pre>
     *
     * <code>int32 userId = 18;</code>
     */
    public int getUserId() {
      return userId_;
    }
    /**
     * <pre>
     *用户Id
     * </pre>
     *
     * <code>int32 userId = 18;</code>
     */
    public Builder setUserId(int value) {
      
      userId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *用户Id
     * </pre>
     *
     * <code>int32 userId = 18;</code>
     */
    public Builder clearUserId() {
      
      userId_ = 0;
      onChanged();
      return this;
    }

    private int hospitalId_ ;
    /**
     * <pre>
     *医院Id
     * </pre>
     *
     * <code>int32 hospitalId = 19;</code>
     */
    public int getHospitalId() {
      return hospitalId_;
    }
    /**
     * <pre>
     *医院Id
     * </pre>
     *
     * <code>int32 hospitalId = 19;</code>
     */
    public Builder setHospitalId(int value) {
      
      hospitalId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *医院Id
     * </pre>
     *
     * <code>int32 hospitalId = 19;</code>
     */
    public Builder clearHospitalId() {
      
      hospitalId_ = 0;
      onChanged();
      return this;
    }

    private int cardId_ ;
    /**
     * <pre>
     *卡Id
     * </pre>
     *
     * <code>int32 cardId = 20;</code>
     */
    public int getCardId() {
      return cardId_;
    }
    /**
     * <pre>
     *卡Id
     * </pre>
     *
     * <code>int32 cardId = 20;</code>
     */
    public Builder setCardId(int value) {
      
      cardId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *卡Id
     * </pre>
     *
     * <code>int32 cardId = 20;</code>
     */
    public Builder clearCardId() {
      
      cardId_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object hospitalName_ = "";
    /**
     * <pre>
     *医院名称
     * </pre>
     *
     * <code>string hospitalName = 21;</code>
     */
    public java.lang.String getHospitalName() {
      java.lang.Object ref = hospitalName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        hospitalName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *医院名称
     * </pre>
     *
     * <code>string hospitalName = 21;</code>
     */
    public com.google.protobuf.ByteString
        getHospitalNameBytes() {
      java.lang.Object ref = hospitalName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        hospitalName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *医院名称
     * </pre>
     *
     * <code>string hospitalName = 21;</code>
     */
    public Builder setHospitalName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      hospitalName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *医院名称
     * </pre>
     *
     * <code>string hospitalName = 21;</code>
     */
    public Builder clearHospitalName() {
      
      hospitalName_ = getDefaultInstance().getHospitalName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *医院名称
     * </pre>
     *
     * <code>string hospitalName = 21;</code>
     */
    public Builder setHospitalNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      hospitalName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object hisPatientId_ = "";
    /**
     * <pre>
     *his的病人ID
     * </pre>
     *
     * <code>string hisPatientId = 22;</code>
     */
    public java.lang.String getHisPatientId() {
      java.lang.Object ref = hisPatientId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        hisPatientId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *his的病人ID
     * </pre>
     *
     * <code>string hisPatientId = 22;</code>
     */
    public com.google.protobuf.ByteString
        getHisPatientIdBytes() {
      java.lang.Object ref = hisPatientId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        hisPatientId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *his的病人ID
     * </pre>
     *
     * <code>string hisPatientId = 22;</code>
     */
    public Builder setHisPatientId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      hisPatientId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *his的病人ID
     * </pre>
     *
     * <code>string hisPatientId = 22;</code>
     */
    public Builder clearHisPatientId() {
      
      hisPatientId_ = getDefaultInstance().getHisPatientId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *his的病人ID
     * </pre>
     *
     * <code>string hisPatientId = 22;</code>
     */
    public Builder setHisPatientIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      hisPatientId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object guardian_ = "";
    /**
     * <pre>
     *监护人（家长姓名）
     * </pre>
     *
     * <code>string guardian = 23;</code>
     */
    public java.lang.String getGuardian() {
      java.lang.Object ref = guardian_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        guardian_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *监护人（家长姓名）
     * </pre>
     *
     * <code>string guardian = 23;</code>
     */
    public com.google.protobuf.ByteString
        getGuardianBytes() {
      java.lang.Object ref = guardian_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        guardian_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *监护人（家长姓名）
     * </pre>
     *
     * <code>string guardian = 23;</code>
     */
    public Builder setGuardian(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      guardian_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *监护人（家长姓名）
     * </pre>
     *
     * <code>string guardian = 23;</code>
     */
    public Builder clearGuardian() {
      
      guardian_ = getDefaultInstance().getGuardian();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *监护人（家长姓名）
     * </pre>
     *
     * <code>string guardian = 23;</code>
     */
    public Builder setGuardianBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      guardian_ = value;
      onChanged();
      return this;
    }

    private int flag_ ;
    /**
     * <pre>
     *加号标识 1-是 0-否
     * </pre>
     *
     * <code>int32 flag = 24;</code>
     */
    public int getFlag() {
      return flag_;
    }
    /**
     * <pre>
     *加号标识 1-是 0-否
     * </pre>
     *
     * <code>int32 flag = 24;</code>
     */
    public Builder setFlag(int value) {
      
      flag_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *加号标识 1-是 0-否
     * </pre>
     *
     * <code>int32 flag = 24;</code>
     */
    public Builder clearFlag() {
      
      flag_ = 0;
      onChanged();
      return this;
    }

    private int lastChoice_ ;
    /**
     * <pre>
     * 最后（上一次）的选择，0-否，1-是
     * </pre>
     *
     * <code>int32 lastChoice = 25;</code>
     */
    public int getLastChoice() {
      return lastChoice_;
    }
    /**
     * <pre>
     * 最后（上一次）的选择，0-否，1-是
     * </pre>
     *
     * <code>int32 lastChoice = 25;</code>
     */
    public Builder setLastChoice(int value) {
      
      lastChoice_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 最后（上一次）的选择，0-否，1-是
     * </pre>
     *
     * <code>int32 lastChoice = 25;</code>
     */
    public Builder clearLastChoice() {
      
      lastChoice_ = 0;
      onChanged();
      return this;
    }

    private boolean freeMedicalTreat_ ;
    /**
     * <pre>
     * 是否是公医
     * </pre>
     *
     * <code>bool freeMedicalTreat = 26;</code>
     */
    public boolean getFreeMedicalTreat() {
      return freeMedicalTreat_;
    }
    /**
     * <pre>
     * 是否是公医
     * </pre>
     *
     * <code>bool freeMedicalTreat = 26;</code>
     */
    public Builder setFreeMedicalTreat(boolean value) {
      
      freeMedicalTreat_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 是否是公医
     * </pre>
     *
     * <code>bool freeMedicalTreat = 26;</code>
     */
    public Builder clearFreeMedicalTreat() {
      
      freeMedicalTreat_ = false;
      onChanged();
      return this;
    }

    private long lastChosenTime_ ;
    /**
     * <pre>
     * 上次选择时间
     * </pre>
     *
     * <code>int64 lastChosenTime = 27;</code>
     */
    public long getLastChosenTime() {
      return lastChosenTime_;
    }
    /**
     * <pre>
     * 上次选择时间
     * </pre>
     *
     * <code>int64 lastChosenTime = 27;</code>
     */
    public Builder setLastChosenTime(long value) {
      
      lastChosenTime_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 上次选择时间
     * </pre>
     *
     * <code>int64 lastChosenTime = 27;</code>
     */
    public Builder clearLastChosenTime() {
      
      lastChosenTime_ = 0L;
      onChanged();
      return this;
    }

    private boolean isDefault_ ;
    /**
     * <pre>
     * 是否是默认诊疗卡
     * </pre>
     *
     * <code>bool isDefault = 28;</code>
     */
    public boolean getIsDefault() {
      return isDefault_;
    }
    /**
     * <pre>
     * 是否是默认诊疗卡
     * </pre>
     *
     * <code>bool isDefault = 28;</code>
     */
    public Builder setIsDefault(boolean value) {
      
      isDefault_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 是否是默认诊疗卡
     * </pre>
     *
     * <code>bool isDefault = 28;</code>
     */
    public Builder clearIsDefault() {
      
      isDefault_ = false;
      onChanged();
      return this;
    }

    private int relationship_ ;
    /**
     * <pre>
     * 与本人关系
     * </pre>
     *
     * <code>int32 relationship = 29;</code>
     */
    public int getRelationship() {
      return relationship_;
    }
    /**
     * <pre>
     * 与本人关系
     * </pre>
     *
     * <code>int32 relationship = 29;</code>
     */
    public Builder setRelationship(int value) {
      
      relationship_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 与本人关系
     * </pre>
     *
     * <code>int32 relationship = 29;</code>
     */
    public Builder clearRelationship() {
      
      relationship_ = 0;
      onChanged();
      return this;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }

    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }


    // @@protoc_insertion_point(builder_scope:com.ywt.gapi.user.MedicalCard)
  }

  // @@protoc_insertion_point(class_scope:com.ywt.gapi.user.MedicalCard)
  private static final com.ywt.gapi.user.MedicalCard DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.ywt.gapi.user.MedicalCard();
  }

  public static com.ywt.gapi.user.MedicalCard getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<MedicalCard>
      PARSER = new com.google.protobuf.AbstractParser<MedicalCard>() {
    public MedicalCard parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
        return new MedicalCard(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<MedicalCard> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<MedicalCard> getParserForType() {
    return PARSER;
  }

  public com.ywt.gapi.user.MedicalCard getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

