Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
AnesthesiaSectionTest10000.1792013-01-31T13:34:40JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testGetMedicationActivities

Constraint

OCL

SuccessInvalid XML

Valid XML

0.019
testValidateAnesthesiaSectionTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:8066, CONF:10380 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.2.25"

OCL

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

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.25"/>
<code code="59774-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</section>

0.008
testValidateAnesthesiaSectionCode

Constraint

Consol Anesthesia Section SHALL contain exactly one [1..1] code (CONF:15351)/@code="59774-0" (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15352)

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 = '59774-0' 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.25"/>
<code code="59774-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</section>

0.045
testValidateAnesthesiaSectionCodeP

Constraint

Consol Anesthesia Section SHALL contain exactly one [1..1] code (CONF:15351)/@code="59774-0" (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:15352)

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.25"/>
<code code="59774-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</section>

0.020
testValidateAnesthesiaSectionText

Constraint

Consol Anesthesia Section SHALL contain exactly one [1..1] text (CONF:8069)

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.25"/>
<code code="59774-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<text/>
</section>

0.007
testValidateAnesthesiaSectionTitle

Constraint

Consol Anesthesia Section SHALL contain exactly one [1..1] title (CONF:8068)

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.25"/>
<code code="59774-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<title>title</title>
</section>

0.022
testValidateAnesthesiaSectionProcedureActivityProcedure

Constraint

Consol Anesthesia Section MAY contain zero or more [0..*] entry (CONF:8092) Contains exactly one [1..1] Procedure Activity Procedure (templateId: 2.16.840.1.113883.10.20.22.4.14)

OCL

self.entry->exists(entry : cda::Entry | not entry.procedure.oclIsUndefined() and entry.procedure.oclIsKindOf(consol::ProcedureActivityProcedure))

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.25"/>
<code code="59774-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.25"/>
<code code="59774-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<entry>
<procedure classCode="PROC">
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
<priorityCode codeSystem="2.16.840.1.113883.5.7" codeSystemName="ActPriority"/>
<targetSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</procedure>
</entry>
</section>

0.019
testValidateAnesthesiaSectionMedicationActivity

Constraint

Consol Anesthesia Section MAY contain zero or more [0..*] entry (CONF:8094) Contains exactly one [1..1] Medication Activity (templateId: 2.16.840.1.113883.10.20.22.4.16)

OCL

self.entry->exists(entry : cda::Entry | not entry.substanceAdministration.oclIsUndefined() and entry.substanceAdministration.oclIsKindOf(consol::MedicationActivity))

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.25"/>
<code code="59774-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.10.20.22.2.25"/>
<code code="59774-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<entry>
<substanceAdministration classCode="SBADM">
<templateId root="2.16.840.1.113883.10.20.22.4.16"/>
<routeCode codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI Thesaurus"/>
<approachSiteCode codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
</substanceAdministration>
</entry>
</section>

0.017
testGetProcedureActivityProcedures

Constraint

OCL

SuccessInvalid XML

Valid XML

0.019
Properties »