hospital-applets-api/app/Controller/PatientPathographyController.php
2023-11-20 15:35:24 +08:00

32 lines
929 B
PHP

<?php
namespace App\Controller;
use App\Constants\HttpEnumCode;
use App\Request\PatientPathographyRequest;
use App\Services\PatientPathographyService;
use Psr\Http\Message\ResponseInterface;
/**
* 家庭成员病情记录
*/
class PatientPathographyController extends AbstractController
{
/**
* 检测家庭成员是否存在病情记录
* @return ResponseInterface
*/
public function existFamilyPathography(): ResponseInterface
{
try {
$request = $this->container->get(PatientPathographyRequest::class);
$request->scene('existFamilyPathography')->validateResolved();
$PatientPathographyService = new PatientPathographyService();
$data = $PatientPathographyService->existFamilyPathography();
return $this->response->json($data);
}catch (\Throwable $e){
return $this->response->json(fail());
}
}
}