You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
257 lines
25 KiB
257 lines
25 KiB
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Utils\Transfer\HisHttpClient;
|
|
|
|
use App\Exceptions\GeneralException;
|
|
use App\Utils\Transfer\HttpTransferAbstract;
|
|
use App\Utils\Transfer\SoapTransferAbstract;
|
|
use Exception;
|
|
|
|
class ClientMockHttpTransfer extends HttpTransferAbstract
|
|
{
|
|
/**
|
|
* ClientMockTransfer Construct
|
|
* @param string $his_name
|
|
*/
|
|
public function __construct(string $his_name = "")
|
|
{
|
|
parent::__construct($his_name);
|
|
}
|
|
|
|
/**
|
|
* 设置客户端选项
|
|
* @return array
|
|
*/
|
|
public function clientHeaders(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
/**
|
|
* @param string $class_name
|
|
* @return $this
|
|
*/
|
|
public function transferClass(string $class_name): static
|
|
{
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @throws GeneralException
|
|
*/
|
|
public function transferMethod(string $method, string $request_name, array $request_data = []): self
|
|
{
|
|
// 使用 match 替代 switch
|
|
return match ($request_name) {
|
|
'CreateCardPatInfo' => $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 '{$request_name}' not found"),
|
|
};
|
|
}
|
|
|
|
/**
|
|
* 响应格式化
|
|
* @param mixed $data
|
|
* @return mixed
|
|
* @throws Exception
|
|
*/
|
|
public function responseFormat(mixed $data): mixed
|
|
{
|
|
try {
|
|
// 此处为json格式
|
|
return json_decode((string)$data, 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);
|
|
}
|
|
|
|
/**
|
|
* mockRegisterCard
|
|
* @param array $params
|
|
* @return self
|
|
*/
|
|
private function mockRegisterCard(array $params): self
|
|
{
|
|
$this->transfer_response = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":{"patientId":"2235711"}}';
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* mockGetPatientInfo
|
|
* @param array $params
|
|
* @return self
|
|
*/
|
|
private function mockGetPatientInfo(array $params): self
|
|
{
|
|
$this->transfer_response = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":{"patientId":"2235574","cardNo":"230403199903245493","name":"谭玉山","sex":"0","birthday":"1999-03-24","cardStatus":"0","naturePatients":"123","patientNumber":"288712335574"}}';
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* mockGetDepLists
|
|
* @param array $params
|
|
* @return self
|
|
*/
|
|
private function mockGetDepLists(array $params): self
|
|
{
|
|
$this->transfer_response = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":[{"typeId":"17","typeName":"泌尿外科"},{"typeId":"20","typeName":"体检办证"},{"typeId":"31","typeName":"内分泌科"},{"typeId":"01","typeName":"内科"},{"typeId":"05","typeName":"口腔科"},{"typeId":"19","typeName":"消化内科"},{"typeId":"29","typeName":"呼吸内科门诊"},{"typeId":"33","typeName":"中医减重门诊"},{"typeId":"03","typeName":"中医康复"},{"typeId":"18","typeName":"产前门诊"},{"typeId":"04","typeName":"五官科"},{"typeId":"10","typeName":"妇产科"},{"typeId":"16","typeName":"全科医生门诊"},{"typeId":"28","typeName":"儿童青少年心理门诊"},{"typeId":"02","typeName":"普外科"},{"typeId":"25","typeName":"儿科"},{"typeId":"27","typeName":"精神心理科"},{"typeId":"07","typeName":"急诊内科"},{"typeId":"09","typeName":"皮肤科"},{"typeId":"14","typeName":"急诊外科"},{"typeId":"15","typeName":"骨科"},{"typeId":"26","typeName":"治未病科"},{"typeId":"06","typeName":"专家门诊"},{"typeId":"11","typeName":"妇保门诊"},{"typeId":"12","typeName":"儿保门诊"},{"typeId":"32","typeName":"血液透析门诊"},{"typeId":"08","typeName":"天灸门诊"},{"typeId":"24","typeName":"神经内科"},{"typeId":"30","typeName":"助产士门诊"}]}';
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* mockGetDoctorLists
|
|
* @param array $params
|
|
* @return self
|
|
*/
|
|
private function mockGetDoctorLists(array $params): self
|
|
{
|
|
$date = &$params['json']['date'];
|
|
$this->transfer_response = '<RESPONSE><RESULTCODE>0</RESULTCODE><ERRORMSG>Success</ERRORMSG><ITEM><DOCTID>10001</DOCTID><YBDOCTID>20001</YBDOCTID><DOCTNAME>张三</DOCTNAME><DEPLOCATION>内科一诊室</DEPLOCATION><TYPENAME>主任医师</TYPENAME><ISKSDOC>1</ISKSDOC><SHIFT><DOCTID>10001</DOCTID><REGID>30001</REGID><FDATE>'.$date.'</FDATE><RANKID>1</RANKID><RANKNAME>上午班</RANKNAME><STARTTIME>08:00</STARTTIME><ENDTIME>12:00</ENDTIME><FEE>50.00</FEE><FEECODE>001</FEECODE><REGCOUNT>20</REGCOUNT><JZCOUNT>15</JZCOUNT></SHIFT><SHIFT><DOCTID>10001</DOCTID><REGID>30002</REGID><FDATE>'.$date.'</FDATE><RANKID>2</RANKID><RANKNAME>下午班</RANKNAME><STARTTIME>14:00</STARTTIME><ENDTIME>18:00</ENDTIME><FEE>55.00</FEE><FEECODE>002</FEECODE><REGCOUNT>18</REGCOUNT><JZCOUNT>12</JZCOUNT></SHIFT><SHIFT><DOCTID>10001</DOCTID><REGID>30003</REGID><FDATE>'.$date.'</FDATE><RANKID>3</RANKID><RANKNAME>夜班</RANKNAME><STARTTIME>20:00</STARTTIME><ENDTIME>00:00</ENDTIME><FEE>60.00</FEE><FEECODE>003</FEECODE><REGCOUNT>10</REGCOUNT><JZCOUNT>8</JZCOUNT></SHIFT><XMBH>XM001</XMBH><GJMLBM>1234567890</GJMLBM><XMMC>挂号诊查费</XMMC><JG>50</JG><MCYL>10</MCYL><JE>500</JE></ITEM><ITEM><DOCTID>10002</DOCTID><YBDOCTID>20002</YBDOCTID><DOCTNAME>李四</DOCTNAME><DEPLOCATION>外科二诊室</DEPLOCATION><TYPENAME>副主任医师</TYPENAME><ISKSDOC>0</ISKSDOC><SHIFT><DOCTID>10002</DOCTID><REGID>30004</REGID><FDATE>'.$date.'</FDATE><RANKID>1</RANKID><RANKNAME>上午班</RANKNAME><STARTTIME>08:00</STARTTIME><ENDTIME>12:00</ENDTIME><FEE>60.00</FEE><FEECODE>004</FEECODE><REGCOUNT>25</REGCOUNT><JZCOUNT>20</JZCOUNT></SHIFT><SHIFT><DOCTID>10002</DOCTID><REGID>30005</REGID><FDATE>'.$date.'</FDATE><RANKID>2</RANKID><RANKNAME>下午班</RANKNAME><STARTTIME>14:00</STARTTIME><ENDTIME>18:00</ENDTIME><FEE>65.00</FEE><FEECODE>005</FEECODE><REGCOUNT>20</REGCOUNT><JZCOUNT>18</JZCOUNT></SHIFT><XMBH>XM002</XMBH><GJMLBM>0987654321</GJMLBM><XMMC>挂号诊查费</XMMC><JG>100</JG><MCYL>15</MCYL><JE>1500</JE></ITEM></RESPONSE>';
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* mockGetRegisterRecordLists
|
|
* @param array $params
|
|
* @return self
|
|
*/
|
|
private function mockGetRegisterRecordLists(array $params): self
|
|
{
|
|
$this->transfer_response = '<RESPONSE><RESULTCODE>0</RESULTCODE><ERRORMSG>成功</ERRORMSG><ITEM><VISITNO>3405227</VISITNO><FTYPE>当天挂号</FTYPE><STATUS>0</STATUS><WAITNUM>143</WAITNUM><TREAID>600240002968</TREAID><GHDATE>2021-07-17</GHDATE><PATIENTID>1103903</PATIENTID><PATIENTNAME>杨尧</PATIENTNAME><RANKID>2</RANKID><RANKNAME>下午</RANKNAME><OPPATNO>600005001000</OPPATNO><DEPLOCATION>门诊一楼</DEPLOCATION><TRANSNUM>0</TRANSNUM><ORDERTYPE>线上预约</ORDERTYPE><PAYFEE>17</PAYFEE><DEPID>16</DEPID><DEPNAME>急诊科</DEPNAME></ITEM><ITEM><VISITNO>3405228</VISITNO><FTYPE>预约挂号</FTYPE><STATUS>1</STATUS><WAITNUM>58</WAITNUM><TREAID>600240002969</TREAID><GHDATE>2021-07-18</GHDATE><PATIENTID>1103904</PATIENTID><PATIENTNAME>李梅</PATIENTNAME><RANKID>1</RANKID><RANKNAME>上午</RANKNAME><OPPATNO>600005001001</OPPATNO><DEPLOCATION>门诊二楼</DEPLOCATION><TRANSNUM>1</TRANSNUM><ORDERTYPE>现场挂号</ORDERTYPE><PAYFEE>25</PAYFEE><DEPID>20</DEPID><DEPNAME>内科</DEPNAME></ITEM><ITEM><VISITNO>3405229</VISITNO><FTYPE>当天挂号</FTYPE><STATUS>0</STATUS><WAITNUM>23</WAITNUM><TREAID>600240002970</TREAID><GHDATE>2021-07-19</GHDATE><PATIENTID>1103905</PATIENTID><PATIENTNAME>张强</PATIENTNAME><RANKID>3</RANKID><RANKNAME>夜间</RANKNAME><OPPATNO>600005001002</OPPATNO><DEPLOCATION>急诊大厅</DEPLOCATION><TRANSNUM>2</TRANSNUM><ORDERTYPE>电话预约</ORDERTYPE><PAYFEE>30</PAYFEE><DEPID>18</DEPID><DEPNAME>儿科</DEPNAME></ITEM><ITEM><VISITNO>3405230</VISITNO><FTYPE>预约挂号</FTYPE><STATUS>1</STATUS><WAITNUM>78</WAITNUM><TREAID>600240002971</TREAID><GHDATE>2021-07-20</GHDATE><PATIENTID>1103906</PATIENTID><PATIENTNAME>王丽</PATIENTNAME><RANKID>1</RANKID><RANKNAME>上午</RANKNAME><OPPATNO>600005001003</OPPATNO><DEPLOCATION>门诊三楼</DEPLOCATION><TRANSNUM>0</TRANSNUM><ORDERTYPE>线上预约</ORDERTYPE><PAYFEE>45</PAYFEE><DEPID>22</DEPID><DEPNAME>眼科</DEPNAME></ITEM></RESPONSE>';
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* mockCheckRefundRegisterStatus
|
|
* @param array $params
|
|
* @return self
|
|
*/
|
|
private function mockCheckRefundRegisterStatus(array $params): self
|
|
{
|
|
$this->transfer_response = '<RESPONSE><RESULTCODE>0</RESULTCODE><ERRORMSG>可退号</ERRORMSG></RESPONSE>';
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* mockRefundRegister
|
|
* @param array $params
|
|
* @return self
|
|
*/
|
|
private function mockRefundRegister(array $params): self
|
|
{
|
|
$this->transfer_response = '<RESPONSE><RESULTCODE>0</RESULTCODE><ERRORMSG>退号成功</ERRORMSG></RESPONSE>';
|
|
|
|
return $this;
|
|
}
|
|
|
|
private function mockGetPendingLists(array $params)
|
|
{
|
|
$this->transfer_response = '<RESPONSE><RESULTCODE>0</RESULTCODE><ERRORMSG></ERRORMSG><ITEM><YFMC>0</YFMC><GMSFHM>441827197303226022</GMSFHM><JZLB>门诊</JZLB><JZRQ>20210717</JZRQ><CYZD>1.急性胃肠炎2.湿热证</CYZD><BQDM>226</BQDM><BQMC>发热门诊</BQMC><REGID>0</REGID><CFID>4-5555857</CFID><YLFYZE>81.53</YLFYZE><CFFYJE>16.2</CFFYJE><YSGH>10395</YSGH><YSMC>麦明杰</YSMC><BZ>无特殊备注</BZ><ZFCF>1</ZFCF><JZXH>2671947</JZXH><CHHM>4-5555857</CHHM><CFTYPE>2</CFTYPE><MED_TYPE>普通医疗</MED_TYPE><DISE_CODG>K52.9</DISE_CODG><DISE_NAME>急性胃肠炎</DISE_NAME><PSN_SETLWAY>自费</PSN_SETLWAY><OUT_FLAG>0</OUT_FLAG></ITEM><ITEM><YFMC>1</YFMC><GMSFHM>441827199405226019</GMSFHM><JZLB>住院</JZLB><JZRQ>20231215</JZRQ><CYZD>1.高血压2.冠心病</CYZD><BQDM>112</BQDM><BQMC>心内科</BQMC><REGID>1</REGID><CFID>3-4567890</CFID><YLFYZE>1050.75</YLFYZE><CFFYJE>450.5</CFFYJE><YSGH>20876</YSGH><YSMC>李海涛</YSMC><BZ>长期病管理</BZ><ZFCF>0</ZFCF><JZXH>3758291</JZXH><CHHM>3-4567890</CHHM><CFTYPE>1</CFTYPE><MED_TYPE>住院医疗</MED_TYPE><DISE_CODG>I10</DISE_CODG><DISE_NAME>高血压</DISE_NAME><PSN_SETLWAY>自费</PSN_SETLWAY><OUT_FLAG>1</OUT_FLAG></ITEM></RESPONSE>';
|
|
|
|
return $this;
|
|
}
|
|
|
|
private function mockGetPendingDetails(array $params)
|
|
{
|
|
$this->transfer_response = '<RESPONSE><RESULTCODE>0</RESULTCODE><ERRORMSG></ERRORMSG><ITEM><FYRQ>2021-07-14</FYRQ><XMXH>13072784</XMXH><XMBH>2220</XMBH><XMMC>尿妊娠试验(金标法)</XMMC><JG>5.67</JG><MCYL>1</MCYL><JE>5.67</JE><ZFBL>1</ZFBL><ZFJE>5.67</ZFJE><CFID>4-5549038</CFID><UNIT>项</UNIT><ZTMC>妊娠检查</ZTMC><CFTYPE>检验单</CFTYPE><BQDM>8</BQDM><BQMC>妇科门诊</BQMC><YSGH>10537</YSGH><YSMC>邝国超</YSMC><GJMLBM>12345</GJMLBM><YCJL>1次</YCJL><YPYF>口服</YPYF><YYTS>1天</YYTS><GYTJ>口服给药</GYTJ><HOSP_APPR_FLAG>0</HOSP_APPR_FLAG><TCMDRUG_USED_WAY>无</TCMDRUG_USED_WAY><ETIP_FLAG>0</ETIP_FLAG><ETIP_HOSP_CODE></ETIP_HOSP_CODE><DSCG_TKDRUG_FLAG>0</DSCG_TKDRUG_FLAG><MATN_FEE_FLAG>0</MATN_FEE_FLAG><RX_CIRC_FLAG>0</RX_CIRC_FLAG></ITEM><ITEM><FYRQ>2021-07-14</FYRQ><XMXH>13072785</XMXH><XMBH>2231</XMBH><XMMC>血常规检查</XMMC><JG>12.34</JG><MCYL>1</MCYL><JE>12.34</JE><ZFBL>0.2</ZFBL><ZFJE>2.47</ZFJE><CFID>4-5549040</CFID><UNIT>项</UNIT><ZTMC>常规检查</ZTMC><CFTYPE>检验单</CFTYPE><BQDM>8</BQDM><BQMC>妇科门诊</BQMC><YSGH>10538</YSGH><YSMC>张伟</YSMC><GJMLBM>67890</GJMLBM><YCJL>1次</YCJL><YPYF>静脉注射</YPYF><YYTS>1天</YYTS><GYTJ>静脉注射</GYTJ><HOSP_APPR_FLAG>0</HOSP_APPR_FLAG><TCMDRUG_USED_WAY>无</TCMDRUG_USED_WAY><ETIP_FLAG>0</ETIP_FLAG><ETIP_HOSP_CODE></ETIP_HOSP_CODE><DSCG_TKDRUG_FLAG>0</DSCG_TKDRUG_FLAG><MATN_FEE_FLAG>0</MATN_FEE_FLAG><RX_CIRC_FLAG>0</RX_CIRC_FLAG></ITEM><ITEM><FYRQ>2021-07-15</FYRQ><XMXH>13072786</XMXH><XMBH>3001</XMBH><XMMC>超声波检查</XMMC><JG>80.00</JG><MCYL>1</MCYL><JE>80.00</JE><ZFBL>0.5</ZFBL><ZFJE>40.00</ZFJE><CFID>4-5549041</CFID><UNIT>次</UNIT><ZTMC>影像检查</ZTMC><CFTYPE>影像单</CFTYPE><BQDM>6</BQDM><BQMC>放射科</BQMC><YSGH>10539</YSGH><YSMC>李明</YSMC><GJMLBM>78901</GJMLBM><YCJL>一次</YCJL><YPYF>其他</YPYF><YYTS>1天</YYTS><GYTJ>无</GYTJ><HOSP_APPR_FLAG>1</HOSP_APPR_FLAG><TCMDRUG_USED_WAY>无</TCMDRUG_USED_WAY><ETIP_FLAG>0</ETIP_FLAG><ETIP_HOSP_CODE></ETIP_HOSP_CODE><DSCG_TKDRUG_FLAG>0</DSCG_TKDRUG_FLAG><MATN_FEE_FLAG>0</MATN_FEE_FLAG><RX_CIRC_FLAG>0</RX_CIRC_FLAG></ITEM><ITEM><FYRQ>2021-07-16</FYRQ><XMXH>13072787</XMXH><XMBH>4002</XMBH><XMMC>CT检查</XMMC><JG>300.00</JG><MCYL>1</MCYL><JE>300.00</JE><ZFBL>0.3</ZFBL><ZFJE>90.00</ZFJE><CFID>4-5549042</CFID><UNIT>次</UNIT><ZTMC>影像检查</ZTMC><CFTYPE>影像单</CFTYPE><BQDM>7</BQDM><BQMC>影像科</BQMC><YSGH>10540</YSGH><YSMC>王磊</YSMC><GJMLBM>34567</GJMLBM><YCJL>1次</YCJL><YPYF>其他</YPYF><YYTS>1天</YYTS><GYTJ>无</GYTJ><HOSP_APPR_FLAG>1</HOSP_APPR_FLAG><TCMDRUG_USED_WAY>无</TCMDRUG_USED_WAY><ETIP_FLAG>0</ETIP_FLAG><ETIP_HOSP_CODE></ETIP_HOSP_CODE><DSCG_TKDRUG_FLAG>0</DSCG_TKDRUG_FLAG><MATN_FEE_FLAG>0</MATN_FEE_FLAG><RX_CIRC_FLAG>0</RX_CIRC_FLAG></ITEM><ITEM><FYRQ>2021-07-17</FYRQ><XMXH>13072788</XMXH><XMBH>5003</XMBH><XMMC>心电图检查</XMMC><JG>25.00</JG><MCYL>1</MCYL><JE>25.00</JE><ZFBL>0.1</ZFBL><ZFJE>2.50</ZFJE><CFID>4-5549043</CFID><UNIT>次</UNIT><ZTMC>心电检查</ZTMC><CFTYPE>检查单</CFTYPE><BQDM>9</BQDM><BQMC>心内科</BQMC><YSGH>10541</YSGH><YSMC>赵云</YSMC><GJMLBM>45678</GJMLBM><YCJL>1次</YCJL><YPYF>其他</YPYF><YYTS>1天</YYTS><GYTJ>无</GYTJ><HOSP_APPR_FLAG>1</HOSP_APPR_FLAG><TCMDRUG_USED_WAY>无</TCMDRUG_USED_WAY><ETIP_FLAG>0</ETIP_FLAG><ETIP_HOSP_CODE></ETIP_HOSP_CODE><DSCG_TKDRUG_FLAG>0</DSCG_TKDRUG_FLAG><MATN_FEE_FLAG>0</MATN_FEE_FLAG><RX_CIRC_FLAG>0</RX_CIRC_FLAG></ITEM></RESPONSE>';
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* mockGetPaidLists
|
|
* @param array $params
|
|
* @return self
|
|
*/
|
|
private function mockGetPaidLists(array $params): self
|
|
{
|
|
$this->transfer_response = '<RESPONSE><RESULTCODE>0</RESULTCODE><ERRORMSG></ERRORMSG><RECORD><PATIENTID>D00589351</PATIENTID><NAME>叶子璐</NAME><SEX>女</SEX><CHARGETYPE>自费</CHARGETYPE><VISITDATE>2012-08-21</VISITDATE><RCPTID>1111</RCPTID><RCPTNO >9-0001</RCPTNO><COSTS>251.59</COSTS><COSTS>251.59</COSTS><GRZF>251.59</GRZF><JJZF>0</JJZF><ISPRINTED>0</ISPRINTED></RECORD><RECORD><PATIENTID>D00589351</PATIENTID><NAME>叶子璐</NAME><SEX>女</SEX><CHARGETYPE>自费</CHARGETYPE><VISITDATE>2012-08-21</VISITDATE><RCPTID>1111</RCPTID><RCPTNO >9-0001</RCPTNO><COSTS>251.59</COSTS><COSTS>251.59</COSTS><GRZF>251.59</GRZF><JJZF>0</JJZF><ISPRINTED>0</ISPRINTED></RECORD></RESPONSE>';
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* mockGetPaidDetails
|
|
* @param array $params
|
|
* @return self
|
|
*/
|
|
private function mockGetPaidDetails(array $params): self
|
|
{
|
|
$this->transfer_response = '<RESPONSE><RESULTCODE>0</RESULTCODE><ERRORMSG></ERRORMSG><JSRQ>2021-07-1715:22:31</JSRQ><TREAID>3324497</TREAID><HOSTRANNO>0000986299</HOSTRANNO><COSTS>65.9</COSTS><GRZF>65.9</GRZF><JJZF></JJZF><PHYADDRESS>智能药房</PHYADDRESS><DEPNAME>急诊科</DEPNAME><DOCTNAME>梁锦胜</DOCTNAME><CYZD>1.慢性喘息性支气管炎急性发作</CYZD><CZGH>818</CZGH><RECORD><ITEMREC><VISITDATE>2021-07-1715:13:32</VISITDATE><CLASSNAME>西药费</CLASSNAME><ITEMNAME>0.9%氯化钠注射液</ITEMNAME><ITEMSPEC>100ML</ITEMSPEC><UNITS>瓶</UNITS><AMOUNT>1</AMOUNT><PRICE>2.42</PRICE><COSTS>2.42</COSTS><ZTMC></ZTMC><YCJL>100</YCJL><JLDW>ML</JLDW><YYTS>1</YYTS><MRCS>1</MRCS><PCMC>QD</PCMC><YPBM>X-B05XA-L211-B002</YPBM><YJBM>86902763001266</YJBM><YBFL>甲类</YBFL><YGXM>梁锦胜</YGXM></ITEMREC><ITEMREC><VISITDATE>2021-07-1715:14:45</VISITDATE><CLASSNAME>西药费</CLASSNAME><ITEMNAME>复方甘草酸苷片</ITEMNAME><ITEMSPEC>20mg</ITEMSPEC><UNITS>瓶</UNITS><AMOUNT>1</AMOUNT><PRICE>15.50</PRICE><COSTS>15.50</COSTS><ZTMC></ZTMC><YCJL>100</YCJL><JLDW>片</JLDW><YYTS>1</YYTS><MRCS>1</MRCS><PCMC>QD</PCMC><YPBM>X-B05XA-L211-B003</YPBM><YJBM>86902763001267</YJBM><YBFL>甲类</YBFL><YGXM>梁锦胜</YGXM></ITEMREC><ITEMREC><VISITDATE>2021-07-1715:15:02</VISITDATE><CLASSNAME>西药费</CLASSNAME><ITEMNAME>头孢克肟胶囊</ITEMNAME><ITEMSPEC>250mg</ITEMSPEC><UNITS>盒</UNITS><AMOUNT>1</AMOUNT><PRICE>18.30</PRICE><COSTS>18.30</COSTS><ZTMC></ZTMC><YCJL>100</YCJL><JLDW>粒</JLDW><YYTS>1</YYTS><MRCS>1</MRCS><PCMC>QD</PCMC><YPBM>X-B05XA-L211-B004</YPBM><YJBM>86902763001268</YJBM><YBFL>甲类</YBFL><YGXM>梁锦胜</YGXM></ITEMREC><ITEMREC><VISITDATE>2021-07-1715:16:10</VISITDATE><CLASSNAME>西药费</CLASSNAME><ITEMNAME>氯氮平片</ITEMNAME><ITEMSPEC>25mg</ITEMSPEC><UNITS>瓶</UNITS><AMOUNT>1</AMOUNT><PRICE>22.00</PRICE><COSTS>22.00</COSTS><ZTMC></ZTMC><YCJL>100</YCJL><JLDW>片</JLDW><YYTS>1</YYTS><MRCS>1</MRCS><PCMC>QD</PCMC><YPBM>X-B05XA-L211-B005</YPBM><YJBM>86902763001269</YJBM><YBFL>甲类</YBFL><YGXM>梁锦胜</YGXM></ITEMREC><ITEMREC><VISITDATE>2021-07-1715:17:25</VISITDATE><CLASSNAME>西药费</CLASSNAME><ITEMNAME>安定片</ITEMNAME><ITEMSPEC>5mg</ITEMSPEC><UNITS>瓶</UNITS><AMOUNT>1</AMOUNT><PRICE>13.40</PRICE><COSTS>13.40</COSTS><ZTMC></ZTMC><YCJL>100</YCJL><JLDW>片</JLDW><YYTS>1</YYTS><MRCS>1</MRCS><PCMC>QD</PCMC><YPBM>X-B05XA-L211-B006</YPBM><YJBM>86902763001270</YJBM><YBFL>甲类</YBFL><YGXM>梁锦胜</YGXM></ITEMREC><ITEMREC><VISITDATE>2021-07-1715:18:42</VISITDATE><CLASSNAME>西药费</CLASSNAME><ITEMNAME>阿莫西林胶囊</ITEMNAME><ITEMSPEC>500mg</ITEMSPEC><UNITS>瓶</UNITS><AMOUNT>1</AMOUNT><PRICE>8.00</PRICE><COSTS>8.00</COSTS><ZTMC></ZTMC><YCJL>100</YCJL><JLDW>粒</JLDW><YYTS>1</YYTS><MRCS>1</MRCS><PCMC>QD</PCMC><YPBM>X-B05XA-L211-B007</YPBM><YJBM>86902763001271</YJBM><YBFL>甲类</YBFL><YGXM>梁锦胜</YGXM></ITEMREC><ITEMREC><VISITDATE>2021-07-1715:19:10</VISITDATE><CLASSNAME>西药费</CLASSNAME><ITEMNAME>双氯芬酸钠胶囊</ITEMNAME><ITEMSPEC>50mg</ITEMSPEC><UNITS>瓶</UNITS><AMOUNT>1</AMOUNT><PRICE>16.80</PRICE><COSTS>16.80</COSTS><ZTMC></ZTMC><YCJL>100</YCJL><JLDW>粒</JLDW><YYTS>1</YYTS><MRCS>1</MRCS><PCMC>QD</PCMC><YPBM>X-B05XA-L211-B008</YPBM><YJBM>86902763001272</YJBM><YBFL>甲类</YBFL><YGXM>梁锦胜</YGXM></ITEMREC><ITEMREC><VISITDATE>2021-07-1715:19:45</VISITDATE><CLASSNAME>西药费</CLASSNAME><ITEMNAME>利血平片</ITEMNAME><ITEMSPEC>25mg</ITEMSPEC><UNITS>瓶</UNITS><AMOUNT>1</AMOUNT><PRICE>12.30</PRICE><COSTS>12.30</COSTS><ZTMC></ZTMC><YCJL>100</YCJL><JLDW>片</JLDW><YYTS>1</YYTS><MRCS>1</MRCS><PCMC>QD</PCMC><YPBM>X-B05XA-L211-B009</YPBM><YJBM>86902763001273</YJBM><YBFL>甲类</YBFL><YGXM>梁锦胜</YGXM></ITEMREC><ITEMREC><VISITDATE>2021-07-1715:20:10</VISITDATE><CLASSNAME>西药费</CLASSNAME><ITEMNAME>依普利酮片</ITEMNAME><ITEMSPEC>25mg</ITEMSPEC><UNITS>瓶</UNITS><AMOUNT>1</AMOUNT><PRICE>30.00</PRICE><COSTS>30.00</COSTS><ZTMC></ZTMC><YCJL>100</YCJL><JLDW>片</JLDW><YYTS>1</YYTS><MRCS>1</MRCS><PCMC>QD</PCMC><YPBM>X-B05XA-L211-B010</YPBM><YJBM>86902763001274</YJBM><YBFL>甲类</YBFL><YGXM>梁锦胜</YGXM></ITEMREC></RECORD></RESPONSE>';
|
|
|
|
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 = '{"status":200,"success":true,"msg":"成功","msgDev":null,"response":[{"typeId":"4","typeName":"草药费"},{"typeId":"20","typeName":"防疫药品"},{"typeId":"2","typeName":"西药费"},{"typeId":"3","typeName":"中成药"},{"typeId":"22","typeName":"B超"},{"typeId":"25","typeName":"CT检查"},{"typeId":"19","typeName":"X光费"},{"typeId":"1","typeName":"床位费"},{"typeId":"27","typeName":"高值耗材"},{"typeId":"12","typeName":"挂号费"},{"typeId":"11","typeName":"护理费"},{"typeId":"17","typeName":"急诊留观床位费"},{"typeId":"5","typeName":"检查费"},{"typeId":"9","typeName":"检验费"},{"typeId":"15","typeName":"救护车"},{"typeId":"26","typeName":"内镜检查"},{"typeId":"10","typeName":"其它"},{"typeId":"8","typeName":"手术费"},{"typeId":"13","typeName":"输血费"},{"typeId":"14","typeName":"输氧费"},{"typeId":"23","typeName":"碎石"},{"typeId":"21","typeName":"心电图"},{"typeId":"24","typeName":"一般诊疗费"},{"typeId":"16","typeName":"医材费"},{"typeId":"7","typeName":"诊查费"},{"typeId":"6","typeName":"治疗费"},{"typeId":"18","typeName":"自负床位费"}]}';
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* mockGetChargeList
|
|
* @param array $params
|
|
* @return 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>';
|
|
|
|
return $this;
|
|
}
|
|
}
|
|
|