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
21e8eb54
authored
Nov 18, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开方来源
parent
520f5f52
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
1 deletions
+46
-1
app/Admin/Controllers/PrescriptionController.php
+3
-0
app/Api/Controllers/PrescriptionController.php
+1
-1
app/Models/PrescriptionModel.php
+11
-0
database/migrations/2024_11_18_190511_add_open_source_to_prescription_table.php
+28
-0
lang/zh_CN/prescription.php
+3
-0
No files found.
app/Admin/Controllers/PrescriptionController.php
View file @
21e8eb54
...
...
@@ -39,6 +39,9 @@ protected function grid()
$grid
->
column
(
'pharmacist_name'
);
$grid
->
column
(
'drug_info'
);
$grid
->
column
(
'pharmacy_name'
);
$grid
->
column
(
'open_source'
)
->
using
(
PrescriptionModel
::
OPEN_SOURCE_MAP
);
$grid
->
column
(
'prescription_at'
);
$grid
->
column
(
'review_at'
);
// $grid->column('diagnosis_id');
// $grid->column('inquiry_info');
// $grid->column('doctor_id');
...
...
app/Api/Controllers/PrescriptionController.php
View file @
21e8eb54
...
...
@@ -143,7 +143,7 @@ public function create(Request $request)
'num'
=>
$drug
[
'num'
],
];
}
$prescription
->
drug_info
=
json_encode
(
$drug_info
);
// TODO 用药信息
$prescription
->
drug_info
=
json_encode
(
$drug_info
);
// 分派医师 TODO 医师当日开方未达到上限以及是否在时间段的搜索出来
// 判断是否开启时间段
// foreach ($doctors as $key => $doctor) {
...
...
app/Models/PrescriptionModel.php
View file @
21e8eb54
...
...
@@ -26,4 +26,15 @@ class PrescriptionModel extends Model
self
::
PRESCRIPTION_STATUS_REVIEWING
=>
'待审方'
,
self
::
PRESCRIPTION_STATUS_SUCCESS
=>
'审方成功'
,
];
// 开方来源[0=客开,1=店开]
const
OPEN_SOURCE_CUSTOMER
=
0
;
const
OPEN_SOURCE_PHARMACY
=
1
;
// 开方来源-文字映射
const
OPEN_SOURCE_MAP
=
[
self
::
OPEN_SOURCE_CUSTOMER
=>
'客开'
,
self
::
OPEN_SOURCE_PHARMACY
=>
'店开'
,
];
}
database/migrations/2024_11_18_190511_add_open_source_to_prescription_table.php
0 → 100644
View file @
21e8eb54
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
return
new
class
extends
Migration
{
/**
* Run the migrations.
*/
public
function
up
()
:
void
{
Schema
::
table
(
'prescription'
,
function
(
Blueprint
$table
)
{
$table
->
boolean
(
'open_source'
)
->
default
(
0
)
->
comment
(
'开方来源[0=客开,1=店开]'
);
});
}
/**
* Reverse the migrations.
*/
public
function
down
()
:
void
{
Schema
::
table
(
'prescription'
,
function
(
Blueprint
$table
)
{
//
});
}
};
lang/zh_CN/prescription.php
View file @
21e8eb54
...
...
@@ -27,6 +27,9 @@
'prescriptio_number'
=>
'处方单编号'
,
'patient_id'
=>
'问诊人'
,
'is_voided'
=>
'作废'
,
'open_source'
=>
'开方来源'
,
'prescription_at'
=>
'开方时间'
,
'review_at'
=>
'审方时间'
,
],
'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