Commit a48e07e1 by 赵增煜

新增字段是否为医保处方

parent b5e974c2
......@@ -20,6 +20,15 @@ protected function grid()
return Grid::make(new ExternalCmPrescription(), function (Grid $grid) {
$grid->model()->orderBy('id', 'desc');
$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){
if($idcardTypeCode == "01"){
return '身份证';
......
......@@ -20,6 +20,15 @@ protected function grid()
return Grid::make(new ExternalWmPrescription(), function (Grid $grid) {
$grid->model()->orderBy('id', 'desc');
$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){
if($idcardTypeCode == "01"){
return '身份证';
......
......@@ -42,6 +42,7 @@ public function handle()
"pageSize"=>20,
];
$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) {
// 设置当前页码参数
$params = array_merge($baseParams, [
......@@ -119,6 +120,9 @@ public function handle()
if (isset($item['addAmountItems'])) {
$prescription->addAmountItems = json_encode($item['addAmountItems'], JSON_UNESCAPED_UNICODE); // 处方附加服务费用明细
}
// 是否医保处方
$prescription->medicalInsurance = $item['medicalInsurance'] ?? null;
$prescription->updated_at = Carbon::now();
// 保存数据
$prescription->save();
......@@ -180,6 +184,8 @@ public function handle()
if (isset($item['addAmountItems'])) {
$prescription->addAmountItems = json_encode($item['addAmountItems'], JSON_UNESCAPED_UNICODE); // 处方附加服务费用明细
}
// 是否医保处方
$prescription->medicalInsurance = $item['medicalInsurance'] ?? null;
// 保存数据
$prescription->save();
......
......@@ -107,6 +107,9 @@ public function handle()
if (isset($item['addAmountItems'])) {
$prescription->addAmountItems = json_encode($item['addAmountItems'], JSON_UNESCAPED_UNICODE); // 处方附加服务费用明细
}
// 是否医保处方
$prescription->medicalInsurance = $item['medicalInsurance'] ?? null;
$prescription->updated_at = Carbon::now();
// 保存数据
$prescription->save();
......@@ -159,6 +162,8 @@ public function handle()
if (isset($item['addAmountItems'])) {
$prescription->addAmountItems = json_encode($item['addAmountItems'], JSON_UNESCAPED_UNICODE); // 处方附加服务费用明细
}
// 是否医保处方
$prescription->medicalInsurance = $item['medicalInsurance'] ?? null;
// 保存数据
$prescription->save();
}
......
......@@ -31,7 +31,7 @@ private function sendRequest($endpoint, $data) {
$url = $this->baseUrl . $endpoint;
print_r($url . "\n");
$data_string = json_encode($data);
print_r($data_string . "\n");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
......@@ -46,7 +46,7 @@ private function sendRequest($endpoint, $data) {
);
$result = curl_exec($ch);
curl_close($ch);
print_r($data_string . "\n");
// print_r($data_string . "\n");
// print_r($result . "\n");
return json_decode($result, true);
}
......
......@@ -40,6 +40,7 @@ public function up()
$table->string('rotateTypeCode')->default('')->comment('处方流向类型');
$table->longText('items')->comment('处方明细');
$table->longText('addAmountItems')->comment('处方附加服务费用明细');
$table->string('medicalInsurance')->default('')->comment('是否医保处方(0:不是,1:是)');
$table->timestamps();
});
}
......
......@@ -49,6 +49,7 @@ public function up()
$table->string('rotateTypeCode')->default('')->comment('处方流向类型');
$table->longText('items')->comment('处方明细');
$table->longText('addAmountItems')->comment('处方附加服务费用明细');
$table->string('medicalInsurance')->default('')->comment('是否医保处方(0:不是,1:是)');
$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