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

package com.ywt.gapi.order;

/**
 * <pre>
 *保存处方单信息请求
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.order.SavePrescriptionOrderRequest}
 */
public  final class SavePrescriptionOrderRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.order.SavePrescriptionOrderRequest)
    SavePrescriptionOrderRequestOrBuilder {
  // Use SavePrescriptionOrderRequest.newBuilder() to construct.
  private SavePrescriptionOrderRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SavePrescriptionOrderRequest() {
    hospitalId_ = 0;
    patientName_ = "";
    patientSex_ = 0;
    patientAge_ = 0;
    patientMobile_ = "";
    diagnosis_ = "";
    allergicHistory_ = "";
    description_ = "";
    doctorId_ = 0;
    doctorSignId_ = 0;
    drugUsage_ = java.util.Collections.emptyList();
    doctorName_ = "";
    source_ = 0;
    deptName_ = "";
    userId_ = 0;
    idCardNo_ = "";
  }

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

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

            patientName_ = s;
            break;
          }
          case 24: {

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

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

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

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

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

            description_ = s;
            break;
          }
          case 72: {

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

            doctorSignId_ = input.readInt32();
            break;
          }
          case 90: {
            if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
              drugUsage_ = new java.util.ArrayList<com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage>();
              mutable_bitField0_ |= 0x00000400;
            }
            drugUsage_.add(
                input.readMessage(com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.parser(), extensionRegistry));
            break;
          }
          case 98: {
            java.lang.String s = input.readStringRequireUtf8();

            doctorName_ = s;
            break;
          }
          case 104: {

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

            deptName_ = s;
            break;
          }
          case 120: {

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

            idCardNo_ = s;
            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 {
      if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
        drugUsage_ = java.util.Collections.unmodifiableList(drugUsage_);
      }
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.order.OrderOuterClass.internal_static_com_ywt_gapi_order_SavePrescriptionOrderRequest_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.order.OrderOuterClass.internal_static_com_ywt_gapi_order_SavePrescriptionOrderRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.order.SavePrescriptionOrderRequest.class, com.ywt.gapi.order.SavePrescriptionOrderRequest.Builder.class);
  }

  public interface DrugUsageOrBuilder extends
      // @@protoc_insertion_point(interface_extends:com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     *药品Id
     * </pre>
     *
     * <code>int32 drugId = 1;</code>
     */
    int getDrugId();

    /**
     * <pre>
     *每次剂量
     * </pre>
     *
     * <code>double eachDose = 2;</code>
     */
    double getEachDose();

    /**
     * <pre>
     *用法
     * </pre>
     *
     * <code>string usage = 3;</code>
     */
    java.lang.String getUsage();
    /**
     * <pre>
     *用法
     * </pre>
     *
     * <code>string usage = 3;</code>
     */
    com.google.protobuf.ByteString
        getUsageBytes();

    /**
     * <pre>
     *用药频率
     * </pre>
     *
     * <code>string frequency = 4;</code>
     */
    java.lang.String getFrequency();
    /**
     * <pre>
     *用药频率
     * </pre>
     *
     * <code>string frequency = 4;</code>
     */
    com.google.protobuf.ByteString
        getFrequencyBytes();

    /**
     * <pre>
     *疗程，单位：天
     * </pre>
     *
     * <code>int32 course = 5;</code>
     */
    int getCourse();

    /**
     * <pre>
     *药品数量
     * </pre>
     *
     * <code>int32 quantity = 6;</code>
     */
    int getQuantity();

    /**
     * <pre>
     *备注
     * </pre>
     *
     * <code>string remark = 7;</code>
     */
    java.lang.String getRemark();
    /**
     * <pre>
     *备注
     * </pre>
     *
     * <code>string remark = 7;</code>
     */
    com.google.protobuf.ByteString
        getRemarkBytes();

    /**
     * <pre>
     *用药频率编码
     * </pre>
     *
     * <code>string frequencyCode = 8;</code>
     */
    java.lang.String getFrequencyCode();
    /**
     * <pre>
     *用药频率编码
     * </pre>
     *
     * <code>string frequencyCode = 8;</code>
     */
    com.google.protobuf.ByteString
        getFrequencyCodeBytes();

    /**
     * <pre>
     *组号，组号相同表示它们为同组药
     * </pre>
     *
     * <code>int32 group = 18;</code>
     */
    int getGroup();

    /**
     * <pre>
     *序号
     * </pre>
     *
     * <code>int32 orderIndex = 19;</code>
     */
    int getOrderIndex();

    /**
     * <pre>
     *是否组合
     * </pre>
     *
     * <code>int32 combination = 20;</code>
     */
    int getCombination();
  }
  /**
   * <pre>
   *药物使用信息
   * </pre>
   *
   * Protobuf type {@code com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage}
   */
  public  static final class DrugUsage extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage)
      DrugUsageOrBuilder {
    // Use DrugUsage.newBuilder() to construct.
    private DrugUsage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private DrugUsage() {
      drugId_ = 0;
      eachDose_ = 0D;
      usage_ = "";
      frequency_ = "";
      course_ = 0;
      quantity_ = 0;
      remark_ = "";
      frequencyCode_ = "";
      group_ = 0;
      orderIndex_ = 0;
      combination_ = 0;
    }

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

              drugId_ = input.readInt32();
              break;
            }
            case 17: {

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

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

              frequency_ = s;
              break;
            }
            case 40: {

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

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

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

              frequencyCode_ = s;
              break;
            }
            case 144: {

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

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

              combination_ = 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.order.OrderOuterClass.internal_static_com_ywt_gapi_order_SavePrescriptionOrderRequest_DrugUsage_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.order.OrderOuterClass.internal_static_com_ywt_gapi_order_SavePrescriptionOrderRequest_DrugUsage_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.class, com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.Builder.class);
    }

    public static final int DRUGID_FIELD_NUMBER = 1;
    private int drugId_;
    /**
     * <pre>
     *药品Id
     * </pre>
     *
     * <code>int32 drugId = 1;</code>
     */
    public int getDrugId() {
      return drugId_;
    }

    public static final int EACHDOSE_FIELD_NUMBER = 2;
    private double eachDose_;
    /**
     * <pre>
     *每次剂量
     * </pre>
     *
     * <code>double eachDose = 2;</code>
     */
    public double getEachDose() {
      return eachDose_;
    }

    public static final int USAGE_FIELD_NUMBER = 3;
    private volatile java.lang.Object usage_;
    /**
     * <pre>
     *用法
     * </pre>
     *
     * <code>string usage = 3;</code>
     */
    public java.lang.String getUsage() {
      java.lang.Object ref = usage_;
      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();
        usage_ = s;
        return s;
      }
    }
    /**
     * <pre>
     *用法
     * </pre>
     *
     * <code>string usage = 3;</code>
     */
    public com.google.protobuf.ByteString
        getUsageBytes() {
      java.lang.Object ref = usage_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        usage_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int FREQUENCY_FIELD_NUMBER = 4;
    private volatile java.lang.Object frequency_;
    /**
     * <pre>
     *用药频率
     * </pre>
     *
     * <code>string frequency = 4;</code>
     */
    public java.lang.String getFrequency() {
      java.lang.Object ref = frequency_;
      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();
        frequency_ = s;
        return s;
      }
    }
    /**
     * <pre>
     *用药频率
     * </pre>
     *
     * <code>string frequency = 4;</code>
     */
    public com.google.protobuf.ByteString
        getFrequencyBytes() {
      java.lang.Object ref = frequency_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        frequency_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int COURSE_FIELD_NUMBER = 5;
    private int course_;
    /**
     * <pre>
     *疗程，单位：天
     * </pre>
     *
     * <code>int32 course = 5;</code>
     */
    public int getCourse() {
      return course_;
    }

    public static final int QUANTITY_FIELD_NUMBER = 6;
    private int quantity_;
    /**
     * <pre>
     *药品数量
     * </pre>
     *
     * <code>int32 quantity = 6;</code>
     */
    public int getQuantity() {
      return quantity_;
    }

    public static final int REMARK_FIELD_NUMBER = 7;
    private volatile java.lang.Object remark_;
    /**
     * <pre>
     *备注
     * </pre>
     *
     * <code>string remark = 7;</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 = 7;</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 FREQUENCYCODE_FIELD_NUMBER = 8;
    private volatile java.lang.Object frequencyCode_;
    /**
     * <pre>
     *用药频率编码
     * </pre>
     *
     * <code>string frequencyCode = 8;</code>
     */
    public java.lang.String getFrequencyCode() {
      java.lang.Object ref = frequencyCode_;
      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();
        frequencyCode_ = s;
        return s;
      }
    }
    /**
     * <pre>
     *用药频率编码
     * </pre>
     *
     * <code>string frequencyCode = 8;</code>
     */
    public com.google.protobuf.ByteString
        getFrequencyCodeBytes() {
      java.lang.Object ref = frequencyCode_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        frequencyCode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int GROUP_FIELD_NUMBER = 18;
    private int group_;
    /**
     * <pre>
     *组号，组号相同表示它们为同组药
     * </pre>
     *
     * <code>int32 group = 18;</code>
     */
    public int getGroup() {
      return group_;
    }

    public static final int ORDERINDEX_FIELD_NUMBER = 19;
    private int orderIndex_;
    /**
     * <pre>
     *序号
     * </pre>
     *
     * <code>int32 orderIndex = 19;</code>
     */
    public int getOrderIndex() {
      return orderIndex_;
    }

    public static final int COMBINATION_FIELD_NUMBER = 20;
    private int combination_;
    /**
     * <pre>
     *是否组合
     * </pre>
     *
     * <code>int32 combination = 20;</code>
     */
    public int getCombination() {
      return combination_;
    }

    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 (drugId_ != 0) {
        output.writeInt32(1, drugId_);
      }
      if (eachDose_ != 0D) {
        output.writeDouble(2, eachDose_);
      }
      if (!getUsageBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, usage_);
      }
      if (!getFrequencyBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, frequency_);
      }
      if (course_ != 0) {
        output.writeInt32(5, course_);
      }
      if (quantity_ != 0) {
        output.writeInt32(6, quantity_);
      }
      if (!getRemarkBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 7, remark_);
      }
      if (!getFrequencyCodeBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 8, frequencyCode_);
      }
      if (group_ != 0) {
        output.writeInt32(18, group_);
      }
      if (orderIndex_ != 0) {
        output.writeInt32(19, orderIndex_);
      }
      if (combination_ != 0) {
        output.writeInt32(20, combination_);
      }
    }

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

      size = 0;
      if (drugId_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(1, drugId_);
      }
      if (eachDose_ != 0D) {
        size += com.google.protobuf.CodedOutputStream
          .computeDoubleSize(2, eachDose_);
      }
      if (!getUsageBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, usage_);
      }
      if (!getFrequencyBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, frequency_);
      }
      if (course_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(5, course_);
      }
      if (quantity_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(6, quantity_);
      }
      if (!getRemarkBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, remark_);
      }
      if (!getFrequencyCodeBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, frequencyCode_);
      }
      if (group_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(18, group_);
      }
      if (orderIndex_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(19, orderIndex_);
      }
      if (combination_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(20, combination_);
      }
      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.order.SavePrescriptionOrderRequest.DrugUsage)) {
        return super.equals(obj);
      }
      com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage other = (com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage) obj;

      boolean result = true;
      result = result && (getDrugId()
          == other.getDrugId());
      result = result && (
          java.lang.Double.doubleToLongBits(getEachDose())
          == java.lang.Double.doubleToLongBits(
              other.getEachDose()));
      result = result && getUsage()
          .equals(other.getUsage());
      result = result && getFrequency()
          .equals(other.getFrequency());
      result = result && (getCourse()
          == other.getCourse());
      result = result && (getQuantity()
          == other.getQuantity());
      result = result && getRemark()
          .equals(other.getRemark());
      result = result && getFrequencyCode()
          .equals(other.getFrequencyCode());
      result = result && (getGroup()
          == other.getGroup());
      result = result && (getOrderIndex()
          == other.getOrderIndex());
      result = result && (getCombination()
          == other.getCombination());
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + DRUGID_FIELD_NUMBER;
      hash = (53 * hash) + getDrugId();
      hash = (37 * hash) + EACHDOSE_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          java.lang.Double.doubleToLongBits(getEachDose()));
      hash = (37 * hash) + USAGE_FIELD_NUMBER;
      hash = (53 * hash) + getUsage().hashCode();
      hash = (37 * hash) + FREQUENCY_FIELD_NUMBER;
      hash = (53 * hash) + getFrequency().hashCode();
      hash = (37 * hash) + COURSE_FIELD_NUMBER;
      hash = (53 * hash) + getCourse();
      hash = (37 * hash) + QUANTITY_FIELD_NUMBER;
      hash = (53 * hash) + getQuantity();
      hash = (37 * hash) + REMARK_FIELD_NUMBER;
      hash = (53 * hash) + getRemark().hashCode();
      hash = (37 * hash) + FREQUENCYCODE_FIELD_NUMBER;
      hash = (53 * hash) + getFrequencyCode().hashCode();
      hash = (37 * hash) + GROUP_FIELD_NUMBER;
      hash = (53 * hash) + getGroup();
      hash = (37 * hash) + ORDERINDEX_FIELD_NUMBER;
      hash = (53 * hash) + getOrderIndex();
      hash = (37 * hash) + COMBINATION_FIELD_NUMBER;
      hash = (53 * hash) + getCombination();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.ywt.gapi.order.OrderOuterClass.internal_static_com_ywt_gapi_order_SavePrescriptionOrderRequest_DrugUsage_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.class, com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.Builder.class);
      }

      // Construct using com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.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();
        drugId_ = 0;

        eachDose_ = 0D;

        usage_ = "";

        frequency_ = "";

        course_ = 0;

        quantity_ = 0;

        remark_ = "";

        frequencyCode_ = "";

        group_ = 0;

        orderIndex_ = 0;

        combination_ = 0;

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.ywt.gapi.order.OrderOuterClass.internal_static_com_ywt_gapi_order_SavePrescriptionOrderRequest_DrugUsage_descriptor;
      }

      public com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage getDefaultInstanceForType() {
        return com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.getDefaultInstance();
      }

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

      public com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage buildPartial() {
        com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage result = new com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage(this);
        result.drugId_ = drugId_;
        result.eachDose_ = eachDose_;
        result.usage_ = usage_;
        result.frequency_ = frequency_;
        result.course_ = course_;
        result.quantity_ = quantity_;
        result.remark_ = remark_;
        result.frequencyCode_ = frequencyCode_;
        result.group_ = group_;
        result.orderIndex_ = orderIndex_;
        result.combination_ = combination_;
        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.order.SavePrescriptionOrderRequest.DrugUsage) {
          return mergeFrom((com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage other) {
        if (other == com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.getDefaultInstance()) return this;
        if (other.getDrugId() != 0) {
          setDrugId(other.getDrugId());
        }
        if (other.getEachDose() != 0D) {
          setEachDose(other.getEachDose());
        }
        if (!other.getUsage().isEmpty()) {
          usage_ = other.usage_;
          onChanged();
        }
        if (!other.getFrequency().isEmpty()) {
          frequency_ = other.frequency_;
          onChanged();
        }
        if (other.getCourse() != 0) {
          setCourse(other.getCourse());
        }
        if (other.getQuantity() != 0) {
          setQuantity(other.getQuantity());
        }
        if (!other.getRemark().isEmpty()) {
          remark_ = other.remark_;
          onChanged();
        }
        if (!other.getFrequencyCode().isEmpty()) {
          frequencyCode_ = other.frequencyCode_;
          onChanged();
        }
        if (other.getGroup() != 0) {
          setGroup(other.getGroup());
        }
        if (other.getOrderIndex() != 0) {
          setOrderIndex(other.getOrderIndex());
        }
        if (other.getCombination() != 0) {
          setCombination(other.getCombination());
        }
        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.order.SavePrescriptionOrderRequest.DrugUsage parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private int drugId_ ;
      /**
       * <pre>
       *药品Id
       * </pre>
       *
       * <code>int32 drugId = 1;</code>
       */
      public int getDrugId() {
        return drugId_;
      }
      /**
       * <pre>
       *药品Id
       * </pre>
       *
       * <code>int32 drugId = 1;</code>
       */
      public Builder setDrugId(int value) {
        
        drugId_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       *药品Id
       * </pre>
       *
       * <code>int32 drugId = 1;</code>
       */
      public Builder clearDrugId() {
        
        drugId_ = 0;
        onChanged();
        return this;
      }

      private double eachDose_ ;
      /**
       * <pre>
       *每次剂量
       * </pre>
       *
       * <code>double eachDose = 2;</code>
       */
      public double getEachDose() {
        return eachDose_;
      }
      /**
       * <pre>
       *每次剂量
       * </pre>
       *
       * <code>double eachDose = 2;</code>
       */
      public Builder setEachDose(double value) {
        
        eachDose_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       *每次剂量
       * </pre>
       *
       * <code>double eachDose = 2;</code>
       */
      public Builder clearEachDose() {
        
        eachDose_ = 0D;
        onChanged();
        return this;
      }

      private java.lang.Object usage_ = "";
      /**
       * <pre>
       *用法
       * </pre>
       *
       * <code>string usage = 3;</code>
       */
      public java.lang.String getUsage() {
        java.lang.Object ref = usage_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          usage_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       *用法
       * </pre>
       *
       * <code>string usage = 3;</code>
       */
      public com.google.protobuf.ByteString
          getUsageBytes() {
        java.lang.Object ref = usage_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          usage_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       *用法
       * </pre>
       *
       * <code>string usage = 3;</code>
       */
      public Builder setUsage(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        usage_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       *用法
       * </pre>
       *
       * <code>string usage = 3;</code>
       */
      public Builder clearUsage() {
        
        usage_ = getDefaultInstance().getUsage();
        onChanged();
        return this;
      }
      /**
       * <pre>
       *用法
       * </pre>
       *
       * <code>string usage = 3;</code>
       */
      public Builder setUsageBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        usage_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object frequency_ = "";
      /**
       * <pre>
       *用药频率
       * </pre>
       *
       * <code>string frequency = 4;</code>
       */
      public java.lang.String getFrequency() {
        java.lang.Object ref = frequency_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          frequency_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       *用药频率
       * </pre>
       *
       * <code>string frequency = 4;</code>
       */
      public com.google.protobuf.ByteString
          getFrequencyBytes() {
        java.lang.Object ref = frequency_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          frequency_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       *用药频率
       * </pre>
       *
       * <code>string frequency = 4;</code>
       */
      public Builder setFrequency(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        frequency_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       *用药频率
       * </pre>
       *
       * <code>string frequency = 4;</code>
       */
      public Builder clearFrequency() {
        
        frequency_ = getDefaultInstance().getFrequency();
        onChanged();
        return this;
      }
      /**
       * <pre>
       *用药频率
       * </pre>
       *
       * <code>string frequency = 4;</code>
       */
      public Builder setFrequencyBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        frequency_ = value;
        onChanged();
        return this;
      }

      private int course_ ;
      /**
       * <pre>
       *疗程，单位：天
       * </pre>
       *
       * <code>int32 course = 5;</code>
       */
      public int getCourse() {
        return course_;
      }
      /**
       * <pre>
       *疗程，单位：天
       * </pre>
       *
       * <code>int32 course = 5;</code>
       */
      public Builder setCourse(int value) {
        
        course_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       *疗程，单位：天
       * </pre>
       *
       * <code>int32 course = 5;</code>
       */
      public Builder clearCourse() {
        
        course_ = 0;
        onChanged();
        return this;
      }

      private int quantity_ ;
      /**
       * <pre>
       *药品数量
       * </pre>
       *
       * <code>int32 quantity = 6;</code>
       */
      public int getQuantity() {
        return quantity_;
      }
      /**
       * <pre>
       *药品数量
       * </pre>
       *
       * <code>int32 quantity = 6;</code>
       */
      public Builder setQuantity(int value) {
        
        quantity_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       *药品数量
       * </pre>
       *
       * <code>int32 quantity = 6;</code>
       */
      public Builder clearQuantity() {
        
        quantity_ = 0;
        onChanged();
        return this;
      }

      private java.lang.Object remark_ = "";
      /**
       * <pre>
       *备注
       * </pre>
       *
       * <code>string remark = 7;</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 = 7;</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 = 7;</code>
       */
      public Builder setRemark(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        remark_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       *备注
       * </pre>
       *
       * <code>string remark = 7;</code>
       */
      public Builder clearRemark() {
        
        remark_ = getDefaultInstance().getRemark();
        onChanged();
        return this;
      }
      /**
       * <pre>
       *备注
       * </pre>
       *
       * <code>string remark = 7;</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 frequencyCode_ = "";
      /**
       * <pre>
       *用药频率编码
       * </pre>
       *
       * <code>string frequencyCode = 8;</code>
       */
      public java.lang.String getFrequencyCode() {
        java.lang.Object ref = frequencyCode_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          frequencyCode_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       *用药频率编码
       * </pre>
       *
       * <code>string frequencyCode = 8;</code>
       */
      public com.google.protobuf.ByteString
          getFrequencyCodeBytes() {
        java.lang.Object ref = frequencyCode_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          frequencyCode_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       *用药频率编码
       * </pre>
       *
       * <code>string frequencyCode = 8;</code>
       */
      public Builder setFrequencyCode(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        frequencyCode_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       *用药频率编码
       * </pre>
       *
       * <code>string frequencyCode = 8;</code>
       */
      public Builder clearFrequencyCode() {
        
        frequencyCode_ = getDefaultInstance().getFrequencyCode();
        onChanged();
        return this;
      }
      /**
       * <pre>
       *用药频率编码
       * </pre>
       *
       * <code>string frequencyCode = 8;</code>
       */
      public Builder setFrequencyCodeBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        frequencyCode_ = value;
        onChanged();
        return this;
      }

      private int group_ ;
      /**
       * <pre>
       *组号，组号相同表示它们为同组药
       * </pre>
       *
       * <code>int32 group = 18;</code>
       */
      public int getGroup() {
        return group_;
      }
      /**
       * <pre>
       *组号，组号相同表示它们为同组药
       * </pre>
       *
       * <code>int32 group = 18;</code>
       */
      public Builder setGroup(int value) {
        
        group_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       *组号，组号相同表示它们为同组药
       * </pre>
       *
       * <code>int32 group = 18;</code>
       */
      public Builder clearGroup() {
        
        group_ = 0;
        onChanged();
        return this;
      }

      private int orderIndex_ ;
      /**
       * <pre>
       *序号
       * </pre>
       *
       * <code>int32 orderIndex = 19;</code>
       */
      public int getOrderIndex() {
        return orderIndex_;
      }
      /**
       * <pre>
       *序号
       * </pre>
       *
       * <code>int32 orderIndex = 19;</code>
       */
      public Builder setOrderIndex(int value) {
        
        orderIndex_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       *序号
       * </pre>
       *
       * <code>int32 orderIndex = 19;</code>
       */
      public Builder clearOrderIndex() {
        
        orderIndex_ = 0;
        onChanged();
        return this;
      }

      private int combination_ ;
      /**
       * <pre>
       *是否组合
       * </pre>
       *
       * <code>int32 combination = 20;</code>
       */
      public int getCombination() {
        return combination_;
      }
      /**
       * <pre>
       *是否组合
       * </pre>
       *
       * <code>int32 combination = 20;</code>
       */
      public Builder setCombination(int value) {
        
        combination_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       *是否组合
       * </pre>
       *
       * <code>int32 combination = 20;</code>
       */
      public Builder clearCombination() {
        
        combination_ = 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.order.SavePrescriptionOrderRequest.DrugUsage)
    }

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

    public static com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

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

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

  public static final int PATIENTSEX_FIELD_NUMBER = 3;
  private int patientSex_;
  /**
   * <pre>
   *患者性别
   * </pre>
   *
   * <code>int32 patientSex = 3;</code>
   */
  public int getPatientSex() {
    return patientSex_;
  }

  public static final int PATIENTAGE_FIELD_NUMBER = 4;
  private int patientAge_;
  /**
   * <pre>
   *患者年龄
   * </pre>
   *
   * <code>int32 patientAge = 4;</code>
   */
  public int getPatientAge() {
    return patientAge_;
  }

  public static final int PATIENTMOBILE_FIELD_NUMBER = 5;
  private volatile java.lang.Object patientMobile_;
  /**
   * <pre>
   *患者手机号
   * </pre>
   *
   * <code>string patientMobile = 5;</code>
   */
  public java.lang.String getPatientMobile() {
    java.lang.Object ref = patientMobile_;
    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();
      patientMobile_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *患者手机号
   * </pre>
   *
   * <code>string patientMobile = 5;</code>
   */
  public com.google.protobuf.ByteString
      getPatientMobileBytes() {
    java.lang.Object ref = patientMobile_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      patientMobile_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DIAGNOSIS_FIELD_NUMBER = 6;
  private volatile java.lang.Object diagnosis_;
  /**
   * <pre>
   *诊断结果
   * </pre>
   *
   * <code>string diagnosis = 6;</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 = 6;</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 ALLERGICHISTORY_FIELD_NUMBER = 7;
  private volatile java.lang.Object allergicHistory_;
  /**
   * <pre>
   *过敏史
   * </pre>
   *
   * <code>string allergicHistory = 7;</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 = 7;</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 = 8;
  private volatile java.lang.Object description_;
  /**
   * <pre>
   *病情描述
   * </pre>
   *
   * <code>string description = 8;</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 = 8;</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 DOCTORID_FIELD_NUMBER = 9;
  private int doctorId_;
  /**
   * <pre>
   *医生Id
   * </pre>
   *
   * <code>int32 doctorId = 9;</code>
   */
  public int getDoctorId() {
    return doctorId_;
  }

  public static final int DOCTORSIGNID_FIELD_NUMBER = 10;
  private int doctorSignId_;
  /**
   * <pre>
   *医生签名Id
   * </pre>
   *
   * <code>int32 doctorSignId = 10;</code>
   */
  public int getDoctorSignId() {
    return doctorSignId_;
  }

  public static final int DRUGUSAGE_FIELD_NUMBER = 11;
  private java.util.List<com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage> drugUsage_;
  /**
   * <pre>
   *药物使用说明
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
   */
  public java.util.List<com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage> getDrugUsageList() {
    return drugUsage_;
  }
  /**
   * <pre>
   *药物使用说明
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
   */
  public java.util.List<? extends com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsageOrBuilder> 
      getDrugUsageOrBuilderList() {
    return drugUsage_;
  }
  /**
   * <pre>
   *药物使用说明
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
   */
  public int getDrugUsageCount() {
    return drugUsage_.size();
  }
  /**
   * <pre>
   *药物使用说明
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
   */
  public com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage getDrugUsage(int index) {
    return drugUsage_.get(index);
  }
  /**
   * <pre>
   *药物使用说明
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
   */
  public com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsageOrBuilder getDrugUsageOrBuilder(
      int index) {
    return drugUsage_.get(index);
  }

  public static final int DOCTORNAME_FIELD_NUMBER = 12;
  private volatile java.lang.Object doctorName_;
  /**
   * <pre>
   *医生姓名
   * </pre>
   *
   * <code>string doctorName = 12;</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 = 12;</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 SOURCE_FIELD_NUMBER = 13;
  private int source_;
  /**
   * <pre>
   *处方单来源
   * </pre>
   *
   * <code>int32 source = 13;</code>
   */
  public int getSource() {
    return source_;
  }

  public static final int DEPTNAME_FIELD_NUMBER = 14;
  private volatile java.lang.Object deptName_;
  /**
   * <pre>
   *科室名称
   * </pre>
   *
   * <code>string deptName = 14;</code>
   */
  public java.lang.String getDeptName() {
    java.lang.Object ref = deptName_;
    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();
      deptName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *科室名称
   * </pre>
   *
   * <code>string deptName = 14;</code>
   */
  public com.google.protobuf.ByteString
      getDeptNameBytes() {
    java.lang.Object ref = deptName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      deptName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

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

  public static final int IDCARDNO_FIELD_NUMBER = 16;
  private volatile java.lang.Object idCardNo_;
  /**
   * <pre>
   *身份证号
   * </pre>
   *
   * <code>string idCardNo = 16;</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 = 16;</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;
    }
  }

  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 (hospitalId_ != 0) {
      output.writeInt32(1, hospitalId_);
    }
    if (!getPatientNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, patientName_);
    }
    if (patientSex_ != 0) {
      output.writeInt32(3, patientSex_);
    }
    if (patientAge_ != 0) {
      output.writeInt32(4, patientAge_);
    }
    if (!getPatientMobileBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, patientMobile_);
    }
    if (!getDiagnosisBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, diagnosis_);
    }
    if (!getAllergicHistoryBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, allergicHistory_);
    }
    if (!getDescriptionBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_);
    }
    if (doctorId_ != 0) {
      output.writeInt32(9, doctorId_);
    }
    if (doctorSignId_ != 0) {
      output.writeInt32(10, doctorSignId_);
    }
    for (int i = 0; i < drugUsage_.size(); i++) {
      output.writeMessage(11, drugUsage_.get(i));
    }
    if (!getDoctorNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, doctorName_);
    }
    if (source_ != 0) {
      output.writeInt32(13, source_);
    }
    if (!getDeptNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 14, deptName_);
    }
    if (userId_ != 0) {
      output.writeInt32(15, userId_);
    }
    if (!getIdCardNoBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 16, idCardNo_);
    }
  }

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

    size = 0;
    if (hospitalId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(1, hospitalId_);
    }
    if (!getPatientNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, patientName_);
    }
    if (patientSex_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(3, patientSex_);
    }
    if (patientAge_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(4, patientAge_);
    }
    if (!getPatientMobileBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, patientMobile_);
    }
    if (!getDiagnosisBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, diagnosis_);
    }
    if (!getAllergicHistoryBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, allergicHistory_);
    }
    if (!getDescriptionBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_);
    }
    if (doctorId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(9, doctorId_);
    }
    if (doctorSignId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(10, doctorSignId_);
    }
    for (int i = 0; i < drugUsage_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(11, drugUsage_.get(i));
    }
    if (!getDoctorNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, doctorName_);
    }
    if (source_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(13, source_);
    }
    if (!getDeptNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, deptName_);
    }
    if (userId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(15, userId_);
    }
    if (!getIdCardNoBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, idCardNo_);
    }
    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.order.SavePrescriptionOrderRequest)) {
      return super.equals(obj);
    }
    com.ywt.gapi.order.SavePrescriptionOrderRequest other = (com.ywt.gapi.order.SavePrescriptionOrderRequest) obj;

    boolean result = true;
    result = result && (getHospitalId()
        == other.getHospitalId());
    result = result && getPatientName()
        .equals(other.getPatientName());
    result = result && (getPatientSex()
        == other.getPatientSex());
    result = result && (getPatientAge()
        == other.getPatientAge());
    result = result && getPatientMobile()
        .equals(other.getPatientMobile());
    result = result && getDiagnosis()
        .equals(other.getDiagnosis());
    result = result && getAllergicHistory()
        .equals(other.getAllergicHistory());
    result = result && getDescription()
        .equals(other.getDescription());
    result = result && (getDoctorId()
        == other.getDoctorId());
    result = result && (getDoctorSignId()
        == other.getDoctorSignId());
    result = result && getDrugUsageList()
        .equals(other.getDrugUsageList());
    result = result && getDoctorName()
        .equals(other.getDoctorName());
    result = result && (getSource()
        == other.getSource());
    result = result && getDeptName()
        .equals(other.getDeptName());
    result = result && (getUserId()
        == other.getUserId());
    result = result && getIdCardNo()
        .equals(other.getIdCardNo());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + HOSPITALID_FIELD_NUMBER;
    hash = (53 * hash) + getHospitalId();
    hash = (37 * hash) + PATIENTNAME_FIELD_NUMBER;
    hash = (53 * hash) + getPatientName().hashCode();
    hash = (37 * hash) + PATIENTSEX_FIELD_NUMBER;
    hash = (53 * hash) + getPatientSex();
    hash = (37 * hash) + PATIENTAGE_FIELD_NUMBER;
    hash = (53 * hash) + getPatientAge();
    hash = (37 * hash) + PATIENTMOBILE_FIELD_NUMBER;
    hash = (53 * hash) + getPatientMobile().hashCode();
    hash = (37 * hash) + DIAGNOSIS_FIELD_NUMBER;
    hash = (53 * hash) + getDiagnosis().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) + DOCTORID_FIELD_NUMBER;
    hash = (53 * hash) + getDoctorId();
    hash = (37 * hash) + DOCTORSIGNID_FIELD_NUMBER;
    hash = (53 * hash) + getDoctorSignId();
    if (getDrugUsageCount() > 0) {
      hash = (37 * hash) + DRUGUSAGE_FIELD_NUMBER;
      hash = (53 * hash) + getDrugUsageList().hashCode();
    }
    hash = (37 * hash) + DOCTORNAME_FIELD_NUMBER;
    hash = (53 * hash) + getDoctorName().hashCode();
    hash = (37 * hash) + SOURCE_FIELD_NUMBER;
    hash = (53 * hash) + getSource();
    hash = (37 * hash) + DEPTNAME_FIELD_NUMBER;
    hash = (53 * hash) + getDeptName().hashCode();
    hash = (37 * hash) + USERID_FIELD_NUMBER;
    hash = (53 * hash) + getUserId();
    hash = (37 * hash) + IDCARDNO_FIELD_NUMBER;
    hash = (53 * hash) + getIdCardNo().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.order.OrderOuterClass.internal_static_com_ywt_gapi_order_SavePrescriptionOrderRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.order.SavePrescriptionOrderRequest.class, com.ywt.gapi.order.SavePrescriptionOrderRequest.Builder.class);
    }

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

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

      patientName_ = "";

      patientSex_ = 0;

      patientAge_ = 0;

      patientMobile_ = "";

      diagnosis_ = "";

      allergicHistory_ = "";

      description_ = "";

      doctorId_ = 0;

      doctorSignId_ = 0;

      if (drugUsageBuilder_ == null) {
        drugUsage_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000400);
      } else {
        drugUsageBuilder_.clear();
      }
      doctorName_ = "";

      source_ = 0;

      deptName_ = "";

      userId_ = 0;

      idCardNo_ = "";

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.order.OrderOuterClass.internal_static_com_ywt_gapi_order_SavePrescriptionOrderRequest_descriptor;
    }

    public com.ywt.gapi.order.SavePrescriptionOrderRequest getDefaultInstanceForType() {
      return com.ywt.gapi.order.SavePrescriptionOrderRequest.getDefaultInstance();
    }

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

    public com.ywt.gapi.order.SavePrescriptionOrderRequest buildPartial() {
      com.ywt.gapi.order.SavePrescriptionOrderRequest result = new com.ywt.gapi.order.SavePrescriptionOrderRequest(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.hospitalId_ = hospitalId_;
      result.patientName_ = patientName_;
      result.patientSex_ = patientSex_;
      result.patientAge_ = patientAge_;
      result.patientMobile_ = patientMobile_;
      result.diagnosis_ = diagnosis_;
      result.allergicHistory_ = allergicHistory_;
      result.description_ = description_;
      result.doctorId_ = doctorId_;
      result.doctorSignId_ = doctorSignId_;
      if (drugUsageBuilder_ == null) {
        if (((bitField0_ & 0x00000400) == 0x00000400)) {
          drugUsage_ = java.util.Collections.unmodifiableList(drugUsage_);
          bitField0_ = (bitField0_ & ~0x00000400);
        }
        result.drugUsage_ = drugUsage_;
      } else {
        result.drugUsage_ = drugUsageBuilder_.build();
      }
      result.doctorName_ = doctorName_;
      result.source_ = source_;
      result.deptName_ = deptName_;
      result.userId_ = userId_;
      result.idCardNo_ = idCardNo_;
      result.bitField0_ = to_bitField0_;
      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.order.SavePrescriptionOrderRequest) {
        return mergeFrom((com.ywt.gapi.order.SavePrescriptionOrderRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.order.SavePrescriptionOrderRequest other) {
      if (other == com.ywt.gapi.order.SavePrescriptionOrderRequest.getDefaultInstance()) return this;
      if (other.getHospitalId() != 0) {
        setHospitalId(other.getHospitalId());
      }
      if (!other.getPatientName().isEmpty()) {
        patientName_ = other.patientName_;
        onChanged();
      }
      if (other.getPatientSex() != 0) {
        setPatientSex(other.getPatientSex());
      }
      if (other.getPatientAge() != 0) {
        setPatientAge(other.getPatientAge());
      }
      if (!other.getPatientMobile().isEmpty()) {
        patientMobile_ = other.patientMobile_;
        onChanged();
      }
      if (!other.getDiagnosis().isEmpty()) {
        diagnosis_ = other.diagnosis_;
        onChanged();
      }
      if (!other.getAllergicHistory().isEmpty()) {
        allergicHistory_ = other.allergicHistory_;
        onChanged();
      }
      if (!other.getDescription().isEmpty()) {
        description_ = other.description_;
        onChanged();
      }
      if (other.getDoctorId() != 0) {
        setDoctorId(other.getDoctorId());
      }
      if (other.getDoctorSignId() != 0) {
        setDoctorSignId(other.getDoctorSignId());
      }
      if (drugUsageBuilder_ == null) {
        if (!other.drugUsage_.isEmpty()) {
          if (drugUsage_.isEmpty()) {
            drugUsage_ = other.drugUsage_;
            bitField0_ = (bitField0_ & ~0x00000400);
          } else {
            ensureDrugUsageIsMutable();
            drugUsage_.addAll(other.drugUsage_);
          }
          onChanged();
        }
      } else {
        if (!other.drugUsage_.isEmpty()) {
          if (drugUsageBuilder_.isEmpty()) {
            drugUsageBuilder_.dispose();
            drugUsageBuilder_ = null;
            drugUsage_ = other.drugUsage_;
            bitField0_ = (bitField0_ & ~0x00000400);
            drugUsageBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getDrugUsageFieldBuilder() : null;
          } else {
            drugUsageBuilder_.addAllMessages(other.drugUsage_);
          }
        }
      }
      if (!other.getDoctorName().isEmpty()) {
        doctorName_ = other.doctorName_;
        onChanged();
      }
      if (other.getSource() != 0) {
        setSource(other.getSource());
      }
      if (!other.getDeptName().isEmpty()) {
        deptName_ = other.deptName_;
        onChanged();
      }
      if (other.getUserId() != 0) {
        setUserId(other.getUserId());
      }
      if (!other.getIdCardNo().isEmpty()) {
        idCardNo_ = other.idCardNo_;
        onChanged();
      }
      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.order.SavePrescriptionOrderRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.order.SavePrescriptionOrderRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

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

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

    private int patientSex_ ;
    /**
     * <pre>
     *患者性别
     * </pre>
     *
     * <code>int32 patientSex = 3;</code>
     */
    public int getPatientSex() {
      return patientSex_;
    }
    /**
     * <pre>
     *患者性别
     * </pre>
     *
     * <code>int32 patientSex = 3;</code>
     */
    public Builder setPatientSex(int value) {
      
      patientSex_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *患者性别
     * </pre>
     *
     * <code>int32 patientSex = 3;</code>
     */
    public Builder clearPatientSex() {
      
      patientSex_ = 0;
      onChanged();
      return this;
    }

    private int patientAge_ ;
    /**
     * <pre>
     *患者年龄
     * </pre>
     *
     * <code>int32 patientAge = 4;</code>
     */
    public int getPatientAge() {
      return patientAge_;
    }
    /**
     * <pre>
     *患者年龄
     * </pre>
     *
     * <code>int32 patientAge = 4;</code>
     */
    public Builder setPatientAge(int value) {
      
      patientAge_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *患者年龄
     * </pre>
     *
     * <code>int32 patientAge = 4;</code>
     */
    public Builder clearPatientAge() {
      
      patientAge_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object patientMobile_ = "";
    /**
     * <pre>
     *患者手机号
     * </pre>
     *
     * <code>string patientMobile = 5;</code>
     */
    public java.lang.String getPatientMobile() {
      java.lang.Object ref = patientMobile_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        patientMobile_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *患者手机号
     * </pre>
     *
     * <code>string patientMobile = 5;</code>
     */
    public com.google.protobuf.ByteString
        getPatientMobileBytes() {
      java.lang.Object ref = patientMobile_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        patientMobile_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *患者手机号
     * </pre>
     *
     * <code>string patientMobile = 5;</code>
     */
    public Builder setPatientMobile(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      patientMobile_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *患者手机号
     * </pre>
     *
     * <code>string patientMobile = 5;</code>
     */
    public Builder clearPatientMobile() {
      
      patientMobile_ = getDefaultInstance().getPatientMobile();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *患者手机号
     * </pre>
     *
     * <code>string patientMobile = 5;</code>
     */
    public Builder setPatientMobileBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      patientMobile_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object diagnosis_ = "";
    /**
     * <pre>
     *诊断结果
     * </pre>
     *
     * <code>string diagnosis = 6;</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 = 6;</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 = 6;</code>
     */
    public Builder setDiagnosis(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      diagnosis_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *诊断结果
     * </pre>
     *
     * <code>string diagnosis = 6;</code>
     */
    public Builder clearDiagnosis() {
      
      diagnosis_ = getDefaultInstance().getDiagnosis();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *诊断结果
     * </pre>
     *
     * <code>string diagnosis = 6;</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 allergicHistory_ = "";
    /**
     * <pre>
     *过敏史
     * </pre>
     *
     * <code>string allergicHistory = 7;</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 = 7;</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 = 7;</code>
     */
    public Builder setAllergicHistory(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      allergicHistory_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *过敏史
     * </pre>
     *
     * <code>string allergicHistory = 7;</code>
     */
    public Builder clearAllergicHistory() {
      
      allergicHistory_ = getDefaultInstance().getAllergicHistory();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *过敏史
     * </pre>
     *
     * <code>string allergicHistory = 7;</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 = 8;</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 = 8;</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 = 8;</code>
     */
    public Builder setDescription(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      description_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *病情描述
     * </pre>
     *
     * <code>string description = 8;</code>
     */
    public Builder clearDescription() {
      
      description_ = getDefaultInstance().getDescription();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *病情描述
     * </pre>
     *
     * <code>string description = 8;</code>
     */
    public Builder setDescriptionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      description_ = value;
      onChanged();
      return this;
    }

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

    private int doctorSignId_ ;
    /**
     * <pre>
     *医生签名Id
     * </pre>
     *
     * <code>int32 doctorSignId = 10;</code>
     */
    public int getDoctorSignId() {
      return doctorSignId_;
    }
    /**
     * <pre>
     *医生签名Id
     * </pre>
     *
     * <code>int32 doctorSignId = 10;</code>
     */
    public Builder setDoctorSignId(int value) {
      
      doctorSignId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *医生签名Id
     * </pre>
     *
     * <code>int32 doctorSignId = 10;</code>
     */
    public Builder clearDoctorSignId() {
      
      doctorSignId_ = 0;
      onChanged();
      return this;
    }

    private java.util.List<com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage> drugUsage_ =
      java.util.Collections.emptyList();
    private void ensureDrugUsageIsMutable() {
      if (!((bitField0_ & 0x00000400) == 0x00000400)) {
        drugUsage_ = new java.util.ArrayList<com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage>(drugUsage_);
        bitField0_ |= 0x00000400;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage, com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.Builder, com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsageOrBuilder> drugUsageBuilder_;

    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public java.util.List<com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage> getDrugUsageList() {
      if (drugUsageBuilder_ == null) {
        return java.util.Collections.unmodifiableList(drugUsage_);
      } else {
        return drugUsageBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public int getDrugUsageCount() {
      if (drugUsageBuilder_ == null) {
        return drugUsage_.size();
      } else {
        return drugUsageBuilder_.getCount();
      }
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage getDrugUsage(int index) {
      if (drugUsageBuilder_ == null) {
        return drugUsage_.get(index);
      } else {
        return drugUsageBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public Builder setDrugUsage(
        int index, com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage value) {
      if (drugUsageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDrugUsageIsMutable();
        drugUsage_.set(index, value);
        onChanged();
      } else {
        drugUsageBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public Builder setDrugUsage(
        int index, com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.Builder builderForValue) {
      if (drugUsageBuilder_ == null) {
        ensureDrugUsageIsMutable();
        drugUsage_.set(index, builderForValue.build());
        onChanged();
      } else {
        drugUsageBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public Builder addDrugUsage(com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage value) {
      if (drugUsageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDrugUsageIsMutable();
        drugUsage_.add(value);
        onChanged();
      } else {
        drugUsageBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public Builder addDrugUsage(
        int index, com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage value) {
      if (drugUsageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDrugUsageIsMutable();
        drugUsage_.add(index, value);
        onChanged();
      } else {
        drugUsageBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public Builder addDrugUsage(
        com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.Builder builderForValue) {
      if (drugUsageBuilder_ == null) {
        ensureDrugUsageIsMutable();
        drugUsage_.add(builderForValue.build());
        onChanged();
      } else {
        drugUsageBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public Builder addDrugUsage(
        int index, com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.Builder builderForValue) {
      if (drugUsageBuilder_ == null) {
        ensureDrugUsageIsMutable();
        drugUsage_.add(index, builderForValue.build());
        onChanged();
      } else {
        drugUsageBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public Builder addAllDrugUsage(
        java.lang.Iterable<? extends com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage> values) {
      if (drugUsageBuilder_ == null) {
        ensureDrugUsageIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, drugUsage_);
        onChanged();
      } else {
        drugUsageBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public Builder clearDrugUsage() {
      if (drugUsageBuilder_ == null) {
        drugUsage_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000400);
        onChanged();
      } else {
        drugUsageBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public Builder removeDrugUsage(int index) {
      if (drugUsageBuilder_ == null) {
        ensureDrugUsageIsMutable();
        drugUsage_.remove(index);
        onChanged();
      } else {
        drugUsageBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.Builder getDrugUsageBuilder(
        int index) {
      return getDrugUsageFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsageOrBuilder getDrugUsageOrBuilder(
        int index) {
      if (drugUsageBuilder_ == null) {
        return drugUsage_.get(index);  } else {
        return drugUsageBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public java.util.List<? extends com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsageOrBuilder> 
         getDrugUsageOrBuilderList() {
      if (drugUsageBuilder_ != null) {
        return drugUsageBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(drugUsage_);
      }
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.Builder addDrugUsageBuilder() {
      return getDrugUsageFieldBuilder().addBuilder(
          com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.getDefaultInstance());
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.Builder addDrugUsageBuilder(
        int index) {
      return getDrugUsageFieldBuilder().addBuilder(
          index, com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.getDefaultInstance());
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage drugUsage = 11;</code>
     */
    public java.util.List<com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.Builder> 
         getDrugUsageBuilderList() {
      return getDrugUsageFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage, com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.Builder, com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsageOrBuilder> 
        getDrugUsageFieldBuilder() {
      if (drugUsageBuilder_ == null) {
        drugUsageBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage, com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsage.Builder, com.ywt.gapi.order.SavePrescriptionOrderRequest.DrugUsageOrBuilder>(
                drugUsage_,
                ((bitField0_ & 0x00000400) == 0x00000400),
                getParentForChildren(),
                isClean());
        drugUsage_ = null;
      }
      return drugUsageBuilder_;
    }

    private java.lang.Object doctorName_ = "";
    /**
     * <pre>
     *医生姓名
     * </pre>
     *
     * <code>string doctorName = 12;</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 = 12;</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 = 12;</code>
     */
    public Builder setDoctorName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      doctorName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *医生姓名
     * </pre>
     *
     * <code>string doctorName = 12;</code>
     */
    public Builder clearDoctorName() {
      
      doctorName_ = getDefaultInstance().getDoctorName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *医生姓名
     * </pre>
     *
     * <code>string doctorName = 12;</code>
     */
    public Builder setDoctorNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      doctorName_ = value;
      onChanged();
      return this;
    }

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

    private java.lang.Object deptName_ = "";
    /**
     * <pre>
     *科室名称
     * </pre>
     *
     * <code>string deptName = 14;</code>
     */
    public java.lang.String getDeptName() {
      java.lang.Object ref = deptName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        deptName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *科室名称
     * </pre>
     *
     * <code>string deptName = 14;</code>
     */
    public com.google.protobuf.ByteString
        getDeptNameBytes() {
      java.lang.Object ref = deptName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        deptName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *科室名称
     * </pre>
     *
     * <code>string deptName = 14;</code>
     */
    public Builder setDeptName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      deptName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *科室名称
     * </pre>
     *
     * <code>string deptName = 14;</code>
     */
    public Builder clearDeptName() {
      
      deptName_ = getDefaultInstance().getDeptName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *科室名称
     * </pre>
     *
     * <code>string deptName = 14;</code>
     */
    public Builder setDeptNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      deptName_ = value;
      onChanged();
      return this;
    }

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

    private java.lang.Object idCardNo_ = "";
    /**
     * <pre>
     *身份证号
     * </pre>
     *
     * <code>string idCardNo = 16;</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 = 16;</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 = 16;</code>
     */
    public Builder setIdCardNo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      idCardNo_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *身份证号
     * </pre>
     *
     * <code>string idCardNo = 16;</code>
     */
    public Builder clearIdCardNo() {
      
      idCardNo_ = getDefaultInstance().getIdCardNo();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *身份证号
     * </pre>
     *
     * <code>string idCardNo = 16;</code>
     */
    public Builder setIdCardNoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      idCardNo_ = value;
      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.order.SavePrescriptionOrderRequest)
  }

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

  public static com.ywt.gapi.order.SavePrescriptionOrderRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  public com.ywt.gapi.order.SavePrescriptionOrderRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

