Commit 4ea42c2
committed
feat(streams): add HDSModelStreams.isContext() helper (plan 53 phase A)
Surfaces the new data-model `role: context` flag at the runtime layer. Returns
true iff a stream definition has role === 'context' (i.e. it's a descendant-
streamId marker for D3 context-via-substream resolution, not a data-bearing
bucket). Unknown streamIds return false — this is a yes/no probe, no throw.
Consumers (settings trees, form-section renderers, dashboards) should use
this to elide / mute / re-render context streams as metadata rather than as
independent input streams. D3 walk-up resolution (forEvent) is unaffected by
the flag.
4 new tests [CTXR-P/Q/R/S] in tests/contextResolution.test.js validate against
the locally-built data-model pack.json so the flag is sourced from real YAML.
Pairs with healthdatasafe/data-model#17 (role: context added to
treatment-fertility and procedure-fertility).1 parent e71501d commit 4ea42c2
3 files changed
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
3 | 10 | | |
4 | 11 | | |
5 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
107 | 126 | | |
108 | 127 | | |
109 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
79 | 94 | | |
80 | 95 | | |
81 | 96 | | |
| |||
0 commit comments