<?php
namespace App\Services;

use Illuminate\Support\Facades\DB;

class OrgService
{
    //根据org_sn获取机构信息
    public function GetOrgInfo($org_sn){
        $orgInfo=DB::table('medical_institution')->where('sn',$org_sn)->get();
        if(count($orgInfo)==0){
            return ['status'=>false,'msg'=>'机构不存在'];
        }
        if(count($orgInfo)<>1){
            return ['status'=>false,'msg'=>'机构编码异常'];
        }
        return ['status'=>true,'msg'=>'','data'=>$orgInfo[0]];

    }
}
