2026-07-07 20:58:13 +08:00
|
|
|
package osi
|
|
|
|
|
|
|
|
|
|
import "context"
|
|
|
|
|
|
|
|
|
|
type GridAddressQuery struct {
|
|
|
|
|
ParentCode string `json:"parentCode,omitempty"`
|
|
|
|
|
PageNo int `json:"pageNo,omitempty"`
|
|
|
|
|
OperateUser string `json:"operateUser,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GridAddress struct {
|
|
|
|
|
RegionCode string `json:"regionCode"`
|
|
|
|
|
RegionName string `json:"regionName"`
|
|
|
|
|
IsFamily string `json:"isFamily"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type DoctorQuery struct {
|
|
|
|
|
ManaUnitID string `json:"manaUnitId,omitempty"`
|
|
|
|
|
OperateUser string `json:"operateUser,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Doctor struct {
|
|
|
|
|
PersonID string `json:"personId"`
|
|
|
|
|
PersonName string `json:"personName"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type DrugQuery struct {
|
2026-07-09 22:22:54 +08:00
|
|
|
PageNo int `json:"pageNo"` // docx 必填,不加 omitempty 以确保 pageNo=0 也上送(避免被平台判缺参)
|
|
|
|
|
PageSize int `json:"pageSize,omitempty"`
|
|
|
|
|
YPMC string `json:"ypmc,omitempty"`
|
|
|
|
|
PYM string `json:"pym,omitempty"`
|
2026-07-07 20:58:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Drug struct {
|
|
|
|
|
YPMC string `json:"ypmc"`
|
|
|
|
|
YPDW string `json:"ypdw"`
|
|
|
|
|
YPGG string `json:"ypgg"`
|
|
|
|
|
JLDW string `json:"jldw"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type OrgQuery struct {
|
|
|
|
|
OrganizCode string `json:"organizCode,omitempty"`
|
|
|
|
|
ParentID string `json:"parentId,omitempty"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Org struct {
|
|
|
|
|
OrganizCode string `json:"organizCode"`
|
|
|
|
|
OrganizName string `json:"organizName"`
|
|
|
|
|
OrganizType string `json:"organizType"`
|
|
|
|
|
ParentID string `json:"parentId"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *Client) QueryGridAddress(ctx context.Context, query GridAddressQuery) ([]GridAddress, Result, error) {
|
|
|
|
|
var rows []GridAddress
|
|
|
|
|
result, err := c.Call(ctx, ServiceIDGridAddress, query, &rows)
|
|
|
|
|
return rows, result, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *Client) QueryDoctors(ctx context.Context, query DoctorQuery) ([]Doctor, Result, error) {
|
|
|
|
|
var rows []Doctor
|
|
|
|
|
result, err := c.Call(ctx, ServiceIDDoctors, query, &rows)
|
|
|
|
|
return rows, result, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *Client) QueryDrugs(ctx context.Context, query DrugQuery) ([]Drug, Result, error) {
|
|
|
|
|
var rows []Drug
|
|
|
|
|
result, err := c.Call(ctx, ServiceIDDrugs, query, &rows)
|
|
|
|
|
return rows, result, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *Client) QueryOrgs(ctx context.Context, query OrgQuery) ([]Org, Result, error) {
|
|
|
|
|
var rows []Org
|
|
|
|
|
result, err := c.Call(ctx, ServiceIDOrgs, query, &rows)
|
|
|
|
|
return rows, result, err
|
|
|
|
|
}
|