# This topic needs a title

**URL:** <https://discourse.openehr.org/t/this-topic-needs-a-title/14751>\
**Category:** Reference Implementation: Java (archive)\
**Created:** [12 May 2008 23:03 UTC](https://discourse.openehr.org/t/this-topic-needs-a-title/14751 "2008-05-12T23:03:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jm1](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/j/db5fbb/32.png) [@jm1](https://discourse.openehr.org/u/jm1)\
**Post date:** [12 May 2008 23:03 UTC](https://discourse.openehr.org/t/this-topic-needs-a-title/14751/1 "2008-05-12T23:03:38Z")

</div>



---

<div class="post-metadata">

**Author:** ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)\
**Post date:** [18 September 2009 19:27 UTC](https://discourse.openehr.org/t/this-topic-needs-a-title/14751/2 "2009-09-18T19:27:30Z")

</div>

Hi,

I think this is a bug in the archetype parser, what do you think?

I’ve an archetype with this node:

ELEMENT[at0002] occurrences matches {0..1} matches { – Exploracion clinica cervical anormal  
value matches {  
DV\_BOOLEAN matches {  
value matches {True, False; True}  
}  
}  
}

So, with the specs of ADL (adl.pdf page 70: assumed values), True is the assumed value for the CPrimitiveObject that hodls the DV\_BOOLEAN constraint.

When I printout this node I get (assumed value “false”):

```auto
org.openehr.am.archetype.constraintmodel.CPrimitiveObject@1a4ab42[
  item=org.openehr.am.archetype.constraintmodel.primitive.CBoolean@1e7aa15
  assumedValue=false
  rmTypeName=DvBoolean
  occurrences=org.openehr.rm.support.basic.Interval@a7607a[lower=1,lowerIncluded=true,upper=1,upperIncluded=true]
  nodeID=
  parent=
  anyAllowed=false
  path=/data[at0001]/items[at0002]/value/value
]

```

Any ideas?

Cheers,  
Pablo Pazos Gutierrez  
[www.simplewebportal.net](http://www.simplewebportal.net)

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [21 September 2009 16:04 UTC](https://discourse.openehr.org/t/this-topic-needs-a-title/14751/3 "2009-09-21T16:04:53Z")

</div>

Hi Pablo,

the result you get sounds wrong, but I cannot reproduce it.  
I created the test archetype below and got the correct results for both DV\_BOOLEANs in it.

Can you share your archetype that fails (and also make sure you are using the latest Parser)?

Cheers  
Sebastian

org.openehr.am.archetype.constraintmodel.CComplexObject@8f4fb3[  
attributes=[org.openehr.am.archetype.constraintmodel.CSingleAttribute@29428e[  
rmAttributeName=value  
existence=REQUIRED  
children=[org.openehr.am.archetype.constraintmodel.CPrimitiveObject@1d04653[  
item=org.openehr.am.archetype.constraintmodel.primitive.CBoolean@1ad77a7  
assumedValue=true  
rmTypeName=DvBoolean  
occurrences=org.openehr.rm.support.basic.Interval@126804e[lower=1,lowerInclude  
d=true,upper=1,upperIncluded=true]  
nodeID=  
parent=  
anyAllowed=false  
path=/data[at0001]/events[at0002]/data[at0003]/items[at0004]/value/value  
]]  
anyAllowed=false  
path=/data[at0001]/events[at0002]/data[at0003]/items[at0004]/value/value  
]]  
assumedValue=  
rmTypeName=DV\_BOOLEAN  
occurrences=org.openehr.rm.support.basic.Interval@d2906a[lower=1,lowerIncluded  
=true,upper=1,upperIncluded=true]  
nodeID=  
parent=  
anyAllowed=false  
path=/data[at0001]/events[at0002]/data[at0003]/items[at0004]/value  
]  
org.openehr.am.archetype.constraintmodel.CComplexObject@72ffb[  
attributes=[org.openehr.am.archetype.constraintmodel.CSingleAttribute@1df38fd[

rmAttributeName=value  
existence=REQUIRED  
children=[org.openehr.am.archetype.constraintmodel.CPrimitiveObject@16a786[  
item=org.openehr.am.archetype.constraintmodel.primitive.CBoolean@1507fb2  
assumedValue=true  
rmTypeName=DvBoolean  
occurrences=org.openehr.rm.support.basic.Interval@1efb836[lower=1,lowerInclude  
d=true,upper=1,upperIncluded=true]  
nodeID=  
parent=  
anyAllowed=false  
path=/data[at0001]/events[at0002]/state[at0005]/items[at0006]/value/value  
]]  
anyAllowed=false  
path=/data[at0001]/events[at0002]/state[at0005]/items[at0006]/value/value  
]]  
assumedValue=  
rmTypeName=DV\_BOOLEAN  
occurrences=org.openehr.rm.support.basic.Interval@126e85f[lower=1,lowerInclude  
d=true,upper=1,upperIncluded=true]  
nodeID=  
parent=  
anyAllowed=false  
path=/data[at0001]/events[at0002]/state[at0005]/items[at0006]/value  
]

Archetype:

archetype (adl\_version=1.4)  
openEHR-EHR-OBSERVATION.testassumedvalue.v1

concept  
[at0000] – Test assumed value  
language  
original\_language = \<[ISO\_639-1::en]\>  
description  
original\_author = \<  
[“name”] = \<“”\>

> 

details = \<  
[“en”] = \<  
language = \<[ISO\_639-1::en]\>  
purpose = \<“test”\>  
use = \<“”\>  
misuse = \<“”\>

> 

lifecycle\_state = \<“Initial”\>  
other\_contributors = \<\>  
other\_details = \<  
[“references”] = \<“”\>  
[“MD5-CAM-1.0.1”] = \<“0B09C5A77713C376B458BDB09F83F018”\>

> 

definition  
OBSERVATION[at0000] matches { – Test assumed value  
data matches {  
HISTORY[at0001] matches { – Event Series  
events cardinality matches {1.._; unordered} matches {  
EVENT[at0002] occurrences matches {0..1} matches { – Any event  
data matches {  
ITEM\_TREE[at0003] matches { – Tree  
items cardinality matches {0.._; unordered} matches {  
ELEMENT[at0004] occurrences matches {0..1} matches { – New element  
value matches {  
DV\_BOOLEAN matches {  
value matches {True, False; True}  
}  
}  
}  
}  
}  
}  
state matches {  
ITEM\_TREE[at0005] matches { – Tree  
items cardinality matches {0..\*; unordered} matches {  
ELEMENT[at0006] occurrences matches {0..1} matches { – New element  
value matches {  
DV\_BOOLEAN matches {  
value matches {True, False; True}  
}  
}  
}  
}  
}  
}  
}  
}  
}  
}  
}

ontology  
term\_definitions = \<  
[“en”] = \<  
items = \<  
[“at0000”] = \<  
text = \<“Test assumed value”\>  
description = \<“unknown”\>

> 

[“at0001”] = \<  
text = \<“Event Series”\>  
description = \<“@ internal @”\>

> 

[“at0002”] = \<  
text = \<“Any event”\>  
description = \<“\*”\>

> 

[“at0003”] = \<  
text = \<“Tree”\>  
description = \<“@ internal @”\>

> 

[“at0004”] = \<  
text = \<“New element”\>  
description = \<“\*”\>

> 

[“at0005”] = \<  
text = \<“Tree”\>  
description = \<“@ internal @”\>

> 

[“at0006”] = \<  
text = \<“New element”\>  
description = \<“\*”\>

> 

pablo pazos wrote:

> **(attachments)**
>
> ![oceanlogo.png](https://discourse.openehr.org/images/transparent.png)

---

<div class="post-metadata">

**Author:** ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)\
**Post date:** [21 September 2009 17:05 UTC](https://discourse.openehr.org/t/this-topic-needs-a-title/14751/4 "2009-09-21T17:05:07Z")

</div>

Hi Sebastian,

Of course, here’s the archetype.

The parser I’m using is: adl-parser-1.0.2-SNAPSHOT.jar, I don’t know if it’s the latest.

I’ll try to parse your archetype to see what happens.

Cheers,  
Pablo Pazos Gutierrez.

> **(attachments)**
>
> ![oceanlogo.png](https://discourse.openehr.org/images/transparent.png)  
> [openEHR-EHR-EVALUATION.columna\_vertebral.v1.adl](https://discourse.openehr.org/404) (1.99 KB)

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [22 September 2009 08:22 UTC](https://discourse.openehr.org/t/this-topic-needs-a-title/14751/5 "2009-09-22T08:22:25Z")

</div>

Hi Pablo,

your archetype gives me this output below which I believe is correct.  
If you are building it from the source make sure you have updated all files before using maven.  
Otherwise try to download the jar from here: [http://www.openehr.org/wiki/display/projects/Java+Project+Download](http://www.openehr.org/wiki/display/projects/Java+Project+Download)

Rong, the Integration server at [http://openehr.cambiosys.org/continuum](http://openehr.cambiosys.org/continuum) (linked from [http://www.openehr.org/projects/java.html](http://www.openehr.org/projects/java.html) ) doesn’t seem to be available at present?

Cheers  
Sebastian

org.openehr.am.archetype.constraintmodel.CComplexObject@8f4fb3[  
attributes=[org.openehr.am.archetype.constraintmodel.CSingleAttribute@29428e[  
rmAttributeName=value  
existence=REQUIRED  
children=[org.openehr.am.archetype.constraintmodel.CPrimitiveObject@1d04653[  
item=org.openehr.am.archetype.constraintmodel.primitive.CBoolean@1ad77a7  
**assumedValue=true**  
rmTypeName=DvBoolean  
occurrences=org.openehr.rm.support.basic.Interval@126804e[lower=1,lowerInclude  
d=true,upper=1,upperIncluded=true]  
nodeID=  
parent=  
anyAllowed=false  
path=/data[at0001]/items[at0002]/value/value  
]]  
anyAllowed=false  
path=/data[at0001]/items[at0002]/value/value  
]]  
assumedValue=  
rmTypeName=DV\_BOOLEAN  
occurrences=org.openehr.rm.support.basic.Interval@d2906a[lower=1,lowerIncluded  
=true,upper=1,upperIncluded=true]  
nodeID=  
parent=  
anyAllowed=false  
path=/data[at0001]/items[at0002]/value  
]

pablo pazos wrote:

> **(attachments)**
>
> ![oceanlogo.png](https://discourse.openehr.org/images/transparent.png)

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [23 September 2009 11:11 UTC](https://discourse.openehr.org/t/this-topic-needs-a-title/14751/6 "2009-09-23T11:11:11Z")

</div>

Hi Sebastian,

Thanks for helping out.

Yes, I am aware of the issue with the integration server. Will look into this.

Cheers,  
Rong

2009/9/22 Sebastian Garde \<[sebastian.garde@oceaninformatics.com](mailto:sebastian.garde@oceaninformatics.com)\>

---

<div class="post-metadata">

**Author:** ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)\
**Post date:** [3 October 2009 16:19 UTC](https://discourse.openehr.org/t/this-topic-needs-a-title/14751/7 "2009-10-03T16:19:33Z")

</div>

Hi Sebastian,

Thanks for testing this issue.  
I have all files updated from [http://www.openehr.org/svn/ref\_impl\_java/TRUNK/](http://www.openehr.org/svn/ref_impl_java/TRUNK/), and the maven build generates the XXX.1.0.2-SNAPSHOT.jar that I’m using.  
So I think this may be a new bug, because in the XXX.1.0.1.jar version of the java ref impl you get the correct value.

For now I’ll grab the 1.0.1 jars to continue with my implementation.

Thanks a lot!

Cheers,  
Pablo Pazos Gutierrez  
[http://pablo.swp.googlepages.com/](http://pablo.swp.googlepages.com/)

> **(attachments)**
>
> ![oceanlogo.png](https://discourse.openehr.org/images/transparent.png)  
> ![oceanlogo.png](https://discourse.openehr.org/images/transparent.png)

---

<div class="post-metadata">

**Author:** ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)\
**Post date:** [17 October 2009 21:24 UTC](https://discourse.openehr.org/t/this-topic-needs-a-title/14751/8 "2009-10-17T21:24:32Z")

</div>

Hi,

I have another problem with assumedValue of the DvBoolean, may be you can help me out.

If I’ve this (I mean “no assumed value”):

DV\_BOOLEAN matches {  
value matches {True, False}  
}

The assumed value of this node in the AOM instance is “false” and I think it must be a “null” assumed value.

Is it the spected behavior?  
Is correct to have a null assumed value for a CBoolean constraint?  
Any ideas?

Thanks a lot,  
Pablo Pazos Gutiérrez.

> **(attachments)**
>
> ![oceanlogo.png](https://discourse.openehr.org/images/transparent.png)  
> ![oceanlogo.png](https://discourse.openehr.org/images/transparent.png)

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [20 October 2009 08:29 UTC](https://discourse.openehr.org/t/this-topic-needs-a-title/14751/9 "2009-10-20T08:29:44Z")

</div>

2009/10/17 pablo pazos \<[pazospablo@hotmail.com](mailto:pazospablo@hotmail.com)\>

> Hi,
> 
> I have another problem with assumedValue of the DvBoolean, may be you can help me out.
> 
> If I’ve this (I mean “no assumed value”):
> 
> DV\_BOOLEAN matches {  
> value matches {True, False}  
> }
> 
> The assumed value of this node in the AOM instance is “false” and I think it must be a “null” assumed value.
> 
> Is it the spected behavior?  
> Is correct to have a null assumed value for a CBoolean constraint?  
> Any ideas?
> 
> Thanks a lot,  
> Pablo Pazos Gutiérrez.
> 
> * * *

Hi Pablo,

The assumedValue attribute of CBoolean is a primitive boolean so it can’t return null. In the case you provided, it’s better to check if hasAssumedValue returns true before proceed to take assumedValue.

By the way, please in the future try not to reply to lengthy posts directly since the response mail can be too big to pass the list server.

Cheers,  
Rong

---

<div class="post-metadata">

**Author:** ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)\
**Post date:** [25 October 2009 19:00 UTC](https://discourse.openehr.org/t/this-topic-needs-a-title/14751/10 "2009-10-25T19:00:08Z")

</div>

Hi Rong,

hasAssumedValue work fine if I do something like: cPrimitiveObject.item.hasAssumedValue()  
but if I do: cPrimitiveObject.hasAssumedValue() it always return true, I think if the item of the CPrimitiveObject  
don’t have an asssumed value, cPrimitiveObject.hasAssumedValue() must return false, is it correct?

Thanks!

Pablo.
