/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

    package com.ywt.gapi.taihe.outpaitent;

import org.apache.dubbo.common.stream.StreamObserver;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.rpc.Invoker;
import org.apache.dubbo.rpc.PathResolver;
import org.apache.dubbo.rpc.RpcException;
import org.apache.dubbo.rpc.ServerService;
import org.apache.dubbo.rpc.TriRpcStatus;
import org.apache.dubbo.rpc.model.MethodDescriptor;
import org.apache.dubbo.rpc.model.ServiceDescriptor;
import org.apache.dubbo.rpc.model.StubMethodDescriptor;
import org.apache.dubbo.rpc.model.StubServiceDescriptor;
import org.apache.dubbo.rpc.stub.BiStreamMethodHandler;
import org.apache.dubbo.rpc.stub.ServerStreamMethodHandler;
import org.apache.dubbo.rpc.stub.StubInvocationUtil;
import org.apache.dubbo.rpc.stub.StubInvoker;
import org.apache.dubbo.rpc.stub.StubMethodHandler;
import org.apache.dubbo.rpc.stub.StubSuppliers;
import org.apache.dubbo.rpc.stub.UnaryStubMethodHandler;

import com.google.protobuf.Message;

import java.util.HashMap;
import java.util.Map;
import java.util.function.BiConsumer;
import java.util.concurrent.CompletableFuture;

public final class DubboTaiheOutpatientServiceTriple {

    public static final String SERVICE_NAME = TaiheOutpatientService.SERVICE_NAME;

    private static final StubServiceDescriptor serviceDescriptor = new StubServiceDescriptor(SERVICE_NAME,TaiheOutpatientService.class);

    static {
        org.apache.dubbo.rpc.protocol.tri.service.SchemaDescriptorRegistry.addSchemaDescriptor(SERVICE_NAME,TaiheOutpaitentProto.getDescriptor());
        StubSuppliers.addSupplier(SERVICE_NAME, DubboTaiheOutpatientServiceTriple::newStub);
        StubSuppliers.addSupplier(TaiheOutpatientService.JAVA_SERVICE_NAME,  DubboTaiheOutpatientServiceTriple::newStub);
        StubSuppliers.addDescriptor(SERVICE_NAME, serviceDescriptor);
        StubSuppliers.addDescriptor(TaiheOutpatientService.JAVA_SERVICE_NAME, serviceDescriptor);
    }

    @SuppressWarnings("all")
    public static TaiheOutpatientService newStub(Invoker<?> invoker) {
        return new TaiheOutpatientServiceStub((Invoker<TaiheOutpatientService>)invoker);
    }

