/*
* 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 com.google.protobuf.Message;

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

public interface TaiheOutpatientService extends org.apache.dubbo.rpc.model.DubboStub {

    String JAVA_SERVICE_NAME = "com.ywt.gapi.taihe.outpaitent.TaiheOutpatientService";
    String SERVICE_NAME = "com.ywt.gapi.taihe.outpaitent.TaiheOutpatientService";

    com.ywt.gapi.taihe.outpaitent.CreateOutpatientResponse createOutpatient(com.ywt.gapi.taihe.outpaitent.CreateOutpatientRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.CreateOutpatientResponse> createOutpatientAsync(com.ywt.gapi.taihe.outpaitent.CreateOutpatientRequest request){
        return CompletableFuture.completedFuture(createOutpatient(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void createOutpatient(com.ywt.gapi.taihe.outpaitent.CreateOutpatientRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.CreateOutpatientResponse> responseObserver){
        createOutpatientAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.PayCallbackResponse payCallback(com.ywt.gapi.taihe.outpaitent.PayCallbackRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.PayCallbackResponse> payCallbackAsync(com.ywt.gapi.taihe.outpaitent.PayCallbackRequest request){
        return CompletableFuture.completedFuture(payCallback(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void payCallback(com.ywt.gapi.taihe.outpaitent.PayCallbackRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.PayCallbackResponse> responseObserver){
        payCallbackAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.GetOutpatientQrcodeResponse getOutpatientQrcode(com.ywt.gapi.taihe.outpaitent.GetOutpatientQrcodeRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetOutpatientQrcodeResponse> getOutpatientQrcodeAsync(com.ywt.gapi.taihe.outpaitent.GetOutpatientQrcodeRequest request){
        return CompletableFuture.completedFuture(getOutpatientQrcode(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getOutpatientQrcode(com.ywt.gapi.taihe.outpaitent.GetOutpatientQrcodeRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetOutpatientQrcodeResponse> responseObserver){
        getOutpatientQrcodeAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.GetOutpatientDetailResponse getOutpatientDetail(com.ywt.gapi.taihe.outpaitent.GetOutpatientDetailRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetOutpatientDetailResponse> getOutpatientDetailAsync(com.ywt.gapi.taihe.outpaitent.GetOutpatientDetailRequest request){
        return CompletableFuture.completedFuture(getOutpatientDetail(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getOutpatientDetail(com.ywt.gapi.taihe.outpaitent.GetOutpatientDetailRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetOutpatientDetailResponse> responseObserver){
        getOutpatientDetailAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.UpdateOutpatientResponse updateOutpatient(com.ywt.gapi.taihe.outpaitent.UpdateOutpatientRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.UpdateOutpatientResponse> updateOutpatientAsync(com.ywt.gapi.taihe.outpaitent.UpdateOutpatientRequest request){
        return CompletableFuture.completedFuture(updateOutpatient(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void updateOutpatient(com.ywt.gapi.taihe.outpaitent.UpdateOutpatientRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.UpdateOutpatientResponse> responseObserver){
        updateOutpatientAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.RefundOutpatientCallbackResponse refundOutpatientCallback(com.ywt.gapi.taihe.outpaitent.RefundOutpatientCallbackRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.RefundOutpatientCallbackResponse> refundOutpatientCallbackAsync(com.ywt.gapi.taihe.outpaitent.RefundOutpatientCallbackRequest request){
        return CompletableFuture.completedFuture(refundOutpatientCallback(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void refundOutpatientCallback(com.ywt.gapi.taihe.outpaitent.RefundOutpatientCallbackRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.RefundOutpatientCallbackResponse> responseObserver){
        refundOutpatientCallbackAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.GetOutpatientListResponse getOutpatientList(com.ywt.gapi.taihe.outpaitent.GetOutpatientListRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetOutpatientListResponse> getOutpatientListAsync(com.ywt.gapi.taihe.outpaitent.GetOutpatientListRequest request){
        return CompletableFuture.completedFuture(getOutpatientList(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getOutpatientList(com.ywt.gapi.taihe.outpaitent.GetOutpatientListRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetOutpatientListResponse> responseObserver){
        getOutpatientListAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse getMedicalCardInfoByPatientId(com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse> getMedicalCardInfoByPatientIdAsync(com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest request){
        return CompletableFuture.completedFuture(getMedicalCardInfoByPatientId(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getMedicalCardInfoByPatientId(com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse> responseObserver){
        getMedicalCardInfoByPatientIdAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse getOutpatientOrderByHisOrderNo(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse> getOutpatientOrderByHisOrderNoAsync(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest request){
        return CompletableFuture.completedFuture(getOutpatientOrderByHisOrderNo(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getOutpatientOrderByHisOrderNo(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderByHisOrderNoResponse> responseObserver){
        getOutpatientOrderByHisOrderNoAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.BaseResult saveOutpatientOrderDetails(com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.BaseResult> saveOutpatientOrderDetailsAsync(com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest request){
        return CompletableFuture.completedFuture(saveOutpatientOrderDetails(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void saveOutpatientOrderDetails(com.ywt.gapi.taihe.outpaitent.SaveOutpatientOrderDetailsRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.BaseResult> responseObserver){
        saveOutpatientOrderDetailsAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailResponse getOutpatientOrderDetail(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailResponse> getOutpatientOrderDetailAsync(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailRequest request){
        return CompletableFuture.completedFuture(getOutpatientOrderDetail(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getOutpatientOrderDetail(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailResponse> responseObserver){
        getOutpatientOrderDetailAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse getMedicalCardInfoById(com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByIdRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse> getMedicalCardInfoByIdAsync(com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByIdRequest request){
        return CompletableFuture.completedFuture(getMedicalCardInfoById(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getMedicalCardInfoById(com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByIdRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetMedicalCardInfoByPatientIdResponse> responseObserver){
        getMedicalCardInfoByIdAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.UpdateOutpatientOrderResponse updateOutpatientOrder(com.ywt.gapi.taihe.outpaitent.UpdateOutpatientOrderRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.UpdateOutpatientOrderResponse> updateOutpatientOrderAsync(com.ywt.gapi.taihe.outpaitent.UpdateOutpatientOrderRequest request){
        return CompletableFuture.completedFuture(updateOutpatientOrder(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void updateOutpatientOrder(com.ywt.gapi.taihe.outpaitent.UpdateOutpatientOrderRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.UpdateOutpatientOrderResponse> responseObserver){
        updateOutpatientOrderAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.GetLatestOutpatientOrderResponse getLatestOutpatientOrder(com.ywt.gapi.taihe.outpaitent.GetLatestOutpatientOrderRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetLatestOutpatientOrderResponse> getLatestOutpatientOrderAsync(com.ywt.gapi.taihe.outpaitent.GetLatestOutpatientOrderRequest request){
        return CompletableFuture.completedFuture(getLatestOutpatientOrder(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getLatestOutpatientOrder(com.ywt.gapi.taihe.outpaitent.GetLatestOutpatientOrderRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetLatestOutpatientOrderResponse> responseObserver){
        getLatestOutpatientOrderAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.GetOutPatientConfigResponse getOutpatientConfigs(com.ywt.gapi.taihe.outpaitent.GetOutPatientConfigRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetOutPatientConfigResponse> getOutpatientConfigsAsync(com.ywt.gapi.taihe.outpaitent.GetOutPatientConfigRequest request){
        return CompletableFuture.completedFuture(getOutpatientConfigs(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getOutpatientConfigs(com.ywt.gapi.taihe.outpaitent.GetOutPatientConfigRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetOutPatientConfigResponse> responseObserver){
        getOutpatientConfigsAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse checkHasOutstandingOutpatientOrder(com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse> checkHasOutstandingOutpatientOrderAsync(com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest request){
        return CompletableFuture.completedFuture(checkHasOutstandingOutpatientOrder(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void checkHasOutstandingOutpatientOrder(com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.CheckHasOutstandingOutpatientOrderResponse> responseObserver){
        checkHasOutstandingOutpatientOrderAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }

    com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse getOutpatientOrderByInvoiceNo(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest request);

    default CompletableFuture<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse> getOutpatientOrderByInvoiceNoAsync(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest request){
        return CompletableFuture.completedFuture(getOutpatientOrderByInvoiceNo(request));
    }

    /**
    * This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
    * It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
    */
    default void getOutpatientOrderByInvoiceNo(com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceRequest request, StreamObserver<com.ywt.gapi.taihe.outpaitent.GetOutpatientOrderDetailByInvoiceResponse> responseObserver){
        getOutpatientOrderByInvoiceNoAsync(request).whenComplete((r, t) -> {
            if (t != null) {
                responseObserver.onError(t);
            } else {
                responseObserver.onNext(r);
                responseObserver.onCompleted();
            }
        });
    }






}
