Dear all,
after parsing an archetype (openEHR-EHR-OBSERVATION.sample_blood_pressure.v1.adl - see below) which contains archetype slots I tried to use its AOM-representation to identify archetypes which are allowed for these slots.
I used the following code to display information on archetype slots:
private void printInfo (ArchetypeSlot archetypeSlot_, int iLevel_)
{
Iterator<Assertion> iterator_;
Assertion assertion_;
System.out.println("\n\n+ [Level: " + iLevel_ + "] " + archetypeSlot_.path());
System.out.println("- Class : " + archetypeSlot_.getClass().getName());
System.out.println("- RM Type : " + archetypeSlot_.getRmTypeName());
System.out.println("- Node-ID : " + archetypeSlot_.getNodeID());
System.out.println("- Any allowed? : " + archetypeSlot_.isAnyAllowed());
System.out.println("- Required : " + archetypeSlot_.isRequired());
System.out.println("- Occurences : " + archetypeSlot_.getOccurrences().getLower() +
" - " + archetypeSlot_.getOccurrences().getUpper());
// Includes
System.out.println("- Includes :");
if (archetypeSlot_.getIncludes() != null)
{
iterator_ = archetypeSlot_.getIncludes().iterator();
while (iterator_.hasNext())
{
assertion_ = (Assertion)iterator_.next();
System.out.println(" > " + assertion_.getStringExpression() +
" / " + assertion_.getTag());
}
}
else
{
System.out.println(" - ");
}
// Excludes
System.out.println("- Excludes :");
if (archetypeSlot_.getExcludes() != null)
{
iterator_ = archetypeSlot_.getIncludes().iterator();
while (iterator_.hasNext())
{
assertion_ = (Assertion)iterator_.next();
System.out.println(" > " + assertion_.getStringExpression() +
" / " + assertion_.getTag());
}
}
else
{
System.out.println(" > - ");
}
}
Unfortunately, I got the following output:
+ [Level: 2] /protocol[at0011]/items[at1025]
- Class : org.openehr.am.archetype.constraintmodel.ArchetypeSlot
- RM Type : CLUSTER
- Node-ID : at1025
- Any allowed? : false
- Required : false
- Occurences : 0 - null
- Includes :
null / null
- Excludes :
-
Even though, the ADL-file shows include infromation for the respective slot "assertion_.getStringExpression()" returns NULL.
How may I accees the required information (in this example "/openEHR-EHR-CLUSTER\.device\.v1/")?
Best regards,
Christian