|
|
|
<?php
|
|
|
|
|
|
|
|
use App\Http\Controllers\Auth\AuthController;
|
|
|
|
use App\Http\Controllers\Hospital\IntroduceController;
|
|
|
|
use App\Http\Controllers\Message\TriggerController;
|
|
|
|
use App\Http\Controllers\Notify\NotifyController;
|
|
|
|
use App\Http\Controllers\Outpatient\PaymentController;
|
|
|
|
use App\Http\Controllers\Outpatient\PendingController;
|
|
|
|
use App\Http\Controllers\Outpatient\RecordController as OutpatientRecordController;
|
|
|
|
use App\Http\Controllers\Patient\PatientController;
|
|
|
|
use App\Http\Controllers\Registration\RecordController as RegistrationRecordController;
|
|
|
|
use App\Http\Controllers\Registration\RegisterController;
|
|
|
|
use App\Http\Controllers\Registration\ScheduleController;
|
|
|
|
use App\Http\Controllers\Dictionary\ItemController;
|
|
|
|
use App\Http\Controllers\Test\TestController;
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
|
|
|
Route::middleware(['apiLog'])->group(function() {
|
|
|
|
|
|
|
|
Route::post('login', [AuthController::class, 'login']);
|
|
|
|
Route::any('unauthorized', [AuthController::class, 'unauthorized'])->name('login');
|
|
|
|
|
|
|
|
// 测试接口
|
|
|
|
Route::get('test', [TestController::class, 'test']);
|
|
|
|
|
|
|
|
// 支付回调
|
|
|
|
Route::any('notify', [NotifyController::class, 'notify']);
|
|
|
|
|
|
|
|
Route::middleware(['auth:sanctum'])->group(function() {
|
|
|
|
// 患者模块
|
|
|
|
Route::prefix('Patient')->group(function () {
|
|
|
|
Route::get('/', [PatientController::class, 'lists']);
|
|
|
|
Route::get('/{patient_id}', [PatientController::class, 'details']);
|
|
|
|
Route::post('/create', [PatientController::class, 'create']);
|
|
|
|
Route::post('/bind', [PatientController::class, 'bind']);
|
|
|
|
Route::post('/{patient_id}/default', [PatientController::class, 'setDefault']);
|
|
|
|
Route::delete('/{patient_id}/delete', [PatientController::class, 'delete']);
|
|
|
|
|
|
|
|
// 获取手机号码
|
|
|
|
Route::get('/phone', [PatientController::class, 'getPhoneNumber']);
|
|
|
|
});
|
|
|
|
|
|
|
|
// 挂号模块
|
|
|
|
Route::prefix('Registration')->group(function () {
|
|
|
|
Route::get('/dept', [ScheduleController::class, 'dept']);
|
|
|
|
Route::get('/dept/tips', [ScheduleController::class, 'deptTips']);
|
|
|
|
Route::get('/doctor', [ScheduleController::class, 'doctor']);
|
|
|
|
Route::post('/{patient_id}/register', [RegisterController::class, 'register']);
|
|
|
|
|
|
|
|
Route::get('/{patient_id}/record', [RegistrationRecordController::class, 'lists']);
|
|
|
|
Route::post('/{patient_id}/record/{serial_no}/refund', [RegistrationRecordController::class, 'refund']);
|
|
|
|
});
|
|
|
|
|
|
|
|
// 缴费模块
|
|
|
|
Route::prefix('Outpatient')->group(function () {
|
|
|
|
Route::get('/{patient_id}/pending', [PendingController::class, 'lists']);
|
|
|
|
Route::get('/{patient_id}/pending/{serial_no}/', [PendingController::class, 'details']);
|
|
|
|
Route::post('/{patient_id}/pending/payment', [PaymentController::class, 'payment']);
|
|
|
|
|
|
|
|
Route::get('/{patient_id}/record', [OutpatientRecordController::class, 'lists']);
|
|
|
|
Route::get('/{patient_id}/record/{serial_no}/', [OutpatientRecordController::class, 'details']);
|
|
|
|
});
|
|
|
|
|
|
|
|
// 缴费详情项目
|
|
|
|
Route::prefix('Dictionary')->group(function () {
|
|
|
|
Route::get('/', [ItemController::class, 'lists']);
|
|
|
|
Route::get('/{type_id}', [ItemController::class, 'details'])->where('type_id', '[0-9]+');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
// 医院详情相关项目
|
|
|
|
Route::middleware([])->prefix('Hospital')->group(function () {
|
|
|
|
// 科室介绍
|
|
|
|
Route::get('/dept', [IntroduceController::class, 'deptLists']);
|
|
|
|
Route::get('/dept/{dept_id}', [IntroduceController::class, 'deptDetails'])->where('dept_id', '[0-9]+');
|
|
|
|
|
|
|
|
// 医生介绍
|
|
|
|
Route::get('/doctor', [IntroduceController::class, 'doctorLists']);
|
|
|
|
Route::get('/doctor/{doctor_id}', [IntroduceController::class, 'doctorDetails'])->where('doctor_id', '[0-9]+');
|
|
|
|
|
|
|
|
// 医院导航
|
|
|
|
Route::get('/navigation', [IntroduceController::class, 'navigationDetails']);
|
|
|
|
Route::get('/info', [IntroduceController::class, 'info']);
|
|
|
|
|
|
|
|
// 新闻动态
|
|
|
|
Route::get('/news', [IntroduceController::class, 'newLists']);
|
|
|
|
Route::get('/news/{new_id}', [IntroduceController::class, 'newDetails'])->where('new_id', '[0-9]+');
|
|
|
|
|
|
|
|
// 健康宣讲
|
|
|
|
Route::get('/lectures', [IntroduceController::class, 'healthLectureLists']);
|
|
|
|
Route::get('/lectures/{lecture_id}', [IntroduceController::class, 'healthLectureDetails'])->where('lecture_id', '[0-9]+');
|
|
|
|
|
|
|
|
// 楼群分布
|
|
|
|
Route::get('/building', [IntroduceController::class, 'buildingDetails']);
|
|
|
|
});
|
|
|
|
|
|
|
|
// 触发推送消息
|
|
|
|
Route::middleware(['intranetAccess'])->prefix('Message')->group(function () {
|
|
|
|
Route::post('/reg_stop', [TriggerController::class, 'registerStopRemind']);
|
|
|
|
Route::post('/pending', [TriggerController::class, 'pendingPaymentRemind']);
|
|
|
|
Route::post('/report', [TriggerController::class, 'reportReleaseRemind']);
|
|
|
|
});
|
|
|
|
});
|