Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
SocialHistoryStatusObservationTest4010.0492013-01-31T13:34:20JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
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
testValidateSocialHistoryStatusObservationValue

Constraint

CCD Social History Status Observation SHALL contain exactly one [1..1] value, where the @code SHALL be selected from (CodeSystem: 2.16.840.1.113883.1.11.20.17 SocialHistoryStatusCode) (CONF-248)

OCL

(self.value->isEmpty() or self.value->exists(element | element.isNullFlavorUndefined())) implies (self.value->size() = 1 and self.value->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = element.oclAsType(datatypes::CE) in value.codeSystem = '2.16.840.1.113883.1.11.20.17'))

FailureInvalid XML


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

Valid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.1.56"/>
<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"/>
<value xsi:type="CD"/>
</observation>

ERROR EXPECT PASS validateSocialHistoryStatusObservationValue: CCD Social History Status Observation SHALL contain exactly one [1..1] value, where the @code SHALL be selected from (CodeSystem: 2.16.840.1.113883.1.11.20.17 SocialHistoryStatusCode) (CONF-248) CCD Social History Status Observation SHALL contain exactly one [1..1] value, where the @code SHALL be selected from (CodeSystem: 2.16.840.1.113883.1.11.20.17 SocialHistoryStatusCode) (CONF-248)

junit.framework.AssertionFailedError: ERROR EXPECT PASS validateSocialHistoryStatusObservationValue: CCD Social History Status Observation SHALL contain exactly one [1..1] value, where the @code SHALL be selected from (CodeSystem: 2.16.840.1.113883.1.11.20.17 SocialHistoryStatusCode) (CONF-248) CCD Social History Status Observation SHALL contain exactly one [1..1] value, where the @code SHALL be selected from (CodeSystem: 2.16.840.1.113883.1.11.20.17 SocialHistoryStatusCode) (CONF-248)
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.SocialHistoryStatusObservationTest.testValidateSocialHistoryStatusObservationValue(SocialHistoryStatusObservationTest.java:79)
0.023
testValidateStatusObservationValue

Constraint

CCD Status Observation SHALL contain exactly one [1..1] value with data type CE (CONF-516)

OCL

NO OCL FOUND FOR PROPERTY VALIDATE_STATUS_OBSERVATION_VALUE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP

SuccessInvalid XML


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

Valid XML


<observation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.1.1"/>
<templateId root="2.16.840.1.113883.10.20.1.57"/>
<templateId root="2.16.840.1.113883.10.20.1.50"/>
<code code="33999-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Status"/>
<statusCode code="completed"/>
<value xsi:type="CE" code="55561003" codeSystem="2.16.840.1.113883.6.96"/>
</observation>

0.016
Properties »