Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
MedicalSummaryTest6000.0602013-01-31T13:34:24JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.001
testValidateMedicalSummaryProblemConcernEntry

Constraint

IHE Medical Summary SHALL satisfy: MedicalSummaryProblemConcernEntry

OCL

self.getSections()->exists(sect : cda::Section | sect.getActs()->exists(act : cda::Act | act.oclIsKindOf(ihe::ProblemConcernEntry)))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</ClinicalDocument>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<entry>
<act classCode="ACT" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.2"/>
<templateId root="2.16.840.1.113883.10.20.1.27"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
<code nullFlavor="NA"/>
</act>
</entry>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.009
testValidateMedicalSummaryAllergyConcernEntry

Constraint

IHE Medical Summary SHALL satisfy: MedicalSummaryAllergyConcernEntry

OCL

self.getSections()->exists(sect : cda::Section | sect.getActs()->exists(act : cda::Act | act.oclIsKindOf(ihe::AllergyIntoleranceConcern)))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</ClinicalDocument>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<entry>
<act/>
</entry>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.008
testValidateMedicalSummaryMedications

Constraint

IHE Medical Summary SHALL satisfy: MedicalSummaryMedications

OCL

self.getSections()->exists(sect : cda::Section | sect.getSubstanceAdministrations()->exists(sub : cda::SubstanceAdministration | sub.oclIsKindOf(ihe::Medication)))

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</ClinicalDocument>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
<component>
<structuredBody>
<component>
<section>
<entry>
<substanceAdministration classCode="SBADM">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.1"/>
<templateId root="2.16.840.1.113883.10.20.1.24"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7"/>
<code codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMEDCT"/>
<routeCode codeSystem="2.16.840.1.113883.5.112" codeSystemName="HL7 RouteOfAdministration"/>
</substanceAdministration>
</entry>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

0.009
testValidateMedicalSummaryTemplateId

Constraint

The 'MedicalSummaryTemplateId' invariant is violated on 'org.openhealthtools.mdht.uml.cda.hitsp.impl.ReferralSummaryImpl@5b92f337{#//}'

OCL

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

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="2.16.840.1.113883.3.88.11.48.1"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.2"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</ClinicalDocument>

0.005
testValidateMedicalSummaryCode

Constraint

IHE Medical Summary SHALL contain exactly one [1..1] code, where the @code SHALL be selected from (CodeSystem: 2.16.840.1.113883.6.1 LOINC)

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.codeSystem = '2.16.840.1.113883.6.1')

SuccessInvalid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd"/>

Valid XML


<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.2"/>
<templateId root="2.16.840.1.113883.10.20.3"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
</ClinicalDocument>

0.025
Properties »