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

package com.ywt.gapi.drug;

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private SavePrescriptionDetailRequest(
      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.drug.DrugUsage>();
              mutable_bitField0_ |= 0x00000400;
            }
            drugUsage_.add(
                input.readMessage(com.ywt.gapi.drug.DrugUsage.parser(), extensionRegistry));
            break;
          }
          case 98: {
            java.lang.String s = input.readStringRequireUtf8();

            doctorName_ = 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.drug.DrugOuterClass.internal_static_com_ywt_gapi_drug_SavePrescriptionDetailRequest_descriptor;
  }

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

  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.drug.DrugUsage> drugUsage_;
  /**
   * <pre>
   *药物使用说明
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
   */
  public java.util.List<com.ywt.gapi.drug.DrugUsage> getDrugUsageList() {
    return drugUsage_;
  }
  /**
   * <pre>
   *药物使用说明
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
   */
  public java.util.List<? extends com.ywt.gapi.drug.DrugUsageOrBuilder> 
      getDrugUsageOrBuilderList() {
    return drugUsage_;
  }
  /**
   * <pre>
   *药物使用说明
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
   */
  public int getDrugUsageCount() {
    return drugUsage_.size();
  }
  /**
   * <pre>
   *药物使用说明
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
   */
  public com.ywt.gapi.drug.DrugUsage getDrugUsage(int index) {
    return drugUsage_.get(index);
  }
  /**
   * <pre>
   *药物使用说明
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
   */
  public com.ywt.gapi.drug.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;
    }
  }

  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_);
    }
  }

  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_);
    }
    memoizedSize = size;
    return size;
  }

  private static final long serialVersionUID = 0L;
  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.ywt.gapi.drug.SavePrescriptionDetailRequest)) {
      return super.equals(obj);
    }
    com.ywt.gapi.drug.SavePrescriptionDetailRequest other = (com.ywt.gapi.drug.SavePrescriptionDetailRequest) 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());
    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 = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.ywt.gapi.drug.SavePrescriptionDetailRequest 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>
   *保存处方单信息Request  Create by daiyihua
   * </pre>
   *
   * Protobuf type {@code com.ywt.gapi.drug.SavePrescriptionDetailRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.drug.SavePrescriptionDetailRequest)
      com.ywt.gapi.drug.SavePrescriptionDetailRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.drug.DrugOuterClass.internal_static_com_ywt_gapi_drug_SavePrescriptionDetailRequest_descriptor;
    }

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

    // Construct using com.ywt.gapi.drug.SavePrescriptionDetailRequest.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_ = "";

      return this;
    }

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

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

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

    public com.ywt.gapi.drug.SavePrescriptionDetailRequest buildPartial() {
      com.ywt.gapi.drug.SavePrescriptionDetailRequest result = new com.ywt.gapi.drug.SavePrescriptionDetailRequest(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.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.drug.SavePrescriptionDetailRequest) {
        return mergeFrom((com.ywt.gapi.drug.SavePrescriptionDetailRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.drug.SavePrescriptionDetailRequest other) {
      if (other == com.ywt.gapi.drug.SavePrescriptionDetailRequest.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();
      }
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.ywt.gapi.drug.SavePrescriptionDetailRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.drug.SavePrescriptionDetailRequest) 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.drug.DrugUsage> drugUsage_ =
      java.util.Collections.emptyList();
    private void ensureDrugUsageIsMutable() {
      if (!((bitField0_ & 0x00000400) == 0x00000400)) {
        drugUsage_ = new java.util.ArrayList<com.ywt.gapi.drug.DrugUsage>(drugUsage_);
        bitField0_ |= 0x00000400;
       }
    }

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

    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
     */
    public java.util.List<com.ywt.gapi.drug.DrugUsage> getDrugUsageList() {
      if (drugUsageBuilder_ == null) {
        return java.util.Collections.unmodifiableList(drugUsage_);
      } else {
        return drugUsageBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
     */
    public int getDrugUsageCount() {
      if (drugUsageBuilder_ == null) {
        return drugUsage_.size();
      } else {
        return drugUsageBuilder_.getCount();
      }
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
     */
    public com.ywt.gapi.drug.DrugUsage getDrugUsage(int index) {
      if (drugUsageBuilder_ == null) {
        return drugUsage_.get(index);
      } else {
        return drugUsageBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
     */
    public Builder setDrugUsage(
        int index, com.ywt.gapi.drug.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.drug.DrugUsage drugUsage = 11;</code>
     */
    public Builder setDrugUsage(
        int index, com.ywt.gapi.drug.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.drug.DrugUsage drugUsage = 11;</code>
     */
    public Builder addDrugUsage(com.ywt.gapi.drug.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.drug.DrugUsage drugUsage = 11;</code>
     */
    public Builder addDrugUsage(
        int index, com.ywt.gapi.drug.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.drug.DrugUsage drugUsage = 11;</code>
     */
    public Builder addDrugUsage(
        com.ywt.gapi.drug.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.drug.DrugUsage drugUsage = 11;</code>
     */
    public Builder addDrugUsage(
        int index, com.ywt.gapi.drug.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.drug.DrugUsage drugUsage = 11;</code>
     */
    public Builder addAllDrugUsage(
        java.lang.Iterable<? extends com.ywt.gapi.drug.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.drug.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.drug.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.drug.DrugUsage drugUsage = 11;</code>
     */
    public com.ywt.gapi.drug.DrugUsage.Builder getDrugUsageBuilder(
        int index) {
      return getDrugUsageFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
     */
    public com.ywt.gapi.drug.DrugUsageOrBuilder getDrugUsageOrBuilder(
        int index) {
      if (drugUsageBuilder_ == null) {
        return drugUsage_.get(index);  } else {
        return drugUsageBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
     */
    public java.util.List<? extends com.ywt.gapi.drug.DrugUsageOrBuilder> 
         getDrugUsageOrBuilderList() {
      if (drugUsageBuilder_ != null) {
        return drugUsageBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(drugUsage_);
      }
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
     */
    public com.ywt.gapi.drug.DrugUsage.Builder addDrugUsageBuilder() {
      return getDrugUsageFieldBuilder().addBuilder(
          com.ywt.gapi.drug.DrugUsage.getDefaultInstance());
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
     */
    public com.ywt.gapi.drug.DrugUsage.Builder addDrugUsageBuilder(
        int index) {
      return getDrugUsageFieldBuilder().addBuilder(
          index, com.ywt.gapi.drug.DrugUsage.getDefaultInstance());
    }
    /**
     * <pre>
     *药物使用说明
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.drug.DrugUsage drugUsage = 11;</code>
     */
    public java.util.List<com.ywt.gapi.drug.DrugUsage.Builder> 
         getDrugUsageBuilderList() {
      return getDrugUsageFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.drug.DrugUsage, com.ywt.gapi.drug.DrugUsage.Builder, com.ywt.gapi.drug.DrugUsageOrBuilder> 
        getDrugUsageFieldBuilder() {
      if (drugUsageBuilder_ == null) {
        drugUsageBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.ywt.gapi.drug.DrugUsage, com.ywt.gapi.drug.DrugUsage.Builder, com.ywt.gapi.drug.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;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }

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


    // @@protoc_insertion_point(builder_scope:com.ywt.gapi.drug.SavePrescriptionDetailRequest)
  }

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

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

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

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

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

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

}

