Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.ccd.tests.ProblemHealthStatusObservationTest

NameTestsErrorsFailuresTime(s)Time StampHost
ProblemHealthStatusObservationTest4020.0472013-01-31T13:34:17JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateStatusObservationTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.1.57"

OCL

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

SuccessInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
</observation>

0.006
testValidateProblemHealthStatusObservationCode

Constraint

CCD Problem Health Status Observation SHALL contain exactly one [1..1] code/@code="11323-3" Health status (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF-166)

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 = '11323-3' and value.codeSystem = '2.16.840.1.113883.6.1')

FailureInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.51"/>
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<code/>
<statusCode code="completed"/>
</observation>

ERROR EXPECT PASS validateProblemHealthStatusObservationCode: CCD Problem Health Status Observation SHALL contain exactly one [1..1] code/@code="11323-3" Health status (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF-166) CCD Problem Health Status Observation SHALL contain exactly one [1..1] code/@code="11323-3" Health status (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF-166)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateProblemHealthStatusObservationCode: CCD Problem Health Status Observation SHALL contain exactly one [1..1] code/@code="11323-3" Health status (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF-166) CCD Problem Health Status Observation SHALL contain exactly one [1..1] code/@code="11323-3" Health status (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF-166)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectPass(CDAValidationTest.java:265)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:798)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.ccd.tests.ProblemHealthStatusObservationTest.testValidateProblemHealthStatusObservationCode(ProblemHealthStatusObservationTest.java:78)
0.019
testValidateStatusObservationCode

Constraint

CCD Status Observation SHALL contain exactly one [1..1] code/@code="33999-4" Status (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF-512, CONF-513)

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 = '33999-4' and value.codeSystem = '2.16.840.1.113883.6.1')

FailureInvalid XML


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

Valid XML


<observation xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1"/>
<statusCode code="completed"/>
</observation>

ERROR EXPECT PASS validateStatusObservationCode: CCD Status Observation SHALL contain exactly one [1..1] code/@code="33999-4" Status (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF-512, CONF-513) CCD Status Observation SHALL contain exactly one [1..1] code/@code="33999-4" Status (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF-512, CONF-513)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateStatusObservationCode: CCD Status Observation SHALL contain exactly one [1..1] code/@code="33999-4" Status (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF-512, CONF-513) CCD Status Observation SHALL contain exactly one [1..1] code/@code="33999-4" Status (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF-512, CONF-513)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$CDAValidationTestCase.validateExpectPass(CDAValidationTest.java:265)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doTest(CDAValidationTest.java:798)
at org.openhealthtools.mdht.uml.cda.operations.CDAValidationTest$OperationsTestCase.doValidationTest(CDAValidationTest.java:845)
at org.openhealthtools.mdht.uml.cda.ccd.tests.ProblemHealthStatusObservationTest.testValidateStatusObservationCode(ProblemHealthStatusObservationTest.java:151)
0.019
Properties »