Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-22655

No range or precision for is defined for "decimal" (just for its xml + json serializatoin)

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Persuasive
    • Icon: Medium Medium
    • FHIR Core (FHIR)
    • STU3
    • Modeling & Methodology
    • Datatypes
    • Hide

      We will change the description and regex for decimal to say that it can not have more than 18 digits and a decimal point.

      Show
      We will change the description and regex for decimal to say that it can not have more than 18 digits and a decimal point.
    • Grahame Grieve / Ron Shapiro: 8-0-0
    • Correction
    • Non-compatible
    • R5

    Description

      Today we say:

      > Rational numbers that have a decimal representation. See below about the precision of the number
      > Regex: -?(0|[1-9][0-9]*)(\.[0-9])?([eE][+-]?[0-9])?

      > XML Representation: union of xs:decimal and xs:double (see below for limitations)

      > JSON Representation: A JSON number (see below for limitations)

      So in the XML + JSON representations, we constrian these to being xs:decimal (at least 18 digits, on my reading) or xs:double (64 bit floating point) – but at the level of FHIR (e.g., for other serializations, or for internal models) they're jsut... arbitrarly large, arbitrarily precise values? Does a FHIR implementation need to cope with unlimited size and precision? Is there a reason we only state expectations on serialization formats? For the other data types, we explicit list details under "Value Domain", like:

      > Note that strings SHALL NOT exceed 1MB (1024*1024 characters) in size

      > A signed integer in the range ?2,147,483,648..2,147,483,647 (32-bit; for larger values, use decimal)

      Attachments

        Activity

          People

            Unassigned Unassigned
            jmandel Josh Mandel
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: