|
@@ -10,7 +10,7 @@ use app\zskk\servies\PatientServies;
|
|
|
|
|
|
class Api extends ApiController
|
|
class Api extends ApiController
|
|
{
|
|
{
|
|
- protected array $noAuth = ['getToken','getAllToken','getHospitalData','getCheck','getInpection','login'];
|
|
|
|
|
|
+ protected array $noAuth = ['getToken','getAllToken','getShareToken','getRecogToken','login','getHospitalData','getCheck','getInpection'];
|
|
|
|
|
|
public function login(PatientServies $servies)
|
|
public function login(PatientServies $servies)
|
|
{
|
|
{
|
|
@@ -23,7 +23,7 @@ class Api extends ApiController
|
|
$this->error($data);
|
|
$this->error($data);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
public function getHospitalData(PatientServies $servies)
|
|
public function getHospitalData(PatientServies $servies)
|
|
{
|
|
{
|
|
$params = $this->request->post();
|
|
$params = $this->request->post();
|
|
@@ -52,6 +52,17 @@ class Api extends ApiController
|
|
$this->success($data['msg'], $data['data']);
|
|
$this->success($data['msg'], $data['data']);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public function getShareToken(EmpowerServies $servies, PatientServies $patientServies): void
|
|
|
|
+ {
|
|
|
|
+ $params = $this->request->post();
|
|
|
|
+ $params = $this->getDecryptData($params['data']);
|
|
|
|
+ $params = $patientServies->makeMappingData($params,'0','getRecogToken');
|
|
|
|
+ $data = $servies->getRecogToken($params);
|
|
|
|
+ $data = $patientServies->makeMappingData($data,'0','getRecogToken',2);
|
|
|
|
+ $data = $this->makeEncryptData($data);
|
|
|
|
+ $this->success('', $data);
|
|
|
|
+ }
|
|
|
|
+
|
|
public function getRecogToken(EmpowerServies $servies, PatientServies $patientServies): void
|
|
public function getRecogToken(EmpowerServies $servies, PatientServies $patientServies): void
|
|
{
|
|
{
|
|
$params = $this->request->post();
|
|
$params = $this->request->post();
|
|
@@ -93,7 +104,7 @@ class Api extends ApiController
|
|
public function delExamReport(PatientServies $servies)//: void
|
|
public function delExamReport(PatientServies $servies)//: void
|
|
{
|
|
{
|
|
$params = $this->request->post();
|
|
$params = $this->request->post();
|
|
-// $params = $this->getDecryptData($params['data']);
|
|
|
|
|
|
+ $params = $this->getDecryptData($params['data']);
|
|
$tokenData = $this->tokenData;
|
|
$tokenData = $this->tokenData;
|
|
if(empty($tokenData))
|
|
if(empty($tokenData))
|
|
{
|
|
{
|
|
@@ -111,7 +122,6 @@ class Api extends ApiController
|
|
$params = $this->request->post();
|
|
$params = $this->request->post();
|
|
// $params = $this->getDecryptData($params['data']);
|
|
// $params = $this->getDecryptData($params['data']);
|
|
$tokenData = $this->tokenData;
|
|
$tokenData = $this->tokenData;
|
|
- $tokenData['orgCode'] = '001';
|
|
|
|
if(empty($tokenData))
|
|
if(empty($tokenData))
|
|
{
|
|
{
|
|
$this->error('无效的token');
|
|
$this->error('无效的token');
|
|
@@ -129,7 +139,7 @@ class Api extends ApiController
|
|
public function getShareCheck(HrServies $servies,PatientServies $patientServies): void
|
|
public function getShareCheck(HrServies $servies,PatientServies $patientServies): void
|
|
{
|
|
{
|
|
$params = $this->request->post();
|
|
$params = $this->request->post();
|
|
-// $params = $this->getDecryptData($params['data']);
|
|
|
|
|
|
+ $params = $this->getDecryptData($params['data']);
|
|
$params = $patientServies->makeMappingData($params,'0','getShareCheck');
|
|
$params = $patientServies->makeMappingData($params,'0','getShareCheck');
|
|
$ID_CARDNUM = $params['ID_CARDNUM'] ?? '';
|
|
$ID_CARDNUM = $params['ID_CARDNUM'] ?? '';
|
|
$ORGCODE = $params['ORGCODE'] ?? '';
|
|
$ORGCODE = $params['ORGCODE'] ?? '';
|
|
@@ -140,7 +150,26 @@ class Api extends ApiController
|
|
$data = $servies->getShareCheck($ID_CARDNUM, $ORGCODE,$DOCTORCODE,$DEPARTMENT,1);
|
|
$data = $servies->getShareCheck($ID_CARDNUM, $ORGCODE,$DOCTORCODE,$DEPARTMENT,1);
|
|
$data = $patientServies->makeMappingData(['RETURN'=>$data],'0','getShareCheck',2);
|
|
$data = $patientServies->makeMappingData(['RETURN'=>$data],'0','getShareCheck',2);
|
|
// halt($data);
|
|
// halt($data);
|
|
-// $data = $this->makeEncryptData($data);
|
|
|
|
|
|
+ $data = $this->makeEncryptData($data);
|
|
|
|
+ // halt($data);
|
|
|
|
+ $this->success('', $data);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public function getRecogCheck(HrServies $servies,PatientServies $patientServies): void
|
|
|
|
+ {
|
|
|
|
+ $params = $this->request->post();
|
|
|
|
+ $params = $this->getDecryptData($params['data']);
|
|
|
|
+ $params = $patientServies->makeMappingData($params,'0','getShareCheck');
|
|
|
|
+ $ID_CARDNUM = $params['ID_CARDNUM'] ?? '';
|
|
|
|
+ $ORGCODE = $params['ORGCODE'] ?? '';
|
|
|
|
+ $ORGNAME = $params['ORGNAME'] ?? '';
|
|
|
|
+ $DOCTORNAME = $params['DOCTORNAME'] ?? '';
|
|
|
|
+ $DOCTORCODE = $params['DOCTORCODE'] ?? '';
|
|
|
|
+ $DEPARTMENT = $params['DEPTNAME'] ?? '';
|
|
|
|
+ $data = $servies->getShareCheck($ID_CARDNUM, $ORGCODE,$DOCTORCODE,$DEPARTMENT,1,1);
|
|
|
|
+ $data = $patientServies->makeMappingData(['RETURN'=>$data],'0','getShareCheck',2);
|
|
|
|
+ // halt($data);
|
|
|
|
+ $data = $this->makeEncryptData($data);
|
|
// halt($data);
|
|
// halt($data);
|
|
$this->success('', $data);
|
|
$this->success('', $data);
|
|
}
|
|
}
|
|
@@ -154,7 +183,7 @@ class Api extends ApiController
|
|
public function getRecogData(HrServies $servies,PatientServies $patientServies): void
|
|
public function getRecogData(HrServies $servies,PatientServies $patientServies): void
|
|
{
|
|
{
|
|
$params = $this->request->post();
|
|
$params = $this->request->post();
|
|
-// $params = $this->getDecryptData($param['data']);
|
|
|
|
|
|
+ $params = $this->getDecryptData($params['data']);
|
|
$params = $patientServies->makeMappingData($params,'0','getRecogData');
|
|
$params = $patientServies->makeMappingData($params,'0','getRecogData');
|
|
$ID_CARDNUM = $params['ID_CARDNUM'] ?? '';
|
|
$ID_CARDNUM = $params['ID_CARDNUM'] ?? '';
|
|
$ORGCODE = $params['ORGCODE'] ?? '';
|
|
$ORGCODE = $params['ORGCODE'] ?? '';
|
|
@@ -165,8 +194,7 @@ class Api extends ApiController
|
|
$data = $servies->getShareCheck($ID_CARDNUM, $ORGCODE,$DOCTORCODE,$DEPARTMENT,2);
|
|
$data = $servies->getShareCheck($ID_CARDNUM, $ORGCODE,$DOCTORCODE,$DEPARTMENT,2);
|
|
// halt($data);
|
|
// halt($data);
|
|
$data = $patientServies->makeMappingData(['DATA'=>$data],'0','getRecogData',2);
|
|
$data = $patientServies->makeMappingData(['DATA'=>$data],'0','getRecogData',2);
|
|
- var_dump($data);die;
|
|
|
|
-// $data = $this->makeEncryptData($data);
|
|
|
|
|
|
+ $data = $this->makeEncryptData($data);
|
|
// halt($data);
|
|
// halt($data);
|
|
$this->success('', $data);
|
|
$this->success('', $data);
|
|
}
|
|
}
|
|
@@ -179,7 +207,7 @@ class Api extends ApiController
|
|
public function saveRecogResult(HrServies $servies, PatientServies $patientServies): void
|
|
public function saveRecogResult(HrServies $servies, PatientServies $patientServies): void
|
|
{
|
|
{
|
|
$params = $this->request->post();
|
|
$params = $this->request->post();
|
|
-// $params = $this->getDecryptData($params['data']);
|
|
|
|
|
|
+ $params = $this->getDecryptData($params['data']);
|
|
$params = $patientServies->makeMappingData($params,'0','saveRecogResult');
|
|
$params = $patientServies->makeMappingData($params,'0','saveRecogResult');
|
|
$HR_RECORDS = $params['HR_RECORDS'] ?? array();
|
|
$HR_RECORDS = $params['HR_RECORDS'] ?? array();
|
|
$servies->saveRecogResult($HR_RECORDS);
|
|
$servies->saveRecogResult($HR_RECORDS);
|