diff --git a/examples/qoc_indicatorset.1.json b/examples/qoc_indicatorset.1.json index 5e5b205..ee294a3 100644 --- a/examples/qoc_indicatorset.1.json +++ b/examples/qoc_indicatorset.1.json @@ -2,6 +2,7 @@ "key": "ZOO-dm", "name": "Diabetes Mellitus type 2", "refDate": "2023-07-01", + "calculating": 1, "chapters": [ { "title": "Opbouw DM ketenzorg patiënten", @@ -12,17 +13,17 @@ "title": "Prevalentie DM", "index": 1, "xMin": 0, - "xMax": 10.5, - "markers": [2.0, 8.2], - "style": "met", - "counts": [232, 2268], + "xMax": 0.10500000000000001, + "markers": [.02, .07], + "style": "normal", "bars": [ { "legend": "Praktijk 2023Q3", + "pop": 2810, "segments": [ { - "style": "measured", - "value": 9.28 + "style": "good", + "value": 0.03024911 } ] }, @@ -30,8 +31,8 @@ "legend": "ZEL 2023Q3", "segments": [ { - "style": "measured", - "value": 4.919984 + "style": "good", + "value": 0.04919984 } ] } @@ -45,30 +46,46 @@ "basedOn": "ZOO-dm-prevalentie-1", "index": 2, "xMin": 0, - "xMax": 100, + "xMax": 1, "style": "normal", - "legend": { - "cat1": "T1", - "cat2": "T2", - "problem1": "Beide", - "problem2": "Onbekend" - }, - "counts": [25, 199, 8, 0], + "legend": [ + { + "title": "T1", + "category": "cat1", + "value": 25 + }, + { + "title": "T2", + "category": "cat2", + "value": 199 + }, + { + "title": "Beide", + "category": "problem1", + "value": 8 + }, + { + "title": "Onbekend", + "category": "problem2", + "value": 0 + } + ], + "legendTotal": 232, "bars": [ { "legend": "Praktijk 2023Q3", "segments": [ { "style": "cat1", - "value": 10.775862 + "value": .10775862 }, { "style": "cat2", - "value": 85.775862 + "value": .85775862 }, { "style": "problem1", - "value": 3.448276 + "value": .03448276 }, { "style": "problem2", @@ -81,19 +98,19 @@ "segments": [ { "style": "cat1", - "value": 9.00225056 + "value": .0900225056 }, { "style": "cat2", - "value": 86.996749 + "value": .86996749 }, { "style": "problem1", - "value": 2.313078 + "value": .02313078 }, { "style": "problem2", - "value": 1.68792198 + "value": .0168792198 } ] } diff --git a/schemas/Indicator.yaml b/schemas/Indicator.yaml index 923819b..d4d62fb 100644 --- a/schemas/Indicator.yaml +++ b/schemas/Indicator.yaml @@ -24,20 +24,20 @@ properties: example: 1 xMin: description: |- - Numeric value of the far left of the bar; represents a percentage (i.e. 0-100). + Numeric value of the far left of the bar; represents a ratio (0.0-1.0). Most indicators range from 0% to 100%, but for some, where the values to be shown represent only a small percentage, the bar is 'zoomed in'; it represents only a slice of the total range. type: number - example: 10.0 - default: 0 + example: .05 + default: 0.0 xMax: description: |- - Numeric value of the far right of the bar; represents a percentage (i.e. 0-100). + Numeric value of the far right of the bar; represents a ratio (0.0-1.0). Most indicators range from 0% to 100%, but for some, where the values to be shown represent only a small percentage, the bar is 'zoomed in'; it represents only a slice of the total range. type: number - example: 20.0 - default: 100.0 + example: .105 + default: 1.0 markers: description: |- A marker is rendered on the percentage bar and represents a noteworthy boundary, for example, for a prevalence indicator, @@ -47,7 +47,7 @@ properties: type: array items: type: number - example: [25, 80] + example: [.25, .80] unitDesc: description: |- *OPTIONAL* describes the unit that the stated legend values are in, in dutch, and *HTML*. For example, if showing blood pressure, `mmHg`. If missing, treat as the empty string (do not show unit at all). @@ -65,10 +65,9 @@ properties: example: failed default: normal enum: - - failed - normal - - met - - focus + - pass + - fail counts: description: >- *OPTIONAL* If present, the actual values (i.e. number of patients) for each segment of the main bar; if the bar is not complete @@ -80,14 +79,55 @@ properties: legend: description: >- *OPTIONAL* If present, render a legend box with the card explaining what each kind of segment (see `bars > segments`) represents. - Each key/value pair in this object maps a style (as used in `bars > segments > style`) onto a very short, dutch, *HTML* description. - type: object + Each item in this array maps maps a style (as used in `bars > segments > style`) onto a very short, dutch, *HTML* description. + type: array + items: + type: object + properties: + title: + description: The short, human readable description (dutch, *HTML*). + type: string + category: + description: A key indicating which style to apply this segment / legend. + type: string + enum: + - preferred + - alternative + - negative + - regProblem + - red + - orange + - high + - good + - low + - yes + - await + - no + - late + - concern + - mild + - serious + value: + description: The amount of patients in this segment for the main bar. + type: number example: |- - { - "serious": "≥140", - "concern": "120-140", - "good": "≤120" - } + [ + { + "title": "≥140", + "category": "serious", + "value": 11 + }, + { + "title": "120-140", + "category": "concern", + "value" 50 + }, + { + "title": "≤120", + "category": "good", + "value": 60 + } + ] bars: type: array items: @@ -129,20 +169,12 @@ properties: style: description: |- Describes what kind of ratio this segment describes. - Each segment represents some kind of ratio and this describes the nature of it. Render the segment according to its style. For example, `serious` (indicating a group of patients whose lab result for this indicator is of serious concern, i.e. medically speaking quite bad news) could be rendered dark red. + Each segment represents some kind of ratio and this describes the nature of it. Render the segment according to its style. For example, `serious` (indicating a group of patients whose lab result for this indicator is of serious concern, i.e. medically speaking quite bad news) could be rendered dark red. Same categories as `legend` - `category` type: string example: concern - enum: - - good - - concern - - problem - - serious - - measured - - nonPrefMeasured - - 'TBD: There are many more.' value: description: |- - The value (in percent). For example, if `xMin` is 10, `xMax` is 40, and this is 20, render this segment at 33% of - the total length (because 20 is a third of the way in, in the range 10-40). + The value (in percent). For example, if `xMin` is .10, `xMax` is .40, and this is .20, render this segment at 33% of + the total length (because .20 is a third of the way in, in the range .10-.40). type: number - example: 29.72 + example: 0.2972