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
59a9ef05
authored
Nov 22, 2024
by
赵增煜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开方增加日志
parent
b2e72082
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
app/Api/Controllers/PrescriptionController.php
+5
-2
No files found.
app/Api/Controllers/PrescriptionController.php
View file @
59a9ef05
...
...
@@ -16,7 +16,7 @@
use
Carbon\Carbon
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\Log
;
// 问诊人控制器
class
PrescriptionController
extends
BaseApiController
{
...
...
@@ -98,6 +98,7 @@ public function detail(Request $request)
public
function
create
(
Request
$request
)
{
$authInfo
=
auth
(
'api'
)
->
user
();
Log
::
info
(
"开方请求参数:"
.
json_encode
(
$request
->
all
()));
$pharmacy_id
=
$request
->
input
(
'pharmacy_id'
,
0
);
$patient_id
=
$request
->
input
(
'patient_id'
);
$diagnosis_id
=
$request
->
input
(
'diagnosis_id'
);
...
...
@@ -209,7 +210,8 @@ public function create(Request $request)
}
else
{
$randomDoctor
=
DoctorModel
::
inRandomOrder
()
->
where
(
'status'
,
DoctorModel
::
STATUS_TRUE
)
->
first
();
}
# 记录开方医师信息
Log
::
info
(
"医师:"
.
json_encode
(
$randomDoctor
));
$prescription
->
doctor_id
=
$randomDoctor
->
id
;
$prescription
->
doctor_name
=
$randomDoctor
->
name
;
$prescription
->
doctor_online_hospital_name
=
$randomDoctor
->
online_hospital_name
;
...
...
@@ -230,6 +232,7 @@ public function create(Request $request)
})
->
inRandomOrder
()
->
first
();
Log
::
info
(
"药师:"
.
json_encode
(
$pharmacist
));
$prescription
->
pharmacist_id
=
$pharmacist
->
id
;
$prescription
->
pharmacist_name
=
$pharmacist
->
name
;
$prescription
->
pharmacist_license_number
=
$pharmacist
->
license_number
;
...
...
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