Commit 599320b4 by 赵增煜

Merge branch 'local-0409' into develop

parents 0a06bd67 a48e07e1
...@@ -20,6 +20,15 @@ protected function grid() ...@@ -20,6 +20,15 @@ protected function grid()
return Grid::make(new ExternalCmPrescription(), function (Grid $grid) { return Grid::make(new ExternalCmPrescription(), function (Grid $grid) {
$grid->model()->orderBy('id', 'desc'); $grid->model()->orderBy('id', 'desc');
$grid->column('id')->sortable(); $grid->column('id')->sortable();
$grid->column('medicalInsurance','是否医保处方')->display(function ($medicalInsurance){
if($medicalInsurance == "1"){
return '是';
}else if($medicalInsurance == "0"){
return '否';
}else{
return '未知';
}
});
$grid->column('idcardTypeCode')->display(function($idcardTypeCode){ $grid->column('idcardTypeCode')->display(function($idcardTypeCode){
if($idcardTypeCode == "01"){ if($idcardTypeCode == "01"){
return '身份证'; return '身份证';
......
...@@ -20,6 +20,15 @@ protected function grid() ...@@ -20,6 +20,15 @@ protected function grid()
return Grid::make(new ExternalWmPrescription(), function (Grid $grid) { return Grid::make(new ExternalWmPrescription(), function (Grid $grid) {
$grid->model()->orderBy('id', 'desc'); $grid->model()->orderBy('id', 'desc');
$grid->column('id')->sortable(); $grid->column('id')->sortable();
$grid->column('medicalInsurance','是否医保处方')->display(function ($medicalInsurance){
if($medicalInsurance == "1"){
return '是';
}else if($medicalInsurance == "0"){
return '否';
}else{
return '未知';
}
});
$grid->column('idcardTypeCode')->display(function($idcardTypeCode){ $grid->column('idcardTypeCode')->display(function($idcardTypeCode){
if($idcardTypeCode == "01"){ if($idcardTypeCode == "01"){
return '身份证'; return '身份证';
......
...@@ -42,6 +42,7 @@ public function handle() ...@@ -42,6 +42,7 @@ public function handle()
"pageSize"=>20, "pageSize"=>20,
]; ];
$eHospitalApi = new ExternalService(env('580_APP_KEY'), env('580_APP_SECRET'), env('580_DOMAIN')); $eHospitalApi = new ExternalService(env('580_APP_KEY'), env('580_APP_SECRET'), env('580_DOMAIN'));
print_r(env('580_APP_KEY'). '----' . env('580_APP_SECRET') ."----". env('580_DOMAIN')."\n");
while ($pageNum <= $maxPage) { while ($pageNum <= $maxPage) {
// 设置当前页码参数 // 设置当前页码参数
$params = array_merge($baseParams, [ $params = array_merge($baseParams, [
...@@ -119,6 +120,9 @@ public function handle() ...@@ -119,6 +120,9 @@ public function handle()
if (isset($item['addAmountItems'])) { if (isset($item['addAmountItems'])) {
$prescription->addAmountItems = json_encode($item['addAmountItems'], JSON_UNESCAPED_UNICODE); // 处方附加服务费用明细 $prescription->addAmountItems = json_encode($item['addAmountItems'], JSON_UNESCAPED_UNICODE); // 处方附加服务费用明细
} }
// 是否医保处方
$prescription->medicalInsurance = $item['medicalInsurance'] ?? null;
$prescription->updated_at = Carbon::now(); $prescription->updated_at = Carbon::now();
// 保存数据 // 保存数据
$prescription->save(); $prescription->save();
...@@ -180,6 +184,8 @@ public function handle() ...@@ -180,6 +184,8 @@ public function handle()
if (isset($item['addAmountItems'])) { if (isset($item['addAmountItems'])) {
$prescription->addAmountItems = json_encode($item['addAmountItems'], JSON_UNESCAPED_UNICODE); // 处方附加服务费用明细 $prescription->addAmountItems = json_encode($item['addAmountItems'], JSON_UNESCAPED_UNICODE); // 处方附加服务费用明细
} }
// 是否医保处方
$prescription->medicalInsurance = $item['medicalInsurance'] ?? null;
// 保存数据 // 保存数据
$prescription->save(); $prescription->save();
......
...@@ -107,6 +107,9 @@ public function handle() ...@@ -107,6 +107,9 @@ public function handle()
if (isset($item['addAmountItems'])) { if (isset($item['addAmountItems'])) {
$prescription->addAmountItems = json_encode($item['addAmountItems'], JSON_UNESCAPED_UNICODE); // 处方附加服务费用明细 $prescription->addAmountItems = json_encode($item['addAmountItems'], JSON_UNESCAPED_UNICODE); // 处方附加服务费用明细
} }
// 是否医保处方
$prescription->medicalInsurance = $item['medicalInsurance'] ?? null;
$prescription->updated_at = Carbon::now(); $prescription->updated_at = Carbon::now();
// 保存数据 // 保存数据
$prescription->save(); $prescription->save();
...@@ -159,6 +162,8 @@ public function handle() ...@@ -159,6 +162,8 @@ public function handle()
if (isset($item['addAmountItems'])) { if (isset($item['addAmountItems'])) {
$prescription->addAmountItems = json_encode($item['addAmountItems'], JSON_UNESCAPED_UNICODE); // 处方附加服务费用明细 $prescription->addAmountItems = json_encode($item['addAmountItems'], JSON_UNESCAPED_UNICODE); // 处方附加服务费用明细
} }
// 是否医保处方
$prescription->medicalInsurance = $item['medicalInsurance'] ?? null;
// 保存数据 // 保存数据
$prescription->save(); $prescription->save();
} }
......
...@@ -31,7 +31,7 @@ private function sendRequest($endpoint, $data) { ...@@ -31,7 +31,7 @@ private function sendRequest($endpoint, $data) {
$url = $this->baseUrl . $endpoint; $url = $this->baseUrl . $endpoint;
print_r($url . "\n"); print_r($url . "\n");
$data_string = json_encode($data); $data_string = json_encode($data);
print_r($data_string . "\n");
$ch = curl_init(); $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
...@@ -46,7 +46,7 @@ private function sendRequest($endpoint, $data) { ...@@ -46,7 +46,7 @@ private function sendRequest($endpoint, $data) {
); );
$result = curl_exec($ch); $result = curl_exec($ch);
curl_close($ch); curl_close($ch);
print_r($data_string . "\n"); // print_r($data_string . "\n");
// print_r($result . "\n"); // print_r($result . "\n");
return json_decode($result, true); return json_decode($result, true);
} }
......
...@@ -40,6 +40,7 @@ public function up() ...@@ -40,6 +40,7 @@ public function up()
$table->string('rotateTypeCode')->default('')->comment('处方流向类型'); $table->string('rotateTypeCode')->default('')->comment('处方流向类型');
$table->longText('items')->comment('处方明细'); $table->longText('items')->comment('处方明细');
$table->longText('addAmountItems')->comment('处方附加服务费用明细'); $table->longText('addAmountItems')->comment('处方附加服务费用明细');
$table->string('medicalInsurance')->default('')->comment('是否医保处方(0:不是,1:是)');
$table->timestamps(); $table->timestamps();
}); });
} }
......
...@@ -49,6 +49,7 @@ public function up() ...@@ -49,6 +49,7 @@ public function up()
$table->string('rotateTypeCode')->default('')->comment('处方流向类型'); $table->string('rotateTypeCode')->default('')->comment('处方流向类型');
$table->longText('items')->comment('处方明细'); $table->longText('items')->comment('处方明细');
$table->longText('addAmountItems')->comment('处方附加服务费用明细'); $table->longText('addAmountItems')->comment('处方附加服务费用明细');
$table->string('medicalInsurance')->default('')->comment('是否医保处方(0:不是,1:是)');
$table->timestamps(); $table->timestamps();
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment