Wechat payment full-process docking document
-
- Part 1: Payment during consultation
1.1.1Patient information query
Request address | ||||
---|---|---|---|---|
note | 1. The type of diagnosis and treatment card must support ID card and hospital diagnosis and treatment card (patCardType = 1 or 5); | |||
2. When the diagnosis and treatment card type is ID card (patCardType = 5), the patient name cannot be empty. HIS queries the patient information based on the patient's name and ID number. When multiple pieces of patient information are matched, the most recent one is returned; | ||||
3. When the diagnosis and treatment card type is in-hospital diagnosis and treatment card (patCardType = 1), the patient's name is empty, and HIS will query the patient information according to it; | ||||
Interface name | getMZPatient | |||
Sample code | Request message: <request><params> <patName></patName> </params></request> Response message: <response> <result> <patType></patType> </result></response> | |||
Parameter Type | parameter name | Parameter code | Must lose | Description |
enter | Hospital code | branchCode | Y | If the hospital has no branch, an empty string will be returned; if the hospital has a branch, it is not allowed to be empty |
Patient name | patName | Y | ||
Medical card number | patCardNo | Y | If there is no medical card, it is the outpatient number | |
Output | Transaction result code | resultCode | Y | -1: Failure 0: Success 1: Success but no data is found |
wrong information | resultMessage | Y | When the transaction result code is successful, this field returns an empty string | |
Patient type | patType | Y | 1: Adult 2: Child | |
Name | patName | Y | ||
gender | patSex | Y | M: male, F: female | |
date of birth | patBirth | Y | ||
address | patAddress | Y | ||
phone | patMobile | y | ||
type of certificate | patIdType | Y | See 2.3.4 Types of documents | |
ID number | patIdNo | Y | ||
Type of medical card | patCardType | Y | See 2.3.1 Types of tied cards | |
Medical card number | patCardNo | Y | ||
Whether to bind medical insurance | hasMedicare | Y | true: bind; false: not bind |
1.1.2 Archives for the first patient
Request address | ||||
---|---|---|---|---|
Interface name | createACard | |||
Sample code | Request message: <request><params> <patType></patType> </params></request> Response message: <response> <result> <patCardType></patCardType> </result></response> | |||
Parameter Type | parameter name | Parameter code | Must lose | Description |
enter | Hospital code | branchCode | Y | If the hospital has no branch, an empty string will be passed in; if the hospital does not have a branch, it is not allowed to be empty; |
Patient type | patType | Y | 1: Adult 2: Child | |
Name | patName | Y | ||
gender | patSex | Y | M: male, F: female | |
age | patAge | Y | ||
date of birth | patBirth | Y | ||
address | patAddress | Y | ||
phone | patMobile | Y | ||
type of certificate | patIdType | Y | See 2.3.4 Document Type When the patient type is "2" children, this item is allowed to be empty | |
ID number | patIdNo | Y | When the patient type is "2" for children, this item is allowed to be empty | |
Guardian's name | guardName | Y | When the patient type is "2" children, this item must be input | |
Guardian ID Type | guardIdType | Y | ||
Guardian ID Number | guardIdNo | Y | ||
Output | Transaction result code | resultCode | Y | -1: Failure 0: Success 1: File has been created (the output is returned according to the return value of successful file creation) |
wrong information | resultMessage | y | When the transaction result code is successful, this field returns an empty string | |
Medical card number | patCardNo | Y | clinic number |
1.1.3 Inquiry of outpatient payment records
Request address | ||||
---|---|---|---|---|
Interface name | getMZFeeList | |||
Sample code | Request message: <request> <params> </params></request> Response message: <response> <result> <item> </item> <item> </item> </result> </response> | |||
Parameter Type | parameter name | Parameter code | Must lose | Description |
enter | Hospital code | branchCode | Y | If the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty |
Type of medical card | patCardType | N | See 2.3.1 Types of tied cards | |
Medical card number (outpatient number) | patCardNo | Y | ||
The branch code and branch name are removed from the output parameters | Transaction result code | resultCode | Y | -1: Failure 0: Success 1: Success but no data is found |
wrong information | resultMessage | Y | When the transaction result code is successful, this field returns an empty string | |
Collection of payment items | The collection content includes the following items | |||
Unique identification of payment item | mzFeeId | Y | Used to uniquely identify a payment (including 1..n prescriptions or 1..n checklists, n prescriptions are one payment, n checklists are another payment) | |
Build time | time | Y | Format: YYYY-MM-DD 24HH:MI:SS | |
Doctor code | doctorCode | Y | ||
Doctor's name | doctorName | Y | ||
Payment Section | deptName | Y | ||
Amounts payable | payAmout | Y | Amount payable = total amount-if the medical insurance amount does not support medical insurance settlement, the total amount will be returned | |
Medicare amount | MedicareAmout | Y | Medicare Amount = Total Amount-Amount Payable | |
total amount | totalAmout | Y | Total amount = amount payable + medical insurance amount |
1.1.4 Inquiry for details of outpatient payment records
Request address | ||||
---|---|---|---|---|
Interface name | getMZFeeDetail | |||
Sample code | Request message: <request> <params> </params></request> Response message: <response> <result> <item> </item> <item> </item> </result> </response> | |||
Parameter Type | parameter name | Parameter code | Must lose | Description |
enter | Hospital code | branchCode | Y | If the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty |
Unique identification of payment item | mzFeeId | Y | Used to uniquely identify a payment | |
Output | Transaction result code | resultCode | Y | -1: Failure 0: Success 1: Success but no data is found |
wrong information | resultMessage | Y | When the transaction result code is successful, this field returns an empty string | |
Collection of payment items | The collection content includes the following items | |||
Project date | itemTime | Y | Format: YYYY-MM-DD 24HH:MI:SS | |
project name | itemName | Y | ||
Project category/fee | itemType | Y | Such as: medicine fee, inspection fee, material fee | |
unit | itemUnit | Y | ||
Item Number | itemId | Y | Identifier of the item, empty if none | |
unit price | itemPrice | Y | Unit: minutes | |
specification | itemSpec | Y | ||
Quantity | itemNumber | Y | ||
Total project price | itemTotalFee | Y | Unit: minutes, equal to: unit price * quantity | |
Out of department | deptName | Y | ||
Prescriber's Code | doctorCode | Y | ||
Name of prescribing doctor | doctorName | Y |
1.1.5 Outpatient payment order payment
Request address | ||||
---|---|---|---|---|
note | 1. Multiple payment items can be paid together, and one transaction serial number corresponds to multiple payment items. | |||
2. Need to consider the processing mechanism when network delay or network failure occurs. If the HIS system has successfully recorded the payment information, but we have not received the result returned by the HIS, we will try to call the outpatient payment order payment interface multiple times. When multiple payments are made to the same outpatient payment order, the HIS system should be treated as a one-time outpatient payment order payment, and the success message will still be returned instead of repeated payments. In the case of network delay, if the interface processing fails or the interface processing is successful, the caller may not receive the result and needs to support repeated submission. 1. For the call that failed to be processed, the second caller will continue to return according to the definition of this interface. | ||||
2. For the successfully processed call, call "transaction result code=1" for the second time, and other output will continue to return according to the definition of this interface. 1. The hospital has its own limitation on the payment of outpatient payment orders, which is limited by the interface according to the actual situation of the hospital. And the limited information is returned through the "error message". | ||||
Interface name | ackPayOrder | |||
Sample code | Request message: <request> <params> </params></request> Response message: <response> <result> </result></response> | |||
Parameter Type | parameter name | Parameter code | Must lose | Description |
enter | Hospital code | branchCode | Y | If the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty |
List of payment items | mzFeeIdList | Y | It can be 1..n payment items, separated by commas | |
Payment amount | payAmout | Y | ||
total amount | totalAmout | Y | ||
Public service platform order number | psOrdNum | Y | The serial number of the public service platform (WeChat official account, Alipay service window) used to uniquely identify a transaction | |
Acquirer serial number | agtOrdNum | Y | The serial number used by the corresponding acquirer (such as Tenpay, Alipay, UnionPay, etc.) to identify a payment transaction | |
Acquirer code | agtCode | Y | Tenpay account number, bank card account number, etc. | |
payment method | payMode | Y | 1: WeChat 2: Alipay | |
Payment time | payTime | Y | Format: YYYY-MM-DD 24HH:MI:SS | |
Output | Transaction result code | resultCode | Y | -1: Failure 0: Success 1: Paid (the output is returned as the return value of payment success) 2: Does not meet the hospital limit, unable to pay (exceeding the payment deadline, etc.) |
wrong information | resultMessage | Y | When the transaction result code is successful, this field returns an empty string | |
Hospital transaction serial number | hisOrdNum | Y | Used to uniquely identify an outpatient payment transaction | |
Receipt number | receiptNum | N | ||
Bar code | barCode | N | ||
Information returned by the hospital | hisMessage | Y |
1.1.6 Check payment status
Request address | ||||
---|---|---|---|---|
note | ||||
Interface name | getPayStatus | |||
Sample code | Request message: <request> <params> </params></request> Response message: <response> <result> </result></response> | |||
Parameter Type | parameter name | Parameter code | Must lose | Description |
enter | Hospital code | branchCode | Y | If the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty |
TransactionID | WeChat Pay order number | Y | ||
PayTime | Payment time | N | ||
ChargeTotal | Payment amount | N | ||
Output | Transaction result code | resultCode | Y | -1: Failure 0: Success |
wrong information | resultMessage | Y | When the transaction result code is successful, this field returns an empty string | |
ReceiptSn | Invoice serial number | Y | ||
Guid | Guidance information | Y |
1.1.7 Payment receipt reminder (HIS calls Ningyuan interface)
When the doctor issues a new prescription, examination, inspection, etc., the patient is notified that there is a new payment receipt.
Entry name | Example |
---|---|
data | <request><head><key>hisRemind_common_payOrder</key><hospcode>Organization Code</hospcode><token>Authorization Verification</token><time>Time such as 20130901150401</time></head><body> <cardNo>Diagnostic card number</cardNo><hisPayNo>Payment receipt number</hisPayNo><phone>Mobile phone number</phone><patientName>Patient name</patientName><payAmt>Payment amount</payAmt><payType>Check Fee/</payType><docName>Doctor's Name</docName><depName>Department Name</depName></body></request> |
-
-
-
- Input parameter data node description
-
-
Participate | Entry description | Types of | Available |
---|---|---|---|
patientName | Patient name | Varchar(20) | N |
hisPayNo | Payment receipt number | VARCHAR2(40) | N |
phone | telephone number | VARCHAR2(40) | Y |
cardNo | Health card number/diagnostic card number | VARCHAR2(40) | Y |
payAmt | Payment amount | Varchar(10,2) | N |
payType | Expense type description, inspection fee, inspection fee, medicine fee | Varchar(20) | N |
docName | Billing doctor | Varchar(20) | N |
depName | Billing Department | Varchar(100) | Y |
Entry name | Example |
---|---|
data | <response><head><result>1</result><desc>Push successfully</desc></head></response> |
Participate | Entry description | Types of | Available |
---|---|---|---|
result | Return value flag 1-success 0-failure | Varchar(1) | N |
desc | Return value description | Varchar(100) | Y |
1.1.8 Refund between consultations (his calls Ningyuan interface)
-
-
-
-
- Service description (pay_refundFromOffline)
-
-
-
HIS directly calls the refund interface in the charging window, and the refund interface calls the online server to apply for refund.
Note: The refund interface is only a refund application, and the arrival of the fee is not real-time. If it is to the wallet, it will be within 10 minutes, if the original way is returned to the bank, it will take 2-5 working days. After the refund application is not excluded Failure occurs (such as the card has been locked or cancelled, etc.).
-
-
-
-
- enter
-
-
-
Entry name | Example |
---|---|
data | <request> <head> <key>pay_Comm_RefundFee (hospital refund fee pay_Comm_inHospitalRefundFromOffline)</key> <hospcode>Organization code</hospcode> <token>Authorization verification</token> <time>Time such as 20130901150401</time> </head> <body> <refundType>Refund Type (1-Refund during consultation, 2-Refund of registration fee)</refundType><invoiceNo>Invoice number</invoiceNo> <payTradeNo>Payment serial number</payTradeNo> <payMethod>weixin</payMethod> <refundAmt>Refund amount</refundAmt> <refundTime>Refund time</refundTime> <refundMan>Refund person</refundMan> </body></request> |
JSON | Reference example |
-
-
-
-
- Input parameter data node description
-
-
-
Participate | Entry description | Types of | Available |
---|---|---|---|
invoiceNo | receipt number | VARCHAR2(40) | NO |
payTradeNo | Payment serial number | VARCHAR2(40) | NO |
payMethod | payment method | NUMBER(16,2) | NO |
refundAmt | Payment amount | VARCHAR2(4) | NO |
refundTime | Refund time | VARCHAR2(64) | NO |
refundMan | Refunder | VARCHAR2(20) | NO |
-
-
-
-
- return
-
-
-
Entry name | Example |
---|---|
data | Success: <response> <head> <result>1</result> <desc>Refund application successful</desc> </head> <body> <invoiceNo>Invoice number</<invoiceNo> <refundState>Refund status </<refundState> <refundTradeNo>Refund serial number</refundTradeNo> <refundTime>Refund success time</refundTime> </body></response> Failure: <response> <head> <result>0</result > <desc>An error occurred when calling the refund interface, please try again</desc> </head></response> |
-
-
-
-
- Return node description
-
-
-
Participate | Entry description | Types of | Available |
---|---|---|---|
invoiceNo | receipt number | VARCHAR2(40) | NO |
refundState | Refund status | VARCHAR2(1) | NO |
refundTradeNo | Payment transaction serial number | VARCHAR2(64) | NO |
refundTime | Refund successful time | VARCHAR2(20) | NO |
1.1.9 Outpatient payment and reconciliation interface
1 . Data exchange process
2. Parameter description:
[Function definition] getMzPayList
[Service description] Outpatient payment and reconciliation interface
[Parameter example] Refer to WeChat_GetOrganization for the specific format of the incoming parameter
[Parameter description] XmlParams: string XML parameters.
parameter list
Common parameters:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
AccessKey | Access authorization code | varchar(255) | TRUE | Please consult the platform provider |
MethodName | Method name | TRUE | Reference interface documentation |
parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
Organization | Institution code | varchar(50) | TRUE | |
BeginDate | Starting time | datetime | TRUE | Required |
EndDate | End Time | datetime | TRUE | Required |
patCardNo | Outpatient number (seeing card number) | varchar(12) | FALSE |
Note: If the time is empty, all payment records of the patient this year will be returned
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Result | Return result | varchar(30) | 0: success -1: failure |
Error | Return message | varchar(32) |
Value list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
PatientName | Name | varchar(50) | |
PatientID | Patient ID | varchar(12) | |
VisitTime | Hospital stay | datetime | |
HisPayNo | Document No | varchar(20) | Patient ID^outpatient serial number |
ReceiptSn | Invoice serial number | varchar(20) | |
PayStatus | Payment status | varchar(2) | 1 paid; -1 refunded |
PayType | payment method | varchar(10) | wWeChat Pay |
ChargeDate | Payment time | datetime | |
ChargeTotal | Payment amount | Decimal(18,0) | Unit: minutes |
TransactionID | Payment order number | varchar(50) | |
BusinessType | category | varchar(1) | 1: Outpatient 2: Inpatient |
RefundMan | Refunder | varchar(50) | |
RefundTime | Refund time | datetime | |
RefundAmt | Refund amount | Decimal(18,0) | |
RefundNo | Refund serial number | varchar(50) |
1.1.10 Waiting for consultation (seeing queue)
1 . Data exchange process
2. Parameter description:
[Function definition] getDistInfo
Service Description Waiting for consultation
[Parameter example]
[Parameter description] XmlParams: string XML parameters.
parameter list :
parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
patCardNo | Outpatient number, or medical card number | varchar(12) | TRUE |
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Result | Return result | varchar(30) | 0: success -1: failure |
Error | Return message | varchar(32) |
Value list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
VisitDate | Treatment time | datetime | |
VisitDeptName | Name of the department | varchar(50) | |
VisitDoctName | Visiting doctor's name | varchar(50) | |
Shift | Shift | Int | |
PatWaitCount | Number of people waiting for consultation | Int | |
QueueSN | Visiting serial number | Int | |
PatientName | Name | varchar(50) | |
BookTime | Appointment | Datetime | |
Status | Queue status | varchar(2) | 1 Appointed 3 Triaged 5 Visited 7 Cancelled Visit 8 Canceled Appointment 9 Cancelled Triage 10 Notified 11 Currently Visited |
BookType | Appointment type |
1.1.11 Check the result list query
Request address | ||||
---|---|---|---|---|
Interface name | getExamineList | |||
Sample code | Request message: <request> <params> </params></request> Response message: <response> <result> <item> </item> <item> </item> </result> </response> | |||
Parameter Type | parameter name | Parameter code | Must lose | Description |
enter | Hospital code | branchCode | N | If the hospital has no branch, an empty string will be passed in; if the hospital does not have a branch, it is not allowed to be empty |
Type of medical card | patCardType | N | See 2.3.1 Types of tied cards | |
Medical card number | patCardNo | N | ||
start date | beginDate | Y | Format: YYYY-MM-DD | |
End date | endDate | Y | Format: YYYY-MM-DD | |
Output | Transaction result code | resultCode | Y | -1: Failure 0: Success 1: Success but no data is found |
wrong information | resultMessage | Y | When the transaction result code is successful, this field returns an empty string | |
Check the result set | The following is the content of the collection item | |||
Patient name | patName | Y | ||
Check ID | checkId | Y | Uniquely identify a certain inspection | |
Check name | checkName | Y | ||
Report type | checkType | Y | ||
Report type name | checkTypeName | Y | ||
Examination department | deptName | Y | ||
Check doctor | doctorName | Y | ||
check the time | checkTime | Y | Format: YYYY-MM-DD 24HH:MI:SS | |
Billing doctor's name | orderDoctor | Y | ||
Billing doctor code | orderDoctorCode | Y | ||
Billing doctor's job number | orderDoctorNo | N | ||
Billing Department | orderDept | Y | ||
report time | ReportTime | Y | Format: YYYY-MM-DD 24HH:MI:SS | |
File address | fileAddress | N | Report image url address |
1.1.12 Check the details of inspection results
Request address | ||||
---|---|---|---|---|
Interface name | getExamineDetail | |||
Sample code | Request message: <request> <params> </params></request> Response message: <response> <result> </reault></response> | |||
Parameter Type | parameter name | Parameter code | Must lose | Description |
enter | Hospital code | branchCode | Y | If the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty |
Check ID | checkId | Y | Uniquely identify a certain inspection | |
Output | Transaction result code | resultCode | Y | -1: Failure 0: Success 1: Success but no data is found |
wrong information | resultMessage | Y | When the transaction result code is successful, this field returns an empty string | |
Patient name | patName | Y | ||
Patient gender | patSex | Y | M: male, F: female | |
Patient's age | patAge | Y | ||
Application department name | deptName | Y | ||
Report the name of the doctor | reportDocName | Y | ||
clinical diagnosis | diagnosis | N | ||
Name of examining doctor (technician) | checkDocName | Y | ||
Check date | checkTime | Y | Format: YYYY-MM-DD HH:MM:SS | |
Check parts | checkPart | Y | ||
Inspection Method | checkMethod | Y | ||
Check what you see | checkSituation | Y | ||
diagnosis | checkOption | Y | ||
Medical order item | advice | Y |
1.1.13 Query of Inspection Report List
Request address | ||||
---|---|---|---|---|
Interface name | getInspectList | |||
Sample code | Request message: <request> <params> </params></request> Response message: <response> <result> <item> </item> <item> </item> </result> </response> | |||
Parameter Type | parameter name | Parameter code | Must lose | Description |
enter | Hospital code | branchCode | N | If the hospital has no branch, an empty string will be passed in; if the hospital does not have a branch, it is not allowed to be empty |
Type of medical card | patCardType | N | See 2.3.1 Types of tied cards | |
Medical card number | patCardNo | N | ||
start date | beginDate | Y | Format: YYYY-MM-DD | |
End date | endDate | Y | Format: YYYY-MM-DD | |
Output | Transaction result code | resultCode | Y | -1: Failure 0: Success 1: Success but no data is found |
wrong information | resultMessage | Y | When the transaction result code is successful, this field returns an empty string | |
Inspection report collection | The following is the content of the collection item | |||
Patient name | patName | Y | ||
Patient gender | patSex | Y | M: male, F: female | |
Patient's age | patAge | Y | ||
clinical diagnosis | diagnosis | N | ||
Check ID | inspectId | Y | ||
Test name | inspectName | Y | ||
Inspection department | deptName | Y | ||
Sending doctor | doctorName | Y | ||
Sending doctor's code | doctorCode | Y | ||
The job number of the sending doctor | doctorNo | Y | ||
Inspection time | inspectTime | Y | Format: YYYY-MM-DD 24HH:MI:SS | |
Audit doctor | verifyDoctor | Y | ||
Review time | verifyTime | Y | Format: YYYY-MM-DD 24HH:MI:SS | |
Examiner | inspectDoctor | Y | ||
Test of time | provingTime | Y | Format: YYYY-MM-DD 24HH:MI:SS | |
report time | reportTime | Y | Format: YYYY-MM-DD 24HH:MI:SS | |
File address | fileAddress | N | Picture or file url address |
1.1.14 Inquiry for details of inspection report
Request address | ||||
---|---|---|---|---|
Interface name | getInspectDetail | |||
Sample code | Request message: <request> <params> </params></request> Response message: <response> <result> <item> </item> <item> </item> </ressult> </response> | |||
Parameter Type | parameter name | Parameter code | Must lose | Description |
enter | Hospital code | branchCode | y | If the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty |
Check ID | inspectId | Y | ||
Output | Transaction result code | resultCode | Y | -1: Failure 0: Success 1: Success but no data is found |
wrong information | resultMessage | y | When the transaction result code is successful, this field returns an empty string | |
Collection of report details | The following is the content of the collection item | |||
project name | itemName | Y | ||
result | result | Y | ||
unit | unit | Y | ||
Reference range | refRange | Y | ||
Abnormal result prompt | abnormal | Y | 0: Normal 1: High 2: Low |
1.1.15 Scan code payment
This document is Ningyuan's front-end computer scan code payment interface document. His party calls this interface, obtains the corresponding URL address, generates a QR code and prints it on the prescription sheet for the patient to scan the code for payment
Both parties make calls through WebService (Soap Web Service, TCP communication).
When the two parties coordinate testing and deployment, they inform each other of the interface call address, and the address uses the same URL. The business is encapsulated in the POST XML string
Calling method: requestWS
1. Request message structure:
<request>
<head>
<key>Business unique identifier</key>
<hospcode>Organization code</hospcode>
<token>Authorization verification</token>
<time>Time such as 20130901150401</time>
</head>
<body>Business parameters</body>
</request>
Response message structure:
<response>
<head>
<result>Request status, 0-failure1-success</result>
<desc>Reason for success or failure</desc>
</head>
<body><table name>business data</table name></body>
</response>
-
-
-
-
- Ningyuan provides interface
- Service Description
-
-
-
HIS calls this interface, passes in information such as the amount, receipt number, card number, etc., and Ning Yuan returns the payment url. His generates a QR code based on this url and prints it on the prescription sheet.
-
-
-
-
- enter
-
-
-
Entry name | Example |
---|---|
data | <request> <head> <key>scanpay_comm_qrCode</key> <hospcode>138</hospcode> <token></token> <time></time> </head> <body> <card_no>8888888</card_no > <health_no>patientId^Number of visits</health_no> <unit_branch_id>Branch id</unit_branch_id> <name>Name</name> </body></request> |
-
-
-
-
- Input parameter data node description
-
-
-
Participate | Entry description | Type length | Available |
---|---|---|---|
hospcode | Hospital ID | varchar(32) | N |
card_no | Patient card number or registration number or patient id, which is the same as the card tied during the consultation | varchar(64) | N |
Health_no | Medical record number or outpatient serial number | Varchar(64) | Y |
unit_branch_id | Branch id | varchar(32) | n |
name | Patient name | varchar(32) | Y |
-
-
-
-
- return
-
-
-
Entry name | Example |
---|---|
data | Success: <response><head><result>1</result><desc>SUCCESS</desc></head><body> <url> wxistest.91160.com/wxis/anaCod... |
1.1.16 Online Number Acquisition
Request address | ||||
---|---|---|---|---|
Interface name | getOrderReg | |||
Sample code | Request message: <request> <params> </params></request> Response message: <response> <result> <item> </item> <item> </item> </result> </response> | |||
Parameter Type | parameter name | Parameter code | Must lose | Description |
enter | Hospital code | hospitalcode | Y | If the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty |
identity number | SFZH | Y | Timeless transmission 0 | |
Reservation order number | ORDERNO | Y | ||
Output | Patient Clinic Number | bah | Y | |
Outpatient serial number | Mzlsh | N | ||
Social Security Serial Number | Sblsh | Y | ||
order number | ORDERNO | Y | ||
identity number | Sfzh | Y | ||
Department name | DepartmentName | Y | ||
Department address | DepartmentPlace | Y | ||
Department code | DepartmentCode | Y | ||
Level name | DoctorType | Y | ||
Doctor's name | DoctorName | Y | ||
Doctor job number | DoctorCode | Y | ||
Appointment date | RegistDate | Y | ||
Appointment start time | BeginTime | Y | Time period format: hour:minute | |
Appointment end time | EndTime | Y | Time period format: hour:minute | |
Payment sign | PayState | Y | -1 unpaid, 0 paid | |
Out-of-pocket amount | Zfje | Y | ||
Social security amount | Sbje | Y | ||
Registration fee | Ghf | Y |
1.1.17 Checklist of physical examination reports
1 . Data exchange process
2. Parameter description:
[Function definition] getExaminationList
[Service Description] Query the list of medical examination reports
[Parameter example]
[Parameter description] XmlParams: string XML parameters.
parameter list
parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
patCardNo | Medical card number | varchar(12) | FALSE | |
empCheckNo | Medical examination number | varchar(20) | FALSE | |
beginDate | Starting time | datetime | TRUE | |
endDate | End Time | datetime | TRUE |
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Result | Return result | varchar(30) | 0: success -1: failure |
Error | Return message | varchar(32) |
Value list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
PHY_ID | Medical Exam ID | varchar(32) | |
PatientId | Patient ID | varchar(12) | |
MOBILE | cellphone number | varchar(32) | |
NAME | username | varchar(32) | |
SEX | gender | varchar(64) | |
PNO | Medical examination number | varchar(128) | |
AGE | age | varchar(128) | |
HOS_ID | Hospital ID | varchar(50) | |
EXAM_DESC | Inspection summary | varchar(50) | |
DOC_PROPOSAL | Doctor recommended | varchar(40) | |
REMARK | Description | varchar(128) | |
DOCTOR_NAME | Chief Examiner | varchar(32) | |
TEL | support hotline | varchar(32) | |
PHY_DATE | General inspection date | datetime | |
REG_DATE | Registration Date | datetime |
1.1.18 Checking the details of the physical examination report
1. Data interaction process
2. Parameter description:
[Function definition] getExaminationDetail
Service Description Inquiry for the details of the physical examination report
[Parameter description] XmlParams: string XML parameters.
parameter list
parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
PHY_ID | Medical Exam ID | varchar(40) | TRUE |
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Result | Return result | varchar(30) | 0: success -1: failure |
Error | Return message | varchar(32) |
Value list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
PHY_ID | Medical Exam ID | varchar(32) | |
RES_TYPE | Check type | varchar(32) | 1 inspection, 2 inspection, 3 others |
ITEM_NAME | project name | varchar(40) | |
ITEM_CODE | Item Number | varchar(20) | |
EXAM_DATE | Check date | varchar(40) | |
DOCTOR_NAME1 | Check doctor | varchar(40) | |
RAMARK1 | Remarks | varchar(40) | |
ASSAY_NAME | project name | varchar(40) | |
ASSAY_VALUE | test result | varchar(40) | |
UNIT | unit | varchar(40) | |
PROMPT | prompt | varchar(40) | |
REFER | Reference | varchar(40) | |
Summary | summary | varchar(40) |
-
- Part 2: Hospitalization
2.1.1WeChat_GetZyPatientInfo : Get inpatient information
1 . Data exchange process
2. Parameter description:
[Function definition] WeChat_GetZyPatientInfo
[Service Description] Obtain information of inpatients
[Parameter example] Refer to WeChat_GetOrganization for the specific format of the incoming parameter
[Parameter description] XmlParams: string XML parameters.
parameter list
Input parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
PatientName | Patient name | varchar(50) | TRUE | |
InpatientNo | Hospital number | varchar(12) | TRUE | ID number, hospitalization number, and ID number cannot be empty at the same time |
PatientID | Patient ID | varchar(12) | TRUE | ID number, hospitalization number, and ID number cannot be empty at the same time |
IDCard | identity number | varchar(18) | TRUE | ID number, hospitalization number, and ID number cannot be empty at the same time |
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Result | Return result | varchar(30) | 0: success -1: failure |
Error | Return message | varchar(32) |
Value list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
PatientID | Patient ID | varchar(12) | |
PatientName | Patient name | varchar(100) | |
InpatientNo | Hospital number | varchar(12) | |
AdmissTimes | Number of hospitalizations | int | |
ReferPhysician | Tube bed doctor's job number | varchar(10) | |
ReferPhysicianName | Name of the doctor in charge | vharchar(50) | |
Dept | Current department | varchar(10) | |
BedNo | Bed number | varchar(8) | |
Status | Hospitalization | varchar(10) | in hospitalized; out discharged |
AdmissDate | Admission date | datetime | Format: YYYY-MM-DD |
DisDate | Discharge date | datetime | Format: YYYY-MM-DD, an empty string will be returned if the admission has not been discharged |
2.1.2 WeChat_GetZyInfos: Query the details of hospitalization information (list)
1 . Data exchange process
2. Parameter description:
[Function definition] WeChat_GetZyInfos
[Service Description] Obtain a list and details of patient hospitalization information. The patient can query the current and previous hospitalization records by binding a hospitalization number on the mobile phone. When the hospitalization status is not empty, the patient can query according to the hospitalization status.
[Parameter example] Refer to WeChat_GetZyInfos for the specific format of the incoming parameter
[Parameter description] XmlParams: string XML parameters.
parameter list
Input parameters, parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
CheckinNo | Flowing water every time you are hospitalized | varchar(50) | TRUE | Both the hospitalization serial number and the hospitalization number cannot be empty at the same time |
InpatientNo | Hospital number | varchar(12) | TRUE | Both the hospitalization serial number and the hospitalization number cannot be empty at the same time |
BeginDate | Starting time | varchar(20) | FALSE | Starting time |
EndDate | End Time | Varchar(20) | FALSE | End Time |
ZYstate | Hospitalization | Varchar(2) | FALSE | in in the hospital out if you are discharged from the hospital, it means all |
Type | Query list flag | Varchar(2) | TRUE | When querying the list, pass 1, and when querying details, pass 2. When passing 2, the CheckinNo node cannot be empty, and other nodes are empty. |
Note: When begin_date and end_date are empty, the hospital records of one year are queried by default.
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Result | Return result | varchar(30) | 0: success -1: failure |
Error | Return message | varchar(32) |
Value list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
CheckinNo | Hospital serial number | varchar(12) | |
PatientName | Patient name | varchar(100) | |
InpatientNo | Hospital number | varchar(12) | |
DepId | Inpatient department ID | int | |
DeptName | Name of Inpatient Department | varchar(10) | |
BedNo | Bed No | vharchar(50) | |
Diagnose | clinical diagnosis | varchar(10) | |
Status | Hospitalization | varchar(10) | in out of hospital |
AdmissDate | Admission date | datetime | Format: YYYY-MM-DD |
DisDate | Discharge date | datetime | Format: YYYY-MM-DD, an empty string will be returned if the admission has not been discharged |
DisDiag | Discharge diagnosis | varchar(200) | |
FeeTotal | Total cost | Dec(18,0) | unit: yuan |
DepositfeeTotal | Total deposit | Dec(18,0) | unit: yuan |
DepositfeeBalance | Available balance of deposit | Dec(18,0) | unit: yuan |
2.1.3 WeChat_GetDailyLedgerList query daily list list
1 . Data exchange process
2. Parameter description:
[Function definition] WeChat_GetDailyLedgerList
[Service Description] The patient can query the associated hospitalization cycle expense list (daily summary) through the hospitalization number and serial number. When the start time and end time are empty, all the expense documents for the current hospitalization are sent by default. [Parameter example] Refer to WeChat_GetDailyLedgerList for the specific format of the incoming parameter
[Parameter description] XmlParams: string XML parameters.
parameter list
Input parameters, parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
CheckinNo | Hospital serial number | varchar(50) | TRUE | The serial number of the hospitalization |
BeginDate | Starting time | varchar(20) | Start time YYYY-MM-DD | |
EndDate | End Time | Varchar(20) | End time YYYY-MM-DD |
Remarks: If the time is empty, return the expense list from 1.1 to yesterday
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Result | Return result | varchar(30) | 0: success -1: failure |
Error | Return message | varchar(32) |
Value list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
CheckinNo | Hospital serial number | varchar(12) | |
LedgerId | Accounting Id | varchar(100) | |
LedgerDate | Accounting date | datetime | Format: yyyy-mm-dd |
FeeTotal | Total cost | dec(18,2) | unit: yuan |
2.1.4 WeChat_GetDailyLedger query daily list details
1 . Data exchange process
2. Parameter description:
[Function definition] WeChat_GetDailyLedger
[Service Description] The patient queries the daily expense list (detailed bill) through the hospitalization number serial number + bill id. When the bill id=all, query the details of all bills with the current serial number. For the specific format of the parameters, refer to WeChat_GetDailyLedger
[Parameter description] XmlParams: string XML parameters.
parameter list
Input parameters, parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
CheckinNo | Hospital serial number | varchar(50) | TRUE | The serial number of the hospitalization |
LedgerId | Accounting ID | varchar(100) | TRUE | Daily bill id |
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Result | Return result | varchar(30) | 0: success -1: failure |
Error | Return message | varchar(32) |
Value list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
CheckinNo | Hospital serial number | varchar(12) | |
LedgerId | Accounting Id | varchar(30) | |
LedgerDate | Accounting date | datetime | Format: YYYY-MM-DD |
FeeItem | Expense item | Varchar(20) | |
FeeItemCode | Expense item code | Varchar(20) | non empty |
ChargePrice | unit price | Dec(18,2) | unit: yuan |
Amt | Quantity | Varchar(20) | |
Unit | unit | Varchar(20) | |
Std | specification | Varchar(20) | |
FeeType | Expense item category | Varchar(20) | Such as surgery fee, western medicine fee, material fee |
ItemTime | Cost execution time | Varchar(20) | Format: yyyy-mm-dd hh:mm:ss |
FeeTime | Cost incurred time | Varchar(20) | Format: yyyy-mm-dd hh:mm:ss |
FeeItemTotal | Single item total | Dec(18,0) | unit: yuan |
FeeTotal | Total cost | Dec(18,0) | unit: yuan |
2.1.5 WeChat_PayDepositFee hospitalization deposit payment
1 . Data exchange process
2. Parameter description:
[Function definition] WeChat_PayDepositFee
[Service description] Hospital deposit payment
[Parameter description] XmlParams: string XML parameters.
parameter list
Input parameters, parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
CheckinNo | Hospital serial number | varchar(50) | TRUE | The serial number of the hospitalization |
OprId | Toll collector | varchar(20) | TRUE | Does His need NY05 |
PayMethod | payment method | varchar(20) | TRUE | Does His need 14 |
InpatientNo | Hospital number | varchar(20) | FALSE | The patient's unique number in the hospital information system |
TradeNo | Payment transaction serial number | varchar(20) | TRUE | Use the serial number of online payment |
TradeTime | Payment transaction time | varchar(20) | TRUE | Online payment time |
PayAmt | Payment amount | numberic(20) | TRUE | unit: yuan |
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Result | Return result | varchar(30) | 0: success -1: failure |
Error | Return message | varchar(32) |
Value list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Rs | result | varchar(2) | 0: success -1: failure |
Msg | Result message | varchar(5000) | |
ReceiptNo | Deposit receipt | varchar(12) | His invoice number |
2.1.6 WeChat_GetDepositFee deposit payment record query
1 . Data exchange process
2. Parameter description:
[Function definition] WeChat_GetDepositFee
[Service Description] Query the patient's hospital deposit payment record.
[Parameter description] XmlParams: string XML parameters.
parameter list
Input parameters, parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
CheckinNo | Hospital serial number | varchar(50) | TRUE | |
InpatientNo | Hospital number | varchar(20) | FALSE | The patient's unique number in the hospital information system |
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Result | Return result | varchar(30) | 0: success -1: failure |
Error | Return message | varchar(32) |
Value list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
PayTime | Payment time | varchar(12) | |
ChannelId | Payment channel | varchar(30) | Payment channel, such as 91160/bank/window |
PayMethodName | payment method | varchar(30) | Patient payment channel, cash/weixin/alipay |
PayAmt | Payment amount | Dec(18,0) | Amount of deposit paid, unit yuan |
2.1.7 WeChat_QueryPayState deposit payment status query
1 . Data exchange process
2. Parameter description:
[Function definition] WeChat_QueryPayState
[Service Description] Query the patient's hospital deposit payment record.
[Parameter description] XmlParams: string XML parameters.
parameter list
Input parameters, parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
CheckinNo | Hospital serial number | varchar(50) | TRUE | |
TradeNo | Payment transaction serial number | varchar(20) | FALSE |
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Result | Return result | varchar(30) | 0: success -1: failure |
Error | Return message | varchar(32) |
Value list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
ReceiptNo | Deposit receipt | varchar(12) | Which is the invoice number |
2.1.8 WeChat_CheckInfoCount view the current hospitalization expenses
1 . Data exchange process
2. Parameter description:
[Function definition] WeChat_CheckInfoCount
[Service Description] The patient is inquiring the statistics of all bills of the current serial number through the serial number of the hospitalization number.
[Parameter description] XmlParams: string XML parameters.
parameter list
Input parameters, parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
CheckinNo | Hospital serial number | varchar(50) | TRUE | The serial number of the hospitalization |
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Result | Return result | varchar(30) | 0: success -1: failure |
Error | Return message | varchar(32) |
Value list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
CheckinNo | Hospital serial number | varchar(12) | |
FeeType | Item category | varchar(30) | |
FeeTypeTotal | The total cost of this category | Dec(18,2) | unit: yuan |
FeeTotal | Total cost | Dec(18,2) | unit: yuan |
2.1.9 WeChat_GetZyPayList: Hospital deposit reconciliation interface
1 . Data exchange process
2. Parameter description:
[Function definition] WeChat_GetZyPayList
[Service description] Hospital deposit reconciliation interface
[Parameter example] Refer to WeChat_GetOrganization for the specific format of the incoming parameter
[Parameter description] XmlParams: string XML parameters.
parameter list
parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
Organization | Institution code | varchar(50) | TRUE | |
BeginDate | Starting time | datetime | TRUE | |
EndDate | End Time | datetime | TRUE | |
PatientID | Patient ID | varchar(12) | False |
Note: If the time is empty, all payment records of the patient this year will be returned
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
Result | Return result | varchar(30) | 0: success -1: failure |
Error | Return message | varchar(32) |
Value list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
PatientName | Name | varchar(50) | |
PatientID | Patient ID | varchar(12) | |
VisitTime | Hospital stay | datetime | |
HisPayNo | Hospitalized receipt number | varchar(20) | Patient ID^Number of hospitalizations |
ReceiptSn | Invoice serial number | varchar(20) | |
PayStatus | Payment status | varchar(2) | 1 paid; -1 refunded |
PayType | payment method | varchar(10) | wWeChat Pay |
AccountSn | Number of payments | int | |
ChargeDate | Payment time | datetime | |
ChargeTotal | Payment amount | Decimal(18,0) | unit: yuan |
TransactionID | Payment order number | varchar(50) | |
BusinessType | category | varchar(1) | 1: Outpatient 2: Inpatient |
RefundMan | Refunder | varchar(50) | No WeChat refund for hospitalization, all refunds are empty |
RefundTime | Refund time | datetime | No WeChat refund for hospitalization, all refunds are empty |
RefundAmt | Refund amount | Decimal(18,0) | No WeChat refund for hospitalization, all refunds are empty |
RefundNo | Refund serial number | varchar(50) | No WeChat refund for hospitalization, all refunds are empty |
2.1.10inHos_warnDeposit: Hospital deposit reminder interface
1 . Data exchange process
2. Parameter description:
[Function definition] inHos_warnDeposit
[Service description] Hospital deposit reminder interface
[Parameter example] Refer to inHos_warnDeposit for the specific format of the incoming parameter
[Parameter description] XmlParams: string XML parameters.
parameter list
Input parameters, parameter list:
Field name | Chinese meaning | type of data | Mandatory sign | Annotation |
---|---|---|---|---|
unit_id | Hospital code | varchar(50) | TRUE | Shenzhen Children s Hospital is 111 |
checkin_no | Hospital serial number | datetime | TRUE | |
patient_no | Hospital number | datetime | TRUE | |
phone | phone number | varchar(12) | TRUE | |
warn_msg | Reminder content | varchar(20) | TRUE | Your hospital deposit balance is low (999.00), please recharge in time |
3. Return information:
The return value is an XML parameter string.
parameter list
return value | Chinese meaning | type of data | Annotation |
---|---|---|---|
result | Return result | varchar(30) | 1- Push successfully 0- Push failed |
desc | Return message | varchar(32) |
4. Example of deposit reminder interface:
Entry name | Example |
---|---|
data | <request><head><key>inHos_warnDeposit</key><hospcode>111/hospcode><token></token><time></time></head><body><checkin_no>Hospitalization number</key> checkin_no><patient_no>hospital number</patient_no><phone>mobile phone number</phone><warn_msg>Your hospital deposit balance is low (999.00), please recharge in time</warn_msg></body></request> |
Participants:
Entry name | Example |
---|---|
data | <response><head><result>1</result><desc>Push successfully</desc></head></response> |