Wechat payment full-process docking document

Wechat payment full-process docking document

Wechat payment full-process docking document

    1. Part 1: Payment during consultation

1.1.1Patient information query

Request address 
note1. 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 namegetMZPatient
Sample codeRequest message: <request><params> <patName></patName> </params></request> Response message: <response> <result> <patType></patType> </result></response>
Parameter Typeparameter nameParameter codeMust loseDescription
enterHospital codebranchCodeYIf 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 namepatNameY 
Medical card numberpatCardNoYIf there is no medical card, it is the outpatient number
OutputTransaction result coderesultCodeY-1: Failure 0: Success 1: Success but no data is found
wrong informationresultMessageYWhen the transaction result code is successful, this field returns an empty string
Patient typepatTypeY1: Adult 2: Child
NamepatNameY 
genderpatSexYM: male, F: female
date of birthpatBirthY 
addresspatAddressY 
phonepatMobiley 
type of certificatepatIdTypeYSee 2.3.4 Types of documents
ID numberpatIdNoY 
Type of medical cardpatCardTypeYSee 2.3.1 Types of tied cards
Medical card numberpatCardNoY 
Whether to bind medical insurancehasMedicareYtrue: bind; false: not bind

1.1.2 Archives for the first patient

Request address 
Interface namecreateACard
Sample codeRequest message: <request><params> <patType></patType> </params></request> Response message: <response> <result> <patCardType></patCardType> </result></response>
Parameter Typeparameter nameParameter codeMust loseDescription
enterHospital codebranchCodeYIf 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 typepatTypeY1: Adult 2: Child
NamepatNameY 
genderpatSexYM: male, F: female
agepatAgeY 
date of birthpatBirthY 
addresspatAddressY 
phonepatMobileY 
type of certificatepatIdTypeYSee 2.3.4 Document Type When the patient type is "2" children, this item is allowed to be empty
ID numberpatIdNoYWhen the patient type is "2" for children, this item is allowed to be empty
Guardian's nameguardNameYWhen the patient type is "2" children, this item must be input
Guardian ID TypeguardIdTypeY
Guardian ID NumberguardIdNoY
OutputTransaction result coderesultCodeY-1: Failure 0: Success 1: File has been created (the output is returned according to the return value of successful file creation)
wrong informationresultMessageyWhen the transaction result code is successful, this field returns an empty string
Medical card numberpatCardNoYclinic number

1.1.3 Inquiry of outpatient payment records

Request address 
Interface namegetMZFeeList
Sample codeRequest message: <request> <params> </params></request> Response message: <response> <result> <item> </item> <item> </item> </result> </response>
Parameter Typeparameter nameParameter codeMust loseDescription
enterHospital codebranchCodeYIf the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty
Type of medical cardpatCardTypeNSee 2.3.1 Types of tied cards
Medical card number (outpatient number)patCardNoY 
The branch code and branch name are removed from the output parametersTransaction result coderesultCodeY-1: Failure 0: Success 1: Success but no data is found
wrong informationresultMessageYWhen the transaction result code is successful, this field returns an empty string
Collection of payment itemsThe collection content includes the following items
Unique identification of payment itemmzFeeIdYUsed to uniquely identify a payment (including 1..n prescriptions or 1..n checklists, n prescriptions are one payment, n checklists are another payment)
Build timetimeYFormat: YYYY-MM-DD 24HH:MI:SS
Doctor codedoctorCodeY 
Doctor's namedoctorNameY 
Payment SectiondeptNameY 
Amounts payablepayAmoutYAmount payable = total amount-if the medical insurance amount does not support medical insurance settlement, the total amount will be returned
Medicare amountMedicareAmoutYMedicare Amount = Total Amount-Amount Payable
total amounttotalAmoutYTotal amount = amount payable + medical insurance amount

 

1.1.4 Inquiry for details of outpatient payment records

