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 {
|
2026-07-13 20:02:19 +08:00
|
|
|
|
// docx 二者均标必填;联调验证通过的请求是两 key 都在(organizCode + parentId 可为 "")。
|
|
|
|
|
|
// 不加 omitempty,确保 parentId="" 也上送,避免像网格地址那样必填空值被丢导致平台 NPE(code=02)。
|
|
|
|
|
|
OrganizCode string `json:"organizCode"`
|
|
|
|
|
|
ParentID string `json:"parentId"`
|
2026-07-07 20:58:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type Org struct {
|
|
|
|
|
|
OrganizCode string `json:"organizCode"`
|
|
|
|
|
|
OrganizName string `json:"organizName"`
|
2026-07-13 20:02:19 +08:00
|
|
|
|
OrganizType string `json:"organizType"` // A医院/B社区中心(站)/C卫生院/D门诊诊所村室/D6村卫生室/R市卫生局
|
2026-07-07 20:58:13 +08:00
|
|
|
|
ParentID string `json:"parentId"`
|
2026-07-13 20:02:19 +08:00
|
|
|
|
RegionCode string `json:"regionCode"` // 机构所在网格码;联调实测可为 null(→"")
|
2026-07-07 20:58:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
}
|