Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.consol.tests.FetusSubjectContextTest

NameTestsErrorsFailuresTime(s)Time StampHost
FetusSubjectContextTest4000.0122013-01-31T13:34:56JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateFetusSubjectContextTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:9189, CONF:10535 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.6.2.3"

OCL

self.templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.6.2.3')

SuccessInvalid XML


<relatedsubject xmlns="urn:hl7-org:v3"/>

Valid XML


<relatedsubject xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.3"/>
<code code="121026" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
</relatedsubject>

0.003
testValidateFetusSubjectContextCode

Constraint

Consol Fetus Subject Context SHALL contain exactly one [1..1] code/@code="121026" (CodeSystem: 1.2.840.10008.2.16.4 DCM)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = self.code.oclAsType(datatypes::CE) in value.code = '121026' and value.codeSystem = '1.2.840.10008.2.16.4')

SuccessInvalid XML


<relatedsubject xmlns="urn:hl7-org:v3"/>

Valid XML


<relatedsubject xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.3"/>
<code code="121026" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
</relatedsubject>

0.004
testValidateFetusSubjectContextSubject

Constraint

Consol Fetus Subject Context SHALL contain exactly one [1..1] subject (CONF:9191)

OCL

self.subject->one(subject : cda::SubjectPerson | not subject.oclIsUndefined() and subject.oclIsKindOf(cda::SubjectPerson))

SuccessInvalid XML


<relatedsubject xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.3"/>
<code code="121026" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
</relatedsubject>

Valid XML


<relatedsubject xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.6.2.3"/>
<code code="121026" codeSystem="1.2.840.10008.2.16.4" codeSystemName="DCM"/>
<subject/>
</relatedsubject>

0.002
Properties »