$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 = '0Success- 1234567890内科50.00001531内科专注于诊治呼吸、消化、心血管等系统疾病。520101015252
- 2345678901外科60.00002842外科提供专业的手术治疗服务,包括创伤、整形及器官移植。630151220303
- 3456789012儿科40.00003621儿科为0-18岁儿童提供专业的诊疗与健康管理服务。4258810184
- 4567890123皮肤科30.00004411皮肤科诊治常见皮肤病、性病及皮肤美容问题。315765111
';
return $this;
}
/**
* mockGetDoctorLists
* @param array $params
* @return self
*/
private function mockGetDoctorLists(array $params): self
{
$this->transfer_response = '0Success- 1000120001张三内科一诊室主任医师110001300012024-12-271上午班08:0012:0050.00001201510001300022024-12-282下午班14:0018:0055.00002181210001300032024-12-293夜班20:0000:0060.00003108XM0011234567890挂号诊查费5010500
- 1000220002李四外科二诊室副主任医师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%氯化钠注射液100ML瓶12.422.42100ML11QDX-B05XA-L211-B00286902763001266甲类梁锦胜2021-07-1715:14:45西药费复方甘草酸苷片20mg瓶115.5015.50100片11QDX-B05XA-L211-B00386902763001267甲类梁锦胜2021-07-1715:15:02西药费头孢克肟胶囊250mg盒118.3018.30100粒11QDX-B05XA-L211-B00486902763001268甲类梁锦胜2021-07-1715:16:10西药费氯氮平片25mg瓶122.0022.00100片11QDX-B05XA-L211-B00586902763001269甲类梁锦胜2021-07-1715:17:25西药费安定片5mg瓶113.4013.40100片11QDX-B05XA-L211-B00686902763001270甲类梁锦胜2021-07-1715:18:42西药费阿莫西林胶囊500mg瓶18.008.00100粒11QDX-B05XA-L211-B00786902763001271甲类梁锦胜2021-07-1715:19:10西药费双氯芬酸钠胶囊50mg瓶116.8016.80100粒11QDX-B05XA-L211-B00886902763001272甲类梁锦胜2021-07-1715:19:45西药费利血平片25mg瓶112.3012.30100片11QDX-B05XA-L211-B00986902763001273甲类梁锦胜2021-07-1715:20:10西药费依普利酮片25mg瓶130.0030.00100片11QDX-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 = '0- 1手术费
- 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;
}
}