新增上报处方平台接口
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"hospital-admin-api/config"
|
||||
"hospital-admin-api/global"
|
||||
"io"
|
||||
@@ -32,60 +33,60 @@ type noticePreOrderCancelResponse struct {
|
||||
ResultDesc string `json:"resultDesc"` // 描述
|
||||
}
|
||||
|
||||
// ReportPreRequest 上报处方请求值
|
||||
// ReportPreRequest 上报处方请求值-基础数据
|
||||
type ReportPreRequest struct {
|
||||
TerminalCode string `json:"terminalCode"` // 终端代码
|
||||
OrderNo string `json:"orderNo"` // 订单编号
|
||||
TransactNo string `json:"transactNo"` // 流水单号
|
||||
PayDate string `json:"payDate"` // 支付时间
|
||||
Money float64 `json:"money"` // 订单金额
|
||||
Freight float64 `json:"freight"` // 运费(单位:元)
|
||||
TakeTypeCode int `json:"takeTypeCode"` // 取货方式 1 自提 2 快递,目前只支持快递,传固定值 2
|
||||
BuyerName string `json:"buyerName"` // 收货人姓名
|
||||
BuyerPhone string `json:"buyerPhone"` // 收货人联系方式
|
||||
BuyerAddress string `json:"buyerAddress"` // 收货人地址
|
||||
ProvinceCode string `json:"provinceCode"` // 收货地址(省) 编码
|
||||
ProvinceName string `json:"provinceName"` // 收货地址(省) 名称
|
||||
CityCode string `json:"cityCode"` // 收货地址(市) 编码
|
||||
CityName string `json:"cityName"` // 收货地址(市) 名称
|
||||
DistrictCode string `json:"districtCode"` // 收货地址(区 县)编码
|
||||
DistrictName string `json:"districtName"` // 收货地址(区 县)名称
|
||||
PresList []Pres `json:"presList"` // 处方列表
|
||||
TerminalCode string `json:"terminalCode"` // 终端代码
|
||||
OrderNo string `json:"orderNo"` // 订单编号
|
||||
TransactNo string `json:"transactNo"` // 流水单号
|
||||
PayDate string `json:"payDate"` // 支付时间
|
||||
Money float64 `json:"money"` // 订单金额
|
||||
Freight float64 `json:"freight"` // 运费(单位:元)
|
||||
TakeTypeCode int `json:"takeTypeCode"` // 取货方式 1 自提 2 快递,目前只支持快递,传固定值 2
|
||||
BuyerName string `json:"buyerName"` // 收货人姓名
|
||||
BuyerPhone string `json:"buyerPhone"` // 收货人联系方式
|
||||
BuyerAddress string `json:"buyerAddress"` // 收货人地址
|
||||
ProvinceCode string `json:"provinceCode"` // 收货地址(省) 编码
|
||||
ProvinceName string `json:"provinceName"` // 收货地址(省) 名称
|
||||
CityCode string `json:"cityCode"` // 收货地址(市) 编码
|
||||
CityName string `json:"cityName"` // 收货地址(市) 名称
|
||||
DistrictCode string `json:"districtCode"` // 收货地址(区 县)编码
|
||||
DistrictName string `json:"districtName"` // 收货地址(区 县)名称
|
||||
PresList []PresRequest `json:"presList"` // 处方列表
|
||||
}
|
||||
|
||||
// Pres 上报处方请求值
|
||||
type Pres struct {
|
||||
PrescriptionNo string `json:"prescriptionNo"` // 处方编号
|
||||
PrescriptionSubType int `json:"prescriptionSubType"` // 处方类型 0:无类型 1:普通处方 2:儿科处方
|
||||
PatientName string `json:"patientName"` // 就诊人姓名
|
||||
PatientPhone string `json:"patientPhone"` // 就诊人联系方式
|
||||
IdCard string `json:"idCard"` // 身份证号
|
||||
Advice string `json:"advice"` // 医嘱
|
||||
DiagnosisName string `json:"diagnosisName"` // 诊断
|
||||
ThirdDoctorName string `json:"thirdDoctorName"` // 开方医生姓名
|
||||
ThirdDeptName string `json:"thirdDeptName"` // 开方科室名称
|
||||
ThirdDoctorNameImg string `json:"thirdDoctorNameImg"` // 开方医生签名链接
|
||||
PrescriptionTime string `json:"prescriptionTime"` // 开方时间
|
||||
ThirdFirstPharmacist string `json:"thirdFirstPharmacist"` // 初审药师姓名
|
||||
ThirdFirstPharmacistImg string `json:"thirdFirstPharmacistImg"` // 初审药师签名链接
|
||||
ThirdFirstTime string `json:"thirdFirstTime"` // 初审时间
|
||||
ThirdLastPharmacist string `json:"thirdLastPharmacist"` // 终审药师姓名
|
||||
ThirdLastPharmacistImg string `json:"thirdLastPharmacistImg"` // 终审药师签名链接
|
||||
ThirdLastTime string `json:"ThirdLastTime"` // 终审时间
|
||||
ThirdSignImg string `json:"thirdSignImg"` // 处方签章链接
|
||||
ReferenceCharge float64 `json:"referenceCharge"` // 处方费用(不包含运费)
|
||||
ChiefComplaint string `json:"chiefComplaint"` // 主诉
|
||||
HistoryPresent string `json:"historyPresent"` // 现病史
|
||||
PastHistory string `json:"pastHistory"` // 既往史
|
||||
PhysicalExamination string `json:"physicalExamination"` // 体格检查
|
||||
SupplementaryExamination string `json:"supplementaryExamination"` // 辅助检查
|
||||
AllergicHistory string `json:"allergicHistory"` // 过敏史
|
||||
DrugList []Drug `json:"drugList"` // 药品列表
|
||||
OrderDrugList []OrderDrug `json:"orderDrugList"` // 订单药品列表
|
||||
// PresRequest 上报处方请求值-处方数据
|
||||
type PresRequest struct {
|
||||
PrescriptionNo string `json:"prescriptionNo"` // 处方编号
|
||||
PrescriptionSubType int `json:"prescriptionSubType"` // 处方类型 0:无类型 1:普通处方 2:儿科处方
|
||||
PatientName string `json:"patientName"` // 就诊人姓名
|
||||
PatientPhone string `json:"patientPhone"` // 就诊人联系方式
|
||||
IdCard string `json:"idCard"` // 身份证号
|
||||
Advice string `json:"advice"` // 医嘱
|
||||
DiagnosisName string `json:"diagnosisName"` // 诊断
|
||||
ThirdDoctorName string `json:"thirdDoctorName"` // 开方医生姓名
|
||||
ThirdDeptName string `json:"thirdDeptName"` // 开方科室名称
|
||||
ThirdDoctorNameImg string `json:"thirdDoctorNameImg"` // 开方医生签名链接
|
||||
PrescriptionTime string `json:"prescriptionTime"` // 开方时间
|
||||
ThirdFirstPharmacist string `json:"thirdFirstPharmacist"` // 初审药师姓名
|
||||
ThirdFirstPharmacistImg string `json:"thirdFirstPharmacistImg"` // 初审药师签名链接
|
||||
ThirdFirstTime string `json:"thirdFirstTime"` // 初审时间
|
||||
ThirdLastPharmacist string `json:"thirdLastPharmacist"` // 终审药师姓名
|
||||
ThirdLastPharmacistImg string `json:"thirdLastPharmacistImg"` // 终审药师签名链接
|
||||
ThirdLastTime string `json:"ThirdLastTime"` // 终审时间
|
||||
ThirdSignImg string `json:"thirdSignImg"` // 处方签章链接
|
||||
ReferenceCharge float64 `json:"referenceCharge"` // 处方费用(不包含运费)
|
||||
ChiefComplaint string `json:"chiefComplaint"` // 主诉
|
||||
HistoryPresent string `json:"historyPresent"` // 现病史
|
||||
PastHistory string `json:"pastHistory"` // 既往史
|
||||
PhysicalExamination string `json:"physicalExamination"` // 体格检查
|
||||
SupplementaryExamination string `json:"supplementaryExamination"` // 辅助检查
|
||||
AllergicHistory string `json:"allergicHistory"` // 过敏史
|
||||
DrugList []DrugRequest `json:"drugList"` // 药品列表
|
||||
OrderDrugList []OrderDrugRequest `json:"orderDrugList"` // 订单药品列表
|
||||
}
|
||||
|
||||
// Drug 上报处方请求值
|
||||
type Drug struct {
|
||||
// DrugRequest 上报处方请求值-药品数据1
|
||||
type DrugRequest struct {
|
||||
DrugCode string `json:"drugCode"` // 药品编码
|
||||
ApprovalNumber string `json:"approvalNumber"` // 批准文号
|
||||
DrugName string `json:"drugName"` // 药品名称
|
||||
@@ -101,8 +102,8 @@ type Drug struct {
|
||||
UseDays int `json:"useDays"` // 使用天数
|
||||
}
|
||||
|
||||
// OrderDrug 上报处方请求值
|
||||
type OrderDrug struct {
|
||||
// OrderDrugRequest 上报处方请求值-药品数据2
|
||||
type OrderDrugRequest struct {
|
||||
DrugCode string `json:"drugCode"` // 药品编码
|
||||
ApprovalNumber string `json:"approvalNumber"` // 批准文号
|
||||
DrugName string `json:"drugName"` // 药品名称
|
||||
@@ -253,6 +254,7 @@ func NoticePreOrderCancel(orderNo string) (bool, error) {
|
||||
return false, err
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
if response.ResultCode != "1000" {
|
||||
if response.ResultDesc != "" {
|
||||
return false, errors.New(response.ResultDesc)
|
||||
|
||||
Reference in New Issue
Block a user