# C_CODED_TEXT, C_COUNT, C_QUANTITY, C_ORDINAL? **Category:** [Implementers (archive)](https://discourse.openehr.org/c/implementers-archive/158) **Created:** 2006-07-10 18:29 UTC **Views:** 3 **Replies:** 16 **URL:** https://discourse.openehr.org/t/c-coded-text-c-count-c-quantity-c-ordinal/13490 --- ## Post #1 by @Rodrigo_Filgueira1 Hi there, Working with Pablo, we fount these classes C_CODED_TEXT, C_COUNT, C_QUANTITY, C_ORDINAL in the AOM Java implementation of the CONSTRAINT package. These classes are not present in the spec, so some information about the would be useful. These are the questions we have: - What are they needed for? shouldn't their functionality be covered with assertions and AOM.Primitive package? - It seems that there is a mapping between these classes and the RM.DATA_TYPE package classes, if this is the case, should we expect to see more of these classes in the future? We also need more clarifications in respect to the C_SINGLE_ATTRIBUTE and the C_MULTIPLE_ATTRIBUTE classes form the constraint model. While trying to do a "paper based parser run" to see how an archetype maps to the AOM we got into strong differences regarding the use of C_SINGLE_ATTRIBUTE and C_MULTIPLE_ATTRIBUTE. One position defends that C_MULTIPLE_ATTRIBUTE is to be used for ITEM_STRUCTURE attributes no matter what it may contain. The other says it is to be used for collections at the same data_type objects. If you could please elaborate around this we'd be very thankful. thank you --- ## Post #2 by @rong.chen Rodrigo Filgueira wrote: > Hi there, > > Working with Pablo, we fount these classes C\_CODED\_TEXT, C\_COUNT, C\_QUANTITY, C\_ORDINAL in the AOM Java implementation of the CONSTRAINT package\. These classes are implemented according to some old specifications\. They don't exist anymore in the RM\. Some of them have been moved into openEHR Archetype Profile specification, which has just been implemented in the Java kernel\. > > These classes are not present in the spec, so some information about the would be useful\. > These are the questions we have: > > \- What are they needed for? shouldn't their functionality be covered with assertions and AOM\.Primitive package? Check openEHR Archetype Profile for further information\. http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/architecture/am/openehr_archetype_profile.pdf Rong --- ## Post #3 by @Rodrigo_Filgueira1 Rong, thanks for your answer, there were some other questions regarding AOM in my previous mail, you probably did not see. Here they go again. ... in respect to the C_SINGLE_ATTRIBUTE and the C_MULTIPLE_ATTRIBUTE classes form the constraint model. While trying to do a "paper based parser run" to see how an archetype is loaded into the AOM we got into strong differences regarding the use of C_SINGLE_ATTRIBUTE and C_MULTIPLE_ATTRIBUTE. One position defends that C_MULTIPLE_ATTRIBUTE is to be used for ITEM_STRUCTURE attributes no matter what it may contain. The other says it is to be used for collections of the same data_type objects. If you could please elaborate around this we'd be very thankful. thank you --- ## Post #4 by @pablo hi, we put the am\.openehr\_profile package in our program but we cant compile the CDvState class because it must implement the inherited method of CDomainType abstract class validValue \( \.\.\. \) which is in the spec\. thanks Pablo Pazos --- ## Post #5 by @rong.chen Pablo Pazos \- simplewebportal\.net wrote: > hi, > we put the am\.openehr\_profile package in our program but we cant compile the CDvState class because it must implement the inherited method of CDomainType abstract class validValue \( \.\.\. \) which is in the spec\. > > thanks > Pablo Pazos Get the latest code by "svn co http://svn.openehr.org/ref_impl_java/TRUNK/libraries"\. Then type "mvn clean test" in libraries folder\. If there is still build failure, please attach the error message to the post\. Cheers, Rong --- ## Post #6 by @thomas.beale Rodrigo Filgueira wrote: > Hi there, > > Working with Pablo, we fount these classes C\_CODED\_TEXT, C\_COUNT, C\_QUANTITY, C\_ORDINAL in the AOM Java implementation of the CONSTRAINT package\. > > These classes are not present in the spec, so some information about the would be useful\. > These are the questions we have: They are in the openEHR archetype profile spec \(http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/architecture/am/openehr_archetype_profile.pdf) > > \- What are they needed for? shouldn't their functionality be covered with assertions and AOM\.Primitive package? explanation is given in the ADL document \- see Section 9 of http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/architecture/am/adl.pdf > \- It seems that there is a mapping between these classes and the RM\.DATA\_TYPE package classes, if this is the case, should we expect to see more of these classes in the future? > generally we hope to limit these, they will most likely occur only at the level of the openEHR data types, i\.e\. things like C\_QUANTITY etc\. We don't have further plans to add more at this stage\. > We also need more clarifications in respect to the C\_SINGLE\_ATTRIBUTE and the C\_MULTIPLE\_ATTRIBUTE classes form the constraint model\. > > While trying to do a "paper based parser run" to see how an archetype maps to the AOM we got into strong differences regarding the use of C\_SINGLE\_ATTRIBUTE and C\_MULTIPLE\_ATTRIBUTE\. > > One position defends that C\_MULTIPLE\_ATTRIBUTE is to be used for ITEM\_STRUCTURE attributes no matter what it may contain\. The other says it is to be used for collections at the same data\_type objects\. > If you could please elaborate around this we'd be very thankful\. These types are actually very simple \- they just constrain the two kinds of attributes you get in object models: \- single: attributes like Person\.name: String \- multiple attributes like Person\.names: List<String>, History\.events: List<Event> C\_MULTIPLE\_ATTRIBUTE will occur in an archetype whenever attributes of the second kind are being constrained from the object model\. \- thomas --- ## Post #7 by @pablo The problem is that there is a method CDomainType\.validValue\(\) in the spec that is not in your implementation\. CDvState doesnt compile because i'm following the spec \(version 1 rev 2\.0\.1\) of the AOM that has the validValue\(\) method, if it's removed the compilation goes fine, my questions are: why is validValue\(\) defined in CDomainType? what kind of tasks need to call validValue\(\) of a CDomainType\(\) concrete class \(like CDvState\)? thanks, Pablo Pazos --- ## Post #8 by @pablo Hi, I found a class constraint\_model\.LeafConstraint in the java implementation which is not in the spec \(aom 1 rev 2\.0\.1\) what is wrong the implementation or the missing class in the spec? thanks Pablo Pazos --- ## Post #9 by @rong.chen Pablo Pazos, simplewebportal\.net wrote: > Hi, > I found a class constraint\_model\.LeafConstraint in the java implementation which is not in the spec \(aom 1 rev 2\.0\.1\) > what is wrong the implementation or the missing class in the spec? > > thanks > Pablo Pazos This is an abstract class extracted from CDomainType and CPrimitive because these two shared 4 identical methods which are used to describe a leave node constraint either it's a primitive type or domain type\. In fact, I would like to propose it to be included in the specification\. I am updating these classes now\. Cheers, Rong --- ## Post #10 by @pablo Hi, I found the ontology\.OntologyBinding class in the java ref impl but its not used\. Maybe is for future use or is a deprecated class\. cheers, Pablo --- ## Post #11 by @pablo Hi, I'm seeing the implementation of assignedValue method of CPrimitiveObject class at the ref impl java: public Object assignedValue\(Map<SystemValue, Object> systemValues,                                 ArchetypeOntology ontology\) \{         return item\.assignedValue\(\);     \} my question is why you pass all those parameters and do not use them? Pablo --- ## Post #12 by @rong.chen Pablo Pazos, simplewebportal\.net wrote: > The problem is that there is a method CDomainType\.validValue\(\) in the spec > that is not in your implementation\. CDvState doesnt compile because i'm following > the spec \(version 1 rev 2\.0\.1\) of the AOM that has the validValue\(\) method, if it's removed I guess you try to use part of the Java kernel code with your own AOM implementation\. It won't be necessary as soon as the kernel is updated\. > > the compilation goes fine, my questions are: why is validValue\(\) defined in CDomainType? > what kind of tasks need to call validValue\(\) of a CDomainType\(\) concrete class \(like CDvState\)? CDvState has a list of states which can be used to check if any given state is allowed\. Rong --- ## Post #13 by @rong.chen Pablo Pazos, simplewebportal\.net wrote: > Hi, I found the ontology\.OntologyBinding class in the java ref impl but its not used\. > Maybe is for future use or is a deprecated class\. > Used in ArchetypeOntology\. --- ## Post #14 by @rong.chen Pablo Pazos, simplewebportal\.net wrote: > Hi, > I'm seeing the implementation of assignedValue method of CPrimitiveObject class at the ref impl java: > > public Object assignedValue\(Map<SystemValue, Object> systemValues, >                                ArchetypeOntology ontology\) \{ >        return item\.assignedValue\(\); >    \} > > my question is why you pass all those parameters and do not use them? > > Pablo Because CPrimitiveObject is a wrapper of CPrimitive which is a constraint of primitive datatype\. Rong --- ## Post #15 by @pablo yes i found it later, my mistake, sorry --- ## Post #16 by @pablo > Pablo Pazos, simplewebportal\.net wrote: >> The problem is that there is a method CDomainType\.validValue\(\) in the >> spec >> that is not in your implementation\. CDvState doesnt compile because i'm >> following >> the spec \(version 1 rev 2\.0\.1\) of the AOM that has the validValue\(\) >> method, if it's removed > > I guess you try to use part of the Java kernel code with your own AOM > implementation\. It won't be necessary as soon as the kernel is updated\. But the problem is that there is a validValue\(\) method in the spec that is not in the implementation\. Pablo --- ## Post #17 by @rong.chen Pablo Pazos \- ar\.geocities\.com/urutech wrote: > > To: <openehr\-implementers@openehr\.org> > Sent: Friday, July 14, 2006 6:56 PM > Subject: Re: C\_CODED\_TEXT, C\_COUNT, C\_QUANTITY, C\_ORDINAL? > >> Pablo Pazos, simplewebportal\.net wrote: >>> The problem is that there is a method CDomainType\.validValue\(\) in the >>> spec >>> that is not in your implementation\. CDvState doesnt compile because i'm >>> following >>> the spec \(version 1 rev 2\.0\.1\) of the AOM that has the validValue\(\) >>> method, if it's removed >> >> I guess you try to use part of the Java kernel code with your own AOM >> implementation\. It won't be necessary as soon as the kernel is updated\. > > But the problem is that there is a validValue\(\) method in the spec that is > not in the implementation\. Yes, the kernel needs to be updated\. Rong --- **Canonical:** https://discourse.openehr.org/t/c-coded-text-c-count-c-quantity-c-ordinal/13490 **Original content:** https://discourse.openehr.org/t/c-coded-text-c-count-c-quantity-c-ordinal/13490