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
f5443991
authored
Dec 23, 2024
by
赵增煜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导入580测试
parent
e67dc2b0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
app/Admin/Extensions/ToolBar/Forms/ExternalPrescriptionImportForm.php
+13
-13
No files found.
app/Admin/Extensions/ToolBar/Forms/ExternalPrescriptionImportForm.php
View file @
f5443991
...
...
@@ -41,9 +41,9 @@ public function handle(array $input): JsonResponse
$prescriptions
=
[];
foreach
(
$data
as
$row
){
$prescriptionNo
=
$row
[
'处方编号'
];
$drug_info
[
'drug_name'
]
=
$row
[
'药品名称'
];
$drug_info
[
'drug_spec'
]
=
$row
[
'药品规格'
];
$drug_info
[
'drug_num'
]
=
$row
[
'药品数量'
];
$drug_info
[
'drug_name'
]
=
$row
[
'药品名称'
]
??
''
;
$drug_info
[
'drug_spec'
]
=
$row
[
'药品规格'
]
??
''
;
$drug_info
[
'drug_num'
]
=
$row
[
'药品数量'
]
??
0
;
if
(
!
isset
(
$prescriptions
[
$prescriptionNo
])){
$prescriptions
[
$prescriptionNo
]
=
$row
;
}
...
...
@@ -59,7 +59,7 @@ public function handle(array $input): JsonResponse
// 查找对应的药店ID
$pharmacy
=
PharmacyModel
::
where
(
'name'
,
$prescription
[
'门店名称'
])
->
first
();
$pharmacyId
=
0
;
if
(
!
$pharmacy
){
if
(
$pharmacy
){
$pharmacyId
=
$pharmacy
->
id
;
}
$externalPrescriptionModel
->
external_prescription_id
=
$prescriptionNo
;
...
...
@@ -73,16 +73,16 @@ public function handle(array $input): JsonResponse
$externalPrescriptionModel
->
patient_mobile
=
$prescription
[
'就诊人电话'
];
$externalPrescriptionModel
->
patient_gender
=
self
::
getGender
(
$prescription
[
'就诊人性别'
]);
$externalPrescriptionModel
->
patient_age
=
$prescription
[
'就诊人年龄'
];
$externalPrescriptionModel
->
patient_id_card
=
$prescription
[
'就诊人身份证号'
];
$externalPrescriptionModel
->
doctor_name
=
$prescription
[
'接诊医师姓名'
];
$externalPrescriptionModel
->
patient_id_card
=
$prescription
[
'就诊人身份证号'
]
??
''
;
$externalPrescriptionModel
->
doctor_name
=
$prescription
[
'接诊医师姓名'
]
??
''
;
$externalPrescriptionModel
->
diagnosis
=
$prescription
[
'诊断'
];
$externalPrescriptionModel
->
drug_info
=
$prescription
[
'药品明细'
]
;
$externalPrescriptionModel
->
pharmacist_name
=
$prescription
[
'审核药师'
];
$externalPrescriptionModel
->
review_at
=
$prescription
[
'药师审核时间'
];
$externalPrescriptionModel
->
pharmacist_attr
=
$prescription
[
'药师属性'
];
$externalPrescriptionModel
->
dispatcher
=
$prescription
[
'调配人'
];
$externalPrescriptionModel
->
checker
=
$prescription
[
'核对人'
];
$externalPrescriptionModel
->
dispenser
=
$prescription
[
'发药人'
];
$externalPrescriptionModel
->
drug_info
=
json_encode
(
$prescription
[
'药品明细'
])
;
$externalPrescriptionModel
->
pharmacist_name
=
$prescription
[
'审核药师'
]
??
''
;
$externalPrescriptionModel
->
review_at
=
$prescription
[
'药师审核时间'
]
??
''
;
$externalPrescriptionModel
->
pharmacist_attr
=
$prescription
[
'药师属性'
]
??
''
;
$externalPrescriptionModel
->
dispatcher
=
$prescription
[
'调配人'
]
??
''
;
$externalPrescriptionModel
->
checker
=
$prescription
[
'核对人'
]
??
''
;
$externalPrescriptionModel
->
dispenser
=
$prescription
[
'发药人'
]
??
''
;
if
(
$externalPrescriptionModel
->
save
()
){
$successNum
++
;
}
...
...
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