<?php

namespace App\Http\Controllers\API\His;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class EntrustController extends Controller
{
    //查询本地是否有对应医嘱，没有则主动查询His
    public function GetEntrust()
    {
        $reg_num = request('reg_num');
        $entrust_ids = request('entrust_ids');
        $episodeid = request('episodeid');
        if(count($entrust_ids) > 0){
            foreach ($entrust_ids as $entrust_id) {
                $entrust = DB::table('s_list')->where(['reg_num' => $reg_num, 'entrust_id' => $entrust_id, 'episodeid' => $episodeid])->first();

            }
        }
    }
}
