# Valid values **Category:** [Clinical (archive)](https://discourse.openehr.org/c/clinical-archive/153) **Created:** 2011-05-23 12:43 UTC **Views:** 10 **Replies:** 3 **URL:** https://discourse.openehr.org/t/valid-values/12697 --- ## Post #1 by @yampeku I have a doubt about valid values \(or ranges\) for clinical data\. Has clinical sense to define a range with discontinuous domain? I am thinking if something like 'critical range' with \[\-100, 0\] and \[100, 200\] makes sense at all\. Or maybe something like 'any positive or negative number but zero' \]\-inf,0\[ & \]0,\+inf\[ I am not talking about normal or reference ranges, but more on the kind of ranges that are currently being archetyped --- ## Post #2 by @thomas.beale At the moment there is the possibility to define intervals like the following (from the ADL spec): Examples of 2-sided intervals include: - length matches {|1000|} -- point interval of 1000 (=fixed value) - length matches {|950..1050|} -- allow 950 - 1050 - length matches {|0..1000|} -- allow 0 - 1000 - length matches {|0..<1000|} -- allow 0>= x <1000 - length matches {|0>..<1000|} -- allow 0> x <1000 - length matches {|100+/-5|} -- allow 100 +/- 5, i.e. 95 - 105 - rate matches {|0..infinity|} -- allow 0 - infinity, i.e. same as >= 0 Examples of one-sided intervals include: - length matches {|<10|} -- allow up to 9 - length matches {|>10|} -- allow 11 or more - length matches {|<=10|} -- allow up to 10 - length matches {|>=10|} -- allow 10 or more The Interval type doesn't cope with sets of intervals, i.e. disjoint intervals, and I am not sure that it should directly. If there was a need, we would probably define a new kind of type allowing disjoint intervals. But.... is there a real need? - thomas --- ## Post #3 by @yampeku That was exactly my question :\) I can see something like the 'critical range' that I defined earlier being used\. If you want to build archetypes about "wrong" status it is quite possible that you want to define disjoint intervals \(if you have a range of "healthy" values, then the inverse disjoint interval lets you define the "unhealthy" range\) --- ## Post #4 by @thomas.beale it can be done in current ADL/AOM as follows: some_attr matches { DV_QUANTITY [at0001] matches { magnitude matches {|-200..-100|} } DV_QUANTITY [at0002] matches { magnitude matches {|100..300|} } } The above means that the two DV_QUANTITYs are alternatives for the single-valued attribute some_attr (and effectively the same even if some_attr is a container). So values like -50, 0, + 50 will all fail the above constraints. Is this close enough to what you want? - thomas --- **Canonical:** https://discourse.openehr.org/t/valid-values/12697 **Original content:** https://discourse.openehr.org/t/valid-values/12697