This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

Difference between revisions of "DataTypes Comments Section 3"

From HL7Wiki
Jump to navigation Jump to search
 
Line 53: Line 53:
 
*# Definition 67 line 4 - (x.notEmpty and (y.isEmpty)).or(x.isEmpty.and(y.'' '''not''' ''Empty)).implies(x.equal(y).not);
 
*# Definition 67 line 4 - (x.notEmpty and (y.isEmpty)).or(x.isEmpty.and(y.'' '''not''' ''Empty)).implies(x.equal(y).not);
 
* [http://wiktolog.com/hl7/datatypes.html#dt-SET 3.7 Set (SET) specializes ANY]
 
* [http://wiktolog.com/hl7/datatypes.html#dt-SET 3.7 Set (SET) specializes ANY]
 +
*# P1 Could (and shouldn't) the constraints be stated as invariants instead of directives? (NOTE: It turns out it is... why is it necessary to put the "SHALL NOT" here? I'd say either (a) remove it or (b) add "SHALL NOT"s for ''every'' invariant (I prefer (a)...))
 +
*# P3 & P4 -  I wonder whether it wouldn't help to move this to the DSET / QSET sections?
 +
*# You ''may'', however, want to emphasize the fact that a SET ''isn't'' a collection!
 +
*# 3.7.1 P2 - This is the primitive <strike>semantic</strike> property of a set, based...
 +
*# "values for which the comparator is unable to differentiate cannot be elements of a set." - Is this a value or a type level constraint?  If I had only one null element, would this be a value(s) that the comparator is unable to differentiate?
 +
*# The second invariant in Definition 72: Is it true that ALL CEQ comparators cannot differentiate nulls?
 
* [http://wiktolog.com/hl7/datatypes.html#dt-COMP 3.8 Comparator (COMP)]
 
* [http://wiktolog.com/hl7/datatypes.html#dt-COMP 3.8 Comparator (COMP)]
 +
*# "An example of a custom comparator might be to specify that a particular SET  of TEL is allowed to contain the same telephone number more than once if it has different useablePeriod properties. In this case, compares should return false if only one of the two TELs has a useablePeriod, or if they both do and they are different." - while this is a believable example, it is somewhat misleading with respect to the intent of TEL, and appears to imply that "TEL" is equivalent to "Telephone".  At bare minimum, you might want to switch to saying "telecommunications address".
 
* [http://wiktolog.com/hl7/datatypes.html#dt-CEQ 3.9 EqualComparator (CEQ)]
 
* [http://wiktolog.com/hl7/datatypes.html#dt-CEQ 3.9 EqualComparator (CEQ)]
 
* [http://wiktolog.com/hl7/datatypes.html#dt-DSET 3.10 Discrete Set (DSET) specializes SET and COLL]
 
* [http://wiktolog.com/hl7/datatypes.html#dt-DSET 3.10 Discrete Set (DSET) specializes SET and COLL]
 
* [http://wiktolog.com/hl7/datatypes.html#dt-HXIT 3.11 History Item (HXIT) specializes T]
 
* [http://wiktolog.com/hl7/datatypes.html#dt-HXIT 3.11 History Item (HXIT) specializes T]
 +
*# a little verbiage on why this esoteric property exists would be much appreciated, especially as "controlActIdRef" isn't exactly a property like any other seen here to date.
 
* [http://wiktolog.com/hl7/datatypes.html#dt-HIST 3.12 History (HIST) specializes LIST<HXIT>]
 
* [http://wiktolog.com/hl7/datatypes.html#dt-HIST 3.12 History (HIST) specializes LIST<HXIT>]

Latest revision as of 21:59, 8 March 2008

3 Foundation Types

  1. The section title is "Foundation Types" and the figure title is "Fundamental data types"
  • 3.1 DataValue (ANY)
    1. Defines the basic properties of every data value The basic properties common to all data values defined... (Definitions shouldn't say what things do, they should say what they are)
    2. dataType - "Every properdata value implicitly or explicitly caries...
    3. The formatting is a little difficult to follow - it isn't clear where the sentence that begins with "A data type MAY.." is connected with nullFlavor or dataType.
    4. The UML diagram includes "equals", yet it isn't in the property summary. Is this because of the "fuzzy" nature of the summaries?
    5. The UML diagram has "equals" and the formal definition has "equal".
    6. The formal definition has "identical", which isn't in the UML diagram.
    7. 3.1.1 - (a) what is a proper data value? (b) why can't a data value carry information explicitly?
    8. 3.1.1 - can't we replace (§ ) w/ something more useful? This won't even work in a non-html environment
    9. 3.1.1 "An exceptional value may not have a type specified by either the context or the instance" - what is the context? What is the instance?
    10. 3.1.1 Why isn't the INV/not any constraint declared as an invariant?
    11. 3.1.2 P3 - "imposed by the [[Constraining Model]]." - wiki markup?
    12. 3.1.2 P5 - "See [[Conformance]] for further information." - more markup?
    13. Table 5 - something is wrong with the formatting here.
    14. Table 5 - maybe this would be a good place to stick the information about codes and levels - either that or put the code and level explanation in an appendix and reference it here?
    15. Table 5 - the difference between INV and OTH appears to be that of INV is "The value as represented in the instance" being invalid ant OTH being "The actual value". I have no clue what this distinction is.
    16. Table 5 - OTH - we need (e.g. concept code not required by code system, integer is too large or small to represent, etc.). The single example is confusing - especially given the NINF and PINF children.
    17. Table 5 - UNC - originalText isn't a component of ANY, so what can this mean? Furthermore, the paragraph below states "If the data type is not null, then the nullFlavor will be null." Where, exactly, would the originalText go?
    18. Table 5 - QS - This is really curious, as it seems to imply a non-null data value and instead should be an imprecise result. I assume that this issue has been properly discussed? (NOTE: I see that it has in the sections below and in "Definition 27".)
    19. Table 5 - TRC - Same as QS
    • "The only case where non-proper (NULL) values may be equal is where both values have a nullFlavor of NA. In all most other cases, the outcome of comparing NULL values is also null. However, there are exceptions based on the semantic meaning of nullFlavor.
    • For instance, although direct comparison of two values with nullFlavor PINF is always null (NI), two intervals with the equal low bounds and high bounds of PINF will return true, since they specify the same set. - I'm not sure that I understand this example. Isn't there a difference between (a) stating that an interval doesn't have an upper bound and (b) stating that the upper bound is too large to be encoded in the value (which I guess I'm assuming the implicit of PINF is)? Or have I misinterpreted the meaning of PINF and NINF? What would be the nullFlavor, say, for an integer that is too large to encode in a particular ITS?
    1. "but the constraining model specifies that the age must be less than 100 years, the age may still be specified, provided that the model does not make the attribute mandatory." - I'm not sure I'm following here. IF I say that the age field is optional, and must be less than 100 years, it is ok to pass what the actual age is (120) in the value, even if the data is stated to be null. IF, however, I say that age is required and it must be less than 100, I can no longer supply the actual age?
    2. "Where the difference of null flavors is not significant,..." - how do I know whether it is or isn't?
    3. "When a property (i.e. RIM attribute, or message field) is labeled mandatory, and the container is not null itself, then any value assigned to the property SHALL be nonNull." - what is a "null container"?
    4. "For example physical quantity () has the two semantic properties
  • 3.2 DataType (TYPE) specializes ANY
    1. The definition doesn't define - it says why the thing exists. That might be a note, but why wouldn't a DataType be The name of a data type or something similar?
    2. See (§ ) for further information. What's a (§ )?
    3. While this section is ok by and large, the use of CS is a tad curious. Is there really a CS for long names?
    4. Can a datatype be null? What does that mean?
    5. What is the literal form of a datatype?
  • 3.3 Boolean (BL) specializes ANY
    1. The truth tables are badly formatted...
    2. "Where a boolean operation is performed upon 2 data types with different nullFlavors, the nullFlavor of the result is the first common ancestor of the 2 different nullFlavors, though conformant applications may also create a result that is any common ancestor." - If conformant applications can use any common ancestor, why even bother to say the first part?
    3. Why is the "literal" stuck right in the middle of the other operations?
  • 3.4 Collection (COLL) specializes ANY
    1. An collection of values...
    2. "To require that a collection have at least one item, the minimum multiplicity of the attribute must be constrained to 1 or more" - at first I was going to say "Well, duh?", but then I realized that I actually didn't understand what this was saying. I've got "notEmpty" and "count", and it seems like I could either assert the invariant that nonEmpty.equals(true) or that count.gt.(0). I have no idea where one might set the minimum multiplicity, however. Clarification?
    3. What is the significance of a null not empty or a null count? How can a collection not know?
    4. Contains - what comparison operator is used?
  • 3.5 Bag (BAG) specializes ANY
    1. It might be useful to include a parenthetical explanation of the "zero.isZero" construct - it can be a tad confusing.
    2. Why the empty bag rather than An empty bag?
  • 3.6 Sequence (LIST) specializes ANY
    1. "Notice that head and tail being NULL and tail being empty ...
    2. List appears to pay no attention to null flavor - correct? This means that a list containing a null NINF item would return true when asked whether it contained an item of PINF?
    3. ... then the result of the operation is undefined. Not any form of null?
    4. Definition 66 - end.greaterOrEqual(0)) {
    5. What is the result of a comparison when T doesn't comare U? (equality)
    6. Definition 67 line 4 - (x.notEmpty and (y.isEmpty)).or(x.isEmpty.and(y. not Empty)).implies(x.equal(y).not);
  • 3.7 Set (SET) specializes ANY
    1. P1 Could (and shouldn't) the constraints be stated as invariants instead of directives? (NOTE: It turns out it is... why is it necessary to put the "SHALL NOT" here? I'd say either (a) remove it or (b) add "SHALL NOT"s for every invariant (I prefer (a)...))
    2. P3 & P4 - I wonder whether it wouldn't help to move this to the DSET / QSET sections?
    3. You may, however, want to emphasize the fact that a SET isn't a collection!
    4. 3.7.1 P2 - This is the primitive semantic property of a set, based...
    5. "values for which the comparator is unable to differentiate cannot be elements of a set." - Is this a value or a type level constraint? If I had only one null element, would this be a value(s) that the comparator is unable to differentiate?
    6. The second invariant in Definition 72: Is it true that ALL CEQ comparators cannot differentiate nulls?
  • 3.8 Comparator (COMP)
    1. "An example of a custom comparator might be to specify that a particular SET of TEL is allowed to contain the same telephone number more than once if it has different useablePeriod properties. In this case, compares should return false if only one of the two TELs has a useablePeriod, or if they both do and they are different." - while this is a believable example, it is somewhat misleading with respect to the intent of TEL, and appears to imply that "TEL" is equivalent to "Telephone". At bare minimum, you might want to switch to saying "telecommunications address".
  • 3.9 EqualComparator (CEQ)
  • 3.10 Discrete Set (DSET) specializes SET and COLL
  • 3.11 History Item (HXIT) specializes T
    1. a little verbiage on why this esoteric property exists would be much appreciated, especially as "controlActIdRef" isn't exactly a property like any other seen here to date.
  • 3.12 History (HIST) specializes LIST<HXIT>