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

package com.ywt.gapi.drug;

/**
 * <pre>
 * 处方记录基本信息(患者端列表调用)
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.drug.PrescriptionBaseInfo}
 */
public  final class PrescriptionBaseInfo extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.drug.PrescriptionBaseInfo)
    PrescriptionBaseInfoOrBuilder {
  // Use PrescriptionBaseInfo.newBuilder() to construct.
  private PrescriptionBaseInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private PrescriptionBaseInfo() {
    prescriptionInfoId_ = 0;
    preBizNo_ = "";
    patientName_ = "";
    hospitalId_ = 0;
    doctorId_ = 0;
    createOn_ = 0L;
    status_ = 0;
    statusStr_ = "";
    total_ = 0;
    deliveryMethod_ = 0;
    sex_ = "";
    dept_ = "";
    hisOrderNo_ = "";
    source_ = 0;
    doctorName_ = "";
    hospitalName_ = "";
    extStatus_ = 0;
    pharmacyId_ = 0;
    orderNo_ = "";
    orderId_ = 0;
  }

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

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

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

            patientName_ = s;
            break;
          }
          case 32: {

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

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

            createOn_ = input.readInt64();
            break;
          }
          case 56: {

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

            statusStr_ = s;
            break;
          }
          case 72: {

            total_ = input.readInt32();
            break;
          }
          case 80: {

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

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

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

            hisOrderNo_ = s;
            break;
          }
          case 112: {

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

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

            hospitalName_ = s;
            break;
          }
          case 136: {

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

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

            orderNo_ = s;
            break;
          }
          case 160: {

            orderId_ = 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.drug.DrugOuterClass.internal_static_com_ywt_gapi_drug_PrescriptionBaseInfo_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.drug.DrugOuterClass.internal_static_com_ywt_gapi_drug_PrescriptionBaseInfo_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.drug.PrescriptionBaseInfo.class, com.ywt.gapi.drug.PrescriptionBaseInfo.Builder.class);
  }

  public static final int PRESCRIPTIONINFOID_FIELD_NUMBER = 1;
  private int prescriptionInfoId_;
  /**
   * <pre>
   * 处方单ID
   * </pre>
   *
   * <code>int32 prescriptionInfoId = 1;</code>
   */
  public int getPrescriptionInfoId() {
    return prescriptionInfoId_;
  }

  public static final int PREBIZNO_FIELD_NUMBER = 2;
  private volatile java.lang.Object preBizNo_;
  /**
   * <pre>
   * 业务编码
   * </pre>
   *
   * <code>string preBizNo = 2;</code>
   */
  public java.lang.String getPreBizNo() {
    java.lang.Object ref = preBizNo_;
    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();
      preBizNo_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 业务编码
   * </pre>
   *
   * <code>string preBizNo = 2;</code>
   */
  public com.google.protobuf.ByteString
      getPreBizNoBytes() {
    java.lang.Object ref = preBizNo_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      preBizNo_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PATIENTNAME_FIELD_NUMBER = 3;
  private volatile java.lang.Object patientName_;
  /**
   * <pre>
   * 患者姓名
   * </pre>
   *
   * <code>string patientName = 3;</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;
    }
  }
  /**
   * <pre>
   * 患者姓名
   * </pre>
   *
   * <code>string patientName = 3;</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 HOSPITALID_FIELD_NUMBER = 4;
  private int hospitalId_;
  /**
   * <pre>
   * 医院ID
   * </pre>
   *
   * <code>int32 hospitalId = 4;</code>
   */
  public int getHospitalId() {
    return hospitalId_;
  }

  public static final int DOCTORID_FIELD_NUMBER = 5;
  private int doctorId_;
  /**
   * <pre>
   * 医生ID
   * </pre>
   *
   * <code>int32 doctorId = 5;</code>
   */
  public int getDoctorId() {
    return doctorId_;
  }

  public static final int CREATEON_FIELD_NUMBER = 6;
  private long createOn_;
  /**
   * <pre>
   * 订单创建时间
   * </pre>
   *
   * <code>int64 createOn = 6;</code>
   */
  public long getCreateOn() {
    return createOn_;
  }

  public static final int STATUS_FIELD_NUMBER = 7;
  private int status_;
  /**
   * <pre>
   * 订单状态（数字）
   * </pre>
   *
   * <code>int32 status = 7;</code>
   */
  public int getStatus() {
    return status_;
  }

  public static final int STATUSSTR_FIELD_NUMBER = 8;
  private volatile java.lang.Object statusStr_;
  /**
   * <pre>
   * 订单状态（文字）
   * </pre>
   *
   * <code>string statusStr = 8;</code>
   */
  public java.lang.String getStatusStr() {
    java.lang.Object ref = statusStr_;
    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();
      statusStr_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 订单状态（文字）
   * </pre>
   *
   * <code>string statusStr = 8;</code>
   */
  public com.google.protobuf.ByteString
      getStatusStrBytes() {
    java.lang.Object ref = statusStr_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      statusStr_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TOTAL_FIELD_NUMBER = 9;
  private int total_;
  /**
   * <pre>
   * 总价
   * </pre>
   *
   * <code>int32 total = 9;</code>
   */
  public int getTotal() {
    return total_;
  }

  public static final int DELIVERYMETHOD_FIELD_NUMBER = 10;
  private int deliveryMethod_;
  /**
   * <pre>
   * 取药方式：1-快递 2-自取
   * </pre>
   *
   * <code>int32 deliveryMethod = 10;</code>
   */
  public int getDeliveryMethod() {
    return deliveryMethod_;
  }

  public static final int SEX_FIELD_NUMBER = 11;
  private volatile java.lang.Object sex_;
  /**
   * <pre>
   * 患者性别(此时数据库存放的直接是'男'、'女')
   * </pre>
   *
   * <code>string sex = 11;</code>
   */
  public java.lang.String getSex() {
    java.lang.Object ref = sex_;
    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();
      sex_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 患者性别(此时数据库存放的直接是'男'、'女')
   * </pre>
   *
   * <code>string sex = 11;</code>
   */
  public com.google.protobuf.ByteString
      getSexBytes() {
    java.lang.Object ref = sex_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      sex_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEPT_FIELD_NUMBER = 12;
  private volatile java.lang.Object dept_;
  /**
   * <pre>
   * 科室名称
   * </pre>
   *
   * <code>string dept = 12;</code>
   */
  public java.lang.String getDept() {
    java.lang.Object ref = dept_;
    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();
      dept_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 科室名称
   * </pre>
   *
   * <code>string dept = 12;</code>
   */
  public com.google.protobuf.ByteString
      getDeptBytes() {
    java.lang.Object ref = dept_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      dept_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int HISORDERNO_FIELD_NUMBER = 13;
  private volatile java.lang.Object hisOrderNo_;
  /**
   * <pre>
   * 医院his返回的订单编号
   * </pre>
   *
   * <code>string hisOrderNo = 13;</code>
   */
  public java.lang.String getHisOrderNo() {
    java.lang.Object ref = hisOrderNo_;
    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();
      hisOrderNo_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 医院his返回的订单编号
   * </pre>
   *
   * <code>string hisOrderNo = 13;</code>
   */
  public com.google.protobuf.ByteString
      getHisOrderNoBytes() {
    java.lang.Object ref = hisOrderNo_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      hisOrderNo_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SOURCE_FIELD_NUMBER = 14;
  private int source_;
  /**
   * <pre>
   * 处方订单来源
   * </pre>
   *
   * <code>int32 source = 14;</code>
   */
  public int getSource() {
    return source_;
  }

  public static final int DOCTORNAME_FIELD_NUMBER = 15;
  private volatile java.lang.Object doctorName_;
  /**
   * <pre>
   * 医生姓名
   * </pre>
   *
   * <code>string doctorName = 15;</code>
   */
  public java.lang.String getDoctorName() {
    java.lang.Object ref = doctorName_;
    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();
      doctorName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 医生姓名
   * </pre>
   *
   * <code>string doctorName = 15;</code>
   */
  public com.google.protobuf.ByteString
      getDoctorNameBytes() {
    java.lang.Object ref = doctorName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      doctorName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int HOSPITALNAME_FIELD_NUMBER = 16;
  private volatile java.lang.Object hospitalName_;
  /**
   * <pre>
   * 医院名称
   * </pre>
   *
   * <code>string hospitalName = 16;</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 = 16;</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 EXTSTATUS_FIELD_NUMBER = 17;
  private int extStatus_;
  /**
   * <pre>
   * 处方状态拓展字段
   * </pre>
   *
   * <code>int32 extStatus = 17;</code>
   */
  public int getExtStatus() {
    return extStatus_;
  }

  public static final int PHARMACYID_FIELD_NUMBER = 18;
  private int pharmacyId_;
  /**
   * <code>int32 pharmacyId = 18;</code>
   */
  public int getPharmacyId() {
    return pharmacyId_;
  }

  public static final int ORDERNO_FIELD_NUMBER = 19;
  private volatile java.lang.Object orderNo_;
  /**
   * <pre>
   * 订单号
   * </pre>
   *
   * <code>string orderNo = 19;</code>
   */
  public java.lang.String getOrderNo() {
    java.lang.Object ref = orderNo_;
    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();
      orderNo_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 订单号
   * </pre>
   *
   * <code>string orderNo = 19;</code>
   */
  public com.google.protobuf.ByteString
      getOrderNoBytes() {
    java.lang.Object ref = orderNo_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      orderNo_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ORDERID_FIELD_NUMBER = 20;
  private int orderId_;
  /**
   * <pre>
   * 订单ID
   * </pre>
   *
   * <code>int32 orderId = 20;</code>
   */
  public int getOrderId() {
    return orderId_;
  }

  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 (prescriptionInfoId_ != 0) {
      output.writeInt32(1, prescriptionInfoId_);
    }
    if (!getPreBizNoBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, preBizNo_);
    }
    if (!getPatientNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, patientName_);
    }
    if (hospitalId_ != 0) {
      output.writeInt32(4, hospitalId_);
    }
    if (doctorId_ != 0) {
      output.writeInt32(5, doctorId_);
    }
    if (createOn_ != 0L) {
      output.writeInt64(6, createOn_);
    }
    if (status_ != 0) {
      output.writeInt32(7, status_);
    }
    if (!getStatusStrBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, statusStr_);
    }
    if (total_ != 0) {
      output.writeInt32(9, total_);
    }
    if (deliveryMethod_ != 0) {
      output.writeInt32(10, deliveryMethod_);
    }
    if (!getSexBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, sex_);
    }
    if (!getDeptBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, dept_);
    }
    if (!getHisOrderNoBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 13, hisOrderNo_);
    }
    if (source_ != 0) {
      output.writeInt32(14, source_);
    }
    if (!getDoctorNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 15, doctorName_);
    }
    if (!getHospitalNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 16, hospitalName_);
    }
    if (extStatus_ != 0) {
      output.writeInt32(17, extStatus_);
    }
    if (pharmacyId_ != 0) {
      output.writeInt32(18, pharmacyId_);
    }
    if (!getOrderNoBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 19, orderNo_);
    }
    if (orderId_ != 0) {
      output.writeInt32(20, orderId_);
    }
  }

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

    size = 0;
    if (prescriptionInfoId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(1, prescriptionInfoId_);
    }
    if (!getPreBizNoBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, preBizNo_);
    }
    if (!getPatientNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, patientName_);
    }
    if (hospitalId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(4, hospitalId_);
    }
    if (doctorId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(5, doctorId_);
    }
    if (createOn_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(6, createOn_);
    }
    if (status_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(7, status_);
    }
    if (!getStatusStrBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, statusStr_);
    }
    if (total_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(9, total_);
    }
    if (deliveryMethod_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(10, deliveryMethod_);
    }
    if (!getSexBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, sex_);
    }
    if (!getDeptBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, dept_);
    }
    if (!getHisOrderNoBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, hisOrderNo_);
    }
    if (source_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(14, source_);
    }
    if (!getDoctorNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, doctorName_);
    }
    if (!getHospitalNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, hospitalName_);
    }
    if (extStatus_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(17, extStatus_);
    }
    if (pharmacyId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(18, pharmacyId_);
    }
    if (!getOrderNoBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, orderNo_);
    }
    if (orderId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(20, orderId_);
    }
    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.drug.PrescriptionBaseInfo)) {
      return super.equals(obj);
    }
    com.ywt.gapi.drug.PrescriptionBaseInfo other = (com.ywt.gapi.drug.PrescriptionBaseInfo) obj;

    boolean result = true;
    result = result && (getPrescriptionInfoId()
        == other.getPrescriptionInfoId());
    result = result && getPreBizNo()
        .equals(other.getPreBizNo());
    result = result && getPatientName()
        .equals(other.getPatientName());
    result = result && (getHospitalId()
        == other.getHospitalId());
    result = result && (getDoctorId()
        == other.getDoctorId());
    result = result && (getCreateOn()
        == other.getCreateOn());
    result = result && (getStatus()
        == other.getStatus());
    result = result && getStatusStr()
        .equals(other.getStatusStr());
    result = result && (getTotal()
        == other.getTotal());
    result = result && (getDeliveryMethod()
        == other.getDeliveryMethod());
    result = result && getSex()
        .equals(other.getSex());
    result = result && getDept()
        .equals(other.getDept());
    result = result && getHisOrderNo()
        .equals(other.getHisOrderNo());
    result = result && (getSource()
        == other.getSource());
    result = result && getDoctorName()
        .equals(other.getDoctorName());
    result = result && getHospitalName()
        .equals(other.getHospitalName());
    result = result && (getExtStatus()
        == other.getExtStatus());
    result = result && (getPharmacyId()
        == other.getPharmacyId());
    result = result && getOrderNo()
        .equals(other.getOrderNo());
    result = result && (getOrderId()
        == other.getOrderId());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + PRESCRIPTIONINFOID_FIELD_NUMBER;
    hash = (53 * hash) + getPrescriptionInfoId();
    hash = (37 * hash) + PREBIZNO_FIELD_NUMBER;
    hash = (53 * hash) + getPreBizNo().hashCode();
    hash = (37 * hash) + PATIENTNAME_FIELD_NUMBER;
    hash = (53 * hash) + getPatientName().hashCode();
    hash = (37 * hash) + HOSPITALID_FIELD_NUMBER;
    hash = (53 * hash) + getHospitalId();
    hash = (37 * hash) + DOCTORID_FIELD_NUMBER;
    hash = (53 * hash) + getDoctorId();
    hash = (37 * hash) + CREATEON_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getCreateOn());
    hash = (37 * hash) + STATUS_FIELD_NUMBER;
    hash = (53 * hash) + getStatus();
    hash = (37 * hash) + STATUSSTR_FIELD_NUMBER;
    hash = (53 * hash) + getStatusStr().hashCode();
    hash = (37 * hash) + TOTAL_FIELD_NUMBER;
    hash = (53 * hash) + getTotal();
    hash = (37 * hash) + DELIVERYMETHOD_FIELD_NUMBER;
    hash = (53 * hash) + getDeliveryMethod();
    hash = (37 * hash) + SEX_FIELD_NUMBER;
    hash = (53 * hash) + getSex().hashCode();
    hash = (37 * hash) + DEPT_FIELD_NUMBER;
    hash = (53 * hash) + getDept().hashCode();
    hash = (37 * hash) + HISORDERNO_FIELD_NUMBER;
    hash = (53 * hash) + getHisOrderNo().hashCode();
    hash = (37 * hash) + SOURCE_FIELD_NUMBER;
    hash = (53 * hash) + getSource();
    hash = (37 * hash) + DOCTORNAME_FIELD_NUMBER;
    hash = (53 * hash) + getDoctorName().hashCode();
    hash = (37 * hash) + HOSPITALNAME_FIELD_NUMBER;
    hash = (53 * hash) + getHospitalName().hashCode();
    hash = (37 * hash) + EXTSTATUS_FIELD_NUMBER;
    hash = (53 * hash) + getExtStatus();
    hash = (37 * hash) + PHARMACYID_FIELD_NUMBER;
    hash = (53 * hash) + getPharmacyId();
    hash = (37 * hash) + ORDERNO_FIELD_NUMBER;
    hash = (53 * hash) + getOrderNo().hashCode();
    hash = (37 * hash) + ORDERID_FIELD_NUMBER;
    hash = (53 * hash) + getOrderId();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.drug.DrugOuterClass.internal_static_com_ywt_gapi_drug_PrescriptionBaseInfo_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.drug.PrescriptionBaseInfo.class, com.ywt.gapi.drug.PrescriptionBaseInfo.Builder.class);
    }

    // Construct using com.ywt.gapi.drug.PrescriptionBaseInfo.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();
      prescriptionInfoId_ = 0;

      preBizNo_ = "";

      patientName_ = "";

      hospitalId_ = 0;

      doctorId_ = 0;

      createOn_ = 0L;

      status_ = 0;

      statusStr_ = "";

      total_ = 0;

      deliveryMethod_ = 0;

      sex_ = "";

      dept_ = "";

      hisOrderNo_ = "";

      source_ = 0;

      doctorName_ = "";

      hospitalName_ = "";

      extStatus_ = 0;

      pharmacyId_ = 0;

      orderNo_ = "";

      orderId_ = 0;

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.drug.DrugOuterClass.internal_static_com_ywt_gapi_drug_PrescriptionBaseInfo_descriptor;
    }

    public com.ywt.gapi.drug.PrescriptionBaseInfo getDefaultInstanceForType() {
      return com.ywt.gapi.drug.PrescriptionBaseInfo.getDefaultInstance();
    }

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

    public com.ywt.gapi.drug.PrescriptionBaseInfo buildPartial() {
      com.ywt.gapi.drug.PrescriptionBaseInfo result = new com.ywt.gapi.drug.PrescriptionBaseInfo(this);
      result.prescriptionInfoId_ = prescriptionInfoId_;
      result.preBizNo_ = preBizNo_;
      result.patientName_ = patientName_;
      result.hospitalId_ = hospitalId_;
      result.doctorId_ = doctorId_;
      result.createOn_ = createOn_;
      result.status_ = status_;
      result.statusStr_ = statusStr_;
      result.total_ = total_;
      result.deliveryMethod_ = deliveryMethod_;
      result.sex_ = sex_;
      result.dept_ = dept_;
      result.hisOrderNo_ = hisOrderNo_;
      result.source_ = source_;
      result.doctorName_ = doctorName_;
      result.hospitalName_ = hospitalName_;
      result.extStatus_ = extStatus_;
      result.pharmacyId_ = pharmacyId_;
      result.orderNo_ = orderNo_;
      result.orderId_ = orderId_;
      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.drug.PrescriptionBaseInfo) {
        return mergeFrom((com.ywt.gapi.drug.PrescriptionBaseInfo)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.drug.PrescriptionBaseInfo other) {
      if (other == com.ywt.gapi.drug.PrescriptionBaseInfo.getDefaultInstance()) return this;
      if (other.getPrescriptionInfoId() != 0) {
        setPrescriptionInfoId(other.getPrescriptionInfoId());
      }
      if (!other.getPreBizNo().isEmpty()) {
        preBizNo_ = other.preBizNo_;
        onChanged();
      }
      if (!other.getPatientName().isEmpty()) {
        patientName_ = other.patientName_;
        onChanged();
      }
      if (other.getHospitalId() != 0) {
        setHospitalId(other.getHospitalId());
      }
      if (other.getDoctorId() != 0) {
        setDoctorId(other.getDoctorId());
      }
      if (other.getCreateOn() != 0L) {
        setCreateOn(other.getCreateOn());
      }
      if (other.getStatus() != 0) {
        setStatus(other.getStatus());
      }
      if (!other.getStatusStr().isEmpty()) {
        statusStr_ = other.statusStr_;
        onChanged();
      }
      if (other.getTotal() != 0) {
        setTotal(other.getTotal());
      }
      if (other.getDeliveryMethod() != 0) {
        setDeliveryMethod(other.getDeliveryMethod());
      }
      if (!other.getSex().isEmpty()) {
        sex_ = other.sex_;
        onChanged();
      }
      if (!other.getDept().isEmpty()) {
        dept_ = other.dept_;
        onChanged();
      }
      if (!other.getHisOrderNo().isEmpty()) {
        hisOrderNo_ = other.hisOrderNo_;
        onChanged();
      }
      if (other.getSource() != 0) {
        setSource(other.getSource());
      }
      if (!other.getDoctorName().isEmpty()) {
        doctorName_ = other.doctorName_;
        onChanged();
      }
      if (!other.getHospitalName().isEmpty()) {
        hospitalName_ = other.hospitalName_;
        onChanged();
      }
      if (other.getExtStatus() != 0) {
        setExtStatus(other.getExtStatus());
      }
      if (other.getPharmacyId() != 0) {
        setPharmacyId(other.getPharmacyId());
      }
      if (!other.getOrderNo().isEmpty()) {
        orderNo_ = other.orderNo_;
        onChanged();
      }
      if (other.getOrderId() != 0) {
        setOrderId(other.getOrderId());
      }
      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.drug.PrescriptionBaseInfo parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.drug.PrescriptionBaseInfo) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int prescriptionInfoId_ ;
    /**
     * <pre>
     * 处方单ID
     * </pre>
     *
     * <code>int32 prescriptionInfoId = 1;</code>
     */
    public int getPrescriptionInfoId() {
      return prescriptionInfoId_;
    }
    /**
     * <pre>
     * 处方单ID
     * </pre>
     *
     * <code>int32 prescriptionInfoId = 1;</code>
     */
    public Builder setPrescriptionInfoId(int value) {
      
      prescriptionInfoId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 处方单ID
     * </pre>
     *
     * <code>int32 prescriptionInfoId = 1;</code>
     */
    public Builder clearPrescriptionInfoId() {
      
      prescriptionInfoId_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object preBizNo_ = "";
    /**
     * <pre>
     * 业务编码
     * </pre>
     *
     * <code>string preBizNo = 2;</code>
     */
    public java.lang.String getPreBizNo() {
      java.lang.Object ref = preBizNo_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        preBizNo_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 业务编码
     * </pre>
     *
     * <code>string preBizNo = 2;</code>
     */
    public com.google.protobuf.ByteString
        getPreBizNoBytes() {
      java.lang.Object ref = preBizNo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        preBizNo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 业务编码
     * </pre>
     *
     * <code>string preBizNo = 2;</code>
     */
    public Builder setPreBizNo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      preBizNo_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 业务编码
     * </pre>
     *
     * <code>string preBizNo = 2;</code>
     */
    public Builder clearPreBizNo() {
      
      preBizNo_ = getDefaultInstance().getPreBizNo();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 业务编码
     * </pre>
     *
     * <code>string preBizNo = 2;</code>
     */
    public Builder setPreBizNoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      preBizNo_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object patientName_ = "";
    /**
     * <pre>
     * 患者姓名
     * </pre>
     *
     * <code>string patientName = 3;</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;
      }
    }
    /**
     * <pre>
     * 患者姓名
     * </pre>
     *
     * <code>string patientName = 3;</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;
      }
    }
    /**
     * <pre>
     * 患者姓名
     * </pre>
     *
     * <code>string patientName = 3;</code>
     */
    public Builder setPatientName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      patientName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 患者姓名
     * </pre>
     *
     * <code>string patientName = 3;</code>
     */
    public Builder clearPatientName() {
      
      patientName_ = getDefaultInstance().getPatientName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 患者姓名
     * </pre>
     *
     * <code>string patientName = 3;</code>
     */
    public Builder setPatientNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      patientName_ = value;
      onChanged();
      return this;
    }

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

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

    private long createOn_ ;
    /**
     * <pre>
     * 订单创建时间
     * </pre>
     *
     * <code>int64 createOn = 6;</code>
     */
    public long getCreateOn() {
      return createOn_;
    }
    /**
     * <pre>
     * 订单创建时间
     * </pre>
     *
     * <code>int64 createOn = 6;</code>
     */
    public Builder setCreateOn(long value) {
      
      createOn_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 订单创建时间
     * </pre>
     *
     * <code>int64 createOn = 6;</code>
     */
    public Builder clearCreateOn() {
      
      createOn_ = 0L;
      onChanged();
      return this;
    }

    private int status_ ;
    /**
     * <pre>
     * 订单状态（数字）
     * </pre>
     *
     * <code>int32 status = 7;</code>
     */
    public int getStatus() {
      return status_;
    }
    /**
     * <pre>
     * 订单状态（数字）
     * </pre>
     *
     * <code>int32 status = 7;</code>
     */
    public Builder setStatus(int value) {
      
      status_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 订单状态（数字）
     * </pre>
     *
     * <code>int32 status = 7;</code>
     */
    public Builder clearStatus() {
      
      status_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object statusStr_ = "";
    /**
     * <pre>
     * 订单状态（文字）
     * </pre>
     *
     * <code>string statusStr = 8;</code>
     */
    public java.lang.String getStatusStr() {
      java.lang.Object ref = statusStr_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        statusStr_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 订单状态（文字）
     * </pre>
     *
     * <code>string statusStr = 8;</code>
     */
    public com.google.protobuf.ByteString
        getStatusStrBytes() {
      java.lang.Object ref = statusStr_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        statusStr_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 订单状态（文字）
     * </pre>
     *
     * <code>string statusStr = 8;</code>
     */
    public Builder setStatusStr(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      statusStr_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 订单状态（文字）
     * </pre>
     *
     * <code>string statusStr = 8;</code>
     */
    public Builder clearStatusStr() {
      
      statusStr_ = getDefaultInstance().getStatusStr();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 订单状态（文字）
     * </pre>
     *
     * <code>string statusStr = 8;</code>
     */
    public Builder setStatusStrBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      statusStr_ = value;
      onChanged();
      return this;
    }

    private int total_ ;
    /**
     * <pre>
     * 总价
     * </pre>
     *
     * <code>int32 total = 9;</code>
     */
    public int getTotal() {
      return total_;
    }
    /**
     * <pre>
     * 总价
     * </pre>
     *
     * <code>int32 total = 9;</code>
     */
    public Builder setTotal(int value) {
      
      total_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 总价
     * </pre>
     *
     * <code>int32 total = 9;</code>
     */
    public Builder clearTotal() {
      
      total_ = 0;
      onChanged();
      return this;
    }

    private int deliveryMethod_ ;
    /**
     * <pre>
     * 取药方式：1-快递 2-自取
     * </pre>
     *
     * <code>int32 deliveryMethod = 10;</code>
     */
    public int getDeliveryMethod() {
      return deliveryMethod_;
    }
    /**
     * <pre>
     * 取药方式：1-快递 2-自取
     * </pre>
     *
     * <code>int32 deliveryMethod = 10;</code>
     */
    public Builder setDeliveryMethod(int value) {
      
      deliveryMethod_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 取药方式：1-快递 2-自取
     * </pre>
     *
     * <code>int32 deliveryMethod = 10;</code>
     */
    public Builder clearDeliveryMethod() {
      
      deliveryMethod_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object sex_ = "";
    /**
     * <pre>
     * 患者性别(此时数据库存放的直接是'男'、'女')
     * </pre>
     *
     * <code>string sex = 11;</code>
     */
    public java.lang.String getSex() {
      java.lang.Object ref = sex_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        sex_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 患者性别(此时数据库存放的直接是'男'、'女')
     * </pre>
     *
     * <code>string sex = 11;</code>
     */
    public com.google.protobuf.ByteString
        getSexBytes() {
      java.lang.Object ref = sex_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        sex_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 患者性别(此时数据库存放的直接是'男'、'女')
     * </pre>
     *
     * <code>string sex = 11;</code>
     */
    public Builder setSex(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      sex_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 患者性别(此时数据库存放的直接是'男'、'女')
     * </pre>
     *
     * <code>string sex = 11;</code>
     */
    public Builder clearSex() {
      
      sex_ = getDefaultInstance().getSex();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 患者性别(此时数据库存放的直接是'男'、'女')
     * </pre>
     *
     * <code>string sex = 11;</code>
     */
    public Builder setSexBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      sex_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object dept_ = "";
    /**
     * <pre>
     * 科室名称
     * </pre>
     *
     * <code>string dept = 12;</code>
     */
    public java.lang.String getDept() {
      java.lang.Object ref = dept_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        dept_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 科室名称
     * </pre>
     *
     * <code>string dept = 12;</code>
     */
    public com.google.protobuf.ByteString
        getDeptBytes() {
      java.lang.Object ref = dept_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        dept_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 科室名称
     * </pre>
     *
     * <code>string dept = 12;</code>
     */
    public Builder setDept(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      dept_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 科室名称
     * </pre>
     *
     * <code>string dept = 12;</code>
     */
    public Builder clearDept() {
      
      dept_ = getDefaultInstance().getDept();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 科室名称
     * </pre>
     *
     * <code>string dept = 12;</code>
     */
    public Builder setDeptBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      dept_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object hisOrderNo_ = "";
    /**
     * <pre>
     * 医院his返回的订单编号
     * </pre>
     *
     * <code>string hisOrderNo = 13;</code>
     */
    public java.lang.String getHisOrderNo() {
      java.lang.Object ref = hisOrderNo_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        hisOrderNo_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 医院his返回的订单编号
     * </pre>
     *
     * <code>string hisOrderNo = 13;</code>
     */
    public com.google.protobuf.ByteString
        getHisOrderNoBytes() {
      java.lang.Object ref = hisOrderNo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        hisOrderNo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 医院his返回的订单编号
     * </pre>
     *
     * <code>string hisOrderNo = 13;</code>
     */
    public Builder setHisOrderNo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      hisOrderNo_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 医院his返回的订单编号
     * </pre>
     *
     * <code>string hisOrderNo = 13;</code>
     */
    public Builder clearHisOrderNo() {
      
      hisOrderNo_ = getDefaultInstance().getHisOrderNo();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 医院his返回的订单编号
     * </pre>
     *
     * <code>string hisOrderNo = 13;</code>
     */
    public Builder setHisOrderNoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      hisOrderNo_ = value;
      onChanged();
      return this;
    }

    private int source_ ;
    /**
     * <pre>
     * 处方订单来源
     * </pre>
     *
     * <code>int32 source = 14;</code>
     */
    public int getSource() {
      return source_;
    }
    /**
     * <pre>
     * 处方订单来源
     * </pre>
     *
     * <code>int32 source = 14;</code>
     */
    public Builder setSource(int value) {
      
      source_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 处方订单来源
     * </pre>
     *
     * <code>int32 source = 14;</code>
     */
    public Builder clearSource() {
      
      source_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object doctorName_ = "";
    /**
     * <pre>
     * 医生姓名
     * </pre>
     *
     * <code>string doctorName = 15;</code>
     */
    public java.lang.String getDoctorName() {
      java.lang.Object ref = doctorName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        doctorName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 医生姓名
     * </pre>
     *
     * <code>string doctorName = 15;</code>
     */
    public com.google.protobuf.ByteString
        getDoctorNameBytes() {
      java.lang.Object ref = doctorName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        doctorName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 医生姓名
     * </pre>
     *
     * <code>string doctorName = 15;</code>
     */
    public Builder setDoctorName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      doctorName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 医生姓名
     * </pre>
     *
     * <code>string doctorName = 15;</code>
     */
    public Builder clearDoctorName() {
      
      doctorName_ = getDefaultInstance().getDoctorName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 医生姓名
     * </pre>
     *
     * <code>string doctorName = 15;</code>
     */
    public Builder setDoctorNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      doctorName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object hospitalName_ = "";
    /**
     * <pre>
     * 医院名称
     * </pre>
     *
     * <code>string hospitalName = 16;</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 = 16;</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 = 16;</code>
     */
    public Builder setHospitalName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      hospitalName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 医院名称
     * </pre>
     *
     * <code>string hospitalName = 16;</code>
     */
    public Builder clearHospitalName() {
      
      hospitalName_ = getDefaultInstance().getHospitalName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 医院名称
     * </pre>
     *
     * <code>string hospitalName = 16;</code>
     */
    public Builder setHospitalNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      hospitalName_ = value;
      onChanged();
      return this;
    }

    private int extStatus_ ;
    /**
     * <pre>
     * 处方状态拓展字段
     * </pre>
     *
     * <code>int32 extStatus = 17;</code>
     */
    public int getExtStatus() {
      return extStatus_;
    }
    /**
     * <pre>
     * 处方状态拓展字段
     * </pre>
     *
     * <code>int32 extStatus = 17;</code>
     */
    public Builder setExtStatus(int value) {
      
      extStatus_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 处方状态拓展字段
     * </pre>
     *
     * <code>int32 extStatus = 17;</code>
     */
    public Builder clearExtStatus() {
      
      extStatus_ = 0;
      onChanged();
      return this;
    }

    private int pharmacyId_ ;
    /**
     * <code>int32 pharmacyId = 18;</code>
     */
    public int getPharmacyId() {
      return pharmacyId_;
    }
    /**
     * <code>int32 pharmacyId = 18;</code>
     */
    public Builder setPharmacyId(int value) {
      
      pharmacyId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 pharmacyId = 18;</code>
     */
    public Builder clearPharmacyId() {
      
      pharmacyId_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object orderNo_ = "";
    /**
     * <pre>
     * 订单号
     * </pre>
     *
     * <code>string orderNo = 19;</code>
     */
    public java.lang.String getOrderNo() {
      java.lang.Object ref = orderNo_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        orderNo_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 订单号
     * </pre>
     *
     * <code>string orderNo = 19;</code>
     */
    public com.google.protobuf.ByteString
        getOrderNoBytes() {
      java.lang.Object ref = orderNo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        orderNo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 订单号
     * </pre>
     *
     * <code>string orderNo = 19;</code>
     */
    public Builder setOrderNo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      orderNo_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 订单号
     * </pre>
     *
     * <code>string orderNo = 19;</code>
     */
    public Builder clearOrderNo() {
      
      orderNo_ = getDefaultInstance().getOrderNo();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 订单号
     * </pre>
     *
     * <code>string orderNo = 19;</code>
     */
    public Builder setOrderNoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      orderNo_ = value;
      onChanged();
      return this;
    }

    private int orderId_ ;
    /**
     * <pre>
     * 订单ID
     * </pre>
     *
     * <code>int32 orderId = 20;</code>
     */
    public int getOrderId() {
      return orderId_;
    }
    /**
     * <pre>
     * 订单ID
     * </pre>
     *
     * <code>int32 orderId = 20;</code>
     */
    public Builder setOrderId(int value) {
      
      orderId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 订单ID
     * </pre>
     *
     * <code>int32 orderId = 20;</code>
     */
    public Builder clearOrderId() {
      
      orderId_ = 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.drug.PrescriptionBaseInfo)
  }

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

  public static com.ywt.gapi.drug.PrescriptionBaseInfo getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  public com.ywt.gapi.drug.PrescriptionBaseInfo getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

