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

package com.ywt.gapi.user;

/**
 * <pre>
 *患者信息
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.user.Patient}
 */
public  final class Patient extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.user.Patient)
    PatientOrBuilder {
  // Use Patient.newBuilder() to construct.
  private Patient(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private Patient() {
    patientid_ = 0;
    realname_ = "";
    age_ = 0;
    sex_ = 0;
    mobile_ = "";
    doctorId_ = 0;
    userId_ = 0;
    createtime_ = 0L;
    chiefComplaint_ = "";
    diagnosis_ = "";
    remark_ = "";
    sexStr_ = "";
    allergicHistory_ = "";
    description_ = "";
    idCardNo_ = "";
    hisPatientId_ = "";
    address_ = "";
    mrVisible_ = false;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private Patient(
      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 8: {

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

            realname_ = s;
            break;
          }
          case 24: {

            age_ = input.readInt32();
            break;
          }
          case 32: {

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

            mobile_ = s;
            break;
          }
          case 48: {

            doctorId_ = input.readInt32();
            break;
          }
          case 56: {

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

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

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

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

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

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

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

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

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

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

            address_ = s;
            break;
          }
          case 144: {

            mrVisible_ = input.readBool();
            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.DoctorOuterClass.internal_static_com_ywt_gapi_user_Patient_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.user.DoctorOuterClass.internal_static_com_ywt_gapi_user_Patient_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.user.Patient.class, com.ywt.gapi.user.Patient.Builder.class);
  }

  public static final int PATIENTID_FIELD_NUMBER = 1;
  private int patientid_;
  /**
   * <pre>
   *患者Id
   * </pre>
   *
   * <code>int32 patientid = 1;</code>
   */
  public int getPatientid() {
    return patientid_;
  }

  public static final int REALNAME_FIELD_NUMBER = 2;
  private volatile java.lang.Object realname_;
  /**
   * <pre>
   *真实姓名
   * </pre>
   *
   * <code>string realname = 2;</code>
   */
  public java.lang.String getRealname() {
    java.lang.Object ref = realname_;
    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();
      realname_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *真实姓名
   * </pre>
   *
   * <code>string realname = 2;</code>
   */
  public com.google.protobuf.ByteString
      getRealnameBytes() {
    java.lang.Object ref = realname_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      realname_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int AGE_FIELD_NUMBER = 3;
  private int age_;
  /**
   * <pre>
   *年龄
   * </pre>
   *
   * <code>int32 age = 3;</code>
   */
  public int getAge() {
    return age_;
  }

  public static final int SEX_FIELD_NUMBER = 4;
  private int sex_;
  /**
   * <pre>
   *性别（数字）
   * </pre>
   *
   * <code>int32 sex = 4;</code>
   */
  public int getSex() {
    return sex_;
  }

  public static final int MOBILE_FIELD_NUMBER = 5;
  private volatile java.lang.Object mobile_;
  /**
   * <pre>
   *手机号码
   * </pre>
   *
   * <code>string mobile = 5;</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;
    }
  }
  /**
   * <pre>
   *手机号码
   * </pre>
   *
   * <code>string mobile = 5;</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 DOCTORID_FIELD_NUMBER = 6;
  private int doctorId_;
  /**
   * <pre>
   *医生Id
   * </pre>
   *
   * <code>int32 doctorId = 6;</code>
   */
  public int getDoctorId() {
    return doctorId_;
  }

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

  public static final int CREATETIME_FIELD_NUMBER = 8;
  private long createtime_;
  /**
   * <pre>
   *创建时间
   * </pre>
   *
   * <code>int64 createtime = 8;</code>
   */
  public long getCreatetime() {
    return createtime_;
  }

  public static final int CHIEFCOMPLAINT_FIELD_NUMBER = 9;
  private volatile java.lang.Object chiefComplaint_;
  /**
   * <pre>
   *主诉
   * </pre>
   *
   * <code>string chiefComplaint = 9;</code>
   */
  public java.lang.String getChiefComplaint() {
    java.lang.Object ref = chiefComplaint_;
    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();
      chiefComplaint_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *主诉
   * </pre>
   *
   * <code>string chiefComplaint = 9;</code>
   */
  public com.google.protobuf.ByteString
      getChiefComplaintBytes() {
    java.lang.Object ref = chiefComplaint_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      chiefComplaint_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DIAGNOSIS_FIELD_NUMBER = 10;
  private volatile java.lang.Object diagnosis_;
  /**
   * <pre>
   *诊断结果
   * </pre>
   *
   * <code>string diagnosis = 10;</code>
   */
  public java.lang.String getDiagnosis() {
    java.lang.Object ref = diagnosis_;
    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();
      diagnosis_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *诊断结果
   * </pre>
   *
   * <code>string diagnosis = 10;</code>
   */
  public com.google.protobuf.ByteString
      getDiagnosisBytes() {
    java.lang.Object ref = diagnosis_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      diagnosis_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int REMARK_FIELD_NUMBER = 11;
  private volatile java.lang.Object remark_;
  /**
   * <pre>
   *备注
   * </pre>
   *
   * <code>string remark = 11;</code>
   */
  public java.lang.String getRemark() {
    java.lang.Object ref = remark_;
    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();
      remark_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *备注
   * </pre>
   *
   * <code>string remark = 11;</code>
   */
  public com.google.protobuf.ByteString
      getRemarkBytes() {
    java.lang.Object ref = remark_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      remark_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SEXSTR_FIELD_NUMBER = 12;
  private volatile java.lang.Object sexStr_;
  /**
   * <pre>
   *性别（中文）
   * </pre>
   *
   * <code>string sexStr = 12;</code>
   */
  public java.lang.String getSexStr() {
    java.lang.Object ref = sexStr_;
    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();
      sexStr_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *性别（中文）
   * </pre>
   *
   * <code>string sexStr = 12;</code>
   */
  public com.google.protobuf.ByteString
      getSexStrBytes() {
    java.lang.Object ref = sexStr_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      sexStr_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ALLERGICHISTORY_FIELD_NUMBER = 13;
  private volatile java.lang.Object allergicHistory_;
  /**
   * <pre>
   *过敏史
   * </pre>
   *
   * <code>string allergicHistory = 13;</code>
   */
  public java.lang.String getAllergicHistory() {
    java.lang.Object ref = allergicHistory_;
    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();
      allergicHistory_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *过敏史
   * </pre>
   *
   * <code>string allergicHistory = 13;</code>
   */
  public com.google.protobuf.ByteString
      getAllergicHistoryBytes() {
    java.lang.Object ref = allergicHistory_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      allergicHistory_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESCRIPTION_FIELD_NUMBER = 14;
  private volatile java.lang.Object description_;
  /**
   * <pre>
   *病情描述
   * </pre>
   *
   * <code>string description = 14;</code>
   */
  public java.lang.String getDescription() {
    java.lang.Object ref = description_;
    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();
      description_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *病情描述
   * </pre>
   *
   * <code>string description = 14;</code>
   */
  public com.google.protobuf.ByteString
      getDescriptionBytes() {
    java.lang.Object ref = description_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      description_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int IDCARDNO_FIELD_NUMBER = 15;
  private volatile java.lang.Object idCardNo_;
  /**
   * <pre>
   *身份证号
   * </pre>
   *
   * <code>string idCardNo = 15;</code>
   */
  public java.lang.String getIdCardNo() {
    java.lang.Object ref = idCardNo_;
    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();
      idCardNo_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *身份证号
   * </pre>
   *
   * <code>string idCardNo = 15;</code>
   */
  public com.google.protobuf.ByteString
      getIdCardNoBytes() {
    java.lang.Object ref = idCardNo_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      idCardNo_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int HISPATIENTID_FIELD_NUMBER = 16;
  private volatile java.lang.Object hisPatientId_;
  /**
   * <pre>
   *太和门诊ID
   * </pre>
   *
   * <code>string hisPatientId = 16;</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>
   *太和门诊ID
   * </pre>
   *
   * <code>string hisPatientId = 16;</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 ADDRESS_FIELD_NUMBER = 17;
  private volatile java.lang.Object address_;
  /**
   * <pre>
   * 患者家庭住址，HIS 建档需要
   * </pre>
   *
   * <code>string address = 17;</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;
    }
  }
  /**
   * <pre>
   * 患者家庭住址，HIS 建档需要
   * </pre>
   *
   * <code>string address = 17;</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 MRVISIBLE_FIELD_NUMBER = 18;
  private boolean mrVisible_;
  /**
   * <code>bool mrVisible = 18;</code>
   */
  public boolean getMrVisible() {
    return mrVisible_;
  }

  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 (patientid_ != 0) {
      output.writeInt32(1, patientid_);
    }
    if (!getRealnameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, realname_);
    }
    if (age_ != 0) {
      output.writeInt32(3, age_);
    }
    if (sex_ != 0) {
      output.writeInt32(4, sex_);
    }
    if (!getMobileBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, mobile_);
    }
    if (doctorId_ != 0) {
      output.writeInt32(6, doctorId_);
    }
    if (userId_ != 0) {
      output.writeInt32(7, userId_);
    }
    if (createtime_ != 0L) {
      output.writeInt64(8, createtime_);
    }
    if (!getChiefComplaintBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, chiefComplaint_);
    }
    if (!getDiagnosisBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, diagnosis_);
    }
    if (!getRemarkBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, remark_);
    }
    if (!getSexStrBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, sexStr_);
    }
    if (!getAllergicHistoryBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 13, allergicHistory_);
    }
    if (!getDescriptionBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 14, description_);
    }
    if (!getIdCardNoBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 15, idCardNo_);
    }
    if (!getHisPatientIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 16, hisPatientId_);
    }
    if (!getAddressBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 17, address_);
    }
    if (mrVisible_ != false) {
      output.writeBool(18, mrVisible_);
    }
  }

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

    size = 0;
    if (patientid_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(1, patientid_);
    }
    if (!getRealnameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, realname_);
    }
    if (age_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(3, age_);
    }
    if (sex_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(4, sex_);
    }
    if (!getMobileBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, mobile_);
    }
    if (doctorId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(6, doctorId_);
    }
    if (userId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(7, userId_);
    }
    if (createtime_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(8, createtime_);
    }
    if (!getChiefComplaintBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, chiefComplaint_);
    }
    if (!getDiagnosisBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, diagnosis_);
    }
    if (!getRemarkBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, remark_);
    }
    if (!getSexStrBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, sexStr_);
    }
    if (!getAllergicHistoryBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, allergicHistory_);
    }
    if (!getDescriptionBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, description_);
    }
    if (!getIdCardNoBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, idCardNo_);
    }
    if (!getHisPatientIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, hisPatientId_);
    }
    if (!getAddressBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, address_);
    }
    if (mrVisible_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(18, mrVisible_);
    }
    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.Patient)) {
      return super.equals(obj);
    }
    com.ywt.gapi.user.Patient other = (com.ywt.gapi.user.Patient) obj;

    boolean result = true;
    result = result && (getPatientid()
        == other.getPatientid());
    result = result && getRealname()
        .equals(other.getRealname());
    result = result && (getAge()
        == other.getAge());
    result = result && (getSex()
        == other.getSex());
    result = result && getMobile()
        .equals(other.getMobile());
    result = result && (getDoctorId()
        == other.getDoctorId());
    result = result && (getUserId()
        == other.getUserId());
    result = result && (getCreatetime()
        == other.getCreatetime());
    result = result && getChiefComplaint()
        .equals(other.getChiefComplaint());
    result = result && getDiagnosis()
        .equals(other.getDiagnosis());
    result = result && getRemark()
        .equals(other.getRemark());
    result = result && getSexStr()
        .equals(other.getSexStr());
    result = result && getAllergicHistory()
        .equals(other.getAllergicHistory());
    result = result && getDescription()
        .equals(other.getDescription());
    result = result && getIdCardNo()
        .equals(other.getIdCardNo());
    result = result && getHisPatientId()
        .equals(other.getHisPatientId());
    result = result && getAddress()
        .equals(other.getAddress());
    result = result && (getMrVisible()
        == other.getMrVisible());
    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();
    hash = (37 * hash) + REALNAME_FIELD_NUMBER;
    hash = (53 * hash) + getRealname().hashCode();
    hash = (37 * hash) + AGE_FIELD_NUMBER;
    hash = (53 * hash) + getAge();
    hash = (37 * hash) + SEX_FIELD_NUMBER;
    hash = (53 * hash) + getSex();
    hash = (37 * hash) + MOBILE_FIELD_NUMBER;
    hash = (53 * hash) + getMobile().hashCode();
    hash = (37 * hash) + DOCTORID_FIELD_NUMBER;
    hash = (53 * hash) + getDoctorId();
    hash = (37 * hash) + USERID_FIELD_NUMBER;
    hash = (53 * hash) + getUserId();
    hash = (37 * hash) + CREATETIME_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getCreatetime());
    hash = (37 * hash) + CHIEFCOMPLAINT_FIELD_NUMBER;
    hash = (53 * hash) + getChiefComplaint().hashCode();
    hash = (37 * hash) + DIAGNOSIS_FIELD_NUMBER;
    hash = (53 * hash) + getDiagnosis().hashCode();
    hash = (37 * hash) + REMARK_FIELD_NUMBER;
    hash = (53 * hash) + getRemark().hashCode();
    hash = (37 * hash) + SEXSTR_FIELD_NUMBER;
    hash = (53 * hash) + getSexStr().hashCode();
    hash = (37 * hash) + ALLERGICHISTORY_FIELD_NUMBER;
    hash = (53 * hash) + getAllergicHistory().hashCode();
    hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
    hash = (53 * hash) + getDescription().hashCode();
    hash = (37 * hash) + IDCARDNO_FIELD_NUMBER;
    hash = (53 * hash) + getIdCardNo().hashCode();
    hash = (37 * hash) + HISPATIENTID_FIELD_NUMBER;
    hash = (53 * hash) + getHisPatientId().hashCode();
    hash = (37 * hash) + ADDRESS_FIELD_NUMBER;
    hash = (53 * hash) + getAddress().hashCode();
    hash = (37 * hash) + MRVISIBLE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getMrVisible());
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.ywt.gapi.user.Patient parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.user.Patient 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.Patient parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.user.Patient 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.Patient parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.user.Patient parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.user.Patient parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.user.Patient 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.Patient parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.user.Patient 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.Patient parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.user.Patient 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.Patient 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.Patient}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.user.Patient)
      com.ywt.gapi.user.PatientOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.user.DoctorOuterClass.internal_static_com_ywt_gapi_user_Patient_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.user.DoctorOuterClass.internal_static_com_ywt_gapi_user_Patient_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.user.Patient.class, com.ywt.gapi.user.Patient.Builder.class);
    }

    // Construct using com.ywt.gapi.user.Patient.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_ = 0;

      realname_ = "";

      age_ = 0;

      sex_ = 0;

      mobile_ = "";

      doctorId_ = 0;

      userId_ = 0;

      createtime_ = 0L;

      chiefComplaint_ = "";

      diagnosis_ = "";

      remark_ = "";

      sexStr_ = "";

      allergicHistory_ = "";

      description_ = "";

      idCardNo_ = "";

      hisPatientId_ = "";

      address_ = "";

      mrVisible_ = false;

      return this;
    }

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

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

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

    public com.ywt.gapi.user.Patient buildPartial() {
      com.ywt.gapi.user.Patient result = new com.ywt.gapi.user.Patient(this);
      result.patientid_ = patientid_;
      result.realname_ = realname_;
      result.age_ = age_;
      result.sex_ = sex_;
      result.mobile_ = mobile_;
      result.doctorId_ = doctorId_;
      result.userId_ = userId_;
      result.createtime_ = createtime_;
      result.chiefComplaint_ = chiefComplaint_;
      result.diagnosis_ = diagnosis_;
      result.remark_ = remark_;
      result.sexStr_ = sexStr_;
      result.allergicHistory_ = allergicHistory_;
      result.description_ = description_;
      result.idCardNo_ = idCardNo_;
      result.hisPatientId_ = hisPatientId_;
      result.address_ = address_;
      result.mrVisible_ = mrVisible_;
      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.Patient) {
        return mergeFrom((com.ywt.gapi.user.Patient)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.user.Patient other) {
      if (other == com.ywt.gapi.user.Patient.getDefaultInstance()) return this;
      if (other.getPatientid() != 0) {
        setPatientid(other.getPatientid());
      }
      if (!other.getRealname().isEmpty()) {
        realname_ = other.realname_;
        onChanged();
      }
      if (other.getAge() != 0) {
        setAge(other.getAge());
      }
      if (other.getSex() != 0) {
        setSex(other.getSex());
      }
      if (!other.getMobile().isEmpty()) {
        mobile_ = other.mobile_;
        onChanged();
      }
      if (other.getDoctorId() != 0) {
        setDoctorId(other.getDoctorId());
      }
      if (other.getUserId() != 0) {
        setUserId(other.getUserId());
      }
      if (other.getCreatetime() != 0L) {
        setCreatetime(other.getCreatetime());
      }
      if (!other.getChiefComplaint().isEmpty()) {
        chiefComplaint_ = other.chiefComplaint_;
        onChanged();
      }
      if (!other.getDiagnosis().isEmpty()) {
        diagnosis_ = other.diagnosis_;
        onChanged();
      }
      if (!other.getRemark().isEmpty()) {
        remark_ = other.remark_;
        onChanged();
      }
      if (!other.getSexStr().isEmpty()) {
        sexStr_ = other.sexStr_;
        onChanged();
      }
      if (!other.getAllergicHistory().isEmpty()) {
        allergicHistory_ = other.allergicHistory_;
        onChanged();
      }
      if (!other.getDescription().isEmpty()) {
        description_ = other.description_;
        onChanged();
      }
      if (!other.getIdCardNo().isEmpty()) {
        idCardNo_ = other.idCardNo_;
        onChanged();
      }
      if (!other.getHisPatientId().isEmpty()) {
        hisPatientId_ = other.hisPatientId_;
        onChanged();
      }
      if (!other.getAddress().isEmpty()) {
        address_ = other.address_;
        onChanged();
      }
      if (other.getMrVisible() != false) {
        setMrVisible(other.getMrVisible());
      }
      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.Patient parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.user.Patient) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int patientid_ ;
    /**
     * <pre>
     *患者Id
     * </pre>
     *
     * <code>int32 patientid = 1;</code>
     */
    public int getPatientid() {
      return patientid_;
    }
    /**
     * <pre>
     *患者Id
     * </pre>
     *
     * <code>int32 patientid = 1;</code>
     */
    public Builder setPatientid(int value) {
      
      patientid_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *患者Id
     * </pre>
     *
     * <code>int32 patientid = 1;</code>
     */
    public Builder clearPatientid() {
      
      patientid_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object realname_ = "";
    /**
     * <pre>
     *真实姓名
     * </pre>
     *
     * <code>string realname = 2;</code>
     */
    public java.lang.String getRealname() {
      java.lang.Object ref = realname_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        realname_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *真实姓名
     * </pre>
     *
     * <code>string realname = 2;</code>
     */
    public com.google.protobuf.ByteString
        getRealnameBytes() {
      java.lang.Object ref = realname_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        realname_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *真实姓名
     * </pre>
     *
     * <code>string realname = 2;</code>
     */
    public Builder setRealname(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      realname_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *真实姓名
     * </pre>
     *
     * <code>string realname = 2;</code>
     */
    public Builder clearRealname() {
      
      realname_ = getDefaultInstance().getRealname();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *真实姓名
     * </pre>
     *
     * <code>string realname = 2;</code>
     */
    public Builder setRealnameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      realname_ = value;
      onChanged();
      return this;
    }

    private int age_ ;
    /**
     * <pre>
     *年龄
     * </pre>
     *
     * <code>int32 age = 3;</code>
     */
    public int getAge() {
      return age_;
    }
    /**
     * <pre>
     *年龄
     * </pre>
     *
     * <code>int32 age = 3;</code>
     */
    public Builder setAge(int value) {
      
      age_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *年龄
     * </pre>
     *
     * <code>int32 age = 3;</code>
     */
    public Builder clearAge() {
      
      age_ = 0;
      onChanged();
      return this;
    }

    private int sex_ ;
    /**
     * <pre>
     *性别（数字）
     * </pre>
     *
     * <code>int32 sex = 4;</code>
     */
    public int getSex() {
      return sex_;
    }
    /**
     * <pre>
     *性别（数字）
     * </pre>
     *
     * <code>int32 sex = 4;</code>
     */
    public Builder setSex(int value) {
      
      sex_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *性别（数字）
     * </pre>
     *
     * <code>int32 sex = 4;</code>
     */
    public Builder clearSex() {
      
      sex_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object mobile_ = "";
    /**
     * <pre>
     *手机号码
     * </pre>
     *
     * <code>string mobile = 5;</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;
      }
    }
    /**
     * <pre>
     *手机号码
     * </pre>
     *
     * <code>string mobile = 5;</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;
      }
    }
    /**
     * <pre>
     *手机号码
     * </pre>
     *
     * <code>string mobile = 5;</code>
     */
    public Builder setMobile(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      mobile_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *手机号码
     * </pre>
     *
     * <code>string mobile = 5;</code>
     */
    public Builder clearMobile() {
      
      mobile_ = getDefaultInstance().getMobile();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *手机号码
     * </pre>
     *
     * <code>string mobile = 5;</code>
     */
    public Builder setMobileBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      mobile_ = value;
      onChanged();
      return this;
    }

    private int doctorId_ ;
    /**
     * <pre>
     *医生Id
     * </pre>
     *
     * <code>int32 doctorId = 6;</code>
     */
    public int getDoctorId() {
      return doctorId_;
    }
    /**
     * <pre>
     *医生Id
     * </pre>
     *
     * <code>int32 doctorId = 6;</code>
     */
    public Builder setDoctorId(int value) {
      
      doctorId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *医生Id
     * </pre>
     *
     * <code>int32 doctorId = 6;</code>
     */
    public Builder clearDoctorId() {
      
      doctorId_ = 0;
      onChanged();
      return this;
    }

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

    private long createtime_ ;
    /**
     * <pre>
     *创建时间
     * </pre>
     *
     * <code>int64 createtime = 8;</code>
     */
    public long getCreatetime() {
      return createtime_;
    }
    /**
     * <pre>
     *创建时间
     * </pre>
     *
     * <code>int64 createtime = 8;</code>
     */
    public Builder setCreatetime(long value) {
      
      createtime_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *创建时间
     * </pre>
     *
     * <code>int64 createtime = 8;</code>
     */
    public Builder clearCreatetime() {
      
      createtime_ = 0L;
      onChanged();
      return this;
    }

    private java.lang.Object chiefComplaint_ = "";
    /**
     * <pre>
     *主诉
     * </pre>
     *
     * <code>string chiefComplaint = 9;</code>
     */
    public java.lang.String getChiefComplaint() {
      java.lang.Object ref = chiefComplaint_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        chiefComplaint_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *主诉
     * </pre>
     *
     * <code>string chiefComplaint = 9;</code>
     */
    public com.google.protobuf.ByteString
        getChiefComplaintBytes() {
      java.lang.Object ref = chiefComplaint_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        chiefComplaint_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *主诉
     * </pre>
     *
     * <code>string chiefComplaint = 9;</code>
     */
    public Builder setChiefComplaint(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      chiefComplaint_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *主诉
     * </pre>
     *
     * <code>string chiefComplaint = 9;</code>
     */
    public Builder clearChiefComplaint() {
      
      chiefComplaint_ = getDefaultInstance().getChiefComplaint();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *主诉
     * </pre>
     *
     * <code>string chiefComplaint = 9;</code>
     */
    public Builder setChiefComplaintBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      chiefComplaint_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object diagnosis_ = "";
    /**
     * <pre>
     *诊断结果
     * </pre>
     *
     * <code>string diagnosis = 10;</code>
     */
    public java.lang.String getDiagnosis() {
      java.lang.Object ref = diagnosis_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        diagnosis_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *诊断结果
     * </pre>
     *
     * <code>string diagnosis = 10;</code>
     */
    public com.google.protobuf.ByteString
        getDiagnosisBytes() {
      java.lang.Object ref = diagnosis_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        diagnosis_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *诊断结果
     * </pre>
     *
     * <code>string diagnosis = 10;</code>
     */
    public Builder setDiagnosis(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      diagnosis_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *诊断结果
     * </pre>
     *
     * <code>string diagnosis = 10;</code>
     */
    public Builder clearDiagnosis() {
      
      diagnosis_ = getDefaultInstance().getDiagnosis();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *诊断结果
     * </pre>
     *
     * <code>string diagnosis = 10;</code>
     */
    public Builder setDiagnosisBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      diagnosis_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object remark_ = "";
    /**
     * <pre>
     *备注
     * </pre>
     *
     * <code>string remark = 11;</code>
     */
    public java.lang.String getRemark() {
      java.lang.Object ref = remark_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        remark_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *备注
     * </pre>
     *
     * <code>string remark = 11;</code>
     */
    public com.google.protobuf.ByteString
        getRemarkBytes() {
      java.lang.Object ref = remark_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        remark_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *备注
     * </pre>
     *
     * <code>string remark = 11;</code>
     */
    public Builder setRemark(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      remark_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *备注
     * </pre>
     *
     * <code>string remark = 11;</code>
     */
    public Builder clearRemark() {
      
      remark_ = getDefaultInstance().getRemark();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *备注
     * </pre>
     *
     * <code>string remark = 11;</code>
     */
    public Builder setRemarkBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      remark_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object sexStr_ = "";
    /**
     * <pre>
     *性别（中文）
     * </pre>
     *
     * <code>string sexStr = 12;</code>
     */
    public java.lang.String getSexStr() {
      java.lang.Object ref = sexStr_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        sexStr_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *性别（中文）
     * </pre>
     *
     * <code>string sexStr = 12;</code>
     */
    public com.google.protobuf.ByteString
        getSexStrBytes() {
      java.lang.Object ref = sexStr_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        sexStr_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *性别（中文）
     * </pre>
     *
     * <code>string sexStr = 12;</code>
     */
    public Builder setSexStr(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      sexStr_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *性别（中文）
     * </pre>
     *
     * <code>string sexStr = 12;</code>
     */
    public Builder clearSexStr() {
      
      sexStr_ = getDefaultInstance().getSexStr();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *性别（中文）
     * </pre>
     *
     * <code>string sexStr = 12;</code>
     */
    public Builder setSexStrBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      sexStr_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object allergicHistory_ = "";
    /**
     * <pre>
     *过敏史
     * </pre>
     *
     * <code>string allergicHistory = 13;</code>
     */
    public java.lang.String getAllergicHistory() {
      java.lang.Object ref = allergicHistory_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        allergicHistory_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *过敏史
     * </pre>
     *
     * <code>string allergicHistory = 13;</code>
     */
    public com.google.protobuf.ByteString
        getAllergicHistoryBytes() {
      java.lang.Object ref = allergicHistory_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        allergicHistory_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *过敏史
     * </pre>
     *
     * <code>string allergicHistory = 13;</code>
     */
    public Builder setAllergicHistory(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      allergicHistory_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *过敏史
     * </pre>
     *
     * <code>string allergicHistory = 13;</code>
     */
    public Builder clearAllergicHistory() {
      
      allergicHistory_ = getDefaultInstance().getAllergicHistory();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *过敏史
     * </pre>
     *
     * <code>string allergicHistory = 13;</code>
     */
    public Builder setAllergicHistoryBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      allergicHistory_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object description_ = "";
    /**
     * <pre>
     *病情描述
     * </pre>
     *
     * <code>string description = 14;</code>
     */
    public java.lang.String getDescription() {
      java.lang.Object ref = description_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        description_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *病情描述
     * </pre>
     *
     * <code>string description = 14;</code>
     */
    public com.google.protobuf.ByteString
        getDescriptionBytes() {
      java.lang.Object ref = description_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        description_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *病情描述
     * </pre>
     *
     * <code>string description = 14;</code>
     */
    public Builder setDescription(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      description_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *病情描述
     * </pre>
     *
     * <code>string description = 14;</code>
     */
    public Builder clearDescription() {
      
      description_ = getDefaultInstance().getDescription();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *病情描述
     * </pre>
     *
     * <code>string description = 14;</code>
     */
    public Builder setDescriptionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      description_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object idCardNo_ = "";
    /**
     * <pre>
     *身份证号
     * </pre>
     *
     * <code>string idCardNo = 15;</code>
     */
    public java.lang.String getIdCardNo() {
      java.lang.Object ref = idCardNo_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        idCardNo_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *身份证号
     * </pre>
     *
     * <code>string idCardNo = 15;</code>
     */
    public com.google.protobuf.ByteString
        getIdCardNoBytes() {
      java.lang.Object ref = idCardNo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        idCardNo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *身份证号
     * </pre>
     *
     * <code>string idCardNo = 15;</code>
     */
    public Builder setIdCardNo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      idCardNo_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *身份证号
     * </pre>
     *
     * <code>string idCardNo = 15;</code>
     */
    public Builder clearIdCardNo() {
      
      idCardNo_ = getDefaultInstance().getIdCardNo();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *身份证号
     * </pre>
     *
     * <code>string idCardNo = 15;</code>
     */
    public Builder setIdCardNoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      idCardNo_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object hisPatientId_ = "";
    /**
     * <pre>
     *太和门诊ID
     * </pre>
     *
     * <code>string hisPatientId = 16;</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>
     *太和门诊ID
     * </pre>
     *
     * <code>string hisPatientId = 16;</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>
     *太和门诊ID
     * </pre>
     *
     * <code>string hisPatientId = 16;</code>
     */
    public Builder setHisPatientId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      hisPatientId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *太和门诊ID
     * </pre>
     *
     * <code>string hisPatientId = 16;</code>
     */
    public Builder clearHisPatientId() {
      
      hisPatientId_ = getDefaultInstance().getHisPatientId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *太和门诊ID
     * </pre>
     *
     * <code>string hisPatientId = 16;</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 address_ = "";
    /**
     * <pre>
     * 患者家庭住址，HIS 建档需要
     * </pre>
     *
     * <code>string address = 17;</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;
      }
    }
    /**
     * <pre>
     * 患者家庭住址，HIS 建档需要
     * </pre>
     *
     * <code>string address = 17;</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;
      }
    }
    /**
     * <pre>
     * 患者家庭住址，HIS 建档需要
     * </pre>
     *
     * <code>string address = 17;</code>
     */
    public Builder setAddress(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      address_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 患者家庭住址，HIS 建档需要
     * </pre>
     *
     * <code>string address = 17;</code>
     */
    public Builder clearAddress() {
      
      address_ = getDefaultInstance().getAddress();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 患者家庭住址，HIS 建档需要
     * </pre>
     *
     * <code>string address = 17;</code>
     */
    public Builder setAddressBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      address_ = value;
      onChanged();
      return this;
    }

    private boolean mrVisible_ ;
    /**
     * <code>bool mrVisible = 18;</code>
     */
    public boolean getMrVisible() {
      return mrVisible_;
    }
    /**
     * <code>bool mrVisible = 18;</code>
     */
    public Builder setMrVisible(boolean value) {
      
      mrVisible_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>bool mrVisible = 18;</code>
     */
    public Builder clearMrVisible() {
      
      mrVisible_ = false;
      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.Patient)
  }

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

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

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

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

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

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

}

