Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
HospitalAdmissionDiagnosisSectionTest8000.2252013-01-31T13:35:18JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateHospitalAdmissionDiagnosisSectionTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:9930, CONF:10391 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.2.43"

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.43"/>
<code code="46241-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HOSPITAL ADMISSION DX"/>
</section>

0.010
testValidateHospitalAdmissionDiagnosisSectionCode

Constraint

Consol Hospital Admission Diagnosis Section SHALL contain exactly one [1..1] code (CONF:15479)/@code="46241-6" HOSPITAL ADMISSION DX (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15480)

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.43"/>
<code code="46241-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HOSPITAL ADMISSION DX"/>
</section>

0.073
testValidateHospitalAdmissionDiagnosisSectionCodeP

Constraint

Consol Hospital Admission Diagnosis Section SHALL contain exactly one [1..1] code (CONF:15479)/@code="46241-6" HOSPITAL ADMISSION DX (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15480)

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.43"/>
<code code="46241-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HOSPITAL ADMISSION DX"/>
</section>

0.032
testValidateHospitalAdmissionDiagnosisSectionTitle

Constraint

Consol Hospital Admission Diagnosis Section SHALL contain exactly one [1..1] title (CONF:9932)

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.43"/>
<code code="46241-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HOSPITAL ADMISSION DX"/>
<title>title</title>
</section>

0.034
testValidateHospitalAdmissionDiagnosisSectionText

Constraint

Consol Hospital Admission Diagnosis Section SHALL contain exactly one [1..1] text (CONF:9933)

OCL

not self.text.oclIsUndefined()

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.43"/>
<code code="46241-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HOSPITAL ADMISSION DX"/>
<text/>
</section>

0.011
testValidateHospitalAdmissionDiagnosisSectionHospitalAdmissionDiagnosis

Constraint

Consol Hospital Admission Diagnosis Section SHOULD contain zero or one [0..1] entry (CONF:9934, CONF:9935) Contains exactly one [1..1] Hospital Admission Diagnosis (templateId: 2.16.840.1.113883.10.20.22.4.34)

OCL

self.entry->one(entry : cda::Entry | not entry.act.oclIsUndefined() and entry.act.oclIsKindOf(consol::HospitalAdmissionDiagnosis))

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.43"/>
<code code="46241-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HOSPITAL ADMISSION DX"/>
<entry>
<act/>
</entry>
</section>

0.027
testGetHospitalAdmissionDiagnosis

Constraint

OCL

SuccessInvalid XML

Valid XML

0.033
Properties »