feat(osi): 优化人群分类查询接口(T-209)

This commit is contained in:
ila
2026-07-09 20:38:27 +08:00
parent ca16f61263
commit 561cd839e7
10 changed files with 108 additions and 16 deletions
+3 -1
View File
@@ -8,7 +8,7 @@ import (
"chis_osi/handler"
)
// runServer 启动 server 模式 HTTP 服务,暴露健康档案查询端点。
// runServer 启动 server 模式 HTTP 服务,暴露查询端点。
func runServer(cfg config.Config, addr string) error {
client, err := buildOSIClient(cfg)
if err != nil {
@@ -19,12 +19,14 @@ func runServer(cfg config.Config, addr string) error {
hc := handler.NewHealthCheckHandler(client)
mux := http.NewServeMux()
mux.HandleFunc("/api/health-record/find", hr.Find)
mux.HandleFunc("/api/health-record/crowd", hr.Crowd)
mux.HandleFunc("/api/health-check/last", hc.Last)
mux.HandleFunc("/api/health-check/all", hc.All)
mux.HandleFunc("/api/health-check/list", hc.List)
fmt.Printf("chis_osi server listening on %s\n", addr)
fmt.Printf(" GET http://%s/api/health-record/find?idCard=<身份证>\n", addr)
fmt.Printf(" GET http://%s/api/health-record/crowd?idCard=<身份证>\n", addr)
fmt.Printf(" GET http://%s/api/health-check/last?idCard=<身份证>\n", addr)
fmt.Printf(" GET http://%s/api/health-check/all?idCard=<身份证>\n", addr)
fmt.Printf(" GET http://%s/api/health-check/list?checkYear=<年度>&idCard=<身份证>\n", addr)