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
13b7c59e
authored
Dec 03, 2024
by
赵增煜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
剂量限制
parent
4486ec47
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletions
+8
-1
app/Admin/Extensions/Form/SiteConfigForm.php
+1
-0
app/Api/Controllers/PrescriptionController.php
+6
-1
app/Api/Controllers/SiteConfigController.php
+1
-0
No files found.
app/Admin/Extensions/Form/SiteConfigForm.php
View file @
13b7c59e
...
...
@@ -41,6 +41,7 @@ public function form()
$this
->
number
(
'diagnosis_limit'
,
'选择诊断数限制'
)
->
required
()
->
default
((
$data
[
'diagnosis_limit'
]
??
1
))
->
min
(
1
)
->
max
(
5
)
->
help
(
'诊断数选择设置1-5'
);
$this
->
number
(
'drug_choose_limit'
,
'选择药品限制'
)
->
required
()
->
default
((
$data
[
'drug_choose_limit'
]
??
5
))
->
min
(
1
)
->
max
(
5
)
->
help
(
'药品目录选择数,最多可设置5'
);
$this
->
number
(
'doses_limit'
,
'中药剂量限制'
)
->
required
()
->
default
((
$data
[
'doses_limit'
]
??
1
))
->
min
(
1
)
->
max
(
100
)
->
help
(
'剂量可选择最大值100'
);
// $this->switch('prescription_auto', '医师自动开方')->default(($data['prescription_auto'] ?? 0));
$this
->
text
(
'limit_keywords'
,
'限制关键词'
)
->
default
(
$data
[
'limit_keywords'
]
??
''
)
->
required
()
->
help
(
'多个关键词请用英文逗号分隔'
);
...
...
app/Api/Controllers/PrescriptionController.php
View file @
13b7c59e
...
...
@@ -476,11 +476,16 @@ public function enter(Request $request)
'num'
=>
$drug
[
'num'
],
// 中药为药师录入数量
];
}
$prescription
->
doses
=
$request
->
input
(
'doses'
);
// 剂量
#
$prescription->doses = $request->input('doses'); // 剂量
$prescription
->
drug_info
=
$drug_info
;
}
else
{
return
$this
->
failed
(
'暂不支持该类型处方单录入'
);
}
$prescription
->
status
=
PrescriptionModel
::
PRESCRIPTION_STATUS_PENDING
;
if
(
$prescription
->
save
()
){
return
$this
->
success
(
'录入成功'
);
}
return
$this
->
failed
(
'录入失败'
);
}
}
app/Api/Controllers/SiteConfigController.php
View file @
13b7c59e
...
...
@@ -27,6 +27,7 @@ public function config(Request $request)
$data
=
[
'diagnosis_limit'
=>
$site_config
[
'diagnosis_limit'
],
'drug_choose_limit'
=>
$site_config
[
'drug_choose_limit'
],
'doses_limit'
=>
$site_config
[
'doses_limit'
],
];
return
$this
->
success
(
$data
);
...
...
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