Request address 
Interface namegetMZFeeDetail
Sample codeRequest message: <request> <params> </params></request> Response message: <response> <result> <item> </item> <item> </item> </result> </response>
Parameter Typeparameter nameParameter codeMust loseDescription
enterHospital codebranchCodeYIf the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty
Unique identification of payment itemmzFeeIdYUsed to uniquely identify a payment
OutputTransaction result coderesultCodeY-1: Failure 0: Success 1: Success but no data is found
wrong informationresultMessageYWhen the transaction result code is successful, this field returns an empty string
Collection of payment itemsThe collection content includes the following items
Project dateitemTimeYFormat: YYYY-MM-DD 24HH:MI:SS
project nameitemNameY 
Project category/feeitemTypeYSuch as: medicine fee, inspection fee, material fee
unititemUnitY 
Item NumberitemIdYIdentifier of the item, empty if none
unit priceitemPriceYUnit: minutes
specificationitemSpecY 
QuantityitemNumberY 
Total project priceitemTotalFeeYUnit: minutes, equal to: unit price * quantity
Out of departmentdeptNameY 
Prescriber's CodedoctorCodeY 
Name of prescribing doctordoctorNameY 

 

1.1.5 Outpatient payment order payment

Request address 
note1. 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 nameackPayOrder
Sample codeRequest message: <request> <params> </params></request> Response message: <response> <result> </result></response>
Parameter Typeparameter nameParameter codeMust loseDescription
enterHospital codebranchCodeYIf the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty
List of payment itemsmzFeeIdListYIt can be 1..n payment items, separated by commas
Payment amountpayAmoutY 
total amounttotalAmoutY 
Public service platform order numberpsOrdNumYThe serial number of the public service platform (WeChat official account, Alipay service window) used to uniquely identify a transaction
Acquirer serial numberagtOrdNumYThe serial number used by the corresponding acquirer (such as Tenpay, Alipay, UnionPay, etc.) to identify a payment transaction
Acquirer codeagtCodeYTenpay account number, bank card account number, etc.
payment methodpayModeY1: WeChat 2: Alipay
Payment timepayTimeYFormat: YYYY-MM-DD 24HH:MI:SS
OutputTransaction result coderesultCodeY-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 informationresultMessageYWhen the transaction result code is successful, this field returns an empty string
Hospital transaction serial numberhisOrdNumYUsed to uniquely identify an outpatient payment transaction
Receipt numberreceiptNumN 
Bar codebarCodeN 
Information returned by the hospitalhisMessageY 

1.1.6 Check payment status

Request address 
note 
Interface namegetPayStatus
Sample codeRequest message: <request> <params> </params></request> Response message: <response> <result> </result></response>
Parameter Typeparameter nameParameter codeMust loseDescription
enterHospital codebranchCodeYIf the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty
TransactionIDWeChat Pay order numberY 
PayTimePayment timeN 
ChargeTotalPayment amountN 
OutputTransaction result coderesultCodeY-1: Failure 0: Success 
wrong informationresultMessageYWhen the transaction result code is successful, this field returns an empty string
ReceiptSnInvoice serial numberY 
GuidGuidance informationY 

 

1.1.7 Payment receipt reminder (HIS calls Ningyuan interface)

        1. Service Description

When the doctor issues a new prescription, examination, inspection, etc., the patient is notified that there is a new payment receipt.

        1. enter
Entry nameExample
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>
  
        1. Input parameter data node description
ParticipateEntry descriptionTypes ofAvailable
patientNamePatient nameVarchar(20)N
hisPayNoPayment receipt numberVARCHAR2(40)N
phonetelephone numberVARCHAR2(40)Y
cardNoHealth card number/diagnostic card numberVARCHAR2(40)Y
payAmtPayment amountVarchar(10,2)N
payTypeExpense type description, inspection fee, inspection fee, medicine feeVarchar(20)N
docNameBilling doctorVarchar(20)N
depNameBilling DepartmentVarchar(100)Y

 

        1. return
