| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- classDiagram
- %% ===== 现有(复用/改造)=====
- class EnergyDimension {
- +Long id
- +String code
- +String name
- +String icon
- +String element
- +Integer status
- }
- class EnergyService {
- +Map~String,Object~ getOverview(Long memberId)
- }
- class HealthDimensionVO {
- +Long memberId
- +BigDecimal healthIndex
- +BigDecimal confidence
- +List~DimensionItem~ dimensions
- +Date updateTime
- +Boolean isAverage
- }
- class DimensionItem {
- +String dimension
- +String label
- +BigDecimal score
- +Integer percentile
- +String dataSource
- +Integer tier
- +String level
- +BigDecimal confidence
- +String dataSources
- +Integer sampleSize
- +String layerBreakdown
- }
- %% ===== 新增实体 =====
- class AssessmentMetric {
- +Long id
- +String metricCode
- +String dimension
- +String layer
- +BigDecimal weight
- +String direction
- +String normStrategy
- +BigDecimal requiredSample
- +String status
- }
- class AssessmentMetricNorm {
- +Long id
- +String metricCode
- +String gender
- +Integer ageMinMonths
- +Integer ageMaxMonths
- +BigDecimal mean
- +BigDecimal sd
- +Integer p05
- +Integer p50
- +Integer p95
- }
- class DimensionMeasure {
- +Long id
- +Long childId
- +String metricCode
- +String dimension
- +String layer
- +BigDecimal rawValue
- +String sourceType
- +String device
- +BigDecimal qualityScore
- +String modelVersion
- +Date measureTime
- +Integer validFlag
- }
- class DimensionScore {
- +Long id
- +Long childId
- +String dimension
- +BigDecimal score
- +BigDecimal confidence
- +Integer sampleSize
- +String dataSources
- +String layerBreakdown
- +Date computedAt
- }
- class HealthIndexSnapshot {
- +Long id
- +Long childId
- +BigDecimal totalHealthIndex
- +String dimensionJson
- +BigDecimal confidence
- +Date computedAt
- }
- class AssessmentReviewLog {
- +Long id
- +Long measureId
- +String reviewType
- +String result
- +Long reviewerId
- +Date reviewedAt
- }
- %% ===== 服务 / DTO =====
- class ScoringAlgorithm {
- +double dPrime(hits, fa, n)
- +double beta(hr, far)
- +double tScore(x, mean, sd, direction)
- +double aggregateDimension(items, norms)
- +double icc(sources)
- +double confidence(completeness, consistency)
- +Map renormalizeWeights(missing)
- }
- class NormService {
- +AssessmentMetricNorm getNorm(metricCode, gender, ageMonths)
- }
- class DimensionMeasureService {
- +Result submit(MeasureSubmitRequest)
- +List~DimensionMeasure~ list(childId, dimension)
- }
- class DimensionScoreService {
- +DimensionScore compute(childId, dimension)
- +DimensionScoreVO getLatest(childId, dimension)
- }
- class HealthIndexService {
- +HealthIndexSnapshot compute(childId)
- +HealthIndexVO getLatest(childId)
- }
- class DimensionAssessmentController {
- +Result submitMeasures()
- +Result getDimensionScore()
- +Result getHealthIndex()
- +Result recompute()
- }
- %% ===== 关系 =====
- AssessmentMetric "1" --> "0..*" AssessmentMetricNorm : 定义常模
- DimensionMeasure --> AssessmentMetric : 归属指标(metricCode)
- DimensionMeasureService ..> DimensionMeasure : CRUD
- DimensionScoreService ..> DimensionMeasure : 聚合
- DimensionScoreService ..> NormService : 取常模
- DimensionScoreService ..> ScoringAlgorithm : 计分
- HealthIndexService ..> DimensionScoreService : 取五维分
- HealthIndexService ..> ScoringAlgorithm : 聚合
- DimensionAssessmentController ..> DimensionMeasureService
- DimensionAssessmentController ..> DimensionScoreService
- DimensionAssessmentController ..> HealthIndexService
- EnergyService ..> HealthIndexService : 读取快照(替换healthIndex=0)
- HealthDimensionVO *-- DimensionItem
- EnergyService ..> HealthDimensionVO : 组装
|