[careprogram] Changed how legends and the counts work (they are now one integrated object), fixed percentage v ratio

EH/population-statistics-authorisation
Reinier Zwitserloot 2 years ago
parent f1b164b09a
commit 863635f859
No known key found for this signature in database
GPG Key ID: DADEDCAA42950296

@ -2,6 +2,7 @@
"key": "ZOO-dm", "key": "ZOO-dm",
"name": "Diabetes Mellitus type 2", "name": "Diabetes Mellitus type 2",
"refDate": "2023-07-01", "refDate": "2023-07-01",
"calculating": 1,
"chapters": [ "chapters": [
{ {
"title": "Opbouw DM ketenzorg patiënten", "title": "Opbouw DM ketenzorg patiënten",
@ -12,17 +13,17 @@
"title": "Prevalentie DM", "title": "Prevalentie DM",
"index": 1, "index": 1,
"xMin": 0, "xMin": 0,
"xMax": 10.5, "xMax": 0.10500000000000001,
"markers": [2.0, 8.2], "markers": [.02, .07],
"style": "met", "style": "normal",
"counts": [232, 2268],
"bars": [ "bars": [
{ {
"legend": "Praktijk 2023Q3", "legend": "Praktijk 2023Q3",
"pop": 2810,
"segments": [ "segments": [
{ {
"style": "measured", "style": "good",
"value": 9.28 "value": 0.03024911
} }
] ]
}, },
@ -30,8 +31,8 @@
"legend": "ZEL 2023Q3", "legend": "ZEL 2023Q3",
"segments": [ "segments": [
{ {
"style": "measured", "style": "good",
"value": 4.919984 "value": 0.04919984
} }
] ]
} }
@ -45,30 +46,46 @@
"basedOn": "ZOO-dm-prevalentie-1", "basedOn": "ZOO-dm-prevalentie-1",
"index": 2, "index": 2,
"xMin": 0, "xMin": 0,
"xMax": 100, "xMax": 1,
"style": "normal", "style": "normal",
"legend": { "legend": [
"cat1": "T1", {
"cat2": "T2", "title": "T1",
"problem1": "Beide", "category": "cat1",
"problem2": "Onbekend" "value": 25
},
{
"title": "T2",
"category": "cat2",
"value": 199
},
{
"title": "Beide",
"category": "problem1",
"value": 8
}, },
"counts": [25, 199, 8, 0], {
"title": "Onbekend",
"category": "problem2",
"value": 0
}
],
"legendTotal": 232,
"bars": [ "bars": [
{ {
"legend": "Praktijk 2023Q3", "legend": "Praktijk 2023Q3",
"segments": [ "segments": [
{ {
"style": "cat1", "style": "cat1",
"value": 10.775862 "value": .10775862
}, },
{ {
"style": "cat2", "style": "cat2",
"value": 85.775862 "value": .85775862
}, },
{ {
"style": "problem1", "style": "problem1",
"value": 3.448276 "value": .03448276
}, },
{ {
"style": "problem2", "style": "problem2",
@ -81,19 +98,19 @@
"segments": [ "segments": [
{ {
"style": "cat1", "style": "cat1",
"value": 9.00225056 "value": .0900225056
}, },
{ {
"style": "cat2", "style": "cat2",
"value": 86.996749 "value": .86996749
}, },
{ {
"style": "problem1", "style": "problem1",
"value": 2.313078 "value": .02313078
}, },
{ {
"style": "problem2", "style": "problem2",
"value": 1.68792198 "value": .0168792198
} }
] ]
} }

@ -24,20 +24,20 @@ properties:
example: 1 example: 1
xMin: xMin:
description: |- 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, 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. the bar is 'zoomed in'; it represents only a slice of the total range.
type: number type: number
example: 10.0 example: .05
default: 0 default: 0.0
xMax: xMax:
description: |- 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, 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. the bar is 'zoomed in'; it represents only a slice of the total range.
type: number type: number
example: 20.0 example: .105
default: 100.0 default: 1.0
markers: markers:
description: |- description: |-
A marker is rendered on the percentage bar and represents a noteworthy boundary, for example, for a prevalence indicator, 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 type: array
items: items:
type: number type: number
example: [25, 80] example: [.25, .80]
unitDesc: unitDesc:
description: |- 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). *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 example: failed
default: normal default: normal
enum: enum:
- failed
- normal - normal
- met - pass
- focus - fail
counts: counts:
description: >- 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 *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: legend:
description: >- description: >-
*OPTIONAL* If present, render a legend box with the card explaining what each kind of segment (see `bars > segments`) represents. *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. 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 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: |- example: |-
[
{
"title": "≥140",
"category": "serious",
"value": 11
},
{
"title": "120-140",
"category": "concern",
"value" 50
},
{ {
"serious": "≥140", "title": "≤120",
"concern": "120-140", "category": "good",
"good": "≤120" "value": 60
} }
]
bars: bars:
type: array type: array
items: items:
@ -129,20 +169,12 @@ properties:
style: style:
description: |- description: |-
Describes what kind of ratio this segment describes. 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 type: string
example: concern example: concern
enum:
- good
- concern
- problem
- serious
- measured
- nonPrefMeasured
- 'TBD: There are many more.'
value: value:
description: |- 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 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 total length (because .20 is a third of the way in, in the range .10-.40).
type: number type: number
example: 29.72 example: 0.2972

Loading…
Cancel
Save