Hi, I am getting good along with the java-tests and really start to
understand. I understand java-code better then documentation, I noticed.
I have one thing found which I don't understand, if it is to long to explain,
please point me to the docs where I can find the answer.
It is in the Java-code, in the testfile: ChildPatientV1Test.Java.
It is doing tests with archetype openEHR-demographic-PERSON.child_patient.v1
It is inserting data and building RMObjects.
If there an error occurs, it can be found in the Map ErrorMap.
This is very good, I get errors like
/[at0000]/contacts[at0021]/addresses[at0022]/details[at0023]/representation[at0024]/items[at0025.2]/value/=MISSING
(a value which has no cardinality--indication is missing, which, I found out,
there must exist a default cardinality, I don't know what it is, I guess
1..1, I will look in the document later for this)
So I understand why I get them. Sorry to say, I find the ADL-document the most
difficult to read, and in this way I understand how it works. Learning "ADL
by Example"
The testfiles Rong wrote are very good to get grip on the mechanisms
But there is one thing I do not understand.
These values are inserted
"t7child firstname", "child lastname", "19801020-0000", "08-324703",
"p1 firstname", "p1 lastname", null, null, null,
null, null, null, null, null
This gives this error
/[at0000]/contacts[at0013]/addresses[at0014]/details[at0015]/representation[at0016]/items[at0018]/value/value=MISSING
definition
PERSON[at0000] matches {
--skip these, not important for this error
contacts cardinality matches {0..*; unordered; unique} matches {
CONTACT[at0008] matches {
--skip the content
}
CONTACT[at0013] matches {
--skip these, not important for my question
}
CONTACT[at0021] occurrences matches {0..1} matches {
--skip these, not important for my question
}
}
As I understand this, there is a PERSON which has things in the first line of
inserts, no problem with that
This person has two contacts. The third line of the inserts is the second
contact, which is 0..1 (optional) so only null are inserted, which is OK.
The second line of inserts gives the error, at 0013 (which is the second
contact. I understand the error, the first null (third value) should contain
a string, but now my question