Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
ProblemConcernActTest13000.5122013-01-31T13:35:54JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testGetProblemObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.040
testValidateProblemConcernActEffectiveTimeLow

Constraint

Consol Problem Concern Act effectiveTime SHALL contain exactly one [1..1] low (CONF:9032)

OCL

not self.effectiveTime.low.oclIsUndefined()

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.3"/>
<code code="CONC" codeSystem="2.16.840.1.113883.5.6" codeSystemName="HL7ActClass" displayName="Concern"/>
<effectiveTime>
<low/>
</effectiveTime>
</act>

0.020
testValidateProblemConcernActEffectiveTimeHigh

Constraint

Consol Problem Concern Act effectiveTime SHOULD contain zero or one [0..1] high (CONF:9033)

OCL

not self.effectiveTime.high.oclIsUndefined()

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.3"/>
<code code="CONC" codeSystem="2.16.840.1.113883.5.6" codeSystemName="HL7ActClass" displayName="Concern"/>
<effectiveTime>
<high/>
</effectiveTime>
</act>

0.019
testValidateProblemConcernActTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:16772, CONF:16773 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.3"

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.3"/>
<code code="CONC" codeSystem="2.16.840.1.113883.5.6" codeSystemName="HL7ActClass" displayName="Concern"/>
</act>

0.012
testValidateProblemConcernActClassCode

Constraint

Consol Problem Concern Act SHALL contain exactly one [1..1] @classCode="ACT" Act (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:9024)

OCL

self.classCode=vocab::x_ActClassDocumentEntryAct::ACT

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.3"/>
<code code="CONC" codeSystem="2.16.840.1.113883.5.6" codeSystemName="HL7ActClass" displayName="Concern"/>
</act>

0.008
testValidateProblemConcernActMoodCode

Constraint

Consol Problem Concern Act SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:9025)

OCL

self.moodCode=vocab::x_DocumentActMood::EVN

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.3"/>
<code code="CONC" codeSystem="2.16.840.1.113883.5.6" codeSystemName="HL7ActClass" displayName="Concern"/>
</act>

0.008
testValidateProblemConcernActId

Constraint

Consol Problem Concern Act SHALL contain at least one [1..*] id (CONF:9026)

OCL

(self.id->isEmpty() or self.id->exists(element | element.isNullFlavorUndefined())) implies (not self.id->isEmpty())

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.3"/>
<id/>
<code code="CONC" codeSystem="2.16.840.1.113883.5.6" codeSystemName="HL7ActClass" displayName="Concern"/>
</act>

0.042
testValidateProblemConcernActCodeP

Constraint

Consol Problem Concern Act SHALL contain exactly one [1..1] code (CONF:9027)/@code="CONC" Concern (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:9440)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined())

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.3"/>
<code code="CONC" codeSystem="2.16.840.1.113883.5.6" codeSystemName="HL7ActClass" displayName="Concern"/>
</act>

0.039
testValidateProblemConcernActCode

Constraint

Consol Problem Concern Act SHALL contain exactly one [1..1] code (CONF:9027)/@code="CONC" Concern (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:9440)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = self.code.oclAsType(datatypes::CD) in value.code = 'CONC' and value.codeSystem = '2.16.840.1.113883.5.6')

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.3"/>
<code code="CONC" codeSystem="2.16.840.1.113883.5.6" codeSystemName="HL7ActClass" displayName="Concern"/>
</act>

0.085
testValidateProblemConcernActStatusCode

Constraint

Consol Problem Concern Act SHALL contain exactly one [1..1] statusCode, where the @code SHALL be selected from ValueSet ProblemActStatusCode 2.16.840.1.113883.11.20.9.19 STATIC 2011-09-09 (CONF:9029)

OCL

(self.statusCode.oclIsUndefined() or self.statusCode.isNullFlavorUndefined()) implies (not self.statusCode.oclIsUndefined() and self.statusCode.oclIsKindOf(datatypes::CS) and let value : datatypes::CS = self.statusCode.oclAsType(datatypes::CS) in value.code = 'active' or value.code = 'suspended' or value.code = 'aborted' or value.code = 'completed')

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.3"/>
<code code="CONC" codeSystem="2.16.840.1.113883.5.6" codeSystemName="HL7ActClass" displayName="Concern"/>
<statusCode code="completed"/>
</act>

0.139
testValidateProblemConcernActEffectiveTime

Constraint

Consol Problem Concern Act SHALL contain exactly one [1..1] effectiveTime (CONF:9030)

OCL

(self.effectiveTime.oclIsUndefined() or self.effectiveTime.isNullFlavorUndefined()) implies (not self.effectiveTime.oclIsUndefined())

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.3"/>
<code code="CONC" codeSystem="2.16.840.1.113883.5.6" codeSystemName="HL7ActClass" displayName="Concern"/>
<effectiveTime/>
</act>

0.046
testValidateProblemConcernActProblemObservation

Constraint

Consol Problem Concern Act SHALL contain at least one [1..*] entryRelationship (CONF:15980) Contains @typeCode="SUBJ" SUBJ, and Contains exactly one [1..1] Problem Observation (templateId: 2.16.840.1.113883.10.20.22.4.4)

OCL

self.entryRelationship->exists(entryRelationship : cda::EntryRelationship | not entryRelationship.observation.oclIsUndefined() and entryRelationship.observation.oclIsKindOf(consol::ProblemObservation) and entryRelationship.typeCode = vocab::x_ActRelationshipEntryRelationship::SUBJ)

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.3"/>
<code code="CONC" codeSystem="2.16.840.1.113883.5.6" codeSystemName="HL7ActClass" displayName="Concern"/>
<entryRelationship typeCode="SUBJ">
<observation/>
</entryRelationship>
</act>

0.045
Properties »