$this->mockRegisterCard($request_data), 'GetCardInfo' => $this->mockGetPatientInfo($request_data), 'GetDepType' => $this->mockGetDepLists($request_data), 'GetDoctList' => $this->mockGetDoctorLists($request_data), 'GetGHMXList' => $this->mockGetRegisterRecordLists($request_data), 'GHCancelCheck' => $this->mockCheckRefundRegisterStatus($request_data), 'GHCancelConfirm' => $this->mockRefundRegister($request_data), 'ListVisitRec' => $this->mockGetPendingLists($request_data), 'ListRecipe' => $this->mockGetPendingDetails($request_data), 'OutpatientExpenseRecord' => $this->mockGetPaidLists($request_data), 'OutpatientDetailRecord' => $this->mockGetPaidDetails($request_data), 'CreateOutpatientinvoiceEBill' => $this->mockCreateElectronInvoice($request_data), 'SendOutpatientinvoiceEBill' => $this->mockSendElectronInvoiceToHis($request_data), 'GetDictionary' => $this->mockGetDictionaryLists($request_data), 'GetChargeList' => $this->mockGetChargeList($request_data), default => throw new GeneralException("Method '{$method_name}' not found"), }; } /** * 响应格式化 * @param mixed $data * @return mixed * @throws Exception */ public function responseFormat(mixed $data): mixed { try { // 此处为xml格式 $obj = simplexml_load_string((string)$data, 'SimpleXMLElement', LIBXML_NOCDATA); return json_decode((string)json_encode($obj), true); } catch (Exception $e) { throw new Exception($e->getMessage()); } } /** * 获取返回值 * @param bool $is_format * @return mixed * @throws Exception */ public function getResult(bool $is_format = true): mixed { return $this->responseFormat($this->transfer_response); } /** * 返回值字段 * @return string */ public function transferResponseStr(): string { return ''; } /** * mockRegisterCard * @param array $params * @return self */ private function mockRegisterCard(array $params): self { $this->transfer_response = '0建卡成功'; return $this; } /** * mockGetPatientInfo * @param array $params * @return self */ private function mockGetPatientInfo(array $params): self { $this->transfer_response = '01104468452323193712153735唐超积11937-12-150123299811204468'; return $this; } /** * mockGetDepLists * @param array $params * @return self */ private function mockGetDepLists(array $params): self { $this->transfer_response = '0Success1234567890内科50.00001531内科专注于诊治呼吸、消化、心血管等系统疾病。5201010152522345678901外科60.00002842外科提供专业的手术治疗服务,包括创伤、整形及器官移植。6301512203033456789012儿科40.00003621儿科为0-18岁儿童提供专业的诊疗与健康管理服务。42588101844567890123皮肤科30.00004411皮肤科诊治常见皮肤病、性病及皮肤美容问题。315765111'; return $this; } /** * mockGetDoctorLists * @param array $params * @return self */ private function mockGetDoctorLists(array $params): self { $this->transfer_response = '0Success1000120001张三内科一诊室主任医师110001300012024-12-271上午班08:0012:0050.00001201510001300022024-12-282下午班14:0018:0055.00002181210001300032024-12-293夜班20:0000:0060.00003108XM0011234567890挂号诊查费50105001000220002李四外科二诊室副主任医师010002300042024-12-271上午班08:0012:0060.00004252010002300052024-12-282下午班14:0018:0065.000052018XM0020987654321挂号诊查费100151500'; return $this; } /** * mockGetRegisterRecordLists * @param array $params * @return self */ private function mockGetRegisterRecordLists(array $params): self { $this->transfer_response = '0成功3405227当天挂号01436002400029682021-07-171103903杨尧2下午600005001000门诊一楼0线上预约1716急诊科3405228预约挂号1586002400029692021-07-181103904李梅1上午600005001001门诊二楼1现场挂号2520内科3405229当天挂号0236002400029702021-07-191103905张强3夜间600005001002急诊大厅2电话预约3018儿科3405230预约挂号1786002400029712021-07-201103906王丽1上午600005001003门诊三楼0线上预约4522眼科'; return $this; } /** * mockCheckRefundRegisterStatus * @param array $params * @return self */ private function mockCheckRefundRegisterStatus(array $params): self { $this->transfer_response = '0可退号'; return $this; } /** * mockRefundRegister * @param array $params * @return self */ private function mockRefundRegister(array $params): self { $this->transfer_response = '0退号成功'; return $this; } private function mockGetPendingLists(array $params) { return [ 'status' => 'success', 'message' => 'Pending list retrieved successfully.', 'data' => [ [ 'visit_no' => '12345', 'patient_id' => $params['PATIENTID'], 'amount' => '100.00' ] ] ]; } private function mockGetPendingDetails(array $params) { return [ 'status' => 'success', 'message' => 'Pending details retrieved successfully.', 'data' => [ 'cf_ids' => $params['CFID'], 'jz_xh' => $params['JZXH'], 'details' => 'Detailed description of the treatment.' ] ]; } /** * mockGetPaidLists * @param array $params * @return self */ private function mockGetPaidLists(array $params): self { $this->transfer_response = '0D00589351叶子璐自费2012-08-2111119-0001251.59251.59251.5900D00589351叶子璐自费2012-08-2111119-0001251.59251.59251.5900'; return $this; } /** * mockGetPaidDetails * @param array $params * @return self */ private function mockGetPaidDetails(array $params): self { $this->transfer_response = '02021-07-1715:22:313324497000098629965.965.9智能药房急诊科梁锦胜1.慢性喘息性支气管炎急性发作8182021-07-1715:13:32西药费0.9%氯化钠注射液100ML12.422.42100ML11QDX-B05XA-L211-B00286902763001266甲类梁锦胜2021-07-1715:14:45西药费复方甘草酸苷片20mg115.5015.5010011QDX-B05XA-L211-B00386902763001267甲类梁锦胜2021-07-1715:15:02西药费头孢克肟胶囊250mg118.3018.3010011QDX-B05XA-L211-B00486902763001268甲类梁锦胜2021-07-1715:16:10西药费氯氮平片25mg122.0022.0010011QDX-B05XA-L211-B00586902763001269甲类梁锦胜2021-07-1715:17:25西药费安定片5mg113.4013.4010011QDX-B05XA-L211-B00686902763001270甲类梁锦胜2021-07-1715:18:42西药费阿莫西林胶囊500mg18.008.0010011QDX-B05XA-L211-B00786902763001271甲类梁锦胜2021-07-1715:19:10西药费双氯芬酸钠胶囊50mg116.8016.8010011QDX-B05XA-L211-B00886902763001272甲类梁锦胜2021-07-1715:19:45西药费利血平片25mg112.3012.3010011QDX-B05XA-L211-B00986902763001273甲类梁锦胜2021-07-1715:20:10西药费依普利酮片25mg130.0030.0010011QDX-B05XA-L211-B01086902763001274甲类梁锦胜'; return $this; } private function mockCreateElectronInvoice(array $params) { return [ 'status' => 'success', 'message' => 'Electron invoice created successfully.', 'data' => $params ]; } private function mockSendElectronInvoiceToHis(array $params) { return [ 'status' => 'success', 'message' => 'Electron invoice sent successfully.', 'data' => $params ]; } /** * mockGetDictionaryLists * @param array $params * @return self */ private function mockGetDictionaryLists(array $params): self { $this->transfer_response = '01手术费2治疗费3中药费4西药费5检查费6诊查费7护理费'; return $this; } /** * mockGetChargeList * @param array $params * @return self */ private function mockGetChargeList(array $params): self { $this->transfer_response = '0西药费苯巴比妥片30MG上海信谊药厂0.097西药费阿莫西林胶囊500MG华北制药厂0.12用于治疗细菌感染西药费复方氯噻吨片0.25G长春药业0.15缓解高血压症状西药费洛伐他汀片20MG中科院制药0.25降低血脂西药费维生素C片500MG美国善格0.05增强免疫力西药费布洛芬片200MG华药集团0.1缓解轻度疼痛西药费氯氮平片25MG南京医药0.3用于治疗精神分裂症西药费头孢克肟胶囊500MG石药集团0.18抗菌药物西药费硝苯地平片10MG国药集团0.2用于治疗高血压西药费美托洛尔片25MG拜耳制药0.22用于治疗心脏病西药费甲硝唑片250MG南京同仁堂0.12用于治疗感染西药费阿托伐他汀片10MG默沙东0.3调节血脂西药费硫酸氢氯噻吨片12.5MG齐鲁制药0.15用于治疗水肿西药费兰索拉唑胶囊30MG百时美施贵宝0.18治疗胃酸过多'; return $this; } }