Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵增煜
/
tzt-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7d0d403a
authored
Nov 18, 2024
by
赵增煜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
routes新增
parent
2360d669
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
22 deletions
+27
-22
app/Api/Controllers/PharmacyController.php
+1
-1
app/Api/Controllers/PrescriptionController.php
+1
-19
routes/api.php
+25
-2
No files found.
app/Api/Controllers/PharmacyController.php
View file @
7d0d403a
...
...
@@ -98,7 +98,7 @@ public function prescription(Request $request)
$patient_id
=
$prescription
->
patient_id
;
$patient
=
PatientModel
::
where
(
'id'
,
$patient_id
)
->
first
();
//
TODO
增加审方日志
// 增加审方日志
$pharmacistLog
=
new
PrescriptionLogModel
;
$pharmacistLog
->
pharmacy_id
=
$prescription
->
pharmacy_id
;
$pharmacistLog
->
pharmacy_name
=
$prescription
->
pharmacy_name
;
...
...
app/Api/Controllers/PrescriptionController.php
View file @
7d0d403a
...
...
@@ -75,7 +75,7 @@ public function prescriptionList(Request $request)
}
// 处方详情
public
function
prescriptionD
etail
(
Request
$request
)
public
function
d
etail
(
Request
$request
)
{
$prescription_id
=
$request
->
input
(
'prescription_id'
);
$prescription
=
PrescriptionModel
::
query
()
->
where
(
'id'
,
$prescription_id
)
->
first
();
...
...
@@ -199,22 +199,4 @@ public function create(Request $request)
return
$this
->
success
(
'ok'
);
}
// 开方通过
public
function
pass
(
Request
$request
)
{
$prescription_id
=
$request
->
input
(
'prescription_id'
);
$res
=
PrescriptionModel
::
query
()
->
where
(
'id'
,
$prescription_id
)
->
update
([
'status'
=>
PrescriptionModel
::
PRESCRIPTION_STATUS_REVIEWING
]);
return
$this
->
success
(
$res
);
}
// 审方通过
public
function
reviewPass
(
Request
$request
)
{
$prescription_id
=
$request
->
input
(
'prescription_id'
);
$res
=
PrescriptionModel
::
query
()
->
where
(
'id'
,
$prescription_id
)
->
update
([
'status'
=>
PrescriptionModel
::
PRESCRIPTION_STATUS_SUCCESS
]);
return
$this
->
success
(
$res
);
}
}
routes/api.php
View file @
7d0d403a
...
...
@@ -39,6 +39,12 @@
# Route::get('/test', 'App\Api\Controllers\DrugController@test');
# 获取药店列表
Route
::
get
(
'/pharmacys'
,
'App\Api\Controllers\PharmacyController@PharmacyList'
);
# 药店详情
Route
::
post
(
'/pharmacy-detail'
,
'App\Api\Controllers\PharmacyController@detail'
);
# 药店纠错
Route
::
post
(
'/pharmacy-correction'
,
'App\Api\Controllers\PharmacyController@correction'
);
# 药店审方
Route
::
post
(
'/pharmacy-prescription'
,
'App\Api\Controllers\PharmacyController@prescription'
);
# 获取诊断列表
Route
::
get
(
'/diagnosis'
,
'App\Api\Controllers\DiagnosisController@diagnosisList'
);
# 获取问诊人列表
...
...
@@ -55,6 +61,10 @@
Route
::
post
(
'/patients-getDefault'
,
'App\Api\Controllers\PatientController@getDefault'
);
# 获取问诊问题列表
Route
::
get
(
'/inquirys'
,
'App\Api\Controllers\InquiryController@InquirytList'
);
# 处方列表
Route
::
get
(
'/prescriptions'
,
'App\Api\Controllers\PrescriptionController@prescriptionList'
);
# 处方详情
Route
::
post
(
'/prescription-detail'
,
'App\Api\Controllers\PrescriptionController@detail'
);
# 开方
Route
::
post
(
'/prescription-create'
,
'App\Api\Controllers\PrescriptionController@create'
);
# 医师详情
...
...
@@ -63,6 +73,18 @@
Route
::
post
(
'/dcotor-upload'
,
'App\Api\Controllers\PrescriptionController@upload'
);
# 医师纠错
Route
::
post
(
'/dcotor-correction'
,
'App\Api\Controllers\PrescriptionController@correction'
);
# 药店详情
# 药师列表
Route
::
get
(
'/pharmacists'
,
'App\Api\Controllers\PharmacistController@pharmacistList'
);
# 药师详情
Route
::
post
(
'/pharmacist-detail'
,
'App\Api\Controllers\PharmacistController@detail'
);
# 证书上传
Route
::
post
(
'/pharmacist-uploadCertificate'
,
'App\Api\Controllers\PharmacistController@uploadCertificate'
);
# 药师新增
Route
::
post
(
'/pharmacist-add'
,
'App\Api\Controllers\PharmacistController@add'
);
# 药师编辑
Route
::
post
(
'/pharmacist-update'
,
'App\Api\Controllers\PharmacistController@update'
);
# 设置默认药师
Route
::
post
(
'/pharmacist-setDefault'
,
'App\Api\Controllers\PharmacistController@setDefault'
);
# 药师签名上传
Route
::
post
(
'/pharmacist-upload'
,
'App\Api\Controllers\PharmacistController@upload'
);
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment