|
|
@ -68,15 +68,14 @@ class ClientMockHttpTransfer extends HttpTransferAbstract |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 响应格式化 |
|
|
|
* 响应格式化 |
|
|
|
* @param mixed $data |
|
|
|
|
|
|
|
* @return mixed |
|
|
|
* @return mixed |
|
|
|
* @throws Exception |
|
|
|
* @throws Exception |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function responseFormat(mixed $data): mixed |
|
|
|
public function responseFormat(): mixed |
|
|
|
{ |
|
|
|
{ |
|
|
|
try { |
|
|
|
try { |
|
|
|
// 此处为json格式 |
|
|
|
// 此处为json格式 |
|
|
|
return json_decode((string)$data, true); |
|
|
|
return json_decode((string)$this->transfer_response, true); |
|
|
|
} catch (Exception $e) { |
|
|
|
} catch (Exception $e) { |
|
|
|
throw new Exception($e->getMessage()); |
|
|
|
throw new Exception($e->getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
@ -115,11 +114,12 @@ class ClientMockHttpTransfer extends HttpTransferAbstract |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private function mockGetPatientInfo(array $params): self |
|
|
|
private function mockGetPatientInfo(array $params): self |
|
|
|
{ |
|
|
|
{ |
|
|
|
$patient_id = random_int(1000000, 9999999); |
|
|
|
// $patient_id = random_int(1000000, 9999999); |
|
|
|
$patient_number = random_int(100000, 999999). random_int(100000, 999999); |
|
|
|
// $patient_number = random_int(100000, 999999). random_int(100000, 999999); |
|
|
|
$card_no = &$params['json']['cardNo']; |
|
|
|
// $card_no = &$params['json']['cardNo']; |
|
|
|
$name = &$params['json']['name']; |
|
|
|
// $name = &$params['json']['name']; |
|
|
|
$this->transfer_response = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":{"patientId":"'. $patient_id.' ","cardNo":"'. $card_no. '","name":"'. ($name ?: '谭玉山').'","sex":"1","birthday":"1999-03-24","cardStatus":"0","naturePatients":"123","patientNumber":"'. $patient_number. '"}}'; |
|
|
|
// $this->transfer_response = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":{"patientId":"'. $patient_id.' ","cardNo":"'. $card_no. '","name":"'. ($name ?: '谭玉山').'","sex":"1","birthday":"1999-03-24","cardStatus":"0","naturePatients":"123","patientNumber":"'. $patient_number. '"}}'; |
|
|
|
|
|
|
|
$this->transfer_response = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":{"patientId":"2247368","cardNo":"440402197605115715","name":"黄华峰","sex":"0","birthday":"1976-05-11","cardStatus":"0","naturePatients":"123","patientNumber":"288712347368"}}'; |
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
} |
|
|
@ -202,7 +202,7 @@ class ClientMockHttpTransfer extends HttpTransferAbstract |
|
|
|
{ |
|
|
|
{ |
|
|
|
$date_1 = date('Ymd'); |
|
|
|
$date_1 = date('Ymd'); |
|
|
|
$date_2 = date('Y-m-d'); |
|
|
|
$date_2 = date('Y-m-d'); |
|
|
|
$this->transfer_response = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":[{"idCardNo":"230403199903245493","visitType":"门诊","visitDate":"'.$date_1.'","strVisitDate":"'.$date_2.'","outpatientDiagnosis":"健康查体,健康查体,健康查体,健康查体,健康查体,健康查体,健康查体","treatmentDepartment":"132","departmentName":"急诊内科","regId":"0","prescriptionId":"1-17488657","prescriptionAmount":"1","singleAmount":"1","doctorId":"10365","doctorName":"管理员","remarks":"","isexpense":"1","strExpense":"自费","nrescriptionNumber":"1-17488657","takeMedicine":null,"visitNumber":"3896308"}]}'; |
|
|
|
$this->transfer_response = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":[{"idCardNo":"360825199901303214","visitType":"门诊","visitDate":"'.$date_1.'","strVisitDate":"2025年3月13日","outpatientDiagnosis":"健康查体,健康查体,健康查体,健康查体,健康查体,健康查体,健康查体","treatmentDepartment":"127","departmentName":"五官科","regId":"0","prescriptionId":"4-10259173","prescriptionAmount":"22.38","singleAmount":"12.96","doctorId":"10365","doctorName":"管理员","remarks":"","isexpense":"1","strExpense":"自费","nrescriptionNumber":"4-10259173","takeMedicine":null,"visitNumber":"3936931"},{"idCardNo":"360825199901303214","visitType":"门诊","visitDate":"'.$date_1.'","strVisitDate":"2025年3月13日","outpatientDiagnosis":"健康查体,健康查体,健康查体,健康查体,健康查体,健康查体,健康查体","treatmentDepartment":"127","departmentName":"五官科","regId":"0","prescriptionId":"1-17643828","prescriptionAmount":"22.38","singleAmount":".75","doctorId":"10365","doctorName":"管理员","remarks":"","isexpense":"1","strExpense":"自费","nrescriptionNumber":"1-17643828","takeMedicine":null,"visitNumber":"3936931"},{"idCardNo":"360825199901303214","visitType":"门诊","visitDate":"'.$date_1.'","strVisitDate":"2025年3月13日","outpatientDiagnosis":"健康查体,健康查体,健康查体,健康查体,健康查体,健康查体,健康查体","treatmentDepartment":"127","departmentName":"五官科","regId":"0","prescriptionId":"5-10259166","prescriptionAmount":"22.38","singleAmount":"8.1","doctorId":"10365","doctorName":"管理员","remarks":"","isexpense":"1","strExpense":"自费","nrescriptionNumber":"5-10259166","takeMedicine":null,"visitNumber":"3936931"},{"idCardNo":"360825199901303214","visitType":"门诊","visitDate":"'.$date_1.'","strVisitDate":"2025年3月13日","outpatientDiagnosis":"健康查体,健康查体,健康查体,健康查体,健康查体,健康查体,健康查体","treatmentDepartment":"127","departmentName":"五官科","regId":"0","prescriptionId":"2-10259174","prescriptionAmount":"22.38","singleAmount":".57","doctorId":"10365","doctorName":"管理员","remarks":"","isexpense":"1","strExpense":"自费","nrescriptionNumber":"2-10259174","takeMedicine":null,"visitNumber":"3936931"},{"idCardNo":"360825199901303214","visitType":"门诊","visitDate":"'.$date_1.'","strVisitDate":"2025年3月13日","outpatientDiagnosis":"健康查体,健康查体,健康查体,健康查体,健康查体,健康查体,健康查体","treatmentDepartment":"127","departmentName":"五官科","regId":"0","prescriptionId":"2-10259175","prescriptionAmount":"21.54","singleAmount":".54","doctorId":"10365","doctorName":"管理员","remarks":"","isexpense":"1","strExpense":"自费","nrescriptionNumber":"2-10259175","takeMedicine":null,"visitNumber":"3936932"},{"idCardNo":"360825199901303214","visitType":"门诊","visitDate":"'.$date_1.'","strVisitDate":"2025年3月13日","outpatientDiagnosis":"健康查体,健康查体,健康查体,健康查体,健康查体,健康查体,健康查体","treatmentDepartment":"127","departmentName":"五官科","regId":"0","prescriptionId":"2-10259176","prescriptionAmount":"21.54","singleAmount":"21","doctorId":"10365","doctorName":"管理员","remarks":"","isexpense":"1","strExpense":"自费","nrescriptionNumber":"2-10259176","takeMedicine":null,"visitNumber":"3936932"}]}'; |
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
} |
|
|
@ -215,7 +215,7 @@ class ClientMockHttpTransfer extends HttpTransferAbstract |
|
|
|
private function mockGetPendingDetails(array $params) |
|
|
|
private function mockGetPendingDetails(array $params) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$date = date('Y-m-d'); |
|
|
|
$date = date('Y-m-d'); |
|
|
|
$this->transfer_response = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":[{"feeDate":"'.$date.'","itemNo":"11283271","projectNumber":"1547","entryName":"0.9%氯化钠注射液G","unitPrice":"1","quantity":"1","money":"1","remarks":null,"projectSpecifications":"100ML:0.9G/瓶","prescriptionNumber":"1-17488657","company":"瓶","prescriptionType":"西药","treatmentDepartment":"132","departmentName":"急诊内科","doctorNumber":"10365","doctorName":"管理员","ysybdm":"D440402003702","gjmlbm":"XB05XAL211B002030902763"}]}'; |
|
|
|
$this->transfer_response = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":[{"feeDate":"'.$date.'","itemNo":"11382601","projectNumber":"1388","entryName":"阿苯达唑片G","unitPrice":".75","quantity":"1","money":".75","remarks":null,"projectSpecifications":"0.2GX10片/盒","prescriptionNumber":"1-17643828","company":"片","prescriptionType":"西药","treatmentDepartment":"127","departmentName":"五官科","doctorNumber":"10365","doctorName":"管理员","ysybdm":"D440402003702","gjmlbm":"XP02CAA010A001020101884"},{"feeDate":"'.$date.'","itemNo":"25078374","projectNumber":"1674","entryName":"*RH血型鉴定","unitPrice":"4.86","quantity":"1","money":"4.86","remarks":null,"projectSpecifications":null,"prescriptionNumber":"4-10259173","company":"次","prescriptionType":"检验单","treatmentDepartment":"127","departmentName":"五官科","doctorNumber":"10365","doctorName":"管理员","ysybdm":"D440402003702","gjmlbm":"002600000040000-260000004"},{"feeDate":"'.$date.'","itemNo":"25078375","projectNumber":"1687","entryName":"*ABO血型鉴定","unitPrice":"8.1","quantity":"1","money":"8.1","remarks":null,"projectSpecifications":null,"prescriptionNumber":"4-10259173","company":"次","prescriptionType":"检验单","treatmentDepartment":"127","departmentName":"五官科","doctorNumber":"10365","doctorName":"管理员","ysybdm":"D440402003702","gjmlbm":"002600000020000-260000002"},{"feeDate":"'.$date.'","itemNo":"25078357","projectNumber":"6629","entryName":"普通透视(使用影像增强器或电视屏)","unitPrice":"8.1","quantity":"1","money":"8.1","remarks":null,"projectSpecifications":null,"prescriptionNumber":"5-10259166","company":"每部位","prescriptionType":"处置单","treatmentDepartment":"127","departmentName":"五官科","doctorNumber":"10365","doctorName":"管理员","ysybdm":"D440402003702","gjmlbm":"002101010010000-210101001-1"},{"feeDate":"'.$date.'","itemNo":"25078377","projectNumber":"7938","entryName":"EDTAK2(紫色)2ML,13*75MM一次性使用人体静脉血样采集容器","unitPrice":".28","quantity":"1","money":".28","remarks":null,"projectSpecifications":null,"prescriptionNumber":"2-10259174","company":"支","prescriptionType":"治疗单","treatmentDepartment":"127","departmentName":"五官科","doctorNumber":"10365","doctorName":"管理员","ysybdm":"D440402003702","gjmlbm":"C1423022030001008207"},{"feeDate":"'.$date.'","itemNo":"25078376","projectNumber":"7924","entryName":"一次性使用采血针XYII蝶翼型0.7","unitPrice":".29","quantity":"1","money":".29","remarks":null,"projectSpecifications":null,"prescriptionNumber":"2-10259174","company":"包","prescriptionType":"治疗单","treatmentDepartment":"127","departmentName":"五官科","doctorNumber":"10365","doctorName":"管理员","ysybdm":"D440402003702","gjmlbm":"C1603062150000200629"}]}'; |
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
} |
|
|
@ -251,7 +251,7 @@ class ClientMockHttpTransfer extends HttpTransferAbstract |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private function mockGetPaidDetails(array $params): self |
|
|
|
private function mockGetPaidDetails(array $params): self |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->transfer_response = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":{"settlementDate":"2025-02-07","treaId":"6497702","hostranno":"ZZ00000049","costs":"1","expensePay":"1","medicalPayment":"","phyAddress":"门诊西药房","depName":"急诊内科","doctName":"管理员","outpatientDiagnosis":"1.健康查体","chargeStaff":"20","outpatientDetail":{"outpatientItemreList":[{"visitdate":"2025-02-07","classname":"西药费","itemname":"0.9%氯化钠注射液G","itemspec":"100ML:0.9G/瓶","units":"瓶","amount":"1","arice":"1","costs":"1","ztmc":"","ycjl":"100","jldw":"ML","yyts":"1","mrcs":"1","pcmc":"QD","ypbm":"XB05XAL211B002030902763","yjbm":"86902763001266","ybfl":"甲类","ygxm":"管理员"}]}}}'; |
|
|
|
$this->transfer_response = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":{"settlementDate":"2025-03-13","treaId":"6558450","hostranno":"ZZJ00000052","costs":"22.38","expensePay":"22.38","medicalPayment":"","phyAddress":"门诊西药房","depName":"五官科","doctName":"管理员","outpatientDiagnosis":"1.健康查体","chargeStaff":"20","outpatientDetail":[{"outpatientItemreList":[{"visitdate":"2025-03-13","classname":"西药费","itemname":"阿苯达唑片G","itemspec":"0.2GX10片/盒","units":"片","amount":"1","price":".75","costs":".75","ztmc":"","ycjl":".2","jldw":"G","yyts":"1","mrcs":"1","pcmc":"QD","ypbm":"XP02CAA010A001020101884","yjbm":"86901884000028","ybfl":"甲类","ygxm":"管理员"}]},{"outpatientItemreList":[{"visitdate":"2025-03-13","classname":"X光费","itemname":"普通透视(使用影像增强器或电视屏)","itemspec":null,"units":"每部位","amount":"1","price":"8.1","costs":"8.1","ztmc":"腹部透视","ycjl":null,"jldw":null,"yyts":null,"mrcs":null,"pcmc":null,"ypbm":"002101010010000-210101001-1","yjbm":null,"ybfl":"甲类","ygxm":"管理员"}]},{"outpatientItemreList":[{"visitdate":"2025-03-13","classname":"检验费","itemname":"*ABO血型鉴定","itemspec":null,"units":"次","amount":"1","price":"8.1","costs":"8.1","ztmc":"ABO+RH血型","ycjl":null,"jldw":null,"yyts":null,"mrcs":null,"pcmc":null,"ypbm":"002600000020000-260000002","yjbm":null,"ybfl":"甲类","ygxm":"管理员"}]},{"outpatientItemreList":[{"visitdate":"2025-03-13","classname":"检验费","itemname":"*RH血型鉴定","itemspec":null,"units":"次","amount":"1","price":"4.86","costs":"4.86","ztmc":"ABO+RH血型","ycjl":null,"jldw":null,"yyts":null,"mrcs":null,"pcmc":null,"ypbm":"002600000040000-260000004","yjbm":null,"ybfl":"甲类","ygxm":"管理员"}]},{"outpatientItemreList":[{"visitdate":"2025-03-13","classname":"医材费","itemname":"一次性使用采血针XYII蝶翼型0.7","itemspec":null,"units":"包","amount":"1","price":".29","costs":".29","ztmc":"","ycjl":null,"jldw":null,"yyts":null,"mrcs":null,"pcmc":null,"ypbm":"C1603062150000200629","yjbm":null,"ybfl":"甲类","ygxm":"管理员"}]},{"outpatientItemreList":[{"visitdate":"2025-03-13","classname":"医材费","itemname":"EDTAK2(紫色)2ML,13*75MM一次性使用人体静脉血样采集容器","itemspec":null,"units":"支","amount":"1","price":".28","costs":".28","ztmc":"","ycjl":null,"jldw":null,"yyts":null,"mrcs":null,"pcmc":null,"ypbm":"C1423022030001008207","yjbm":null,"ybfl":"甲类","ygxm":"管理员"}]}]}}'; |
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
} |
|
|
@ -293,7 +293,7 @@ class ClientMockHttpTransfer extends HttpTransferAbstract |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private function mockGetChargeList(array $params): self |
|
|
|
private function mockGetChargeList(array $params): self |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->transfer_response = '<RESPONSE><RESULTCODE>0</RESULTCODE><ERRORMSG></ERRORMSG><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>苯巴比妥片</COSTNAME><UNIT>片</UNIT><COSTSPEC>30MG</COSTSPEC><CDNAME>上海信谊药厂</CDNAME><PRICE>0.097</PRICE><REMARK></REMARK></ITEM><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>阿莫西林胶囊</COSTNAME><UNIT>粒</UNIT><COSTSPEC>500MG</COSTSPEC><CDNAME>华北制药厂</CDNAME><PRICE>0.12</PRICE><REMARK>用于治疗细菌感染</REMARK></ITEM><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>复方氯噻吨片</COSTNAME><UNIT>片</UNIT><COSTSPEC>0.25G</COSTSPEC><CDNAME>长春药业</CDNAME><PRICE>0.15</PRICE><REMARK>缓解高血压症状</REMARK></ITEM><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>洛伐他汀片</COSTNAME><UNIT>片</UNIT><COSTSPEC>20MG</COSTSPEC><CDNAME>中科院制药</CDNAME><PRICE>0.25</PRICE><REMARK>降低血脂</REMARK></ITEM><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>维生素C片</COSTNAME><UNIT>片</UNIT><COSTSPEC>500MG</COSTSPEC><CDNAME>美国善格</CDNAME><PRICE>0.05</PRICE><REMARK>增强免疫力</REMARK></ITEM><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>布洛芬片</COSTNAME><UNIT>片</UNIT><COSTSPEC>200MG</COSTSPEC><CDNAME>华药集团</CDNAME><PRICE>0.1</PRICE><REMARK>缓解轻度疼痛</REMARK></ITEM><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>氯氮平片</COSTNAME><UNIT>片</UNIT><COSTSPEC>25MG</COSTSPEC><CDNAME>南京医药</CDNAME><PRICE>0.3</PRICE><REMARK>用于治疗精神分裂症</REMARK></ITEM><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>头孢克肟胶囊</COSTNAME><UNIT>粒</UNIT><COSTSPEC>500MG</COSTSPEC><CDNAME>石药集团</CDNAME><PRICE>0.18</PRICE><REMARK>抗菌药物</REMARK></ITEM><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>硝苯地平片</COSTNAME><UNIT>片</UNIT><COSTSPEC>10MG</COSTSPEC><CDNAME>国药集团</CDNAME><PRICE>0.2</PRICE><REMARK>用于治疗高血压</REMARK></ITEM><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>美托洛尔片</COSTNAME><UNIT>片</UNIT><COSTSPEC>25MG</COSTSPEC><CDNAME>拜耳制药</CDNAME><PRICE>0.22</PRICE><REMARK>用于治疗心脏病</REMARK></ITEM><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>甲硝唑片</COSTNAME><UNIT>片</UNIT><COSTSPEC>250MG</COSTSPEC><CDNAME>南京同仁堂</CDNAME><PRICE>0.12</PRICE><REMARK>用于治疗感染</REMARK></ITEM><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>阿托伐他汀片</COSTNAME><UNIT>片</UNIT><COSTSPEC>10MG</COSTSPEC><CDNAME>默沙东</CDNAME><PRICE>0.3</PRICE><REMARK>调节血脂</REMARK></ITEM><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>硫酸氢氯噻吨片</COSTNAME><UNIT>片</UNIT><COSTSPEC>12.5MG</COSTSPEC><CDNAME>齐鲁制药</CDNAME><PRICE>0.15</PRICE><REMARK>用于治疗水肿</REMARK></ITEM><ITEM><TYPENAME>西药费</TYPENAME><COSTNAME>兰索拉唑胶囊</COSTNAME><UNIT>粒</UNIT><COSTSPEC>30MG</COSTSPEC><CDNAME>百时美施贵宝</CDNAME><PRICE>0.18</PRICE><REMARK>治疗胃酸过多</REMARK></ITEM></RESPONSE>'; |
|
|
|
$this->transfer_response = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":[{"typeName":"草药费","costName":"莲子","unit":"G","costSpec":"10GX100小包/袋","manufacturer":"岭南中药饮片有","price":".08875","remark":""},{"typeName":"草药费","costName":"茯苓","unit":"G","costSpec":"10GX100小包/袋","manufacturer":"广州至信中药饮","price":".0925","remark":""}]}'; |
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
} |
|
|
|