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
e67d9d47
authored
Nov 21, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
详情
parent
af92f046
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
23 deletions
+65
-23
app/Admin/Controllers/PrescriptionController.php
+48
-23
app/Models/PrescriptionModel.php
+11
-0
lang/zh_CN/prescription.php
+6
-0
No files found.
app/Admin/Controllers/PrescriptionController.php
View file @
e67d9d47
...
...
@@ -33,7 +33,7 @@ protected function grid()
$grid
->
column
(
'status'
)
->
using
(
PrescriptionModel
::
PRESCRIPTION_STATUS_MAP
);
$grid
->
column
(
'patient_name'
);
$grid
->
column
(
'patient_age'
);
$grid
->
column
(
'patient_gender'
);
$grid
->
column
(
'patient_gender'
)
->
using
(
PatientModel
::
SEX_MAP
)
;
$grid
->
column
(
'diagnosis_name'
);
$grid
->
column
(
'doctor_name'
);
$grid
->
column
(
'pharmacist_name'
);
...
...
@@ -99,30 +99,55 @@ protected function grid()
protected
function
detail
(
$id
)
{
return
Show
::
make
(
$id
,
new
PrescriptionRepository
(),
function
(
Show
$show
)
{
$show
->
field
(
'id'
)
->
width
(
4
);
$show
->
field
(
'status'
)
->
width
(
4
);
$show
->
field
(
'patient_name'
)
->
width
(
4
);
$show
->
field
(
'patient_age'
)
->
width
(
4
);
$show
->
field
(
'patient_gender'
)
->
width
(
4
);
$show
->
field
(
'diagnosis_id'
)
->
width
(
4
);
$show
->
field
(
'diagnosis_name'
)
->
width
(
4
);
$show
->
field
(
'inquiry_info'
)
->
width
(
4
);
$show
->
field
(
'drug_info'
)
->
width
(
4
);
$show
->
field
(
'doctor_id'
)
->
width
(
4
);
$show
->
field
(
'doctor_name'
)
->
width
(
4
);
$show
->
field
(
'doctor_online_hospital_name'
)
->
width
(
4
);
$show
->
field
(
'doctor_department'
)
->
width
(
4
);
$show
->
field
(
'doctor_title'
)
->
width
(
4
);
$show
->
field
(
'doctor_license_no'
)
->
width
(
4
);
$show
->
field
(
'pharmacy_id'
)
->
width
(
4
);
$show
->
field
(
'pharmacy_name'
)
->
width
(
4
);
$show
->
field
(
'pharmacist_id'
)
->
width
(
4
);
$show
->
field
(
'pharmacist_name'
)
->
width
(
4
);
$show
->
field
(
'pharmacist_license_number'
)
->
width
(
4
);
$show
->
field
(
'created_at'
)
->
width
(
4
);
$show
->
field
(
'updated_at'
)
->
width
(
4
);
$show
->
field
(
'id'
)
->
width
(
3
);
$show
->
field
(
'status'
)
->
width
(
3
)
->
using
(
PrescriptionModel
::
PRESCRIPTION_STATUS_MAP
);
$show
->
field
(
'patient_name'
)
->
width
(
3
);
$show
->
field
(
'patient_age'
)
->
width
(
3
);
$show
->
field
(
'patient_gender'
)
->
using
(
PatientModel
::
SEX_MAP
)
->
width
(
3
);
$show
->
field
(
'diagnosis_name'
)
->
width
(
3
);
$show
->
field
(
'inquiry_info'
)
->
width
(
3
)
->
as
(
function
(
$inquiryInfo
)
{
$answerMap
=
[
1
=>
'是'
,
0
=>
'否'
];
return
array_map
(
function
(
$item
)
use
(
$answerMap
)
{
return
$item
[
'question'
]
.
' : '
.
$answerMap
[
$item
[
'answer'
]];
},
$inquiryInfo
);
})
->
label
();
$show
->
field
(
'drug_info'
)
->
width
(
3
)
->
as
(
function
(
$drugInfo
)
{
return
array_map
(
function
(
$item
)
{
return
$item
[
'drug_name'
]
.
' : '
.
(
$item
[
'spec'
]
??
''
)
.
' : '
.
$item
[
'num'
]
.
(
$item
[
'unit'
]
??
''
)
.
' : '
.
(
$item
[
'dosage_desc'
]
??
''
);
},
$drugInfo
);
})
->
label
();
$show
->
field
(
'doctor_name'
)
->
width
(
3
);
$show
->
field
(
'doctor_online_hospital_name'
)
->
width
(
3
);
$show
->
field
(
'doctor_department'
)
->
width
(
3
);
$show
->
field
(
'doctor_title'
)
->
width
(
3
);
$show
->
field
(
'doctor_license_no'
)
->
width
(
3
);
$show
->
field
(
'doctor_signed_pic'
)
->
image
(
''
,
100
,
100
)
->
width
(
3
);
$show
->
field
(
'doctor_introduction'
)
->
width
(
3
);
$show
->
field
(
'pharmacy_name'
)
->
width
(
3
);
$show
->
field
(
'pharmacist_name'
)
->
width
(
3
);
$show
->
field
(
'pharmacist_license_number'
)
->
width
(
3
);
$show
->
field
(
'pharmacist_signed_pic'
)
->
image
(
''
,
100
,
100
)
->
width
(
3
);
$show
->
field
(
'prescription_pic'
)
->
image
(
''
,
100
,
100
)
->
width
(
3
);
$show
->
field
(
'prescription_pic_eseal'
)
->
image
(
''
,
100
,
100
)
->
width
(
3
);
$show
->
field
(
'prescription_at'
)
->
width
(
3
);
$show
->
field
(
'review_at'
)
->
width
(
3
);
$show
->
field
(
'open_source'
)
->
width
(
3
)
->
using
(
PrescriptionModel
::
OPEN_SOURCE_MAP
);
$show
->
field
(
'is_voided'
)
->
width
(
3
)
->
using
(
PrescriptionModel
::
IS_VOIDED_MAP
);
$show
->
field
(
'is_abnormal'
)
->
width
(
3
)
->
using
([
0
=>
'否'
,
1
=>
'是'
]);
$show
->
panel
()
->
tools
(
function
(
$tools
)
{
$tools
->
disableEdit
();
$tools
->
disableDelete
();
// 禁止删除按钮
});
});
...
...
app/Models/PrescriptionModel.php
View file @
e67d9d47
...
...
@@ -46,6 +46,17 @@ class PrescriptionModel extends Model
self
::
OPEN_SOURCE_PHARMACY
=>
'店开'
,
];
// 作废状态[0=未作废,1=作废]
const
IS_VOIDED_FALSE
=
0
;
const
IS_VOIDED_TRUE
=
1
;
// 作废状态-文字映射
const
IS_VOIDED_MAP
=
[
self
::
IS_VOIDED_FALSE
=>
'未作废'
,
self
::
IS_VOIDED_FALSE
=>
'作废'
,
];
public
function
getDoctorSignedPicAttribute
(
$value
)
{
if
(
Str
::
contains
(
$value
,
'//'
)
||
!
$value
)
{
...
...
lang/zh_CN/prescription.php
View file @
e67d9d47
...
...
@@ -5,6 +5,7 @@
'prescription'
=>
'处方'
,
],
'fields'
=>
[
'id'
=>
'处方单号'
,
'status'
=>
'状态'
,
'patient_name'
=>
'姓名'
,
'patient_age'
=>
'年龄'
,
...
...
@@ -19,12 +20,17 @@
'doctor_department'
=>
'医师科室'
,
'doctor_title'
=>
'医师职称'
,
'doctor_license_no'
=>
'医师执照编号'
,
'doctor_signed_pic'
=>
'医师签名'
,
'doctor_introduction'
=>
'医师简介'
,
'pharmacy_id'
=>
'药店'
,
'pharmacy_name'
=>
'药店'
,
'pharmacist_id'
=>
'药师'
,
'pharmacist_name'
=>
'审方药师'
,
'pharmacist_license_number'
=>
'药师执照编号'
,
'pharmacist_signed_pic'
=>
'药师签名'
,
'prescriptio_number'
=>
'处方单编号'
,
'prescription_pic'
=>
'处方单'
,
'prescription_pic_eseal'
=>
'处方单[电子章]'
,
'patient_id'
=>
'问诊人'
,
'is_voided'
=>
'作废'
,
'open_source'
=>
'开方来源'
,
...
...
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