Unit Test Results.

Designed for use with JUnit and Ant.

Class org.openhealthtools.mdht.uml.cda.ihe.tests.CodedReasonForReferralSectionTest

NameTestsErrorsFailuresTime(s)Time StampHost
CodedReasonForReferralSectionTest6000.0552013-01-31T13:34:22JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidateCodedReasonForReferralSectionTemplateId

Constraint

The 'CodedReasonForReferralSectionTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.hitsp.impl.ReasonForReferralSectionImpl@6a23d344{#//}'

OCL

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

SuccessInvalid XML


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

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="2.16.840.1.113883.3.88.11.83.106"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.2"/>
<templateId root="2.16.840.1.113883.10.20.4.8"/>
<code code="42349-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="REASON FOR REFERRAL"/>
</section>

0.007
testValidateCodedReasonForReferralSectionSimpleObservation

Constraint

IHE Coded Reason For Referral Section SHALL contain at least one [1..*] entry Contains exactly one [1..1] Simple Observation (templateId: 1.3.6.1.4.1.19376.1.5.3.1.4.13)

OCL

self.entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(ihe::SimpleObservation))

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.2"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.1"/>
<code code="42349-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="REASON FOR REFERRAL"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.2"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.1"/>
<code code="42349-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="REASON FOR REFERRAL"/>
<entry>
<observation classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.2"/>
<templateId root="2.16.840.1.113883.10.20.1.31"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<statusCode code="completed"/>
</observation>
</entry>
</section>

0.012
testValidateCodedReasonForReferralSectionProblemEntry

Constraint

IHE Coded Reason For Referral Section SHALL contain at least one [1..*] entry Contains exactly one [1..1] Problem Entry (templateId: 1.3.6.1.4.1.19376.1.5.3.1.4.5)

OCL

self.entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(ihe::ProblemEntry))

SuccessInvalid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.2"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.1"/>
<code code="42349-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="REASON FOR REFERRAL"/>
</section>

Valid XML


<section xmlns="urn:hl7-org:v3">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.2"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.1"/>
<code code="42349-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="REASON FOR REFERRAL"/>
<entry>
<observation classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
<templateId root="2.16.840.1.113883.10.20.1.28"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<statusCode code="completed"/>
</observation>
</entry>
</section>

0.012
testGetSimpleObservations

Constraint

OCL

SuccessInvalid XML

Valid XML

0.010
testGetProblemEntries

Constraint

OCL

SuccessInvalid XML

Valid XML

0.010
Properties »