|
@@ -0,0 +1,770 @@
|
|
|
|
+package sdk
|
|
|
|
+
|
|
|
|
+type ClientConfig struct {
|
|
|
|
+ ApiDomain string // API域名
|
|
|
|
+ AppDebug bool // 是否开启调试模式
|
|
|
|
+ AlgorApiDomain string // Algor API域名
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type BaseResponse[T any] struct {
|
|
|
|
+ Code int `json:"code"`
|
|
|
|
+ Data T `json:"data"`
|
|
|
|
+ Message string `json:"message"`
|
|
|
|
+ Success bool `json:"success"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type ListResponse[T any] struct {
|
|
|
|
+ List []T `json:"list"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type PaginateResponse[T any] struct {
|
|
|
|
+ List []T `json:"list"`
|
|
|
|
+ Total int64 `json:"total"`
|
|
|
|
+}
|
|
|
|
+type PaginateTotalSumResponse[T any] struct {
|
|
|
|
+ List []T `json:"list"`
|
|
|
|
+ Total int64 `json:"total"`
|
|
|
|
+ TotalSum int64 `json:"totalSum"`
|
|
|
|
+}
|
|
|
|
+type DetailResponse[T any] struct {
|
|
|
|
+ Detail T `json:"detail"`
|
|
|
|
+}
|
|
|
|
+type FormFieldsResponse[T any] struct {
|
|
|
|
+ FormFields T `json:"formFields"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type Tag struct {
|
|
|
|
+ ID string `json:"id" form:"id" binding:"omitempty"`
|
|
|
|
+ Name string `json:"name" form:"name" binding:"required,max=20"`
|
|
|
|
+ VisibleConfig *TagVisibleConfig `json:"visibleConfig" form:"visibleConfig" binding:"omitempty,required_if=Type 2"`
|
|
|
|
+ Type int `json:"type" form:"type" binding:"required"`
|
|
|
|
+ CategoryId string `json:"categoryId" form:"categoryId" binding:"required"`
|
|
|
|
+ Category *TagCategory `json:"tagCategory" form:"-" binding:"-"`
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"-" binding:"-"`
|
|
|
|
+ UpdatedAt string `json:"updatedAt" form:"-" binding:"-"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type TagVisibleConfig struct {
|
|
|
|
+ Gender int `json:"gender" form:"gender" binding:"omitempty,oneof=0 1 2"` // 性别,0:全部,1:男,2:女
|
|
|
|
+ StartAge int64 `json:"startAge" form:"startAge" binding:"omitempty,number,gte=0"`
|
|
|
|
+ StartMonth int64 `json:"startMonth" form:"startMonth" binding:"omitempty,number,gte=0"`
|
|
|
|
+ StartDay int64 `json:"startDay" form:"startDay" binding:"omitempty,number,gte=0"`
|
|
|
|
+ EndAge int64 `json:"endAge" form:"endAge" binding:"omitempty,number,gte=0"`
|
|
|
|
+ EndMonth int64 `json:"endMonth" form:"endMonth" binding:"omitempty,number,gte=0"`
|
|
|
|
+ EndDay int64 `json:"endDay" form:"endDay" binding:"omitempty,number,gte=0"`
|
|
|
|
+ AgeType int64 `json:"ageType" form:"ageType" binding:"required,oneof=1 2 3"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type Mechanism struct {
|
|
|
|
+ ID string `json:"id" form:"-" binding:"-"`
|
|
|
|
+ Account string `json:"account" form:"account" binding:"required_unless=ID 0,omitempty,alphanum,min=4,max=20"`
|
|
|
|
+ Nickname string `json:"nickname" form:"nickname" binding:"required"`
|
|
|
|
+ Status int `json:"status" form:"status" binding:"omitempty,oneof=1 2"`
|
|
|
|
+ Permissions []string `json:"permissions" form:"-" binding:"-"`
|
|
|
|
+ Remark string `json:"remark" form:"remark" binding:"omitempty,max=255"`
|
|
|
|
+ DefaultWebTemplateId string `json:"defaultWebTemplateId" form:"defaultWebTemplateId" binding:"required"`
|
|
|
|
+ RawId int64 `json:"rawId" form:"-" binding:"-"`
|
|
|
|
+ AppKey string `json:"appKey" form:"-" binding:"-"`
|
|
|
|
+ AppSecret string `json:"appSecret" form:"-" binding:"-"`
|
|
|
|
+ IpWhiteList string `json:"ipWhiteList" form:"-" binding:"-"`
|
|
|
|
+ CallbackUrlList string `json:"callbackUrlList" form:"-" binding:"-"`
|
|
|
|
+ MemberCanRegist bool `json:"memberCanRegist" form:"memberCanRegist" binding:"omitempty"`
|
|
|
|
+ Logo string `json:"logo" form:"logo" binding:"omitempty"`
|
|
|
|
+ SmsSignName string `json:"smsSignName" form:"smsSignName" binding:"omitempty"`
|
|
|
|
+ SmsTemplateCode string `json:"smsTemplateCode" form:"smsTemplateCode" binding:"omitempty"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type Form struct {
|
|
|
|
+ ID string `json:"id" form:"id" binding:"omitempty"` // 编号
|
|
|
|
+ Name string `json:"name" form:"name" binding:"required"` // 名称
|
|
|
|
+ Icon string `json:"icon" form:"icon" binding:"omitempty,url"` // 图标
|
|
|
|
+ TagIds []string `json:"tagIds" form:"tagIds" binding:"omitempty"` // 标签ID列表
|
|
|
|
+ Tags []*Tag `json:"tags" form:"tags" binding:"omitempty"` // 标签
|
|
|
|
+ Remark string `json:"remark" form:"remark" binding:"omitempty"` // 备注
|
|
|
|
+ Fields []*FormField `json:"fields" form:"-" binding:"-"` // 字段列表
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"-" binding:"-"` // 创建时间
|
|
|
|
+ UpdatedAt string `json:"updatedAt" form:"-" binding:"-"` // 更新时间
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type FormField struct {
|
|
|
|
+ ID int64 `json:"id" form:"id" binding:"omitempty"` // 编号
|
|
|
|
+ FormId string `json:"formId" form:"formId" binding:"required"` // 表单编号
|
|
|
|
+ Name string `json:"name" form:"name" binding:"omitempty,required_if=Type 1"` // 名称
|
|
|
|
+ Type int `json:"type" form:"type" binding:"required"` // 类型
|
|
|
|
+ ExtraId string `json:"extraId" form:"extraId" binding:"omitempty,required_without=Type 1"` // 数据ID
|
|
|
|
+ Extra any `json:"extra" form:"-" binding:"-"` // 数据
|
|
|
|
+ TagIds []string `json:"tagIds" form:"tagIds" binding:"omitempty"` // 标签ID列表
|
|
|
|
+ Tags []*Tag `json:"tags" form:"tags" binding:"omitempty"` // 标签
|
|
|
|
+ Remark string `json:"remark" form:"remark" binding:"omitempty"` // 备注
|
|
|
|
+ ParentId int64 `json:"parentId" form:"parentId" binding:"omitempty"` // 父级编号
|
|
|
|
+ Parent *FormField `json:"parent" form:"-" binding:"-"` // 父级
|
|
|
|
+ Fields []*FormField `json:"fields" form:"-" binding:"-"` // 子级列表
|
|
|
|
+ CheckItemId string `json:"checkItemId" form:"checkItemId" binding:"omitempty"` // 检查项ID
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"-" binding:"-"` // 创建时间
|
|
|
|
+ UpdatedAt string `json:"updatedAt" form:"-" binding:"-"` // 更新时间
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type FormCustomField struct {
|
|
|
|
+ Type int `json:"type" binding:"required"`
|
|
|
|
+ Key string `json:"key" binding:"required"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 知识图谱节点
|
|
|
|
+type GraphNode struct {
|
|
|
|
+ ID string `json:"id"`
|
|
|
|
+ Labels []string `json:"labels"`
|
|
|
|
+ Properties struct {
|
|
|
|
+ CreatedAt float64 `json:"createdAt"`
|
|
|
|
+ Aliases []string `json:"aliases"`
|
|
|
|
+ Name string `json:"name"`
|
|
|
|
+ UUID string `json:"uuid"`
|
|
|
|
+ Tags []string `json:"tags"`
|
|
|
|
+ Props string `json:"props"`
|
|
|
|
+ } `json:"properties"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const (
|
|
|
|
+ IndicatorQuestionSubjectPrefix = "b8fbfa26.indicator" // 指标题目前缀
|
|
|
|
+ IndicatorValueFlag = "value" // 检查结果
|
|
|
|
+ IndicatorRangeFlag = "range" // 范围
|
|
|
|
+ IndicatorUnitFlag = "unit" // 单位
|
|
|
|
+ IndicatorTimeFlag = "time" // 检查时间
|
|
|
|
+ IndicatorCheckItemIdFlag = "checkItemId" // 检查项目ID
|
|
|
|
+)
|
|
|
|
+
|
|
|
|
+const (
|
|
|
|
+ QuestionSubjectTypeRadio = 1 // 单选题
|
|
|
|
+ QuestionSubjectTypeCheckbox = 2 // 多选题
|
|
|
|
+ QuestionSubjectTypeInput = 3 // 单行文本题
|
|
|
|
+ QuestionSubjectTypeMatrixCheckbox = 4 // 矩阵多选题
|
|
|
|
+ QuestionSubjectTypeDate = 5 // 日期选择题
|
|
|
|
+ QuestionSubjectTypeGroup = 6 // 组合题
|
|
|
|
+
|
|
|
|
+ QuestionSubjectTypeInputFlag = "input" // 单行文本题
|
|
|
|
+ QuestionSubjectTypeRadioFlag = "radio" // 单选题
|
|
|
|
+ QuestionSubjectTypeCheckboxFlag = "checkbox" // 多选题
|
|
|
|
+ QuestionSubjectTypeMatrixCheckboxFlag = "matrix_checkbox" // 矩阵多选题
|
|
|
|
+ QuestionSubjectTypeDateFlag = "date" // 日期选择题
|
|
|
|
+ QuestionSubjectTypeGroupFlag = "group" // 组合题
|
|
|
|
+)
|
|
|
|
+
|
|
|
|
+// 问题库
|
|
|
|
+type QuestionnaireSubject struct {
|
|
|
|
+ ID int64 `json:"id" form:"id"`
|
|
|
|
+ SN string `json:"sn" form:"sn"`
|
|
|
|
+ Type int `json:"type" form:"type"`
|
|
|
|
+ Title string `json:"title" form:"title"`
|
|
|
|
+ Validator string `json:"validator" form:"validator"`
|
|
|
|
+ Remark string `json:"remark" form:"remark"`
|
|
|
|
+ Mark string `json:"mark" form:"mark"`
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"-"`
|
|
|
|
+ SelectValues []*QuestionnaireSubjectSelectValue `json:"selectValues" form:"-"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type QuestionnaireSubjectSelectValue struct {
|
|
|
|
+ Label string `json:"label" form:"label"`
|
|
|
|
+ Value string `json:"value" form:"value"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 问题模板
|
|
|
|
+type QuestionnaireTemplate struct {
|
|
|
|
+ ID int64 `json:"id" form:"id"`
|
|
|
|
+ SN string `json:"sn" form:"sn"`
|
|
|
|
+ Title string `json:"title" form:"title"`
|
|
|
|
+ Peg string `json:"peg" form:"peg"`
|
|
|
|
+ SubjectTotal int `json:"subjectTotal" form:"-"` // 关联的题目数
|
|
|
|
+ SubjectIds []string `json:"subjectIds" form:"-"` // 关联的题目ID列表
|
|
|
|
+ Subjects []*QuestionnaireSubject `json:"subjects" form:"-"` // 关联的题目列表
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"-"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type Province struct {
|
|
|
|
+ ID string `json:"id" binding:"required"`
|
|
|
|
+ Name string `json:"name" binding:"required"`
|
|
|
|
+ Citys []*City `json:"citys" binding:"-"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type City struct {
|
|
|
|
+ ID string `json:"id" binding:"required"`
|
|
|
|
+ Name string `json:"name" binding:"required"`
|
|
|
|
+ ProvinceId string `json:"provinceId" binding:"required"`
|
|
|
|
+ Countys []*County `json:"countys" binding:"-"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type County struct {
|
|
|
|
+ ID string `json:"id" binding:"required"`
|
|
|
|
+ Name string `json:"name" binding:"required"`
|
|
|
|
+ CityId string `json:"cityId" binding:"required"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type Archives struct {
|
|
|
|
+ ID string `json:"id" form:"id" binding:"omitempty"`
|
|
|
|
+ Name string `json:"name" form:"name" binding:"required_without=ID,omitempty"`
|
|
|
|
+ Avatar string `json:"avatar" form:"avatar" binding:"omitempty"`
|
|
|
|
+ Gender int `json:"gender" form:"gender" binding:"required_without=ID,omitempty"`
|
|
|
|
+ Birthday string `json:"birthday" form:"birthday" binding:"required_without=ID,omitempty"`
|
|
|
|
+ RegisterAddress string `json:"registerAddress" form:"registerAddress" binding:"omitempty"`
|
|
|
|
+ EmergencyContactName string `json:"emergencyContactName" form:"emergencyContactName" binding:"omitempty"`
|
|
|
|
+ EmergencyContactPhone string `json:"emergencyContactPhone" form:"emergencyContactPhone" binding:"omitempty"`
|
|
|
|
+ Address string `json:"address" form:"address" binding:"omitempty"`
|
|
|
|
+ Province string `json:"province" form:"province" binding:"omitempty"`
|
|
|
|
+ ProvinceText string `json:"provinceText" form:"-" binding:"-"`
|
|
|
|
+ City string `json:"city" form:"city" binding:"omitempty"`
|
|
|
|
+ CityText string `json:"cityText" form:"-" binding:"-"`
|
|
|
|
+ Area string `json:"area" form:"area" binding:"omitempty"`
|
|
|
|
+ AreaText string `json:"areaText" form:"-" binding:"-"`
|
|
|
|
+ SubDistrict string `json:"subDistrict" form:"subDistrict" binding:"omitempty"`
|
|
|
|
+ Community string `json:"community" form:"community" binding:"omitempty"`
|
|
|
|
+ Village string `json:"village" form:"village" binding:"omitempty"`
|
|
|
|
+ Building string `json:"building" form:"building" binding:"omitempty"`
|
|
|
|
+ HouseNumber string `json:"houseNumber" form:"houseNumber" binding:"omitempty"`
|
|
|
|
+ MainArchivesId string `json:"mainArchivesId" form:"mainArchivesId" binding:"omitempty"` // 主档案编号
|
|
|
|
+ ArchivesRelation int `json:"archivesRelation" form:"archivesRelation" binding:"omitempty"`
|
|
|
|
+ ArchivesRelationText string `json:"archivesRelationText" form:"-" binding:"-"`
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"-" binding:"-"`
|
|
|
|
+ UpdatedAt string `json:"updatedAt" form:"-" binding:"-"`
|
|
|
|
+ DepartmentId int64 `json:"departmentId" form:"departmentId" binding:"omitempty"`
|
|
|
|
+ DepartmentName string `json:"departmentName" form:"departmentName" binding:"omitempty"`
|
|
|
|
+ ParentDepartmentName string `json:"parentDepartmentName" form:"parentDepartmentName" binding:"omitempty"`
|
|
|
|
+ AssociatArchives []*Archives `json:"associatArchives" form:"-" binding:"-"`
|
|
|
|
+ Tags []*Tag `json:"tags" form:"-" binding:"-"`
|
|
|
|
+ Accounts []*Account `json:"accounts" form:"accounts" binding:"required_without=ID,dive"`
|
|
|
|
+ IsCompletePassword bool `json:"isCompletePassword" form:"-" binding:"-"`
|
|
|
|
+ IsCompleteInfo bool `json:"isCompleteInfo" form:"-" binding:"-"`
|
|
|
|
+ MedicalReportConfirmTotal *MedicalReportCharts `json:"medicalReportConfirmTotal" form:"-" binding:"-"` // 已确认的报告数量
|
|
|
|
+ CreateMechanismId string `json:"createMechanismId" form:"createMechanismId" binding:"omitempty"` // 注册档案机构ID
|
|
|
|
+ HasArchivesReport bool `json:"hasArchivesReport" form:"hasArchivesReport" binding:"omitempty"` // 是否有档案报告
|
|
|
|
+ ArchivesChannels []*ArchivesChannelInfo `json:"archivesChannels" form:"archivesChannels" binding:"omitempty"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type ArchivesAttachForm struct {
|
|
|
|
+ ChannelId int64 `json:"channelId" form:"channelId" binding:"omitempty"`
|
|
|
|
+ // DepartmentName string `json:"departmentName" form:"departmentName" binding:"omitempty"`
|
|
|
|
+ // ParentDepartmentName string `json:"parentDepartmentName" form:"parentDepartmentName" binding:"omitempty"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type ArchivesChannelInfo struct {
|
|
|
|
+ ID int64 `json:"id" form:"id" binding:"omitempty"`
|
|
|
|
+ Name string `json:"name" form:"name" binding:"omitempty"`
|
|
|
|
+ DepartmentId int64 `json:"departmentId" form:"departmentId" binding:"omitempty"`
|
|
|
|
+ DepartmentName string `json:"departmentName" form:"departmentName" binding:"omitempty"`
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"-" binding:"-"`
|
|
|
|
+}
|
|
|
|
+type Account struct {
|
|
|
|
+ Account string `json:"account" form:"account" binding:"required"`
|
|
|
|
+ Type int `json:"type" form:"type" binding:"required"`
|
|
|
|
+ Code string `json:"code" form:"code" binding:"omitempty"`
|
|
|
|
+ IsValid bool `json:"isValid" form:"-" binding:"-"`
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"-" binding:"-"`
|
|
|
|
+ UpdatedAt string `json:"updatedAt" form:"-" binding:"-"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type ArchivesMedicalData struct {
|
|
|
|
+ LastUpdatedAt string `json:"lastUpdatedAt"` // 最后更新时间
|
|
|
|
+ Indicators map[string][]*Indicator `json:"indicators"` // 指标数据
|
|
|
|
+ ArchivesValues map[string][]*ArchivesValues `json:"archivesValues"` // 档案数据(问卷答案)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type ArchivesValues struct {
|
|
|
|
+ ExtraType int `json:"extraType"` // 数据类型
|
|
|
|
+ UpdatedAt string `json:"updatedAt"`
|
|
|
|
+ ReturnAnswer *SurveyAnswer `json:"returnAnswer"`
|
|
|
|
+ Answer *SurveyAnswer `json:"answer"` // 请求时要传这个
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type ArchivesPaginateQuery struct {
|
|
|
|
+ Page int `json:"page" form:"page" binding:"omitempty"`
|
|
|
|
+ PageSize int `json:"pageSize" form:"pageSize" binding:"omitempty"`
|
|
|
|
+ Name string `json:"name" form:"name" binding:"omitempty"`
|
|
|
|
+ Gender int `json:"gender" form:"gender" binding:"omitempty"`
|
|
|
|
+ ArchivesId string `json:"archivesId" form:"archivesId" binding:"omitempty"`
|
|
|
|
+ Phone string `json:"phone" form:"phone" binding:"omitempty"`
|
|
|
|
+ IdCard string `json:"idCard" form:"idCard" binding:"omitempty"`
|
|
|
|
+ Account string `json:"account" form:"account" binding:"omitempty"`
|
|
|
|
+ RegistMechanismId string `json:"registMechanismId" form:"registMechanismId" binding:"omitempty"`
|
|
|
|
+ ProvinceId string `json:"provinceId" form:"provinceId" binding:"omitempty"`
|
|
|
|
+ CityId string `json:"cityId" form:"cityId" binding:"omitempty"`
|
|
|
|
+ AreaId string `json:"areaId" form:"areaId" binding:"omitempty"`
|
|
|
|
+ SubDistrict string `json:"subDistrict" form:"subDistrict" binding:"omitempty"`
|
|
|
|
+ Community string `json:"community" form:"community" binding:"omitempty"`
|
|
|
|
+ SubDistricts []string `json:"subDistricts" form:"subDistricts" binding:"omitempty"`
|
|
|
|
+ Communities []string `json:"communities" form:"communities" binding:"omitempty"`
|
|
|
|
+ TagIds []string `json:"tagIds[]" form:"tagIds[]" binding:"omitempty"`
|
|
|
|
+ TagIdList []string `json:"tagIdList" form:"tagIdList" binding:"omitempty"`
|
|
|
|
+ Keyword string `json:"keyword" form:"keyword" binding:"omitempty"` // 聚合搜索
|
|
|
|
+ CreatedStartDate string `json:"createdStartDate" form:"createdStartDate" binding:"omitempty"` // 建档开始时间
|
|
|
|
+ CreatedEndDate string `json:"createdEndDate" form:"createdEndDate" binding:"omitempty"` // 建档结束时间
|
|
|
|
+ NeedSubArchives int64 `json:"needSubArchives" form:"needSubArchives" binding:"omitempty"` // 是否需要子档案
|
|
|
|
+ InDepartment int64 `json:"inDepartment" form:"inDepartment" binding:"omitempty"` // 是否在部门中
|
|
|
|
+ DepartmentId int64 `json:"departmentId" form:"departmentId" binding:"omitempty"` // 部门ID
|
|
|
|
+ ArchivesValuesDataIds []string `json:"archivesValuesDataIds" form:"archivesValuesDataIds" binding:"omitempty"` // 档案值数据ID
|
|
|
|
+ AgeStart int64 `json:"ageStart" form:"ageStart" binding:"omitempty"` // 年龄开始
|
|
|
|
+ AgeEnd int64 `json:"ageEnd" form:"ageEnd" binding:"omitempty"` // 年龄结束
|
|
|
|
+ HasArchivesReport int64 `json:"hasArchivesReport" form:"hasArchivesReport" binding:"omitempty"` // 是否有档案报告
|
|
|
|
+ ChannelId int64 `json:"channelId" form:"channelId" binding:"omitempty"` // 渠道ID
|
|
|
|
+ ChannelIds string `json:"channelIds" form:"channelIds" binding:"omitempty"` // 渠道ID列表
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type FormAnswer struct {
|
|
|
|
+ ExtraType int `json:"extraType" form:"extraType" binding:"required"` // 数据类型
|
|
|
|
+ Answer *SurveyAnswer `json:"answer"`
|
|
|
|
+ UpdatedAt string `json:"updatedAt"`
|
|
|
|
+ ReturnAnswer map[string]any `json:"returnAnswer"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 指标数据
|
|
|
|
+type Indicator struct {
|
|
|
|
+ Name string `json:"name"` //身体名称
|
|
|
|
+ ID string `json:"id"` //身体ID
|
|
|
|
+ Value string `json:"value"` //身体值
|
|
|
|
+ Unit string `json:"unit"` //身体单位
|
|
|
|
+ Reference string `json:"reference"` //参考范围
|
|
|
|
+ ReferStart string `json:"referStart"` //参考范围低值
|
|
|
|
+ ReferEnd string `json:"referEnd"` //参考范围高值
|
|
|
|
+ ItemName string `json:"itemName"` //检查项目名称
|
|
|
|
+ ItemID string `json:"itemId"` //检查项目ID
|
|
|
|
+ AbnormalDatas []*AbnormalData `json:"abnormalDatas"` //异常数据
|
|
|
|
+ Date int `json:"date"` //检查时间
|
|
|
|
+ OriginalName string `json:"originalName"` //原始名称
|
|
|
|
+ Mark int `json:"mark"` //标记
|
|
|
|
+ IsAbnormal bool `json:"isAbnormal"` //是否异常
|
|
|
|
+ IsHideInCheckData bool `json:"isHideInCheckData"` //是否在检查数据中隐藏
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 异常数据
|
|
|
|
+type AbnormalData struct {
|
|
|
|
+ Name string `json:"name"` //异常名称
|
|
|
|
+ ID string `json:"id"` //异常ID
|
|
|
|
+ Value map[string]string `json:"value"` //异常值
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 普通答案
|
|
|
|
+type QuestionAnswerModel struct {
|
|
|
|
+ Key string `json:"key"` // 答案key
|
|
|
|
+ Value string `json:"value"` // 答案value
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 单行文本题答案
|
|
|
|
+type QuestionInputAnswerModel struct {
|
|
|
|
+ Key string `json:"key"` // 答案key
|
|
|
|
+ Value []string `json:"value"` // 答案value
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 链接答案
|
|
|
|
+type LinkAnswerModel struct {
|
|
|
|
+ Key string `json:"key"` // 答案key
|
|
|
|
+ Value []LinkAnswer `json:"value"` // 答案value
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type LinkAnswer struct {
|
|
|
|
+ Url string `json:"url"` // 链接地址
|
|
|
|
+ Name string `json:"name"` // 链接名称
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 矩阵答案
|
|
|
|
+type QuestionMatrixAnswerModel struct {
|
|
|
|
+ XKey string `json:"xKey"` // X轴key
|
|
|
|
+ XText string `json:"xText"` // X轴文本
|
|
|
|
+ YKey string `json:"yKey"` // Y轴key
|
|
|
|
+ YText string `json:"yText"` // Y轴文本
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 问卷答案
|
|
|
|
+type SurveyAnswer struct {
|
|
|
|
+ Type string `json:"type" form:"type" binding:"required"` // 问题类型
|
|
|
|
+ QuestionNo string `json:"questionNo" form:"questionNo" binding:"required"` // 问题编号
|
|
|
|
+ MultipleAnswers bool `json:"multipleAnswers" form:"multipleAnswers" binding:"omitempty"` // 是否多答
|
|
|
|
+ InputAnswers QuestionInputAnswerModel `json:"inputAnswers" form:"inputAnswers" binding:"required_if=Type input"` // 答案(单行文本题)支持多答
|
|
|
|
+ LinkAnswers LinkAnswerModel `json:"linkAnswers" form:"linkAnswers" binding:"required_if=Type upload"` // 答案(链接题)支持多答
|
|
|
|
+ Answer QuestionAnswerModel `json:"answer" form:"answer" binding:"-"` // 答案(单选题、时间选择题)
|
|
|
|
+ CheckboxAnswers []QuestionAnswerModel `json:"checkboxAnswers" form:"checkboxAnswers" binding:"required_if=Type checkbox"` // 答案(多选题)
|
|
|
|
+ MatrixAnswers []QuestionMatrixAnswerModel `json:"matrixAnswers" form:"matrixAnswers" binding:"required_if=Type matrix_checkbox"` // 答案(矩阵多选题)
|
|
|
|
+ GroupAnswers [][]SurveyAnswer `json:"groupAnswers" form:"groupAnswers" binding:"required_if=Type group"` // 答案(组合题)支持多答
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type AlgorAppAuth struct {
|
|
|
|
+ ID int64 `json:"id" form:"id" binding:"omitempty,numeric"`
|
|
|
|
+ AppId int64 `json:"appId" form:"appId" binding:"omitempty,numeric"`
|
|
|
|
+ DecisionModelId int64 `json:"decisionModelId" form:"decisionModelId" binding:"required,numeric"`
|
|
|
|
+ DecisionModel *DecisionModel `json:"decisionModel" form:"decisionModel" binding:"-"`
|
|
|
|
+ Remark string `json:"remark" form:"remark" binding:"omitempty,min=1,max=100"`
|
|
|
|
+ UsedTotal int `json:"usedTotal" form:"usedTotal" binding:"-"`
|
|
|
|
+ Status int `json:"status" form:"status" binding:"oneof=1 2"`
|
|
|
|
+ CreatedAt string `json:"createdAt" binding:"-"`
|
|
|
|
+}
|
|
|
|
+type DecisionModel struct {
|
|
|
|
+ ID int64 `json:"id" form:"id" binding:"omitempty,number"`
|
|
|
|
+ Name string `json:"name" form:"name" binding:"required,min=1,max=20"`
|
|
|
|
+ SN string `json:"sn" form:"sn" binding:"required,alphanum,min=1,max=20"`
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"-" binding:"-"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type ExecuteRequest struct {
|
|
|
|
+ Type int `json:"type" form:"type" binding:"required"` // 处理类型,1:问卷,2:ocr
|
|
|
|
+ SurveyData map[string]map[string]any `json:"surveyData" form:"surveyData" binding:"required_if=Type 1"` // 问卷数据
|
|
|
|
+ OcrData *OCRDataList `json:"ocrData" form:"ocrData" binding:"required_if=Type 2"` // ocr数据
|
|
|
|
+ MultiOcrData map[string]*OCRDataList `json:"multiOcrData" form:"multiOcrData" binding:"required_if=Type 6"` // ocr数据
|
|
|
|
+ DecisionModelSN string `json:"decisionModelSn" form:"decisionModelSn" binding:"required"` // 决策模型编号
|
|
|
|
+ Extra string `json:"extra" form:"extra" binding:"omitempty"` // 额外数据
|
|
|
|
+ ArchivesData *ExecuteRequestArchivesData `json:"archivesData" form:"archivesData" binding:"required_if=Type 3"` // 档案数据
|
|
|
|
+ ChronicDiseaseData any `json:"chronicDiseaseData" form:"chronicDiseaseData" binding:"required_if=Type 4"` // 慢病数据
|
|
|
|
+ // ChronicDiseaseData *ChronicDiseaseRequestData `json:"chronicDiseaseData" form:"chronicDiseaseData" binding:"required_if=Type 4"` // 慢病数据
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type ExecuteRequestArchivesData struct {
|
|
|
|
+ ArchivesId string `json:"archivesId" form:"archivesId" binding:"required"`
|
|
|
|
+ Name string `json:"name" form:"name" binding:"required"`
|
|
|
|
+ Gender string `json:"gender" form:"gender" binding:"required"`
|
|
|
|
+ Age int `json:"age" form:"age" binding:"required"`
|
|
|
|
+ Indicators []*Indicator `json:"indicators" form:"indicators" binding:"omitempty"`
|
|
|
|
+ ArchivesValues []*ArchivesValues `json:"archivesValues" form:"archivesValues" binding:"omitempty"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type OCRDataList struct {
|
|
|
|
+ UserName string `json:"userName"` //用户姓名
|
|
|
|
+ UserAge int `json:"userAge"` //用户年龄
|
|
|
|
+ UserBirthday string `json:"userBirthday"` //用户生日
|
|
|
|
+ UserSex string `json:"userSex"` //用户性别
|
|
|
|
+ OCRData []map[string]any `json:"ocrData"` //OCR数据
|
|
|
|
+ SurveyData map[string]*SurveyAnswer `json:"surveyData"` // 问卷数据
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type AuthMechanism struct {
|
|
|
|
+ ID string `json:"id"` // 用户ID
|
|
|
|
+ Account string `json:"account"` // 账号
|
|
|
|
+ Nickname string `json:"nickname"` // 昵称
|
|
|
|
+ LoginAt int64 `json:"loginAt"` // 当前Token派发登录时间
|
|
|
|
+ IsMechanism bool `json:"isMechanism"` // 是否是机构
|
|
|
|
+ FullPermission bool `json:"fullPermission"` // 是否全权限覆盖
|
|
|
|
+ Permissions []string `json:"permissions"` // 权限KEY列表
|
|
|
|
+ RoleIds []int64 `json:"roleIds"` // 角色ID列表
|
|
|
|
+ Mechanism *AuthBaseMechanism `json:"mechanism"` // 机构信息
|
|
|
|
+}
|
|
|
|
+type AuthBaseMechanism struct {
|
|
|
|
+ ID string `json:"id"` // 用户ID
|
|
|
|
+ Account string `json:"account"` // 账号
|
|
|
|
+ Nickname string `json:"nickname"` // 昵称
|
|
|
|
+ RawId int64 `json:"rawId"` // 原始ID
|
|
|
|
+ AppKey string `json:"appKey"` // appKey
|
|
|
|
+ AppSecret string `json:"appSecret"` // appSecret
|
|
|
|
+ IpWhiteList string `json:"ipWhiteList"` // ip白名单
|
|
|
|
+ CallbackUrlList string `json:"callbackUrlList"` // 回调地址列表
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type AuthUser struct {
|
|
|
|
+ ID int64 `json:"id"` // 用户ID
|
|
|
|
+ Account string `json:"account"` // 账号
|
|
|
|
+ Nickname string `json:"nickname"` // 昵称
|
|
|
|
+ FullPermission bool `json:"fullPermission"` // 是否全权限覆盖
|
|
|
|
+ RoleIds []int64 `json:"roleIds"` // 角色ID列表
|
|
|
|
+ Permissions []string `json:"permissions"` // 权限KEY列表
|
|
|
|
+ LoginAt int64 `json:"loginAt"` // 当前Token派发登录时间
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type AuthMember struct {
|
|
|
|
+ ID string `json:"id"` // 档案编号
|
|
|
|
+ Name string `json:"name"` // 档案姓名
|
|
|
|
+ Gender int `json:"gender"` // 档案性别
|
|
|
|
+ MainArchivesId string `json:"mainArchivesId"` // 主档案编号
|
|
|
|
+ IsCompletePassword bool `json:"isFullPassword"` // 是否完善了密码
|
|
|
|
+ IsCompleteArchivesInfo bool `json:"isCompleteArchivesInfo"` // 是否完善了档案信息
|
|
|
|
+ LoginAt int64 `json:"loginAt"` // 当前Token派发登录时间
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type PdfTemplate struct {
|
|
|
|
+ ID int64 `json:"id"`
|
|
|
|
+ Type int64 `json:"type"`
|
|
|
|
+ SortRule int64 `json:"sortRule"`
|
|
|
|
+ Name string `json:"name"`
|
|
|
|
+ IsDefault int64 `json:"isDefault"`
|
|
|
|
+ Config string `json:"config"`
|
|
|
|
+ Remark string `json:"remark"`
|
|
|
|
+ Logo string `json:"logo"`
|
|
|
|
+ IsAttachRawPdf int64 `json:"isAttachRawPdf"`
|
|
|
|
+ IsFilterDisease int64 `json:"isFilterDisease"` // 是否过滤疾病
|
|
|
|
+ CreatedAt string `json:"createdAt"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type PdfTemplateMechanism struct {
|
|
|
|
+ ID int64 `json:"id"`
|
|
|
|
+ MechanismId string `json:"mechanismId"`
|
|
|
|
+ IsMember bool `json:"isMember"`
|
|
|
|
+ TemplateId int64 `json:"templateId"`
|
|
|
|
+ Template *PdfTemplate `json:"template"`
|
|
|
|
+ CreatedAt string `json:"createdAt"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type TagCategory struct {
|
|
|
|
+ ID string `json:"id" form:"id" binding:"omitempty"`
|
|
|
|
+ RawId int64 `json:"rawId" form:"-" binding:"-"`
|
|
|
|
+ Name string `json:"name" form:"name" binding:"required,max=20"`
|
|
|
|
+ Purpose string `json:"purpose" form:"purpose"`
|
|
|
|
+ ModelSn string `json:"modelSn" form:"-" binding:"-"`
|
|
|
|
+ ReturnFields []*TagCategoryModelReturnField `json:"returnFields" form:"-" binding:"-"`
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"-" binding:"-"`
|
|
|
|
+ UpdatedAt string `json:"updatedAt" form:"-" binding:"-"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type TagCategoryModelReturnField struct {
|
|
|
|
+ Value string `json:"value" form:"value" binding:"required"` // 字段value
|
|
|
|
+ Label string `json:"label" form:"-" binding:"-"` // 字段名称
|
|
|
|
+ TagId string `json:"tagId" form:"tagId" binding:"required"` // 标签ID
|
|
|
|
+ Tag *Tag `json:"tag" form:"-" binding:"-"` // 标签
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type Street struct {
|
|
|
|
+ ID string `json:"id" binding:"required"`
|
|
|
|
+ Name string `json:"name" binding:"required"`
|
|
|
|
+ CountyId string `json:"countyId" binding:"required"`
|
|
|
|
+ Villages []*Villages `json:"villages" binding:"-"`
|
|
|
|
+}
|
|
|
|
+type Villages struct {
|
|
|
|
+ ID string `json:"id" binding:"required"`
|
|
|
|
+ Name string `json:"name" binding:"required"`
|
|
|
|
+ StreetId string `json:"streetId" binding:"required"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type MedicalReportCharts struct {
|
|
|
|
+ ArchivesId string `json:"archivesId"`
|
|
|
|
+ Archives *Archives `json:"archives"`
|
|
|
|
+ AwaitTotal int64 `json:"awaitTotal"`
|
|
|
|
+ ProcessTotal int64 `json:"processTotal"`
|
|
|
|
+ SuccessTotal int64 `json:"successTotal"`
|
|
|
|
+ DoneTotal int64 `json:"doneTotal"`
|
|
|
|
+ ConfirmTotal int64 `json:"confirmTotal"`
|
|
|
|
+ SuggestionStatus int64 `json:"suggestionStatus"`
|
|
|
|
+ LastTime string `json:"lastTime"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type MedicalDataCreateFormByOpenAPI struct {
|
|
|
|
+ FileBase64 string `json:"fileBase64" form:"fileBase64" binding:"omitempty"` // 文件base64
|
|
|
|
+ FileName string `json:"fileName" form:"fileName" binding:"omitempty"` // 文件名
|
|
|
|
+ FileUrl string `json:"fileUrl" form:"fileUrl" binding:"omitempty,url"` // 文件地址
|
|
|
|
+ FileRemark string `json:"fileRemark" form:"fileRemark" binding:"omitempty"` // 文件备注
|
|
|
|
+ MedicalDate string `json:"medicalDate" form:"medicalDate" binding:"required"` // 体检日期
|
|
|
|
+ MechanismId string `json:"mechanismId" form:"mechanismId" binding:"required"` // 机构ID
|
|
|
|
+ TransferResult []map[string]any `json:"transferResult" form:"transferResult" binding:"omitempty"` // 转换结果
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type MedicalDataBindArchivesFormByOpenAPI struct {
|
|
|
|
+ ArchivesId string `json:"archivesId" form:"archivesId" binding:"required"` // 档案编号
|
|
|
|
+ MedicalDataId string `json:"medicalDataId" form:"medicalDataId" binding:"required"` // 数据ID
|
|
|
|
+ MechanismId string `json:"mechanismId" form:"mechanismId" binding:"required"` // 机构ID
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type MedicalData struct {
|
|
|
|
+ // ID int64 `json:"id" form:"id" binding:"omitempty,min=1"` // 数据ID
|
|
|
|
+ SN string `json:"sn" form:"-" binding:"-"` // 批次号
|
|
|
|
+ ArchivesId string `json:"archivesId" form:"archivesId" binding:"omitempty"` // 档案编号
|
|
|
|
+ Type int `json:"type" form:"type" binding:"required_if=ID 0,omitempty,min=1"` // 类型
|
|
|
|
+ Remark string `json:"remark" form:"remark" binding:"omitempty"` // 备注
|
|
|
|
+ Files []*MedicalDataFile `json:"files" form:"files" binding:"required,dive,min=1"` // 文件列表
|
|
|
|
+ MechanismId string `json:"mechanismId" form:"-" binding:"-"` // 机构ID
|
|
|
|
+ Mechanism *Mechanism `json:"mechanism" form:"-" binding:"-"` // 机构
|
|
|
|
+ FileName string `json:"fileName" form:"fileName" binding:"omitempty"` // 文件名
|
|
|
|
+ Source int `json:"source" form:"-" binding:"-"` // 来源
|
|
|
|
+ Status int `json:"status" form:"-" binding:"-"` // 状态
|
|
|
|
+ IsAbandon int `json:"isAbandon" form:"-" binding:"-"` // 是否废弃
|
|
|
|
+ ResultRawJson string `json:"resultRawJson" form:"-" binding:"-"` // 结果原始JSON
|
|
|
|
+ TransferRawJson string `json:"transferRawJson" form:"transferRawJson" binding:"omitempty"` // 转换原始JSON
|
|
|
|
+ Suggestion string `json:"suggestion" form:"suggestion" binding:"omitempty"` // 个性化建议
|
|
|
|
+ PdfTransferStatus int `json:"pdfTransferStatus" form:"-" binding:"-"` // PDF转换状态
|
|
|
|
+ PdfTransferMsg string `json:"pdfTransferMsg" form:"-" binding:"-"` // PDF转换消息
|
|
|
|
+ PdfTransferResultUrl string `json:"pdfTransferResultUrl" form:"-" binding:"-"` // PDF转换结果地址
|
|
|
|
+ PdfTransferStartTime string `json:"pdfTransferStartTime" form:"-" binding:"-"` // PDF转换开始时间
|
|
|
|
+ PdfTransferEndTime string `json:"pdfTransferEndTime" form:"-" binding:"-"` // PDF转换结束时间
|
|
|
|
+ Errors []string `json:"errors" form:"-" binding:"-"` // 错误信息
|
|
|
|
+ Date string `json:"date" form:"date" binding:"omitempty"` // 日期
|
|
|
|
+ PdfResultTotalStatus int `json:"pdfResultTotalStatus" form:"-" binding:"-"` // PDF转换结果总状态
|
|
|
|
+ PdfResultTemplateTotal int64 `json:"pdfResultTemplateTotal" form:"-" binding:"-"` // PDF转换结果总数
|
|
|
|
+ PdfResultSuccessTotal int64 `json:"pdfResultSuccessTotal" form:"-" binding:"-"` // PDF转换结果成功数
|
|
|
|
+ PdfTemplateConfigs []*MedicalDataPdfTemplateConfig `json:"pdfTemplateConfigs" form:"pdfTemplateConfigs" binding:"omitempty"` // PDF模板配置列表
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"-" binding:"-"` // 创建时间
|
|
|
|
+ UpdatedAt string `json:"updatedAt" form:"-" binding:"-"` // 更新时间
|
|
|
|
+}
|
|
|
|
+type MedicalDataFile struct {
|
|
|
|
+ ID int64 `json:"id" form:"id" binding:"omitempty,min=1"` // 文件ID
|
|
|
|
+ DataId int64 `json:"dataId" form:"-" binding:"-"` // 数据ID
|
|
|
|
+ FileName string `json:"fileName" form:"fileName" binding:"required_if=ID 0,omitempty"` // 文件名
|
|
|
|
+ FileUrl string `json:"fileUrl" form:"fileUrl" binding:"required_if=ID 0,omitempty,url"` // 文件地址
|
|
|
|
+ Date string `json:"date" form:"date" binding:"required_if=ID 0,omitempty,datetime=2006-01-02"` // 日期
|
|
|
|
+ Remark string `json:"remark" form:"remark" binding:"omitempty"` // 备注
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"-" binding:"-"` // 创建时间
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type MedicalDataPdfTemplateConfig struct {
|
|
|
|
+ PdfTemplateId int64 `json:"pdfTemplateId" form:"pdfTemplateId" binding:"required"` // PDF模板ID
|
|
|
|
+ Config *MedicalDataPdfTemplateConfigStruct `json:"config" form:"config" binding:"required"` // 配置信息
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type MedicalDataPdfTemplateConfigStruct struct {
|
|
|
|
+ ShowDiseaseNames []string `json:"showDiseaseNames"` // 需要展示的疾病名称
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type MedicalCompareReport struct {
|
|
|
|
+ ID string `json:"id" form:"id" binding:"required"` // 对比报告ID
|
|
|
|
+ ArchivesId string `json:"archivesId" form:"archivesId" binding:"required"` // 档案编号
|
|
|
|
+ Data *MedicalReportCompareData `json:"data" form:"data" binding:"required"` // 对比报告的医疗数据
|
|
|
|
+ SuggestionStatus int64 `json:"suggestionStatus" form:"-" binding:"-"` // 个性化建议状态
|
|
|
|
+ Suggestion string `json:"suggestion" form:"suggestion" binding:"omitempty"` // 个性化建议
|
|
|
|
+ PdfTransferStatus int `json:"pdfTransferStatus" form:"-" binding:"-"` // PDF转换状态
|
|
|
|
+ PdfTransferMsg string `json:"pdfTransferMsg" form:"-" binding:"-"` // PDF转换消息
|
|
|
|
+ PdfTransferResultUrl string `json:"pdfTransferResultUrl" form:"-" binding:"-"` // PDF转换结果地址
|
|
|
|
+ PdfTransferStartTime string `json:"pdfTransferStartTime" form:"-" binding:"-"` // PDF转换开始时间
|
|
|
|
+ PdfTransferEndTime string `json:"pdfTransferEndTime" form:"-" binding:"-"` // PDF转换结束时间
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"-" binding:"-"` // 创建时间
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type MedicalReportCompareData struct {
|
|
|
|
+ DiseaseList []MedicalReportDisease `json:"diseaseList"`
|
|
|
|
+ MedDataList []MedicalReportMedData `json:"medDataList"`
|
|
|
|
+ TableHeaderColumns []string `json:"tableHeaderColumns"`
|
|
|
|
+ TableData []FinalAnalysisResult `json:"tableData"`
|
|
|
|
+ MedicalDataIds []string `json:"medicalDataIds"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type MedicalReportDisease struct {
|
|
|
|
+ Name string `json:"name"`
|
|
|
|
+ NodeId string `json:"nodeId"`
|
|
|
|
+ List []MedicalReportDiseaseItem `json:"list"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type MedicalReportDiseaseItem struct {
|
|
|
|
+ RiskDesc string `json:"riskDesc"` //风险描述词
|
|
|
|
+ RiskDegree int `json:"riskDegree"` //风险程度 //0-无法评估 1-暂无风险 2-有一定风险 3-有明显风险 4-已确诊
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type MedicalReportMedData struct {
|
|
|
|
+ Name string `json:"name"`
|
|
|
|
+ NodeId string `json:"nodeId"`
|
|
|
|
+ Type int `json:"type"`
|
|
|
|
+ Sort int `json:"sort"`
|
|
|
|
+ List [][]MedData `json:"list"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 医疗数据
|
|
|
|
+type MedData struct {
|
|
|
|
+ ItermName string `json:"itermName"` //医疗数据名称
|
|
|
|
+ NodeId string `json:"nodeId"` //医疗数据ID
|
|
|
|
+ Value string `json:"value"` //医疗数据值
|
|
|
|
+ Unit string `json:"unit"` //医疗数据单位
|
|
|
|
+ Reference string `json:"reference"` //参考范围
|
|
|
|
+ CheckTime int `json:"checkTime"` //检查时间
|
|
|
|
+ CheckItemName string `json:"checkItemName"` //检查项目名称
|
|
|
|
+ CheckItemId string `json:"checkItemId"` //检查项目ID
|
|
|
|
+ Mark int `json:"mark"` //异常标记 0-无标记 1-升高 -1-降低
|
|
|
|
+ IsAbnormal bool `json:"isAbnormal"` //是否异常
|
|
|
|
+ Type int `json:"type"` //类型 0-未定义 1-身体物质 2-身体部位 3-其他身体物质
|
|
|
|
+ Sort int `json:"sort"` //排序
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 最终输出结果
|
|
|
|
+type FinalAnalysisResult struct {
|
|
|
|
+ ExamDate int `json:"examDate"` //检查日期
|
|
|
|
+ AssessmentDate string `json:"assessmentDate"` //评估日期
|
|
|
|
+ DebugInfo []string `json:"debugInfo"` //调试信息
|
|
|
|
+ MajorDiseases []MajorDisease `json:"majorDisease"` //重大疾病
|
|
|
|
+ CalErr []string `json:"calErr"` //系统计算错误信息
|
|
|
|
+ AlTime string `json:"alTime"` //计算时间
|
|
|
|
+ UserInfo FinalAnalysisResultUserInfo `json:"userInfo"` //用户信息
|
|
|
|
+ MedicalReportId string `json:"medicalReportId"`
|
|
|
|
+ AbnormalInfo []FinalAnalysisResultAbnormalInfo `json:"abnormalInfo"` //异常信息
|
|
|
|
+}
|
|
|
|
+type FinalAnalysisResultAbnormalInfo struct {
|
|
|
|
+ AbnormalTypeName string `json:"abnormalTypeName"` //异常类型名称
|
|
|
|
+ AbnormalTypeNodeID string `json:"abnormalTypeNodeID"` //异常类型nodeid
|
|
|
|
+ ClassInfo []FinalAnalysisResultClassInfo `json:"classInfo"` //异常类别信息
|
|
|
|
+}
|
|
|
|
+type FinalAnalysisResultClassInfo struct {
|
|
|
|
+ AbnormalClassName string `json:"abnormalClassName"` //异常类别名称
|
|
|
|
+ AbnormalClassNodeID string `json:"abnormalClassNodeID"` //异常类别nodeid
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type FinalAnalysisResultUserInfo struct {
|
|
|
|
+ CurrentAge string `json:"currentAge"` //当前年龄
|
|
|
|
+ ExamAge string `json:"examAge"` //检查时年龄
|
|
|
|
+ Gender string `json:"gender"` // 性别
|
|
|
|
+ Name string `json:"name"` //姓名
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 重大疾病
|
|
|
|
+type MajorDisease struct {
|
|
|
|
+ Name string `json:"name"` //疾病名称
|
|
|
|
+ NodeId string `json:"nodeId"` //疾病ID
|
|
|
|
+ RiskDesc string `json:"riskDesc"` //风险描述词
|
|
|
|
+ RiskDegree int `json:"riskDegree"` //风险程度 //0-无法评估 1-暂无风险 2-有一定风险 3-有明显风险 4-已确诊
|
|
|
|
+ Classification int `json:"classification"` //疾病分类 0-未分类 1-肿瘤 2-心脑血管 3-个性化疾病
|
|
|
|
+ RecommendItems []string `json:"recommendItems"` //推荐检查项目
|
|
|
|
+ FollowUpTime string `json:"followUpTime"` //随访时间
|
|
|
|
+ NotificationTime string `json:"notificationTime"` //通知时间
|
|
|
|
+ Department []string `json:"department"` //科室名称
|
|
|
|
+ MedDatas []MedData `json:"medDatas"` //医疗数据
|
|
|
|
+ AbnormalDatas []AbnormalData `json:"abnormalDatas"` //异常检查结果
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type QueryIDCIndicatorDataQuery struct {
|
|
|
|
+ ArchivesId string `json:"archivesId" form:"archivesId" binding:"required"`
|
|
|
|
+ QueryData []*QueryIDCIndicatorDataQueryData `json:"queryData" form:"queryData" binding:"required,dive,min=1"`
|
|
|
|
+}
|
|
|
|
+type QueryIDCIndicatorDataQueryData struct {
|
|
|
|
+ BodyDataId string `json:"bodyDataId" form:"bodyDataId" binding:"required"`
|
|
|
|
+ ItemId string `json:"itemId" form:"itemId" binding:"omitempty"`
|
|
|
|
+ CheckTime []string `json:"checkTime" form:"checkTime" binding:"omitempty"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type MedicalDateTransferResultQueryResultItemBody struct {
|
|
|
|
+ ID string `json:"id"` // 检查内容ID
|
|
|
|
+ Name string `json:"name"` // 检查内容名称
|
|
|
|
+ IsBodyMatter bool `json:"isBodyMatter"` // 是否是身体物质
|
|
|
|
+ Tags []string `json:"tags"` // 标签
|
|
|
|
+ List []*Indicator `json:"list"` // 检查内容的指标列表
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 慢病管理参数
|
|
|
|
+type ChronicDiseaseRequestData struct {
|
|
|
|
+ DiseaseId string `json:"diseaseId" form:"diseaseId" binding:"required"` // 疾病ID
|
|
|
|
+ UserId string `json:"userId" form:"userId" binding:"required"` // 用户ID
|
|
|
|
+ EvaluationsNum int `json:"evaluationsNum" form:"evaluationsNum" binding:"required,min=0"` // 评估次数
|
|
|
|
+ AssessmentInfo *AssessmentInfo `json:"assessmentInfo" form:"assessmentInfo" binding:"omitempty"` // 评估信息
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type AssessmentInfo struct {
|
|
|
|
+ Result string `json:"result"` //评估结果
|
|
|
|
+ Accordance []string `json:"accordance"` //评估依据
|
|
|
|
+ ErrInfo []string `json:"errInfo"` //错误信息
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type Channel struct {
|
|
|
|
+ ID int64 `json:"id"`
|
|
|
|
+ Name string `json:"name"`
|
|
|
|
+ Remark string `json:"remark"`
|
|
|
|
+ Sort int64 `json:"sort"`
|
|
|
|
+ CreatedAt string `json:"createdAt"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type Agency struct {
|
|
|
|
+ ID int64 `json:"id" form:"id" binding:"omitempty"`
|
|
|
|
+ Nickname string `json:"nickname" form:"nickname" binding:"required"`
|
|
|
|
+ Account string `json:"account" form:"account" binding:"required"`
|
|
|
|
+ Password string `json:"password" form:"password" binding:"omitempty"`
|
|
|
|
+ Status int64 `json:"status" form:"status" binding:"required"`
|
|
|
|
+ Remark string `json:"remark" form:"remark" binding:"omitempty"`
|
|
|
|
+ ChannelIds []int64 `json:"channelIds" form:"channelIds" binding:"required"`
|
|
|
|
+ Channels []*Channel `json:"channels" form:"channels" binding:"-"`
|
|
|
|
+ MechanismId string `json:"mechanismId" form:"mechanismId" binding:"-"`
|
|
|
|
+ CreatedAt string `json:"createdAt" form:"createdAt" binding:"-"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+type AgencyDeveloperSettingForm struct {
|
|
|
|
+ AgencyId int64 `json:"agencyId" form:"agencyId" binding:"required"` // 三方机构ID
|
|
|
|
+ MechanismId string `json:"mechanismId" form:"mechanismId" binding:"omitempty"` // 机构ID
|
|
|
|
+ AppKey string `json:"appKey" form:"appKey" binding:"omitempty"` // appKey
|
|
|
|
+ AppSecret string `json:"appSecret" form:"appSecret" binding:"omitempty"` // appSecret
|
|
|
|
+ RegistChannelId int64 `json:"registChannelId" form:"registChannelId" binding:"required"` // 注册渠道ID
|
|
|
|
+ RegistDepartmentId int64 `json:"registDepartmentId" form:"registDepartmentId" binding:"required"` // 注册部门ID
|
|
|
|
+ CallbackUrl string `json:"callbackUrl" form:"callbackUrl" binding:"required"` // 回调地址
|
|
|
|
+ WhiteIp string `json:"whiteIp" form:"whiteIp" binding:"omitempty"` // 白名单
|
|
|
|
+ UserAccountPrefix string `json:"userAccountPrefix" form:"userAccountPrefix" binding:"omitempty"` // 用户账号前缀
|
|
|
|
+ PdfTemplateId int64 `json:"pdfTemplateId" form:"pdfTemplateId" binding:"omitempty"` // PDF模板ID
|
|
|
|
+ AgencyInfo *Agency `json:"agencyInfo" form:"agencyInfo" binding:"-"`
|
|
|
|
+}
|