value of DV_COUNT::magnitude as Integer or C_INTEGER?

Hello again!

Now, I have a new doubt, if for example I have the following
openehr_ELEMENT which value is a DV_COUNT datatype...

     ELEMENT[at0025] occurrences matches {0..1} matches { -- Rating
         value matches {
  DV_COUNT matches {
    magnitude matches {|0..10|}
  }
         }
     }

Then the property "magnitude" of DV_COUNT according to OpenEHR
specification should be an Integer, but here I think It's a C_INTEGER.

Then, should I represent all the Integer values as C_INTEGER elements?

Thank you very much!!

Hi Cati,

Yes, it is an INTEGER, which is (further) constrained by a C_INTEGER.
That means in an instance of this archetype, an INTEGER will be
recorded, AND this INTEGER has to be from 0 to 10... as defined by the
C_INTEGER constraint.

Cheers
Sebastian

Cati Martínez wrote:

Hi,

But I don't know how implement it. According to your reply, the
attribute "magnitude" should be of Integer type, If its type is
Integer, a primitive type, how can I associate the restriction
C_INTEGER to "magnitude" attribute.

Thank you again!

Hi Cati

In ADL C_INTEGER has the syntax as in ADL 1.4 |>=0| or some such constraint:

value matches {
DV_COUNT matches {
magnitude matches {|>=1|}
}
}

In XML the AOM constraint is expressed as:

value true true false false 1 1 DV_COUNT true true false false 1 1 magnitude true true false false 1 1 INTEGER true true false false 1 1 true false true 1

It is the same thing. The XML is very verbose as it is the full reference model specification so existence is expressed at every level.

The ADL and XML parsers in C# and Java are open source.

Cheers, Sam

Cati Martínez wrote:

(attachments)

OceanCsmall.png