<?php

namespace App\Controller;

use App\Model\Area;
use App\Model\Hospital;
use App\Model\SubTemplate;
use App\Model\TbHospitalMy;
use App\Services\IndexService;
use App\Utils\Prescription;
use Extend\Wechat\Wechat;
use Hyperf\DbConnection\Db;
use Hyperf\Snowflake\IdGeneratorInterface;
use Psr\Http\Message\ResponseInterface;

/**
 * 首页
 */
class IndexController extends AbstractController
{
    /**
     * 医生端-首页
     * @return ResponseInterface
     */
    public function doctorIndex(): ResponseInterface
    {
        $IndexService = new IndexService();

        $data = $IndexService->getDoctorIndex();

        return $this->response->json($data);
    }

    /**
     * 患者端-首页
     * @return ResponseInterface
     */
    public function patientIndex(): ResponseInterface
    {

        $IndexService = new IndexService();

        $data = $IndexService->getPatientIndex();

        return $this->response->json($data);
    }

    /**
     * 药师端-首页
     * @return ResponseInterface
     */
    public function pharmacistIndex(): ResponseInterface
    {

        $IndexService = new IndexService();

        $data = $IndexService->getPharmacistIndex();

        return $this->response->json($data);
    }
}