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
0db1ca14
authored
Nov 13, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处方添加
parent
b066c9e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
23 deletions
+40
-23
app/Admin/Controllers/PrescriptionController.php
+20
-19
app/Models/PrescriptionModel.php
+14
-0
lang/zh_CN/prescription.php
+6
-4
No files found.
app/Admin/Controllers/PrescriptionController.php
View file @
0db1ca14
...
@@ -3,6 +3,13 @@
...
@@ -3,6 +3,13 @@
namespace
App\Admin\Controllers
;
namespace
App\Admin\Controllers
;
use
App\Admin\Repositories\PrescriptionRepository
;
use
App\Admin\Repositories\PrescriptionRepository
;
use
App\Models\DiagnosiModel
;
use
App\Models\DoctorModel
;
use
App\Models\InquiryModel
;
use
App\Models\PatientModel
;
use
App\Models\PharmacyDrugModel
;
use
App\Models\PharmacyModel
;
use
App\Models\PrescriptionModel
;
use
Dcat\Admin\Form
;
use
Dcat\Admin\Form
;
use
Dcat\Admin\Grid
;
use
Dcat\Admin\Grid
;
use
Dcat\Admin\Http\Controllers\AdminController
;
use
Dcat\Admin\Http\Controllers\AdminController
;
...
@@ -109,25 +116,19 @@ protected function form()
...
@@ -109,25 +116,19 @@ protected function form()
{
{
return
Form
::
make
(
new
PrescriptionRepository
(),
function
(
Form
$form
)
{
return
Form
::
make
(
new
PrescriptionRepository
(),
function
(
Form
$form
)
{
$form
->
display
(
'id'
)
->
width
(
4
);
$form
->
display
(
'id'
)
->
width
(
4
);
$form
->
text
(
'status'
);
$form
->
radio
(
'status'
)
->
options
(
PrescriptionModel
::
PRESCRIPTION_STATUS_MAP
);
$form
->
text
(
'patient_name'
)
->
width
(
4
);
$form
->
select
(
'patient_id'
)
->
options
(
PatientModel
::
all
()
->
pluck
(
'name'
,
'id'
))
->
width
(
4
);
$form
->
text
(
'patient_age'
)
->
width
(
4
);
$form
->
select
(
'diagnosis_id'
)
->
options
(
DiagnosiModel
::
all
()
->
pluck
(
'name'
,
'id'
))
->
width
(
4
);
$form
->
text
(
'patient_gender'
)
->
width
(
4
);
$form
->
select
(
'doctor_id'
)
->
options
(
DoctorModel
::
all
()
->
pluck
(
'name'
,
'id'
))
->
width
(
4
);
$form
->
text
(
'diagnosis_id'
)
->
width
(
4
);
$form
->
select
(
'pharmacy_id'
)
->
options
(
PharmacyModel
::
all
()
->
pluck
(
'name'
,
'id'
))
->
width
(
4
);
$form
->
text
(
'diagnosis_name'
)
->
width
(
4
);
$form
->
select
(
'pharmacist_id'
)
->
options
(
DoctorModel
::
all
()
->
pluck
(
'name'
,
'id'
))
->
width
(
4
);
$form
->
text
(
'inquiry_info'
)
->
width
(
4
);
$form
->
multipleSelect
(
'inquiry_info'
)
->
options
(
InquiryModel
::
all
()
->
pluck
(
'question'
,
'id'
))
->
width
(
4
)
->
saving
(
function
(
$v
)
{
$form
->
text
(
'drug_info'
)
->
width
(
4
);
return
json_encode
(
$v
);
$form
->
text
(
'doctor_id'
)
->
width
(
4
);
});
$form
->
text
(
'doctor_name'
)
->
width
(
4
);
$form
->
multipleSelect
(
'drug_info'
)
->
options
(
PharmacyDrugModel
::
with
(
'drug'
)
->
get
()
->
pluck
(
'drug'
)
->
pluck
(
'name'
,
'id'
))
->
width
(
4
)
->
saving
(
function
(
$v
)
{
$form
->
text
(
'doctor_online_hospital_name'
)
->
width
(
4
);
return
json_encode
(
$v
);
$form
->
text
(
'doctor_department'
)
->
width
(
4
);
});
$form
->
text
(
'doctor_title'
)
->
width
(
4
);
$form
->
switch
(
'is_voided'
)
->
width
(
4
);
$form
->
text
(
'doctor_license_no'
)
->
width
(
4
);
$form
->
text
(
'pharmacy_id'
)
->
width
(
4
);
$form
->
text
(
'pharmacy_name'
)
->
width
(
4
);
$form
->
text
(
'pharmacist_id'
)
->
width
(
4
);
$form
->
text
(
'pharmacist_name'
)
->
width
(
4
);
$form
->
text
(
'pharmacist_license_number'
)
->
width
(
4
);
$form
->
display
(
'created_at'
)
->
width
(
4
);
$form
->
display
(
'created_at'
)
->
width
(
4
);
$form
->
display
(
'updated_at'
)
->
width
(
4
);
$form
->
display
(
'updated_at'
)
->
width
(
4
);
...
...
app/Models/PrescriptionModel.php
View file @
0db1ca14
...
@@ -12,4 +12,18 @@ class PrescriptionModel extends Model
...
@@ -12,4 +12,18 @@ class PrescriptionModel extends Model
use
SoftDeletes
;
use
SoftDeletes
;
protected
$table
=
'prescription'
;
protected
$table
=
'prescription'
;
// 审方状态[0=待开方,1=待审方,2=审方成功]
const
PRESCRIPTION_STATUS_PENDING
=
0
;
const
PRESCRIPTION_STATUS_REVIEWING
=
1
;
const
PRESCRIPTION_STATUS_SUCCESS
=
2
;
// 审方状态-文字映射
const
PRESCRIPTION_STATUS_MAP
=
[
self
::
PRESCRIPTION_STATUS_PENDING
=>
'待开方'
,
self
::
PRESCRIPTION_STATUS_REVIEWING
=>
'待审方'
,
self
::
PRESCRIPTION_STATUS_SUCCESS
=>
'审方成功'
,
];
}
}
lang/zh_CN/prescription.php
View file @
0db1ca14
...
@@ -9,22 +9,24 @@
...
@@ -9,22 +9,24 @@
'patient_name'
=>
'姓名'
,
'patient_name'
=>
'姓名'
,
'patient_age'
=>
'年龄'
,
'patient_age'
=>
'年龄'
,
'patient_gender'
=>
'性别'
,
'patient_gender'
=>
'性别'
,
'diagnosis_id'
=>
'诊断
表ID
'
,
'diagnosis_id'
=>
'诊断'
,
'diagnosis_name'
=>
'诊断'
,
'diagnosis_name'
=>
'诊断'
,
'inquiry_info'
=>
'问诊问题'
,
'inquiry_info'
=>
'问诊问题'
,
'drug_info'
=>
'处方药'
,
'drug_info'
=>
'处方药'
,
'doctor_id'
=>
'医师
表ID
'
,
'doctor_id'
=>
'医师'
,
'doctor_name'
=>
'开方医师'
,
'doctor_name'
=>
'开方医师'
,
'doctor_online_hospital_name'
=>
'医师互联网医院名称'
,
'doctor_online_hospital_name'
=>
'医师互联网医院名称'
,
'doctor_department'
=>
'医师科室'
,
'doctor_department'
=>
'医师科室'
,
'doctor_title'
=>
'医师职称'
,
'doctor_title'
=>
'医师职称'
,
'doctor_license_no'
=>
'医师执照编号'
,
'doctor_license_no'
=>
'医师执照编号'
,
'pharmacy_id'
=>
'药店
表ID
'
,
'pharmacy_id'
=>
'药店'
,
'pharmacy_name'
=>
'药店'
,
'pharmacy_name'
=>
'药店'
,
'pharmacist_id'
=>
'药师
表ID
'
,
'pharmacist_id'
=>
'药师'
,
'pharmacist_name'
=>
'审方药师'
,
'pharmacist_name'
=>
'审方药师'
,
'pharmacist_license_number'
=>
'药师执照编号'
,
'pharmacist_license_number'
=>
'药师执照编号'
,
'prescriptio_number'
=>
'处方单编号'
,
'prescriptio_number'
=>
'处方单编号'
,
'patient_id'
=>
'问诊人'
,
'is_voided'
=>
'作废'
,
],
],
'options'
=>
[
'options'
=>
[
],
],
...
...
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