123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289 |
- package service
-
- import (
- "bytes"
- "encoding/json"
- "fmt"
- "io/ioutil"
- "net/http"
- )
-
- func SavePatientMessageInfo() (string, string) {
-
- //input := make(map[string]interface{})
- inputData := make(map[string]interface{})
-
- inputData["patType"] = "1" // 就诊凭证编号
- inputData["patIdNo"] = "441701195808152845" // 开始时间
- inputData["patName"] = "罗秀云" // 人员姓名
-
- inputData["patMobile"] = "13535547901" // 人员姓名
- inputData["patSex"] = "M" // 人员姓名
- inputData["patMarriage"] = "1" // 人员姓名
- inputData["birthday"] = "1992-10-23" // 人员姓名
- inputData["patAddress"] = "11111" // 人员姓名
- inputData["thirdPartyID"] = "16" // 人员姓名
- inputData["patAge"] = "11" // 人员姓名
- //input["req"] = inputData
-
- var inputLog string
- bytesData, err := json.Marshal(inputData)
- inputLog = string(bytesData)
- fmt.Println(string(bytesData))
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- reader := bytes.NewReader(bytesData)
- var url string
- gdyb_url := "http://218.104.146.179:9091/esb/listener/savePatientMessageInfo"
- url = gdyb_url
-
- //url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
- request, err := http.NewRequest("GET", url, reader)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
-
- request.Header.Set("Content-Type", "application/json;charset=UTF-8")
- request.Header.Set("code", "Xmrjyy")
-
- client := http.Client{}
- resp, err := client.Do(request)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- respBytes, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- fmt.Println(string(respBytes))
- str := string(respBytes)
- return str, inputLog
-
- }
- func SaveReg() (string, string) {
-
- //input := make(map[string]interface{})
- inputData := make(map[string]interface{})
-
- inputData["deptId"] = "01" // 就诊凭证编号
- inputData["clinicUnitId"] = "" // 开始时间
- inputData["healthCardNo"] = "" // 人员姓名
-
- inputData["patientId"] = "701822660170096645" // 人员姓名
- inputData["patientName"] = "罗秀云" // 人员姓名
- inputData["idCardNo"] = "" // 人员姓名
- inputData["phone"] = "" // 人员姓名
- inputData["doctorId"] = "01" // 人员姓名
- inputData["doctorLevelCode"] = "" // 人员姓名
- inputData["regDate"] = "2022-05-10" // 人员姓名
-
- inputData["shiftCode"] = "" // 人员姓名
- inputData["startTime"] = "" // 人员姓名
- inputData["endTime"] = "" // 人员姓名
-
- inputData["scheduleId"] = "" // 人员姓名
- inputData["periodId"] = "" // 人员姓名
-
- inputData["svObjectId"] = "" // 人员姓名
- inputData["diseaseId"] = "" // 人员姓名
- inputData["regFee"] = "0.00" // 人员姓名
-
- inputData["treatFee"] = "0.00" // 人员姓名
- inputData["operatorId"] = "admin" // 人员姓名
- inputData["remark"] = "" // 人员姓名
-
- inputData["orderType"] = "" // 人员姓名
- inputData["clinicCode"] = "" // 人员姓名
- inputData["infoSeq"] = "" // 人员姓名
-
- //input["Request"] = inputData
-
- var inputLog string
- bytesData, err := json.Marshal(inputData)
- inputLog = string(bytesData)
- fmt.Println(string(bytesData))
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- reader := bytes.NewReader(bytesData)
- var url string
- gdyb_url := "http://218.104.146.179:9091/esb/listener/saveReg"
- url = gdyb_url
-
- //url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
- request, err := http.NewRequest("POST", url, reader)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
-
- request.Header.Set("Content-Type", "application/json;charset=UTF-8")
- request.Header.Set("code", "Xmrjyy")
-
- client := http.Client{}
- resp, err := client.Do(request)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- respBytes, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- fmt.Println(string(respBytes))
- str := string(respBytes)
- return str, inputLog
-
- }
- func GetWaitPayDetail() (string, string) {
-
- //input := make(map[string]interface{})
- inputData := make(map[string]interface{})
-
- inputData["clinicSeq"] = "30445" // 就诊凭证编号
- inputData["prescriptionId"] = "" // 开始时间
- inputData["patientId"] = "701822660170096645" // 人员姓名
-
- var inputLog string
- bytesData, err := json.Marshal(inputData)
- inputLog = string(bytesData)
- fmt.Println(string(bytesData))
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- reader := bytes.NewReader(bytesData)
- var url string
- gdyb_url := "http://218.104.146.179:9091/esb/listener/getWaitPayDetail"
- url = gdyb_url
-
- //url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
- request, err := http.NewRequest("POST", url, reader)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
-
- request.Header.Set("Content-Type", "application/json;charset=UTF-8")
- request.Header.Set("code", "Xmrjyy")
-
- client := http.Client{}
- resp, err := client.Do(request)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- respBytes, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- fmt.Println(string(respBytes))
- str := string(respBytes)
- return str, inputLog
-
- }
- func OpKeepAccounts() (string, string) {
-
- inputData := make(map[string]interface{})
- inputData["inNo"] = "30445" // 就诊凭证编号
- inputData["itemCode"] = "240300013-000" // 开始时间
- inputData["num"] = "1" // 人员姓名
-
- var inputLog string
- bytesData, err := json.Marshal(inputData)
- inputLog = string(bytesData)
- fmt.Println(string(bytesData))
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- reader := bytes.NewReader(bytesData)
- var url string
- gdyb_url := "http://218.104.146.179:9091/esb/listener/opKeepAccounts"
- url = gdyb_url
-
- //url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
- request, err := http.NewRequest("POST", url, reader)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
-
- request.Header.Set("Content-Type", "application/json;charset=UTF-8")
- request.Header.Set("code", "Xmrjyy")
-
- client := http.Client{}
- resp, err := client.Do(request)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- respBytes, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- fmt.Println(string(respBytes))
- str := string(respBytes)
- return str, inputLog
-
- }
- func OpCancelKeepAccounts() (string, string) {
-
- input := make(map[string]interface{})
- inputData := make(map[string]interface{})
-
- inputData["docId"] = "" // 就诊凭证编号
- inputData["operCode"] = "" // 开始时间
- inputData["operName"] = "" // 人员姓名
-
- input["req"] = inputData
-
- var inputLog string
- bytesData, err := json.Marshal(input)
- inputLog = string(bytesData)
- fmt.Println(string(bytesData))
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- reader := bytes.NewReader(bytesData)
- var url string
- gdyb_url := "http://218.104.146.179:9091/esb/listener/opCancelKeepAccounts"
- url = gdyb_url
-
- //url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/1101"
- request, err := http.NewRequest("POST", url, reader)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
-
- request.Header.Set("Content-Type", "application/json;charset=UTF-8")
- request.Header.Set("code", "Xmrjyy")
-
- client := http.Client{}
- resp, err := client.Do(request)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- respBytes, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- fmt.Println(err.Error())
- return err.Error(), ""
- }
- fmt.Println(string(respBytes))
- str := string(respBytes)
- return str, inputLog
-
- }
|