    private static final StubMethodDescriptor createOutpatientMethod = new StubMethodDescriptor("createOutpatient",
    CreateOutpatientRequest.class, CreateOutpatientResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), CreateOutpatientRequest::parseFrom,
    CreateOutpatientResponse::parseFrom);

    private static final StubMethodDescriptor createOutpatientAsyncMethod = new StubMethodDescriptor("createOutpatient",
    CreateOutpatientRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), CreateOutpatientRequest::parseFrom,
    CreateOutpatientResponse::parseFrom);

    private static final StubMethodDescriptor createOutpatientProxyAsyncMethod = new StubMethodDescriptor("createOutpatientAsync",
    CreateOutpatientRequest.class, CreateOutpatientResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), CreateOutpatientRequest::parseFrom,
    CreateOutpatientResponse::parseFrom);

    private static final StubMethodDescriptor payCallbackMethod = new StubMethodDescriptor("payCallback",
    PayCallbackRequest.class, PayCallbackResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), PayCallbackRequest::parseFrom,
    PayCallbackResponse::parseFrom);

    private static final StubMethodDescriptor payCallbackAsyncMethod = new StubMethodDescriptor("payCallback",
    PayCallbackRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), PayCallbackRequest::parseFrom,
    PayCallbackResponse::parseFrom);

    private static final StubMethodDescriptor payCallbackProxyAsyncMethod = new StubMethodDescriptor("payCallbackAsync",
    PayCallbackRequest.class, PayCallbackResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), PayCallbackRequest::parseFrom,
    PayCallbackResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientQrcodeMethod = new StubMethodDescriptor("getOutpatientQrcode",
    GetOutpatientQrcodeRequest.class, GetOutpatientQrcodeResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutpatientQrcodeRequest::parseFrom,
    GetOutpatientQrcodeResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientQrcodeAsyncMethod = new StubMethodDescriptor("getOutpatientQrcode",
    GetOutpatientQrcodeRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutpatientQrcodeRequest::parseFrom,
    GetOutpatientQrcodeResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientQrcodeProxyAsyncMethod = new StubMethodDescriptor("getOutpatientQrcodeAsync",
    GetOutpatientQrcodeRequest.class, GetOutpatientQrcodeResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutpatientQrcodeRequest::parseFrom,
    GetOutpatientQrcodeResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientDetailMethod = new StubMethodDescriptor("getOutpatientDetail",
    GetOutpatientDetailRequest.class, GetOutpatientDetailResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutpatientDetailRequest::parseFrom,
    GetOutpatientDetailResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientDetailAsyncMethod = new StubMethodDescriptor("getOutpatientDetail",
    GetOutpatientDetailRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutpatientDetailRequest::parseFrom,
    GetOutpatientDetailResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientDetailProxyAsyncMethod = new StubMethodDescriptor("getOutpatientDetailAsync",
    GetOutpatientDetailRequest.class, GetOutpatientDetailResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutpatientDetailRequest::parseFrom,
    GetOutpatientDetailResponse::parseFrom);

    private static final StubMethodDescriptor updateOutpatientMethod = new StubMethodDescriptor("updateOutpatient",
    UpdateOutpatientRequest.class, UpdateOutpatientResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), UpdateOutpatientRequest::parseFrom,
    UpdateOutpatientResponse::parseFrom);

    private static final StubMethodDescriptor updateOutpatientAsyncMethod = new StubMethodDescriptor("updateOutpatient",
    UpdateOutpatientRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), UpdateOutpatientRequest::parseFrom,
    UpdateOutpatientResponse::parseFrom);

    private static final StubMethodDescriptor updateOutpatientProxyAsyncMethod = new StubMethodDescriptor("updateOutpatientAsync",
    UpdateOutpatientRequest.class, UpdateOutpatientResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), UpdateOutpatientRequest::parseFrom,
    UpdateOutpatientResponse::parseFrom);

    private static final StubMethodDescriptor refundOutpatientCallbackMethod = new StubMethodDescriptor("refundOutpatientCallback",
    RefundOutpatientCallbackRequest.class, RefundOutpatientCallbackResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), RefundOutpatientCallbackRequest::parseFrom,
    RefundOutpatientCallbackResponse::parseFrom);

    private static final StubMethodDescriptor refundOutpatientCallbackAsyncMethod = new StubMethodDescriptor("refundOutpatientCallback",
    RefundOutpatientCallbackRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), RefundOutpatientCallbackRequest::parseFrom,
    RefundOutpatientCallbackResponse::parseFrom);

    private static final StubMethodDescriptor refundOutpatientCallbackProxyAsyncMethod = new StubMethodDescriptor("refundOutpatientCallbackAsync",
    RefundOutpatientCallbackRequest.class, RefundOutpatientCallbackResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), RefundOutpatientCallbackRequest::parseFrom,
    RefundOutpatientCallbackResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientListMethod = new StubMethodDescriptor("getOutpatientList",
    GetOutpatientListRequest.class, GetOutpatientListResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutpatientListRequest::parseFrom,
    GetOutpatientListResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientListAsyncMethod = new StubMethodDescriptor("getOutpatientList",
    GetOutpatientListRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutpatientListRequest::parseFrom,
    GetOutpatientListResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientListProxyAsyncMethod = new StubMethodDescriptor("getOutpatientListAsync",
    GetOutpatientListRequest.class, GetOutpatientListResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutpatientListRequest::parseFrom,
    GetOutpatientListResponse::parseFrom);

    private static final StubMethodDescriptor getMedicalCardInfoByPatientIdMethod = new StubMethodDescriptor("getMedicalCardInfoByPatientId",
    com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest.class, com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse::parseFrom);

    private static final StubMethodDescriptor getMedicalCardInfoByPatientIdAsyncMethod = new StubMethodDescriptor("getMedicalCardInfoByPatientId",
    com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse::parseFrom);

    private static final StubMethodDescriptor getMedicalCardInfoByPatientIdProxyAsyncMethod = new StubMethodDescriptor("getMedicalCardInfoByPatientIdAsync",
    com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest.class, com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientOrderByHisOrderNoMethod = new StubMethodDescriptor("getOutpatientOrderByHisOrderNo",
    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest.class, com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientOrderByHisOrderNoAsyncMethod = new StubMethodDescriptor("getOutpatientOrderByHisOrderNo",
    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientOrderByHisOrderNoProxyAsyncMethod = new StubMethodDescriptor("getOutpatientOrderByHisOrderNoAsync",
    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest.class, com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse::parseFrom);

    private static final StubMethodDescriptor saveOutpatientOrderDetailsMethod = new StubMethodDescriptor("saveOutpatientOrderDetails",
    com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest.class, BaseResult.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest::parseFrom,
    BaseResult::parseFrom);

    private static final StubMethodDescriptor saveOutpatientOrderDetailsAsyncMethod = new StubMethodDescriptor("saveOutpatientOrderDetails",
    com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest::parseFrom,
    BaseResult::parseFrom);

    private static final StubMethodDescriptor saveOutpatientOrderDetailsProxyAsyncMethod = new StubMethodDescriptor("saveOutpatientOrderDetailsAsync",
    com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest.class, BaseResult.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest::parseFrom,
    BaseResult::parseFrom);

    private static final StubMethodDescriptor getOutpatientOrderDetailMethod = new StubMethodDescriptor("getOutpatientOrderDetail",
    GetOutpatientOrderDetailRequest.class, GetOutpatientOrderDetailResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutpatientOrderDetailRequest::parseFrom,
    GetOutpatientOrderDetailResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientOrderDetailAsyncMethod = new StubMethodDescriptor("getOutpatientOrderDetail",
    GetOutpatientOrderDetailRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutpatientOrderDetailRequest::parseFrom,
    GetOutpatientOrderDetailResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientOrderDetailProxyAsyncMethod = new StubMethodDescriptor("getOutpatientOrderDetailAsync",
    GetOutpatientOrderDetailRequest.class, GetOutpatientOrderDetailResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutpatientOrderDetailRequest::parseFrom,
    GetOutpatientOrderDetailResponse::parseFrom);

    private static final StubMethodDescriptor getMedicalCardInfoByIdMethod = new StubMethodDescriptor("getMedicalCardInfoById",
    GetMedicalCardInfoByIdRequest.class, com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetMedicalCardInfoByIdRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse::parseFrom);

    private static final StubMethodDescriptor getMedicalCardInfoByIdAsyncMethod = new StubMethodDescriptor("getMedicalCardInfoById",
    GetMedicalCardInfoByIdRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetMedicalCardInfoByIdRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse::parseFrom);

    private static final StubMethodDescriptor getMedicalCardInfoByIdProxyAsyncMethod = new StubMethodDescriptor("getMedicalCardInfoByIdAsync",
    GetMedicalCardInfoByIdRequest.class, com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetMedicalCardInfoByIdRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse::parseFrom);

    private static final StubMethodDescriptor updateOutpatientOrderMethod = new StubMethodDescriptor("updateOutpatientOrder",
    UpdateOutpatientOrderRequest.class, UpdateOutpatientOrderResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), UpdateOutpatientOrderRequest::parseFrom,
    UpdateOutpatientOrderResponse::parseFrom);

    private static final StubMethodDescriptor updateOutpatientOrderAsyncMethod = new StubMethodDescriptor("updateOutpatientOrder",
    UpdateOutpatientOrderRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), UpdateOutpatientOrderRequest::parseFrom,
    UpdateOutpatientOrderResponse::parseFrom);

    private static final StubMethodDescriptor updateOutpatientOrderProxyAsyncMethod = new StubMethodDescriptor("updateOutpatientOrderAsync",
    UpdateOutpatientOrderRequest.class, UpdateOutpatientOrderResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), UpdateOutpatientOrderRequest::parseFrom,
    UpdateOutpatientOrderResponse::parseFrom);

    private static final StubMethodDescriptor getLatestOutpatientOrderMethod = new StubMethodDescriptor("getLatestOutpatientOrder",
    GetLatestOutpatientOrderRequest.class, GetLatestOutpatientOrderResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetLatestOutpatientOrderRequest::parseFrom,
    GetLatestOutpatientOrderResponse::parseFrom);

    private static final StubMethodDescriptor getLatestOutpatientOrderAsyncMethod = new StubMethodDescriptor("getLatestOutpatientOrder",
    GetLatestOutpatientOrderRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetLatestOutpatientOrderRequest::parseFrom,
    GetLatestOutpatientOrderResponse::parseFrom);

    private static final StubMethodDescriptor getLatestOutpatientOrderProxyAsyncMethod = new StubMethodDescriptor("getLatestOutpatientOrderAsync",
    GetLatestOutpatientOrderRequest.class, GetLatestOutpatientOrderResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetLatestOutpatientOrderRequest::parseFrom,
    GetLatestOutpatientOrderResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientConfigsMethod = new StubMethodDescriptor("getOutpatientConfigs",
    GetOutPatientConfigRequest.class, GetOutPatientConfigResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutPatientConfigRequest::parseFrom,
    GetOutPatientConfigResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientConfigsAsyncMethod = new StubMethodDescriptor("getOutpatientConfigs",
    GetOutPatientConfigRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutPatientConfigRequest::parseFrom,
    GetOutPatientConfigResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientConfigsProxyAsyncMethod = new StubMethodDescriptor("getOutpatientConfigsAsync",
    GetOutPatientConfigRequest.class, GetOutPatientConfigResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), GetOutPatientConfigRequest::parseFrom,
    GetOutPatientConfigResponse::parseFrom);

    private static final StubMethodDescriptor checkHasOutstandingOutpatientOrderMethod = new StubMethodDescriptor("checkHasOutstandingOutpatientOrder",
    com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest.class, com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse::parseFrom);

    private static final StubMethodDescriptor checkHasOutstandingOutpatientOrderAsyncMethod = new StubMethodDescriptor("checkHasOutstandingOutpatientOrder",
    com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse::parseFrom);

    private static final StubMethodDescriptor checkHasOutstandingOutpatientOrderProxyAsyncMethod = new StubMethodDescriptor("checkHasOutstandingOutpatientOrderAsync",
    com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest.class, com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientOrderByInvoiceNoMethod = new StubMethodDescriptor("getOutpatientOrderByInvoiceNo",
    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest.class, com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientOrderByInvoiceNoAsyncMethod = new StubMethodDescriptor("getOutpatientOrderByInvoiceNo",
    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest.class, CompletableFuture.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse::parseFrom);

    private static final StubMethodDescriptor getOutpatientOrderByInvoiceNoProxyAsyncMethod = new StubMethodDescriptor("getOutpatientOrderByInvoiceNoAsync",
    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest.class, com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse.class, serviceDescriptor, MethodDescriptor.RpcType.UNARY,
    obj -> ((Message) obj).toByteArray(), obj -> ((Message) obj).toByteArray(), com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest::parseFrom,
    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse::parseFrom);





    public static class TaiheOutpatientServiceStub implements TaiheOutpatientService{
        private final Invoker<TaiheOutpatientService> invoker;

        public TaiheOutpatientServiceStub(Invoker<TaiheOutpatientService> invoker) {
            this.invoker = invoker;
        }

        @Override
        public CreateOutpatientResponse createOutpatient(CreateOutpatientRequest request){
            return StubInvocationUtil.unaryCall(invoker, createOutpatientMethod, request);
        }

        public CompletableFuture<CreateOutpatientResponse> createOutpatientAsync(CreateOutpatientRequest request){
            return StubInvocationUtil.unaryCall(invoker, createOutpatientAsyncMethod, request);
        }

        @Override
        public void createOutpatient(CreateOutpatientRequest request, StreamObserver<CreateOutpatientResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, createOutpatientMethod , request, responseObserver);
        }
        @Override
        public PayCallbackResponse payCallback(PayCallbackRequest request){
            return StubInvocationUtil.unaryCall(invoker, payCallbackMethod, request);
        }

        public CompletableFuture<PayCallbackResponse> payCallbackAsync(PayCallbackRequest request){
            return StubInvocationUtil.unaryCall(invoker, payCallbackAsyncMethod, request);
        }

        @Override
        public void payCallback(PayCallbackRequest request, StreamObserver<PayCallbackResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, payCallbackMethod , request, responseObserver);
        }
        @Override
        public GetOutpatientQrcodeResponse getOutpatientQrcode(GetOutpatientQrcodeRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientQrcodeMethod, request);
        }

        public CompletableFuture<GetOutpatientQrcodeResponse> getOutpatientQrcodeAsync(GetOutpatientQrcodeRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientQrcodeAsyncMethod, request);
        }

        @Override
        public void getOutpatientQrcode(GetOutpatientQrcodeRequest request, StreamObserver<GetOutpatientQrcodeResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, getOutpatientQrcodeMethod , request, responseObserver);
        }
        @Override
        public GetOutpatientDetailResponse getOutpatientDetail(GetOutpatientDetailRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientDetailMethod, request);
        }

        public CompletableFuture<GetOutpatientDetailResponse> getOutpatientDetailAsync(GetOutpatientDetailRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientDetailAsyncMethod, request);
        }

        @Override
        public void getOutpatientDetail(GetOutpatientDetailRequest request, StreamObserver<GetOutpatientDetailResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, getOutpatientDetailMethod , request, responseObserver);
        }
        @Override
        public UpdateOutpatientResponse updateOutpatient(UpdateOutpatientRequest request){
            return StubInvocationUtil.unaryCall(invoker, updateOutpatientMethod, request);
        }

        public CompletableFuture<UpdateOutpatientResponse> updateOutpatientAsync(UpdateOutpatientRequest request){
            return StubInvocationUtil.unaryCall(invoker, updateOutpatientAsyncMethod, request);
        }

        @Override
        public void updateOutpatient(UpdateOutpatientRequest request, StreamObserver<UpdateOutpatientResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, updateOutpatientMethod , request, responseObserver);
        }
        @Override
        public RefundOutpatientCallbackResponse refundOutpatientCallback(RefundOutpatientCallbackRequest request){
            return StubInvocationUtil.unaryCall(invoker, refundOutpatientCallbackMethod, request);
        }

        public CompletableFuture<RefundOutpatientCallbackResponse> refundOutpatientCallbackAsync(RefundOutpatientCallbackRequest request){
            return StubInvocationUtil.unaryCall(invoker, refundOutpatientCallbackAsyncMethod, request);
        }

        @Override
        public void refundOutpatientCallback(RefundOutpatientCallbackRequest request, StreamObserver<RefundOutpatientCallbackResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, refundOutpatientCallbackMethod , request, responseObserver);
        }
        @Override
        public GetOutpatientListResponse getOutpatientList(GetOutpatientListRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientListMethod, request);
        }

        public CompletableFuture<GetOutpatientListResponse> getOutpatientListAsync(GetOutpatientListRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientListAsyncMethod, request);
        }

        @Override
        public void getOutpatientList(GetOutpatientListRequest request, StreamObserver<GetOutpatientListResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, getOutpatientListMethod , request, responseObserver);
        }
        @Override
        public com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse getMedicalCardInfoByPatientId(com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest request){
            return StubInvocationUtil.unaryCall(invoker, getMedicalCardInfoByPatientIdMethod, request);
        }

        public CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse> getMedicalCardInfoByPatientIdAsync(com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest request){
            return StubInvocationUtil.unaryCall(invoker, getMedicalCardInfoByPatientIdAsyncMethod, request);
        }

        @Override
        public void getMedicalCardInfoByPatientId(com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, getMedicalCardInfoByPatientIdMethod , request, responseObserver);
        }
        @Override
        public com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse getOutpatientOrderByHisOrderNo(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientOrderByHisOrderNoMethod, request);
        }

        public CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse> getOutpatientOrderByHisOrderNoAsync(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientOrderByHisOrderNoAsyncMethod, request);
        }

        @Override
        public void getOutpatientOrderByHisOrderNo(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, getOutpatientOrderByHisOrderNoMethod , request, responseObserver);
        }
        @Override
        public BaseResult saveOutpatientOrderDetails(com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest request){
            return StubInvocationUtil.unaryCall(invoker, saveOutpatientOrderDetailsMethod, request);
        }

        public CompletableFuture<BaseResult> saveOutpatientOrderDetailsAsync(com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest request){
            return StubInvocationUtil.unaryCall(invoker, saveOutpatientOrderDetailsAsyncMethod, request);
        }

        @Override
        public void saveOutpatientOrderDetails(com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest request, StreamObserver<BaseResult> responseObserver){
            StubInvocationUtil.unaryCall(invoker, saveOutpatientOrderDetailsMethod , request, responseObserver);
        }
        @Override
        public GetOutpatientOrderDetailResponse getOutpatientOrderDetail(GetOutpatientOrderDetailRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientOrderDetailMethod, request);
        }

        public CompletableFuture<GetOutpatientOrderDetailResponse> getOutpatientOrderDetailAsync(GetOutpatientOrderDetailRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientOrderDetailAsyncMethod, request);
        }

        @Override
        public void getOutpatientOrderDetail(GetOutpatientOrderDetailRequest request, StreamObserver<GetOutpatientOrderDetailResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, getOutpatientOrderDetailMethod , request, responseObserver);
        }
        @Override
        public com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse getMedicalCardInfoById(GetMedicalCardInfoByIdRequest request){
            return StubInvocationUtil.unaryCall(invoker, getMedicalCardInfoByIdMethod, request);
        }

        public CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse> getMedicalCardInfoByIdAsync(GetMedicalCardInfoByIdRequest request){
            return StubInvocationUtil.unaryCall(invoker, getMedicalCardInfoByIdAsyncMethod, request);
        }

        @Override
        public void getMedicalCardInfoById(GetMedicalCardInfoByIdRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, getMedicalCardInfoByIdMethod , request, responseObserver);
        }
        @Override
        public UpdateOutpatientOrderResponse updateOutpatientOrder(UpdateOutpatientOrderRequest request){
            return StubInvocationUtil.unaryCall(invoker, updateOutpatientOrderMethod, request);
        }

        public CompletableFuture<UpdateOutpatientOrderResponse> updateOutpatientOrderAsync(UpdateOutpatientOrderRequest request){
            return StubInvocationUtil.unaryCall(invoker, updateOutpatientOrderAsyncMethod, request);
        }

        @Override
        public void updateOutpatientOrder(UpdateOutpatientOrderRequest request, StreamObserver<UpdateOutpatientOrderResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, updateOutpatientOrderMethod , request, responseObserver);
        }
        @Override
        public GetLatestOutpatientOrderResponse getLatestOutpatientOrder(GetLatestOutpatientOrderRequest request){
            return StubInvocationUtil.unaryCall(invoker, getLatestOutpatientOrderMethod, request);
        }

        public CompletableFuture<GetLatestOutpatientOrderResponse> getLatestOutpatientOrderAsync(GetLatestOutpatientOrderRequest request){
            return StubInvocationUtil.unaryCall(invoker, getLatestOutpatientOrderAsyncMethod, request);
        }

        @Override
        public void getLatestOutpatientOrder(GetLatestOutpatientOrderRequest request, StreamObserver<GetLatestOutpatientOrderResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, getLatestOutpatientOrderMethod , request, responseObserver);
        }
        @Override
        public GetOutPatientConfigResponse getOutpatientConfigs(GetOutPatientConfigRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientConfigsMethod, request);
        }

        public CompletableFuture<GetOutPatientConfigResponse> getOutpatientConfigsAsync(GetOutPatientConfigRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientConfigsAsyncMethod, request);
        }

        @Override
        public void getOutpatientConfigs(GetOutPatientConfigRequest request, StreamObserver<GetOutPatientConfigResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, getOutpatientConfigsMethod , request, responseObserver);
        }
        @Override
        public com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse checkHasOutstandingOutpatientOrder(com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest request){
            return StubInvocationUtil.unaryCall(invoker, checkHasOutstandingOutpatientOrderMethod, request);
        }

        public CompletableFuture<com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse> checkHasOutstandingOutpatientOrderAsync(com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest request){
            return StubInvocationUtil.unaryCall(invoker, checkHasOutstandingOutpatientOrderAsyncMethod, request);
        }

        @Override
        public void checkHasOutstandingOutpatientOrder(com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, checkHasOutstandingOutpatientOrderMethod , request, responseObserver);
        }
        @Override
        public com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse getOutpatientOrderByInvoiceNo(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientOrderByInvoiceNoMethod, request);
        }

        public CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse> getOutpatientOrderByInvoiceNoAsync(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest request){
            return StubInvocationUtil.unaryCall(invoker, getOutpatientOrderByInvoiceNoAsyncMethod, request);
        }

        @Override
        public void getOutpatientOrderByInvoiceNo(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse> responseObserver){
            StubInvocationUtil.unaryCall(invoker, getOutpatientOrderByInvoiceNoMethod , request, responseObserver);
        }



    }

    public static abstract class TaiheOutpatientServiceImplBase implements TaiheOutpatientService, ServerService<TaiheOutpatientService> {

        private <T, R> BiConsumer<T, StreamObserver<R>> syncToAsync(java.util.function.Function<T, R> syncFun) {
            return new BiConsumer<T, StreamObserver<R>>() {
                @Override
                public void accept(T t, StreamObserver<R> observer) {
                    try {
                        R ret = syncFun.apply(t);
                        observer.onNext(ret);
                        observer.onCompleted();
                    } catch (Throwable e) {
                        observer.onError(e);
                    }
                }
            };
        }

        @Override
        public final Invoker<TaiheOutpatientService> getInvoker(URL url) {
            PathResolver pathResolver = url.getOrDefaultFrameworkModel()
            .getExtensionLoader(PathResolver.class)
            .getDefaultExtension();
            Map<String,StubMethodHandler<?, ?>> handlers = new HashMap<>();

            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/createOutpatient" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/createOutpatientAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/payCallback" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/payCallbackAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientQrcode" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientQrcodeAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientDetail" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientDetailAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/updateOutpatient" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/updateOutpatientAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/refundOutpatientCallback" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/refundOutpatientCallbackAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientList" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientListAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getMedicalCardInfoByPatientId" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getMedicalCardInfoByPatientIdAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientOrderByHisOrderNo" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientOrderByHisOrderNoAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/saveOutpatientOrderDetails" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/saveOutpatientOrderDetailsAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientOrderDetail" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientOrderDetailAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getMedicalCardInfoById" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getMedicalCardInfoByIdAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/updateOutpatientOrder" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/updateOutpatientOrderAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getLatestOutpatientOrder" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getLatestOutpatientOrderAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientConfigs" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientConfigsAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/checkHasOutstandingOutpatientOrder" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/checkHasOutstandingOutpatientOrderAsync" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientOrderByInvoiceNo" );
            pathResolver.addNativeStub( "/" + SERVICE_NAME + "/getOutpatientOrderByInvoiceNoAsync" );

            BiConsumer<CreateOutpatientRequest, StreamObserver<CreateOutpatientResponse>> createOutpatientFunc = this::createOutpatient;
            handlers.put(createOutpatientMethod.getMethodName(), new UnaryStubMethodHandler<>(createOutpatientFunc));
            BiConsumer<CreateOutpatientRequest, StreamObserver<CreateOutpatientResponse>> createOutpatientAsyncFunc = syncToAsync(this::createOutpatient);
            handlers.put(createOutpatientProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(createOutpatientAsyncFunc));
            BiConsumer<PayCallbackRequest, StreamObserver<PayCallbackResponse>> payCallbackFunc = this::payCallback;
            handlers.put(payCallbackMethod.getMethodName(), new UnaryStubMethodHandler<>(payCallbackFunc));
            BiConsumer<PayCallbackRequest, StreamObserver<PayCallbackResponse>> payCallbackAsyncFunc = syncToAsync(this::payCallback);
            handlers.put(payCallbackProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(payCallbackAsyncFunc));
            BiConsumer<GetOutpatientQrcodeRequest, StreamObserver<GetOutpatientQrcodeResponse>> getOutpatientQrcodeFunc = this::getOutpatientQrcode;
            handlers.put(getOutpatientQrcodeMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientQrcodeFunc));
            BiConsumer<GetOutpatientQrcodeRequest, StreamObserver<GetOutpatientQrcodeResponse>> getOutpatientQrcodeAsyncFunc = syncToAsync(this::getOutpatientQrcode);
            handlers.put(getOutpatientQrcodeProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientQrcodeAsyncFunc));
            BiConsumer<GetOutpatientDetailRequest, StreamObserver<GetOutpatientDetailResponse>> getOutpatientDetailFunc = this::getOutpatientDetail;
            handlers.put(getOutpatientDetailMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientDetailFunc));
            BiConsumer<GetOutpatientDetailRequest, StreamObserver<GetOutpatientDetailResponse>> getOutpatientDetailAsyncFunc = syncToAsync(this::getOutpatientDetail);
            handlers.put(getOutpatientDetailProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientDetailAsyncFunc));
            BiConsumer<UpdateOutpatientRequest, StreamObserver<UpdateOutpatientResponse>> updateOutpatientFunc = this::updateOutpatient;
            handlers.put(updateOutpatientMethod.getMethodName(), new UnaryStubMethodHandler<>(updateOutpatientFunc));
            BiConsumer<UpdateOutpatientRequest, StreamObserver<UpdateOutpatientResponse>> updateOutpatientAsyncFunc = syncToAsync(this::updateOutpatient);
            handlers.put(updateOutpatientProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(updateOutpatientAsyncFunc));
            BiConsumer<RefundOutpatientCallbackRequest, StreamObserver<RefundOutpatientCallbackResponse>> refundOutpatientCallbackFunc = this::refundOutpatientCallback;
            handlers.put(refundOutpatientCallbackMethod.getMethodName(), new UnaryStubMethodHandler<>(refundOutpatientCallbackFunc));
            BiConsumer<RefundOutpatientCallbackRequest, StreamObserver<RefundOutpatientCallbackResponse>> refundOutpatientCallbackAsyncFunc = syncToAsync(this::refundOutpatientCallback);
            handlers.put(refundOutpatientCallbackProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(refundOutpatientCallbackAsyncFunc));
            BiConsumer<GetOutpatientListRequest, StreamObserver<GetOutpatientListResponse>> getOutpatientListFunc = this::getOutpatientList;
            handlers.put(getOutpatientListMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientListFunc));
            BiConsumer<GetOutpatientListRequest, StreamObserver<GetOutpatientListResponse>> getOutpatientListAsyncFunc = syncToAsync(this::getOutpatientList);
            handlers.put(getOutpatientListProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientListAsyncFunc));
            BiConsumer<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse>> getMedicalCardInfoByPatientIdFunc = this::getMedicalCardInfoByPatientId;
            handlers.put(getMedicalCardInfoByPatientIdMethod.getMethodName(), new UnaryStubMethodHandler<>(getMedicalCardInfoByPatientIdFunc));
            BiConsumer<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse>> getMedicalCardInfoByPatientIdAsyncFunc = syncToAsync(this::getMedicalCardInfoByPatientId);
            handlers.put(getMedicalCardInfoByPatientIdProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(getMedicalCardInfoByPatientIdAsyncFunc));
            BiConsumer<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse>> getOutpatientOrderByHisOrderNoFunc = this::getOutpatientOrderByHisOrderNo;
            handlers.put(getOutpatientOrderByHisOrderNoMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientOrderByHisOrderNoFunc));
            BiConsumer<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse>> getOutpatientOrderByHisOrderNoAsyncFunc = syncToAsync(this::getOutpatientOrderByHisOrderNo);
            handlers.put(getOutpatientOrderByHisOrderNoProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientOrderByHisOrderNoAsyncFunc));
            BiConsumer<com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest, StreamObserver<BaseResult>> saveOutpatientOrderDetailsFunc = this::saveOutpatientOrderDetails;
            handlers.put(saveOutpatientOrderDetailsMethod.getMethodName(), new UnaryStubMethodHandler<>(saveOutpatientOrderDetailsFunc));
            BiConsumer<com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest, StreamObserver<BaseResult>> saveOutpatientOrderDetailsAsyncFunc = syncToAsync(this::saveOutpatientOrderDetails);
            handlers.put(saveOutpatientOrderDetailsProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(saveOutpatientOrderDetailsAsyncFunc));
            BiConsumer<GetOutpatientOrderDetailRequest, StreamObserver<GetOutpatientOrderDetailResponse>> getOutpatientOrderDetailFunc = this::getOutpatientOrderDetail;
            handlers.put(getOutpatientOrderDetailMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientOrderDetailFunc));
            BiConsumer<GetOutpatientOrderDetailRequest, StreamObserver<GetOutpatientOrderDetailResponse>> getOutpatientOrderDetailAsyncFunc = syncToAsync(this::getOutpatientOrderDetail);
            handlers.put(getOutpatientOrderDetailProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientOrderDetailAsyncFunc));
            BiConsumer<GetMedicalCardInfoByIdRequest, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse>> getMedicalCardInfoByIdFunc = this::getMedicalCardInfoById;
            handlers.put(getMedicalCardInfoByIdMethod.getMethodName(), new UnaryStubMethodHandler<>(getMedicalCardInfoByIdFunc));
            BiConsumer<GetMedicalCardInfoByIdRequest, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse>> getMedicalCardInfoByIdAsyncFunc = syncToAsync(this::getMedicalCardInfoById);
            handlers.put(getMedicalCardInfoByIdProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(getMedicalCardInfoByIdAsyncFunc));
            BiConsumer<UpdateOutpatientOrderRequest, StreamObserver<UpdateOutpatientOrderResponse>> updateOutpatientOrderFunc = this::updateOutpatientOrder;
            handlers.put(updateOutpatientOrderMethod.getMethodName(), new UnaryStubMethodHandler<>(updateOutpatientOrderFunc));
            BiConsumer<UpdateOutpatientOrderRequest, StreamObserver<UpdateOutpatientOrderResponse>> updateOutpatientOrderAsyncFunc = syncToAsync(this::updateOutpatientOrder);
            handlers.put(updateOutpatientOrderProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(updateOutpatientOrderAsyncFunc));
            BiConsumer<GetLatestOutpatientOrderRequest, StreamObserver<GetLatestOutpatientOrderResponse>> getLatestOutpatientOrderFunc = this::getLatestOutpatientOrder;
            handlers.put(getLatestOutpatientOrderMethod.getMethodName(), new UnaryStubMethodHandler<>(getLatestOutpatientOrderFunc));
            BiConsumer<GetLatestOutpatientOrderRequest, StreamObserver<GetLatestOutpatientOrderResponse>> getLatestOutpatientOrderAsyncFunc = syncToAsync(this::getLatestOutpatientOrder);
            handlers.put(getLatestOutpatientOrderProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(getLatestOutpatientOrderAsyncFunc));
            BiConsumer<GetOutPatientConfigRequest, StreamObserver<GetOutPatientConfigResponse>> getOutpatientConfigsFunc = this::getOutpatientConfigs;
            handlers.put(getOutpatientConfigsMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientConfigsFunc));
            BiConsumer<GetOutPatientConfigRequest, StreamObserver<GetOutPatientConfigResponse>> getOutpatientConfigsAsyncFunc = syncToAsync(this::getOutpatientConfigs);
            handlers.put(getOutpatientConfigsProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientConfigsAsyncFunc));
            BiConsumer<com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest, StreamObserver<com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse>> checkHasOutstandingOutpatientOrderFunc = this::checkHasOutstandingOutpatientOrder;
            handlers.put(checkHasOutstandingOutpatientOrderMethod.getMethodName(), new UnaryStubMethodHandler<>(checkHasOutstandingOutpatientOrderFunc));
            BiConsumer<com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest, StreamObserver<com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse>> checkHasOutstandingOutpatientOrderAsyncFunc = syncToAsync(this::checkHasOutstandingOutpatientOrder);
            handlers.put(checkHasOutstandingOutpatientOrderProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(checkHasOutstandingOutpatientOrderAsyncFunc));
            BiConsumer<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse>> getOutpatientOrderByInvoiceNoFunc = this::getOutpatientOrderByInvoiceNo;
            handlers.put(getOutpatientOrderByInvoiceNoMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientOrderByInvoiceNoFunc));
            BiConsumer<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse>> getOutpatientOrderByInvoiceNoAsyncFunc = syncToAsync(this::getOutpatientOrderByInvoiceNo);
            handlers.put(getOutpatientOrderByInvoiceNoProxyAsyncMethod.getMethodName(), new UnaryStubMethodHandler<>(getOutpatientOrderByInvoiceNoAsyncFunc));




            return new StubInvoker<>(this, url, TaiheOutpatientService.class, handlers);
        }


        @Override
        public CreateOutpatientResponse createOutpatient(CreateOutpatientRequest request){
            throw unimplementedMethodException(createOutpatientMethod);
        }

        @Override
        public PayCallbackResponse payCallback(PayCallbackRequest request){
            throw unimplementedMethodException(payCallbackMethod);
        }

        @Override
        public GetOutpatientQrcodeResponse getOutpatientQrcode(GetOutpatientQrcodeRequest request){
            throw unimplementedMethodException(getOutpatientQrcodeMethod);
        }

        @Override
        public GetOutpatientDetailResponse getOutpatientDetail(GetOutpatientDetailRequest request){
            throw unimplementedMethodException(getOutpatientDetailMethod);
        }

        @Override
        public UpdateOutpatientResponse updateOutpatient(UpdateOutpatientRequest request){
            throw unimplementedMethodException(updateOutpatientMethod);
        }

        @Override
        public RefundOutpatientCallbackResponse refundOutpatientCallback(RefundOutpatientCallbackRequest request){
            throw unimplementedMethodException(refundOutpatientCallbackMethod);
        }

        @Override
        public GetOutpatientListResponse getOutpatientList(GetOutpatientListRequest request){
            throw unimplementedMethodException(getOutpatientListMethod);
        }

        @Override
        public com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse getMedicalCardInfoByPatientId(com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest request){
            throw unimplementedMethodException(getMedicalCardInfoByPatientIdMethod);
        }

        @Override
        public com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse getOutpatientOrderByHisOrderNo(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest request){
            throw unimplementedMethodException(getOutpatientOrderByHisOrderNoMethod);
        }

        @Override
        public BaseResult saveOutpatientOrderDetails(com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest request){
            throw unimplementedMethodException(saveOutpatientOrderDetailsMethod);
        }

        @Override
        public GetOutpatientOrderDetailResponse getOutpatientOrderDetail(GetOutpatientOrderDetailRequest request){
            throw unimplementedMethodException(getOutpatientOrderDetailMethod);
        }

        @Override
        public com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse getMedicalCardInfoById(GetMedicalCardInfoByIdRequest request){
            throw unimplementedMethodException(getMedicalCardInfoByIdMethod);
        }

        @Override
        public UpdateOutpatientOrderResponse updateOutpatientOrder(UpdateOutpatientOrderRequest request){
            throw unimplementedMethodException(updateOutpatientOrderMethod);
        }

        @Override
        public GetLatestOutpatientOrderResponse getLatestOutpatientOrder(GetLatestOutpatientOrderRequest request){
            throw unimplementedMethodException(getLatestOutpatientOrderMethod);
        }

        @Override
        public GetOutPatientConfigResponse getOutpatientConfigs(GetOutPatientConfigRequest request){
            throw unimplementedMethodException(getOutpatientConfigsMethod);
        }

        @Override
        public com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse checkHasOutstandingOutpatientOrder(com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest request){
            throw unimplementedMethodException(checkHasOutstandingOutpatientOrderMethod);
        }

        @Override
        public com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse getOutpatientOrderByInvoiceNo(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest request){
            throw unimplementedMethodException(getOutpatientOrderByInvoiceNoMethod);
        }





        @Override
        public final ServiceDescriptor getServiceDescriptor() {
            return serviceDescriptor;
        }
        private RpcException unimplementedMethodException(StubMethodDescriptor methodDescriptor) {
            return TriRpcStatus.UNIMPLEMENTED.withDescription(String.format("Method %s is unimplemented",
                "/" + serviceDescriptor.getInterfaceName() + "/" + methodDescriptor.getMethodName())).asException();
        }
    }

}