Entry nameExample
data<response><head><result>1</result><desc>Push successfully</desc></head></response>
  

 

        1. Return node description
ParticipateEntry descriptionTypes ofAvailable
resultReturn value flag 1-success 0-failureVarchar(1)N
descReturn value descriptionVarchar(100)Y

 

1.1.8 Refund between consultations (his calls Ningyuan interface)

          1. 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.).

          1. enter
Entry nameExample
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>
JSONReference example
          1. Input parameter data node description
ParticipateEntry descriptionTypes ofAvailable
invoiceNoreceipt numberVARCHAR2(40)NO
payTradeNoPayment serial numberVARCHAR2(40)NO
payMethodpayment methodNUMBER(16,2)NO
refundAmtPayment amountVARCHAR2(4)NO
refundTimeRefund timeVARCHAR2(64)NO
refundManRefunderVARCHAR2(20)NO

 

          1. return
Entry nameExample
dataSuccess: <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> 
  

 

          1. Return node description
ParticipateEntry descriptionTypes ofAvailable
invoiceNoreceipt numberVARCHAR2(40)NO 
refundStateRefund statusVARCHAR2(1)NO
refundTradeNoPayment transaction serial numberVARCHAR2(64)NO
refundTimeRefund successful timeVARCHAR2(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 nameChinese meaningtype of dataMandatory signAnnotation
AccessKeyAccess authorization codevarchar(255)TRUEPlease consult the platform provider
MethodNameMethod name TRUEReference interface documentation

parameter list:

Field nameChinese meaningtype of dataMandatory signAnnotation
OrganizationInstitution codevarchar(50)TRUE 
BeginDateStarting timedatetimeTRUERequired
EndDateEnd TimedatetimeTRUERequired
patCardNoOutpatient 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 valueChinese meaningtype of dataAnnotation
ResultReturn resultvarchar(30)0: success -1: failure
ErrorReturn messagevarchar(32) 

 

Value list

return valueChinese meaningtype of dataAnnotation
PatientNameNamevarchar(50) 
PatientIDPatient IDvarchar(12) 
VisitTimeHospital staydatetime 
HisPayNoDocument Novarchar(20)Patient ID^outpatient serial number
ReceiptSnInvoice serial numbervarchar(20) 
PayStatusPayment statusvarchar(2)1 paid; -1 refunded
PayTypepayment methodvarchar(10)wWeChat Pay
ChargeDatePayment timedatetime 
ChargeTotalPayment amountDecimal(18,0)Unit: minutes
TransactionIDPayment order numbervarchar(50) 
BusinessTypecategoryvarchar(1)1: Outpatient 2: Inpatient
RefundManRefundervarchar(50) 
RefundTimeRefund timedatetime 
RefundAmtRefund amountDecimal(18,0) 
RefundNoRefund serial numbervarchar(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 nameChinese meaningtype of dataMandatory signAnnotation
patCardNoOutpatient number, or medical card numbervarchar(12)TRUE 

3. Return information:

The return value is an XML parameter string.

parameter list

return valueChinese meaningtype of dataAnnotation
ResultReturn resultvarchar(30)0: success -1: failure
ErrorReturn messagevarchar(32) 

 

 

Value list

return valueChinese meaningtype of dataAnnotation
VisitDateTreatment timedatetime 
VisitDeptNameName of the departmentvarchar(50) 
VisitDoctNameVisiting doctor's namevarchar(50) 
ShiftShiftInt 
PatWaitCountNumber of people waiting for consultationInt 
QueueSNVisiting serial numberInt 
PatientNameNamevarchar(50) 
BookTimeAppointmentDatetime 
StatusQueue statusvarchar(2)1 Appointed 3 Triaged 5 Visited 7 Cancelled Visit 8 Canceled Appointment 9 Cancelled Triage 10 Notified 11 Currently Visited
BookTypeAppointment type  

 

 

 

1.1.11 Check the result list query

Request address 
Interface namegetExamineList
  
Sample codeRequest message: <request> <params> </params></request> Response message: <response> <result> <item> </item> <item> </item> </result> </response>
Parameter Typeparameter nameParameter codeMust loseDescription
enterHospital codebranchCodeNIf 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 cardpatCardTypeNSee 2.3.1 Types of tied cards
Medical card numberpatCardNoN 
start datebeginDateYFormat: YYYY-MM-DD
End dateendDateYFormat: YYYY-MM-DD
Output Transaction result coderesultCodeY-1: Failure 0: Success 1: Success but no data is found
wrong informationresultMessageYWhen the transaction result code is successful, this field returns an empty string
Check the result setThe following is the content of the collection item
Patient namepatNameY 
Check IDcheckIdYUniquely identify a certain inspection
Check namecheckNameY 
Report typecheckTypeY 
Report type namecheckTypeNameY 
Examination departmentdeptNameY 
Check doctordoctorNameY 
check the timecheckTimeYFormat: YYYY-MM-DD 24HH:MI:SS
Billing doctor's nameorderDoctorY 
Billing doctor codeorderDoctorCodeY 
Billing doctor's job numberorderDoctorNoN 
Billing DepartmentorderDeptY 
report timeReportTimeYFormat: YYYY-MM-DD 24HH:MI:SS
File addressfileAddressNReport image url address

 

1.1.12 Check the details of inspection results

Request address 
Interface namegetExamineDetail
Sample codeRequest message: <request> <params> </params></request> Response message: <response> <result> </reault></response>
Parameter Typeparameter nameParameter codeMust loseDescription
enterHospital codebranchCodeYIf the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty
Check IDcheckIdYUniquely identify a certain inspection
OutputTransaction result coderesultCodeY-1: Failure 0: Success 1: Success but no data is found
wrong informationresultMessageYWhen the transaction result code is successful, this field returns an empty string
Patient namepatNameY 
Patient genderpatSexYM: male, F: female
Patient's agepatAgeY 
Application department namedeptNameY 
Report the name of the doctorreportDocNameY 
clinical diagnosisdiagnosisN 
Name of examining doctor (technician)checkDocNameY 
Check datecheckTimeYFormat: YYYY-MM-DD HH:MM:SS
Check partscheckPartY 
Inspection MethodcheckMethodY 
Check what you seecheckSituationY 
diagnosischeckOptionY 
Medical order itemadviceY 

 

1.1.13 Query of Inspection Report List

Request address 
Interface namegetInspectList
Sample codeRequest message: <request> <params> </params></request> Response message: <response> <result> <item> </item> <item> </item> </result> </response>
Parameter Typeparameter nameParameter codeMust loseDescription
enterHospital codebranchCodeNIf 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 cardpatCardTypeNSee 2.3.1 Types of tied cards
Medical card numberpatCardNoN 
start datebeginDateYFormat: YYYY-MM-DD
End dateendDateYFormat: YYYY-MM-DD
OutputTransaction result coderesultCodeY-1: Failure 0: Success 1: Success but no data is found
wrong informationresultMessageYWhen the transaction result code is successful, this field returns an empty string
Inspection report collectionThe following is the content of the collection item
Patient namepatNameY 
Patient genderpatSexYM: male, F: female
Patient's agepatAgeY 
clinical diagnosisdiagnosisN 
Check IDinspectIdY 
Test nameinspectNameY 
Inspection departmentdeptNameY 
Sending doctordoctorNameY 
Sending doctor's codedoctorCodeY 
The job number of the sending doctordoctorNoY 
Inspection timeinspectTimeYFormat: YYYY-MM-DD 24HH:MI:SS
Audit doctorverifyDoctorY 
Review timeverifyTimeYFormat: YYYY-MM-DD 24HH:MI:SS
ExaminerinspectDoctorY 
Test of timeprovingTimeYFormat: YYYY-MM-DD 24HH:MI:SS
report timereportTimeYFormat: YYYY-MM-DD 24HH:MI:SS
File addressfileAddressNPicture or file url address

 

1.1.14 Inquiry for details of inspection report

Request address 
Interface namegetInspectDetail
Sample codeRequest message: <request> <params> </params></request> Response message: <response> <result> <item> </item> <item> </item> </ressult> </response>
Parameter Typeparameter nameParameter codeMust loseDescription
enter Hospital codebranchCodeyIf the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty
Check IDinspectIdY 
OutputTransaction result coderesultCodeY-1: Failure 0: Success 1: Success but no data is found
wrong informationresultMessageyWhen the transaction result code is successful, this field returns an empty string
Collection of report detailsThe following is the content of the collection item
project nameitemNameY 
resultresultY 
unitunitY 
Reference rangerefRangeY 
Abnormal result promptabnormalY0: 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

          1. Call method

Both parties make calls through WebService (Soap Web Service, TCP communication).

          1. Call address

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. Message structure description

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>

          1. Ningyuan provides interface
          2. 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.

          1. enter
Entry nameExample
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>
  
          1. Input parameter data node description
ParticipateEntry descriptionType lengthAvailable
hospcodeHospital IDvarchar(32)N
card_noPatient card number or registration number or patient id, which is the same as the card tied during the consultationvarchar(64)N
Health_noMedical record number or outpatient serial numberVarchar(64)Y
unit_branch_idBranch idvarchar(32)n
namePatient namevarchar(32)Y

 

          1. return
Entry nameExample
dataSuccess: <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 namegetOrderReg
Sample codeRequest message: <request> <params> </params></request> Response message: <response> <result> <item> </item> <item> </item> </result> </response>
Parameter Typeparameter nameParameter codeMust loseDescription
enterHospital codehospitalcodeYIf the hospital has no branch, it will be empty; if the hospital has a branch, it cannot be empty
identity numberSFZHYTimeless transmission 0
Reservation order numberORDERNOY 
Output Patient Clinic NumberbahY 
Outpatient serial numberMzlshN 
Social Security Serial NumberSblshY 
order numberORDERNOY 
identity numberSfzhY 
Department nameDepartmentNameY 
Department addressDepartmentPlaceY 
Department codeDepartmentCodeY 
Level nameDoctorTypeY 
Doctor's nameDoctorNameY 
Doctor job numberDoctorCodeY 
 Appointment dateRegistDateY 
 Appointment start timeBeginTimeYTime period format: hour:minute
 Appointment end timeEndTimeYTime period format: hour:minute
 Payment signPayStateY-1 unpaid, 0 paid
 Out-of-pocket amountZfjeY 
 Social security amountSbjeY 
 Registration feeGhfY 

 

 

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 nameChinese meaningtype of dataMandatory signAnnotation
patCardNoMedical card numbervarchar(12)FALSE 
empCheckNoMedical examination numbervarchar(20)FALSE 
beginDateStarting timedatetimeTRUE 
endDateEnd TimedatetimeTRUE 

 

3. Return information:

The return value is an XML parameter string.

parameter list

return valueChinese meaningtype of dataAnnotation
ResultReturn resultvarchar(30)0: success -1: failure
ErrorReturn messagevarchar(32) 

 

Value list

return valueChinese meaningtype of dataAnnotation
PHY_IDMedical Exam IDvarchar(32) 
PatientIdPatient IDvarchar(12) 
MOBILEcellphone numbervarchar(32) 
NAMEusernamevarchar(32) 
SEXgendervarchar(64) 
PNOMedical examination numbervarchar(128) 
AGEagevarchar(128) 
HOS_IDHospital IDvarchar(50) 
EXAM_DESCInspection summaryvarchar(50) 
DOC_PROPOSALDoctor recommendedvarchar(40) 
REMARKDescriptionvarchar(128) 
DOCTOR_NAMEChief Examinervarchar(32) 
TELsupport hotlinevarchar(32) 
PHY_DATEGeneral inspection datedatetime 
REG_DATERegistration Datedatetime 

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 nameChinese meaningtype of dataMandatory signAnnotation
PHY_IDMedical Exam IDvarchar(40)TRUE 

 

3. Return information:

The return value is an XML parameter string.

parameter list

return valueChinese meaningtype of dataAnnotation
ResultReturn resultvarchar(30)0: success -1: failure
ErrorReturn messagevarchar(32) 

 

Value list

return valueChinese meaningtype of dataAnnotation
PHY_IDMedical Exam IDvarchar(32) 
RES_TYPECheck typevarchar(32)1 inspection, 2 inspection, 3 others
ITEM_NAMEproject namevarchar(40) 
ITEM_CODEItem Numbervarchar(20) 
EXAM_DATECheck datevarchar(40) 
DOCTOR_NAME1Check doctorvarchar(40) 
RAMARK1Remarksvarchar(40) 
ASSAY_NAMEproject namevarchar(40) 
ASSAY_VALUEtest resultvarchar(40) 
UNITunitvarchar(40) 
PROMPTpromptvarchar(40) 
REFERReferencevarchar(40) 
Summarysummaryvarchar(40) 

 

 

 

 

 

    1. 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 nameChinese meaningtype of dataMandatory signAnnotation
PatientNamePatient namevarchar(50)TRUE 
InpatientNoHospital numbervarchar(12)TRUEID number, hospitalization number, and ID number cannot be empty at the same time
PatientIDPatient IDvarchar(12)TRUEID number, hospitalization number, and ID number cannot be empty at the same time
IDCardidentity numbervarchar(18)TRUEID 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 valueChinese meaningtype of dataAnnotation
ResultReturn resultvarchar(30)0: success -1: failure
ErrorReturn messagevarchar(32) 

 

Value list

return valueChinese meaningtype of dataAnnotation
PatientIDPatient IDvarchar(12) 
PatientNamePatient namevarchar(100) 
InpatientNoHospital numbervarchar(12) 
AdmissTimesNumber of hospitalizationsint 
ReferPhysicianTube bed doctor's job numbervarchar(10) 
ReferPhysicianNameName of the doctor in chargevharchar(50) 
DeptCurrent departmentvarchar(10) 
BedNoBed numbervarchar(8) 
StatusHospitalizationvarchar(10)in hospitalized; out discharged
AdmissDateAdmission datedatetimeFormat: YYYY-MM-DD
DisDateDischarge datedatetimeFormat: 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 nameChinese meaningtype of dataMandatory signAnnotation
CheckinNoFlowing water every time you are hospitalizedvarchar(50)TRUEBoth the hospitalization serial number and the hospitalization number cannot be empty at the same time
InpatientNoHospital numbervarchar(12)TRUEBoth the hospitalization serial number and the hospitalization number cannot be empty at the same time
BeginDateStarting timevarchar(20)FALSEStarting time
EndDateEnd TimeVarchar(20)FALSEEnd Time
ZYstateHospitalizationVarchar(2)FALSEin in the hospital out if you are discharged from the hospital, it means all
TypeQuery list flagVarchar(2)TRUEWhen 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 valueChinese meaningtype of dataAnnotation
ResultReturn resultvarchar(30)0: success -1: failure
ErrorReturn messagevarchar(32) 

 

Value list

return valueChinese meaningtype of dataAnnotation
CheckinNoHospital serial numbervarchar(12) 
PatientNamePatient namevarchar(100) 
InpatientNoHospital numbervarchar(12) 
DepIdInpatient department IDint 
DeptNameName of Inpatient Departmentvarchar(10) 
BedNoBed Novharchar(50) 
Diagnoseclinical diagnosisvarchar(10) 
StatusHospitalizationvarchar(10)in out of hospital
AdmissDateAdmission datedatetimeFormat: YYYY-MM-DD
DisDateDischarge datedatetimeFormat: YYYY-MM-DD, an empty string will be returned if the admission has not been discharged
DisDiagDischarge diagnosisvarchar(200) 
FeeTotalTotal costDec(18,0)unit: yuan
DepositfeeTotalTotal depositDec(18,0)unit: yuan
DepositfeeBalanceAvailable balance of depositDec(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 nameChinese meaningtype of dataMandatory signAnnotation
CheckinNoHospital serial numbervarchar(50)TRUEThe serial number of the hospitalization 
BeginDateStarting timevarchar(20) Start time YYYY-MM-DD
EndDateEnd TimeVarchar(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 valueChinese meaningtype of dataAnnotation
ResultReturn resultvarchar(30)0: success -1: failure
ErrorReturn messagevarchar(32) 

 

Value list

return valueChinese meaningtype of dataAnnotation
CheckinNoHospital serial numbervarchar(12) 
LedgerIdAccounting Idvarchar(100) 
LedgerDateAccounting datedatetimeFormat: yyyy-mm-dd
FeeTotalTotal costdec(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 nameChinese meaningtype of dataMandatory signAnnotation
CheckinNoHospital serial numbervarchar(50)TRUEThe serial number of the hospitalization
LedgerIdAccounting IDvarchar(100)TRUEDaily bill id

 

3. Return information:

The return value is an XML parameter string.

parameter list

return valueChinese meaningtype of dataAnnotation
ResultReturn resultvarchar(30)0: success -1: failure
ErrorReturn messagevarchar(32) 

 

Value list

return valueChinese meaningtype of dataAnnotation
CheckinNoHospital serial numbervarchar(12) 
LedgerIdAccounting Idvarchar(30) 
LedgerDateAccounting datedatetimeFormat: YYYY-MM-DD
FeeItemExpense itemVarchar(20) 
FeeItemCodeExpense item codeVarchar(20)non empty
ChargePriceunit priceDec(18,2)unit: yuan
AmtQuantityVarchar(20) 
UnitunitVarchar(20) 
StdspecificationVarchar(20) 
FeeTypeExpense item categoryVarchar(20)Such as surgery fee, western medicine fee, material fee
ItemTimeCost execution timeVarchar(20)Format: yyyy-mm-dd hh:mm:ss
FeeTimeCost incurred timeVarchar(20)Format: yyyy-mm-dd hh:mm:ss
FeeItemTotalSingle item totalDec(18,0)unit: yuan
FeeTotalTotal costDec(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 nameChinese meaningtype of dataMandatory signAnnotation
CheckinNoHospital serial numbervarchar(50)TRUEThe serial number of the hospitalization
OprIdToll collectorvarchar(20)TRUEDoes His need NY05
PayMethodpayment methodvarchar(20)TRUEDoes His need 14
InpatientNoHospital numbervarchar(20)FALSEThe patient's unique number in the hospital information system
TradeNoPayment transaction serial numbervarchar(20)TRUEUse the serial number of online payment
TradeTimePayment transaction timevarchar(20)TRUEOnline payment time
PayAmtPayment amountnumberic(20)TRUEunit: yuan

 

3. Return information:

The return value is an XML parameter string.

parameter list

return valueChinese meaningtype of dataAnnotation
ResultReturn resultvarchar(30)0: success -1: failure
ErrorReturn messagevarchar(32) 

 

Value list

return valueChinese meaningtype of dataAnnotation
Rsresultvarchar(2)0: success -1: failure
MsgResult messagevarchar(5000) 
ReceiptNoDeposit receiptvarchar(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 nameChinese meaningtype of dataMandatory signAnnotation
CheckinNoHospital serial numbervarchar(50)TRUE 
InpatientNoHospital numbervarchar(20)FALSEThe patient's unique number in the hospital information system

 

3. Return information:

The return value is an XML parameter string.

parameter list

return valueChinese meaningtype of dataAnnotation
ResultReturn resultvarchar(30)0: success -1: failure
ErrorReturn messagevarchar(32) 

 

Value list

return valueChinese meaningtype of dataAnnotation
PayTimePayment timevarchar(12) 
ChannelIdPayment channelvarchar(30)Payment channel, such as 91160/bank/window
PayMethodNamepayment methodvarchar(30)Patient payment channel, cash/weixin/alipay
PayAmtPayment amountDec(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 nameChinese meaningtype of dataMandatory signAnnotation
CheckinNoHospital serial numbervarchar(50)TRUE 
TradeNoPayment transaction serial numbervarchar(20)FALSE 

 

3. Return information:

The return value is an XML parameter string.

parameter list

return valueChinese meaningtype of dataAnnotation
ResultReturn resultvarchar(30)0: success -1: failure
ErrorReturn messagevarchar(32) 

 

Value list

return valueChinese meaningtype of dataAnnotation
ReceiptNoDeposit receiptvarchar(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 nameChinese meaningtype of dataMandatory signAnnotation
CheckinNoHospital serial numbervarchar(50)TRUEThe serial number of the hospitalization

 

3. Return information:

The return value is an XML parameter string.

parameter list

return valueChinese meaningtype of dataAnnotation
ResultReturn resultvarchar(30)0: success -1: failure
ErrorReturn messagevarchar(32) 

 

Value list

return valueChinese meaningtype of dataAnnotation
CheckinNoHospital serial numbervarchar(12) 
FeeTypeItem categoryvarchar(30) 
FeeTypeTotalThe total cost of this categoryDec(18,2)unit: yuan
FeeTotalTotal costDec(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 nameChinese meaningtype of dataMandatory signAnnotation
OrganizationInstitution codevarchar(50)TRUE 
BeginDateStarting timedatetimeTRUE 
EndDateEnd TimedatetimeTRUE 
PatientIDPatient IDvarchar(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 valueChinese meaningtype of dataAnnotation
ResultReturn resultvarchar(30)0: success -1: failure
ErrorReturn messagevarchar(32) 

 

Value list

return valueChinese meaningtype of dataAnnotation
PatientNameNamevarchar(50) 
PatientIDPatient IDvarchar(12) 
VisitTimeHospital staydatetime 
HisPayNoHospitalized receipt numbervarchar(20)Patient ID^Number of hospitalizations
ReceiptSnInvoice serial numbervarchar(20) 
PayStatusPayment statusvarchar(2)1 paid; -1 refunded
PayTypepayment methodvarchar(10)wWeChat Pay
AccountSnNumber of paymentsint 
ChargeDatePayment timedatetime 
ChargeTotalPayment amountDecimal(18,0)unit: yuan
TransactionIDPayment order numbervarchar(50) 
BusinessTypecategoryvarchar(1)1: Outpatient 2: Inpatient
RefundManRefundervarchar(50)No WeChat refund for hospitalization, all refunds are empty
RefundTimeRefund timedatetimeNo WeChat refund for hospitalization, all refunds are empty
RefundAmtRefund amountDecimal(18,0)No WeChat refund for hospitalization, all refunds are empty
RefundNoRefund serial numbervarchar(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 nameChinese meaningtype of dataMandatory signAnnotation
unit_idHospital codevarchar(50)TRUEShenzhen Children s Hospital is 111
checkin_noHospital serial numberdatetimeTRUE 
patient_noHospital numberdatetimeTRUE 
phonephone numbervarchar(12)TRUE 
warn_msgReminder contentvarchar(20)TRUEYour 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 valueChinese meaningtype of dataAnnotation
resultReturn resultvarchar(30)1- Push successfully 0- Push failed
descReturn messagevarchar(32) 

 

4. Example of deposit reminder interface:

Entry nameExample
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 nameExample
data<response><head><result>1</result><desc>Push successfully</desc></head></response>