Unit Test Results.

Designed for use with JUnit and Ant.

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

NameTestsErrorsFailuresTime(s)Time StampHost
PolicyActivityTest85008.3952013-01-31T13:35:41JKMSoftware-desktop

Tests

NameStatusResultTime(s)
testConstructor

Constraint

OCL

SuccessInvalid XML

Valid XML

0.000
testValidatePolicyActivityTemplateId

Constraint

SHALL contain exactly one [1..1] templateId ( CONF:8900, CONF:10516 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.61"

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
</act>

0.012
testValidatePolicyActivityClassCode

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] @classCode="ACT" Act (CodeSystem: 2.16.840.1.113883.5.6 HL7ActClass) (CONF:8898)

OCL

self.classCode=vocab::x_ActClassDocumentEntryAct::ACT

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
</act>

0.011
testValidatePolicyActivityMoodCode

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] @moodCode="EVN" Event (CodeSystem: 2.16.840.1.113883.5.1001 HL7ActMood) (CONF:8899)

OCL

self.moodCode=vocab::x_DocumentActMood::EVN

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
</act>

0.007
testValidatePolicyActivityId

Constraint

Consol Policy Activity SHALL contain at least one [1..*] id (CONF:8901, CONF:10119)

OCL

(self.id->isEmpty() or self.id->exists(element | element.isNullFlavorUndefined())) implies (not self.id->isEmpty())

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<id root="12345678-0"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
</act>

0.039
testValidatePolicyActivityStatusCode

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] statusCode/@code="completed" Completed (CodeSystem: 2.16.840.1.113883.5.14 ActStatus) (CONF:8902)

OCL

(self.statusCode.oclIsUndefined() or self.statusCode.isNullFlavorUndefined()) implies (not self.statusCode.oclIsUndefined() and self.statusCode.oclIsKindOf(datatypes::CS) and let value : datatypes::CS = self.statusCode.oclAsType(datatypes::CS) in value.code = 'completed')

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
</act>

0.082
testValidatePolicyActivityCode

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] code (CONF:8903), where the @code SHOULD be selected from ValueSet Health Insurance Type Value Set 2.16.840.1.113883.3.88.12.3221.5.2 STATIC 20081218 (CONF:15993)

OCL

(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CD) and let value : datatypes::CD = self.code.oclAsType(datatypes::CD) in value.code = '12' or value.code = '13' or value.code = '14' or value.code = '15' or value.code = '16' or value.code = '41' or value.code = '42' or value.code = '43' or value.code = '47' or value.code = 'AP' or value.code = 'C1' or value.code = 'CO' or value.code = 'CP' or value.code = 'D' or value.code = 'DB' or value.code = 'EP' or value.code = 'FF' or value.code = 'GP' or value.code = 'HM' or value.code = 'HN' or value.code = 'HS' or value.code = 'IN' or value.code = 'IP' or value.code = 'LC' or value.code = 'LD' or value.code = 'LI' or value.code = 'LT' or value.code = 'MA' or value.code = 'MB' or value.code = 'MC' or value.code = 'MH' or value.code = 'MI' or value.code = 'MP' or value.code = 'OT' or value.code = 'PE' or value.code = 'PL' or value.code = 'PP' or value.code = 'PR' or value.code = 'PS' or value.code = 'QM' or value.code = 'RP' or value.code = 'SP' or value.code = 'TF' or value.code = 'WC' or value.code = 'WU')

SuccessInvalid XML


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

Valid XML


<act xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code xsi:type="CE" code="AP" codeSystem="2.16.840.1.113883.6.1"/>
<statusCode code="completed"/>
</act>

0.659
testValidatePolicyActivityCodeP

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] code (CONF:8903), where the @code SHOULD be selected from ValueSet Health Insurance Type Value Set 2.16.840.1.113883.3.88.12.3221.5.2 STATIC 20081218 (CONF:15993)

OCL

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

SuccessInvalid XML


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

Valid XML


<act xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code xsi:type="CE"/>
<statusCode code="completed"/>
</act>

0.036
testValidatePolicyActivityPayer

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer

OCL

self.performer->select(performer : cda::Performer2 | not performer.oclIsUndefined() and performer.oclIsKindOf(cda::Performer2))->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR'))->size() = 1

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer/>
<performer>
<assignedEntity>
<code code="GUAR" codeSystem=""/>
</assignedEntity>
</performer>
</act>

0.064
testValidatePolicyActivityGuarantor

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer

OCL

self.performer->select(performer : cda::Performer2 | not performer.oclIsUndefined() and performer.oclIsKindOf(cda::Performer2))->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'})->size() = 1

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<code code="GUAR" codeSystem=""/>
</assignedEntity>
</performer>
</act>

0.071
testValidatePolicyActivityCoverage

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916)

OCL

self.participant->select(participant : cda::Participant2 | not participant.oclIsUndefined() and participant.oclIsKindOf(cda::Participant2))->select(typeCode=vocab::ParticipationType::COV)->size() = 1

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<playingEntity/>
</participantRole>
</participant>
</act>

0.047
testValidatePolicyActivityHolder

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934)

OCL

self.participant->select(participant : cda::Participant2 | not participant.oclIsUndefined() and participant.oclIsKindOf(cda::Participant2))->select(typeCode=vocab::ParticipationType::HLD)->size() = 1

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="HLD"/>
</act>

0.046
testValidatePolicyActivityEntryRelationship

Constraint

Consol Policy Activity SHALL contain at least one [1..*] entryRelationship (CONF:8939)

OCL

self.entryRelationship->select(entryRelationship : cda::EntryRelationship | not entryRelationship.oclIsUndefined() and entryRelationship.oclIsKindOf(cda::EntryRelationship))->select(typeCode=vocab::x_ActRelationshipEntryRelationship::REFR)->notEmpty()

SuccessInvalid XML


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

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<entryRelationship typeCode="REFR"/>
</act>

0.039
testValidatePolicyActivityPayerPayerAssignedEntityUSRealmAddressStreet

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) each MAY contain zero or one [0..1] addr with data type USRealmAddress (CONF:8910, CONF:10481) addr SHALL contain at least one and not more than 4 streetAddressLine (CONF:7291) Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) each MAY contain zero or one [0..1] addr with data type USRealmAddress (CONF:8910, CONF:10481) addr SHALL contain at least one and not more than 4 streetAddressLine (CONF:7291)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject(isNullFlavorUndefined() implies ( streetAddressLine->size() >=1 and streetAddressLine->size() <=4))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<addr><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine></addr>
<telecom/>
</assignedEntity>
</performer>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<telecom/>
</assignedEntity>
</performer>
</act>

0.113
testValidatePolicyActivityPayerPayerAssignedEntityUSRealmAddressCity

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) each MAY contain zero or one [0..1] addr with data type USRealmAddress (CONF:8910, CONF:10481) addr SHALL contain exactly one [1..1] city (CONF:7292)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((city->isEmpty() or city->exists(element | element.isNullFlavorUndefined())) implies (city->size() = 1) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<telecom/>
</assignedEntity>
</performer>
</act>

0.119
testValidatePolicyActivityPayerPayerAssignedEntityUSRealmAddressCountry

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) each MAY contain zero or one [0..1] addr with data type USRealmAddress (CONF:8910, CONF:10481) addr SHOULD contain zero or one [0..1] country (CONF:7295)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((country->isEmpty() or country->exists(element | element.isNullFlavorUndefined())) implies (not country->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<telecom/>
</assignedEntity>
</performer>
</act>

0.115
testValidatePolicyActivityPayerPayerAssignedEntityUSRealmAddressPostalCode

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) each MAY contain zero or one [0..1] addr with data type USRealmAddress (CONF:8910, CONF:10481) addr SHOULD contain zero or one [0..1] postalCode (CONF:7294)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((postalCode->isEmpty() or postalCode->exists(element | element.isNullFlavorUndefined())) implies (not postalCode->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<telecom/>
</assignedEntity>
</performer>
</act>

0.114
testValidatePolicyActivityPayerPayerAssignedEntityUSRealmAddressState

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) each MAY contain zero or one [0..1] addr with data type USRealmAddress (CONF:8910, CONF:10481) addr SHOULD contain zero or one [0..1] state (CONF:7293)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((state->isEmpty() or state->exists(element | element.isNullFlavorUndefined())) implies (not state->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<telecom/>
</assignedEntity>
</performer>
</act>

0.115
testValidatePolicyActivityPayerPayerAssignedEntityUSRealmAddressStreetAddressLine

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) each MAY contain zero or one [0..1] addr with data type USRealmAddress (CONF:8910, CONF:10481) addr SHALL contain at least one [1..*] streetAddressLine (CONF:7291)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((streetAddressLine->isEmpty() or streetAddressLine->exists(element | element.isNullFlavorUndefined())) implies (not streetAddressLine->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<telecom/>
</assignedEntity>
</performer>
</act>

0.115
testValidatePolicyActivityPayerPayerAssignedEntityUSRealmAddressUseP

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) each MAY contain zero or one [0..1] addr with data type USRealmAddress (CONF:8910, CONF:10481) addr SHOULD contain zero or one [0..1] @use (CONF:7290), where the @code SHALL be selected from ValueSet PostalAddressUse 2.16.840.1.113883.1.11.10637 STATIC

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies (not use->isEmpty() )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<telecom/>
</assignedEntity>
</performer>
</act>

0.079
testValidatePolicyActivityPayerPayerAssignedEntityUSRealmAddressUse

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) each MAY contain zero or one [0..1] addr with data type USRealmAddress (CONF:8910, CONF:10481) addr SHOULD contain zero or one [0..1] @use (CONF:7290), where the @code SHALL be selected from ValueSet PostalAddressUse 2.16.840.1.113883.1.11.10637 STATIC

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies (use->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(vocab::PostalAddressUse) and let value : vocab::PostalAddressUse = element.oclAsType(vocab::PostalAddressUse) in value = vocab::PostalAddressUse::BAD or value = vocab::PostalAddressUse::DIR or value = vocab::PostalAddressUse::H or value = vocab::PostalAddressUse::HP or value = vocab::PostalAddressUse::HV or value = vocab::PostalAddressUse::PHYS or value = vocab::PostalAddressUse::PST or value = vocab::PostalAddressUse::PUB or value = vocab::PostalAddressUse::TMP or value = vocab::PostalAddressUse::WP) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr use=""/>
<telecom/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<telecom/>
</assignedEntity>
</performer>
</act>

0.180
testValidatePolicyActivityPayerPayerAssignedEntityPayerOrganizationName

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) each SHOULD contain zero or one [0..1] representedOrganization, where (CONF:8912) payerOrganization SHOULD contain zero or one [0..1] name (CONF:8913)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null).representedOrganization->excluding(null)->reject((name->isEmpty() or name->exists(element | element.isNullFlavorUndefined())) implies (not name->isEmpty()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
<representedOrganization/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
<representedOrganization>
<name/>
</representedOrganization>
</assignedEntity>
</performer>
</act>

0.098
testValidatePolicyActivityPayerPayerAssignedEntityId

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) payerAssignedEntity SHALL contain at least one [1..*] id (CONF:8909)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null)->reject((id->isEmpty() or id->exists(element | element.isNullFlavorUndefined())) implies (not id->isEmpty()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

0.089
testValidatePolicyActivityPayerPayerAssignedEntityCode

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) payerAssignedEntity SHALL contain exactly one [1..1] code (CONF:8914), where the @code SHALL be selected from ValueSet Financially Responsible Party Type Value Set 2.16.840.1.113883.1.11.10416 STATIC 1 (CONF:15992)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null)->reject((code.oclIsUndefined() or code.isNullFlavorUndefined()) implies (not code.oclIsUndefined() and code.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = code.oclAsType(datatypes::CE) in value.codeSystem = '2.16.840.1.113883.5.110' and (value.code = 'AFFL' or value.code = 'AGNT' or value.code = 'CIT' or value.code = 'CRINV' or value.code = 'CRSPNSR' or value.code = 'SPNSR' or value.code = 'COVPTY' or value.code = 'EMP' or value.code = 'GUAR' or value.code = 'INVSBJ' or value.code = 'PAYOR' or value.code = 'LIC' or value.code = 'PAT' or value.code = 'PAYEE' or value.code = 'POLHOLD' or value.code = 'QUAL' or value.code = 'STD' or value.code = 'UNDWRT')))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

0.387
testValidatePolicyActivityPayerPayerAssignedEntityCodeP

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) payerAssignedEntity SHALL contain exactly one [1..1] code (CONF:8914), where the @code SHALL be selected from ValueSet Financially Responsible Party Type Value Set 2.16.840.1.113883.1.11.10416 STATIC 1 (CONF:15992)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null)->reject((code.oclIsUndefined() or code.isNullFlavorUndefined()) implies (not code.oclIsUndefined()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

0.090
testValidatePolicyActivityPayerPayerAssignedEntityAddr

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) payerAssignedEntity MAY contain zero or one [0..1] addr with data type USRealmAddress (CONF:8910, CONF:10481)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null)->reject((addr->isEmpty() or addr->exists(element | element.isNullFlavorUndefined())) implies (not addr->isEmpty()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<telecom/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

0.090
testValidatePolicyActivityPayerPayerAssignedEntityTelecom

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) payerAssignedEntity MAY contain zero or one [0..1] telecom (CONF:8910)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null)->reject((telecom->isEmpty() or telecom->exists(element | element.isNullFlavorUndefined())) implies (not telecom->isEmpty()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

0.090
testValidatePolicyActivityPayerPayerAssignedEntityPayerOrganization

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8908) payerAssignedEntity SHOULD contain zero or one [0..1] representedOrganization, where its type is Payer Organization (CONF:8912)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR')).assignedEntity->excluding(null)->reject(representedOrganization->one(representedOrganization : cda::Organization | not representedOrganization.oclIsUndefined() and representedOrganization.oclIsKindOf(cda::Organization)))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
<representedOrganization/>
</assignedEntity>
</performer>
</act>

0.069
testValidatePolicyActivityPayerTemplateId

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer SHALL contain exactly one [1..1] templateId ( CONF:16808, CONF:16809 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.87"

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR'))->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR'))->reject(templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.22.4.87'))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<performer typeCode="SPRF"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer typeCode="PRF">
<templateId root="2.16.840.1.113883.10.20.22.4.87"/>
</performer>
</act>

0.073
testValidatePolicyActivityPayerTypeCode

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer payer SHALL contain exactly one [1..1] @typeCode="PRF" (CONF:8907)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR'))->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR'))->reject(isDefined('typeCode') and typeCode=vocab::ParticipationPhysicalPerformer::PRF)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<performer typeCode="SPRF"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer typeCode="PRF"/>
</act>

0.081
testValidatePolicyActivityPayerPayerAssignedEntity

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] performer payer SHALL contain exactly one [1..1] assignedEntity (CONF:8908)

OCL

self.performer->excluding(null)->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR'))->select(assignedEntity->excluding(null).code->excluding(null).code->excludes('GUAR'))->reject(assignedEntity->one(assignedEntity : cda::AssignedEntity | not assignedEntity.oclIsUndefined() and assignedEntity.oclIsKindOf(cda::AssignedEntity)))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="EMP" codeSystem="2.16.840.1.113883.5.110"/>
<addr/>
<telecom/>
</assignedEntity>
</performer>
</act>

0.087
testValidatePolicyActivityGuarantorGuarantorAssignedEntityUSRealmAddressStreet

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8962) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8964, CONF:10482) addr SHALL contain at least one and not more than 4 streetAddressLine (CONF:7291)

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'}).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject(isNullFlavorUndefined() implies ( streetAddressLine->size() >=1 and streetAddressLine->size() <=4))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine></addr>
</assignedEntity>
</performer>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</assignedEntity>
</performer>
</act>

0.119
testValidatePolicyActivityGuarantorGuarantorAssignedEntityUSRealmAddressCity

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8962) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8964, CONF:10482) addr SHALL contain exactly one [1..1] city (CONF:7292)

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'}).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((city->isEmpty() or city->exists(element | element.isNullFlavorUndefined())) implies (city->size() = 1) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</assignedEntity>
</performer>
</act>

0.124
testValidatePolicyActivityGuarantorGuarantorAssignedEntityUSRealmAddressCountry

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8962) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8964, CONF:10482) addr SHOULD contain zero or one [0..1] country (CONF:7295)

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'}).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((country->isEmpty() or country->exists(element | element.isNullFlavorUndefined())) implies (not country->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</assignedEntity>
</performer>
</act>

0.121
testValidatePolicyActivityGuarantorGuarantorAssignedEntityUSRealmAddressPostalCode

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8962) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8964, CONF:10482) addr SHOULD contain zero or one [0..1] postalCode (CONF:7294)

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'}).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((postalCode->isEmpty() or postalCode->exists(element | element.isNullFlavorUndefined())) implies (not postalCode->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</assignedEntity>
</performer>
</act>

0.123
testValidatePolicyActivityGuarantorGuarantorAssignedEntityUSRealmAddressState

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8962) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8964, CONF:10482) addr SHOULD contain zero or one [0..1] state (CONF:7293)

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'}).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((state->isEmpty() or state->exists(element | element.isNullFlavorUndefined())) implies (not state->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</assignedEntity>
</performer>
</act>

0.121
testValidatePolicyActivityGuarantorGuarantorAssignedEntityUSRealmAddressStreetAddressLine

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8962) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8964, CONF:10482) addr SHALL contain at least one [1..*] streetAddressLine (CONF:7291)

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'}).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((streetAddressLine->isEmpty() or streetAddressLine->exists(element | element.isNullFlavorUndefined())) implies (not streetAddressLine->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</assignedEntity>
</performer>
</act>

0.121
testValidatePolicyActivityGuarantorGuarantorAssignedEntityUSRealmAddressUseP

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8962) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8964, CONF:10482) addr SHOULD contain zero or one [0..1] @use (CONF:7290), where the @code SHALL be selected from ValueSet PostalAddressUse 2.16.840.1.113883.1.11.10637 STATIC

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'}).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies (not use->isEmpty() )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</assignedEntity>
</performer>
</act>

0.086
testValidatePolicyActivityGuarantorGuarantorAssignedEntityUSRealmAddressUse

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8962) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8964, CONF:10482) addr SHOULD contain zero or one [0..1] @use (CONF:7290), where the @code SHALL be selected from ValueSet PostalAddressUse 2.16.840.1.113883.1.11.10637 STATIC

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'}).assignedEntity->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies (use->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(vocab::PostalAddressUse) and let value : vocab::PostalAddressUse = element.oclAsType(vocab::PostalAddressUse) in value = vocab::PostalAddressUse::BAD or value = vocab::PostalAddressUse::DIR or value = vocab::PostalAddressUse::H or value = vocab::PostalAddressUse::HP or value = vocab::PostalAddressUse::HV or value = vocab::PostalAddressUse::PHYS or value = vocab::PostalAddressUse::PST or value = vocab::PostalAddressUse::PUB or value = vocab::PostalAddressUse::TMP or value = vocab::PostalAddressUse::WP) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr use=""/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</assignedEntity>
</performer>
</act>

0.189
testValidatePolicyActivityGuarantorGuarantorAssignedEntityPersonNameAndOrOrgName

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8962) guarantorAssignedEntity SHOULD include assignedEntity/assignedPerson/name AND/OR assignedEntity/representedOrganization/name (CONF:8967)

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'}).assignedEntity->excluding(null)->reject((performer.assignedEntity.assignedPerson->exists(not oclIsUndefined()) and performer.assignedEntity.assignedPerson.name->size() >0) or (performer.assignedEntity.representedOrganization->exists(not oclIsUndefined()) and performer.assignedEntity.representedOrganization.name->size() >0 ))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<assignedPerson/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<assignedPerson>
<name/>
</assignedPerson>
</assignedEntity>
</performer>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<representedOrganization>
<name/>
</representedOrganization>
</assignedEntity>
</performer>
</act>

0.185
testValidatePolicyActivityGuarantorGuarantorAssignedEntityCode

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8962) guarantorAssignedEntity SHALL contain exactly one [1..1] code (CONF:8968)/@code="GUAR" (CodeSystem: 2.16.840.1.113883.5.111 RoleCode) (CONF:16096)

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'}).assignedEntity->excluding(null)->reject((code.oclIsUndefined() or code.isNullFlavorUndefined()) implies (not code.oclIsUndefined() and code.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = code.oclAsType(datatypes::CE) in value.code = 'GUAR' and value.codeSystem = '2.16.840.1.113883.5.111'))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111X"/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
</assignedEntity>
</performer>
</act>

0.148
testValidatePolicyActivityGuarantorGuarantorAssignedEntityCodeP

Constraint

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'}).assignedEntity->excluding(null)->reject((code.oclIsUndefined() or code.isNullFlavorUndefined()) implies (not code.oclIsUndefined()))

SuccessInvalid XML


Skip Fail Test

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
</assignedEntity>
</performer>
</act>

0.093
testValidatePolicyActivityGuarantorGuarantorAssignedEntityAddr

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8962) guarantorAssignedEntity SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8964, CONF:10482)

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'}).assignedEntity->excluding(null)->reject((addr->isEmpty() or addr->exists(element | element.isNullFlavorUndefined())) implies (not addr->isEmpty()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<addr/>
</assignedEntity>
</performer>
</act>

0.096
testValidatePolicyActivityGuarantorGuarantorAssignedEntityTelecom

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer each SHALL contain exactly one [1..1] assignedEntity (CONF:8962) guarantorAssignedEntity SHOULD contain zero or one [0..1] telecom (CONF:8965)

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'}).assignedEntity->excluding(null)->reject((telecom->isEmpty() or telecom->exists(element | element.isNullFlavorUndefined())) implies (not telecom->isEmpty()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
<telecom/>
</assignedEntity>
</performer>
</act>

0.097
testValidatePolicyActivityGuarantorTemplateId

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer SHALL contain exactly one [1..1] templateId ( CONF:16810, CONF:16811 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.88"

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'})->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'})->reject(templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.22.4.88'))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<templateId root="2.16.840.1.113883.10.20.22.4.88"/>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
</assignedEntity>
</performer>
</act>

0.089
testValidatePolicyActivityGuarantorTime

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer guarantor SHOULD contain exactly one [1..1] time (CONF:8963)

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'})->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'})->reject((time.oclIsUndefined() or time.isNullFlavorUndefined()) implies (not time.oclIsUndefined()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<time/>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
</assignedEntity>
</performer>
</act>

0.124
testValidatePolicyActivityGuarantorTypeCode

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] performer guarantor SHOULD contain exactly one [1..1] @typeCode="PRF" (CONF:8961)

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'})->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'})->reject(isDefined('typeCode') and typeCode=vocab::ParticipationPhysicalPerformer::PRF)

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer typeCode="PPRF">
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
</assignedEntity>
</performer>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer typeCode="PRF">
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
</assignedEntity>
</performer>
</act>

0.093
testValidatePolicyActivityGuarantorGuarantorAssignedEntity

Constraint

OCL

self.performer->excluding(null)->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'})->select(assignedEntity->asSequence()->excluding(null).code->excluding(null).code = Sequence{'GUAR'})->reject(assignedEntity->one(assignedEntity : cda::AssignedEntity | not assignedEntity.oclIsUndefined() and assignedEntity.oclIsKindOf(cda::AssignedEntity)))

SuccessInvalid XML


Skip Fail Test

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<performer>
<assignedEntity>
<id root="12345"/>
<code code="GUAR" codeSystem="2.16.840.1.113883.5.111"/>
</assignedEntity>
</performer>
</act>

0.099
testValidatePolicyActivityCoverageCoverageRoleUSRealmAddressStreet

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8956) addr SHALL contain at least one and not more than 4 streetAddressLine (CONF:7291)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject(isNullFlavorUndefined() implies ( streetAddressLine->size() >=1 and streetAddressLine->size() <=4))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<addr><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine></addr>
<playingEntity/>
</participantRole>
</participant>
</act>

<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<addr/>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<playingEntity/>
</participantRole>
</participant>
</act>

0.097
testValidatePolicyActivityCoverageCoverageRoleUSRealmAddressCity

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8956) addr SHALL contain exactly one [1..1] city (CONF:7292)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((city->isEmpty() or city->exists(element | element.isNullFlavorUndefined())) implies (city->size() = 1) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr/>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<playingEntity/>
</participantRole>
</participant>
</act>

0.101
testValidatePolicyActivityCoverageCoverageRoleUSRealmAddressCountry

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8956) addr SHOULD contain zero or one [0..1] country (CONF:7295)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((country->isEmpty() or country->exists(element | element.isNullFlavorUndefined())) implies (not country->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr/>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<playingEntity/>
</participantRole>
</participant>
</act>

0.098
testValidatePolicyActivityCoverageCoverageRoleUSRealmAddressPostalCode

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8956) addr SHOULD contain zero or one [0..1] postalCode (CONF:7294)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((postalCode->isEmpty() or postalCode->exists(element | element.isNullFlavorUndefined())) implies (not postalCode->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr/>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<playingEntity/>
</participantRole>
</participant>
</act>

0.098
testValidatePolicyActivityCoverageCoverageRoleUSRealmAddressState

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8956) addr SHOULD contain zero or one [0..1] state (CONF:7293)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((state->isEmpty() or state->exists(element | element.isNullFlavorUndefined())) implies (not state->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr/>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<playingEntity/>
</participantRole>
</participant>
</act>

0.098
testValidatePolicyActivityCoverageCoverageRoleUSRealmAddressStreetAddressLine

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8956) addr SHALL contain at least one [1..*] streetAddressLine (CONF:7291)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((streetAddressLine->isEmpty() or streetAddressLine->exists(element | element.isNullFlavorUndefined())) implies (not streetAddressLine->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr/>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<playingEntity/>
</participantRole>
</participant>
</act>

0.098
testValidatePolicyActivityCoverageCoverageRoleUSRealmAddressUseP

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8956) addr SHOULD contain zero or one [0..1] @use (CONF:7290), where the @code SHALL be selected from ValueSet PostalAddressUse 2.16.840.1.113883.1.11.10637 STATIC

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies (not use->isEmpty() )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr/>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<playingEntity/>
</participantRole>
</participant>
</act>

0.064
testValidatePolicyActivityCoverageCoverageRoleUSRealmAddressUse

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8956) addr SHOULD contain zero or one [0..1] @use (CONF:7290), where the @code SHALL be selected from ValueSet PostalAddressUse 2.16.840.1.113883.1.11.10637 STATIC

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies (use->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(vocab::PostalAddressUse) and let value : vocab::PostalAddressUse = element.oclAsType(vocab::PostalAddressUse) in value = vocab::PostalAddressUse::BAD or value = vocab::PostalAddressUse::DIR or value = vocab::PostalAddressUse::H or value = vocab::PostalAddressUse::HP or value = vocab::PostalAddressUse::HV or value = vocab::PostalAddressUse::PHYS or value = vocab::PostalAddressUse::PST or value = vocab::PostalAddressUse::PUB or value = vocab::PostalAddressUse::TMP or value = vocab::PostalAddressUse::WP) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr use=""/>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="COV">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
<playingEntity/>
</participantRole>
</participant>
</act>

0.167
testValidatePolicyActivityCoverageCoverageRoleCoveragePlayingEntityName

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) each SHOULD contain zero or one [0..1] playingEntity, where (CONF:8932) coveragePlayingEntity SHALL contain exactly one [1..1] name (CONF:8930)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null).playingEntity->excluding(null)->reject((name->isEmpty() or name->exists(element | element.isNullFlavorUndefined())) implies (name->size() = 1))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<playingEntity>
<name/>
</playingEntity>
</participantRole>
</participant>
</act>

0.084
testValidatePolicyActivityCoverageCoverageRoleId

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) coverageRole SHALL contain at least one [1..*] id (CONF:8922)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null)->reject((id->isEmpty() or id->exists(element | element.isNullFlavorUndefined())) implies (not id->isEmpty()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<id/>
</participantRole>
</participant>
</act>

0.073
testValidatePolicyActivityCoverageCoverageRoleCode

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) coverageRole SHALL contain exactly one [1..1] code (CONF:8923), where the @code SHALL be selected from ValueSet Coverage Role Type Value Set 2.16.840.1.113883.1.11.18877 DYNAMIC (CONF:16078, CONF:8924)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null)->reject((code.oclIsUndefined() or code.isNullFlavorUndefined()) implies (not code.oclIsUndefined() and code.oclIsKindOf(datatypes::CE) and let value : datatypes::CE = code.oclAsType(datatypes::CE) in value.codeSystem = '2.16.840.1.113883.5.111' and (value.code = 'FAMDEP' or value.code = 'FSTUD' or value.code = 'HANDIC' or value.code = 'INJ' or value.code = 'PSTUD' or value.code = 'SELF' or value.code = 'SPON' or value.code = 'STUD')))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<id/>
<code code="FAMDEP" codeSystem="2.16.840.1.113883.5.111"/>
</participantRole>
</participant>
</act>

0.230
testValidatePolicyActivityCoverageCoverageRoleCodeP

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) coverageRole SHALL contain exactly one [1..1] code (CONF:8923), where the @code SHALL be selected from ValueSet Coverage Role Type Value Set 2.16.840.1.113883.1.11.18877 DYNAMIC (CONF:16078, CONF:8924)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null)->reject((code.oclIsUndefined() or code.isNullFlavorUndefined()) implies (not code.oclIsUndefined()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<id/>
<code code="FAMDEP" codeSystem="2.16.840.1.113883.5.111"/>
</participantRole>
</participant>
</act>

0.072
testValidatePolicyActivityCoverageCoverageRoleAddr

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) coverageRole SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8956)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null)->reject((addr->isEmpty() or addr->exists(element | element.isNullFlavorUndefined())) implies (not addr->isEmpty()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<addr/>
<playingEntity/>
</participantRole>
</participant>
</act>

0.073
testValidatePolicyActivityCoverageCoverageRoleCoveragePlayingEntity

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) each SHALL contain exactly one [1..1] participantRole (CONF:8921) coverageRole SHOULD contain zero or one [0..1] playingEntity, where its type is Coverage Playing Entity (CONF:8932)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV).participantRole->excluding(null)->reject(playingEntity->one(playingEntity : cda::PlayingEntity | not playingEntity.oclIsUndefined() and playingEntity.oclIsKindOf(cda::PlayingEntity)))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole/>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<addr/>
<playingEntity/>
</participantRole>
</participant>
</act>

0.052
testValidatePolicyActivityCoverageLowTime

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) coverage The time, if present, SHOULD contain zero or one [0..1] low (CONF:8919)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV)->select(typeCode=vocab::ParticipationType::COV)->reject(not time.oclIsUndefined() implies not time.low.oclIsUndefined())

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<time/>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<time>
<low/>
</time>
</participant>
</act>

0.070
testValidatePolicyActivityCoverageHighTime

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) coverage The time, if present, SHOULD contain zero or one [0..1] high (CONF:8920)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV)->select(typeCode=vocab::ParticipationType::COV)->reject(not time.oclIsUndefined() implies not time.high.oclIsUndefined())

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<time/>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<time>
<high/>
</time>
</participant>
</act>

0.070
testValidatePolicyActivityCoverageTemplateId

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) SHALL contain exactly one [1..1] templateId ( CONF:16812, CONF:16814 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.89"

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV)->select(typeCode=vocab::ParticipationType::COV)->reject(templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.22.4.89'))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<time/>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<templateId root="2.16.840.1.113883.10.20.22.4.89"/>
</participant>
</act>

0.042
testValidatePolicyActivityCoverageTypeCode

Constraint

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV)->select(typeCode=vocab::ParticipationType::COV)->reject(typeCode=vocab::ParticipationType::COV)

SuccessInvalid XML


Skip Fail Test

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<playingEntity/>
</participantRole>
</participant>
</act>

0.037
testValidatePolicyActivityCoverageTime

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) coverage SHOULD contain zero or one [0..1] time (CONF:8918)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV)->select(typeCode=vocab::ParticipationType::COV)->reject((time.oclIsUndefined() or time.isNullFlavorUndefined()) implies (not time.oclIsUndefined()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<playingEntity/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<time/>
<participantRole>
<playingEntity/>
</participantRole>
</participant>
</act>

0.078
testValidatePolicyActivityCoverageCoverageRole

Constraint

Consol Policy Activity SHALL contain exactly one [1..1] participant (CONF:8916) coverage SHALL contain exactly one [1..1] participantRole (CONF:8921)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::COV)->select(typeCode=vocab::ParticipationType::COV)->reject(participantRole->one(participantRole : cda::ParticipantRole | not participantRole.oclIsUndefined() and participantRole.oclIsKindOf(cda::ParticipantRole)))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="COV">
<participantRole>
<playingEntity/>
</participantRole>
</participant>
</act>

0.053
testValidatePolicyActivityHolderHolderRoleUSRealmAddressStreet

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934) each SHALL contain exactly one [1..1] participantRole (CONF:8936) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8925) addr SHALL contain at least one and not more than 4 streetAddressLine (CONF:7291)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject(isNullFlavorUndefined() implies ( streetAddressLine->size() >=1 and streetAddressLine->size() <=4))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine><streetAddressLine>123</streetAddressLine></addr>
</participantRole>
</participant>
</act>

<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</participantRole>
</participant>
</act>

0.099
testValidatePolicyActivityHolderHolderRoleUSRealmAddressCity

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934) each SHALL contain exactly one [1..1] participantRole (CONF:8936) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8925) addr SHALL contain exactly one [1..1] city (CONF:7292)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((city->isEmpty() or city->exists(element | element.isNullFlavorUndefined())) implies (city->size() = 1) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</participantRole>
</participant>
</act>

0.102
testValidatePolicyActivityHolderHolderRoleUSRealmAddressCountry

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934) each SHALL contain exactly one [1..1] participantRole (CONF:8936) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8925) addr SHOULD contain zero or one [0..1] country (CONF:7295)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((country->isEmpty() or country->exists(element | element.isNullFlavorUndefined())) implies (not country->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</participantRole>
</participant>
</act>

0.099
testValidatePolicyActivityHolderHolderRoleUSRealmAddressPostalCode

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934) each SHALL contain exactly one [1..1] participantRole (CONF:8936) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8925) addr SHOULD contain zero or one [0..1] postalCode (CONF:7294)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((postalCode->isEmpty() or postalCode->exists(element | element.isNullFlavorUndefined())) implies (not postalCode->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</participantRole>
</participant>
</act>

0.099
testValidatePolicyActivityHolderHolderRoleUSRealmAddressState

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934) each SHALL contain exactly one [1..1] participantRole (CONF:8936) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8925) addr SHOULD contain zero or one [0..1] state (CONF:7293)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((state->isEmpty() or state->exists(element | element.isNullFlavorUndefined())) implies (not state->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</participantRole>
</participant>
</act>

0.099
testValidatePolicyActivityHolderHolderRoleUSRealmAddressStreetAddressLine

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934) each SHALL contain exactly one [1..1] participantRole (CONF:8936) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8925) addr SHALL contain at least one [1..*] streetAddressLine (CONF:7291)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies ((streetAddressLine->isEmpty() or streetAddressLine->exists(element | element.isNullFlavorUndefined())) implies (not streetAddressLine->isEmpty()) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</participantRole>
</participant>
</act>

0.099
testValidatePolicyActivityHolderHolderRoleUSRealmAddressUseP

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934) each SHALL contain exactly one [1..1] participantRole (CONF:8936) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8925) addr SHOULD contain zero or one [0..1] @use (CONF:7290), where the @code SHALL be selected from ValueSet PostalAddressUse 2.16.840.1.113883.1.11.10637 STATIC

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies (not use->isEmpty() )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</participantRole>
</participant>
</act>

0.063
testValidatePolicyActivityHolderHolderRoleUSRealmAddressUse

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934) each SHALL contain exactly one [1..1] participantRole (CONF:8936) each SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8925) addr SHOULD contain zero or one [0..1] @use (CONF:7290), where the @code SHALL be selected from ValueSet PostalAddressUse 2.16.840.1.113883.1.11.10637 STATIC

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD).participantRole->excluding(null).addr->excluding(null)->select(isNullFlavorUndefined())->reject( ( isNullFlavorUndefined() implies (use->forAll(element | not element.oclIsUndefined() and element.oclIsKindOf(vocab::PostalAddressUse) and let value : vocab::PostalAddressUse = element.oclAsType(vocab::PostalAddressUse) in value = vocab::PostalAddressUse::BAD or value = vocab::PostalAddressUse::DIR or value = vocab::PostalAddressUse::H or value = vocab::PostalAddressUse::HP or value = vocab::PostalAddressUse::HV or value = vocab::PostalAddressUse::PHYS or value = vocab::PostalAddressUse::PST or value = vocab::PostalAddressUse::PUB or value = vocab::PostalAddressUse::TMP or value = vocab::PostalAddressUse::WP) )))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr use=""/>
</participantRole>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD">
<participantRole>
<addr use="HP"><streetAddressLine>123 Main Street</streetAddressLine><city>Boston</city><state>MA</state><country>US</country><postalCode>01001</postalCode></addr>
</participantRole>
</participant>
</act>

0.168
testValidatePolicyActivityHolderHolderRoleId

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934) each SHALL contain exactly one [1..1] participantRole (CONF:8936) holderRole SHALL contain at least one [1..*] id (CONF:8937)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD).participantRole->excluding(null)->reject((id->isEmpty() or id->exists(element | element.isNullFlavorUndefined())) implies (not id->isEmpty()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="HLD">
<participantRole/>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="HLD">
<participantRole>
<id/>
</participantRole>
</participant>
</act>

0.073
testValidatePolicyActivityHolderHolderRoleAddr

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934) each SHALL contain exactly one [1..1] participantRole (CONF:8936) holderRole SHOULD contain zero or one [0..1] addr with data type USRealmAddress (CONF:8925)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD).participantRole->excluding(null)->reject((addr->isEmpty() or addr->exists(element | element.isNullFlavorUndefined())) implies (not addr->isEmpty()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="HLD">
<participantRole/>
</participant>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="HLD">
<participantRole>
<addr/>
</participantRole>
</participant>
</act>

0.074
testValidatePolicyActivityHolderTemplateId

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934) SHALL contain exactly one [1..1] templateId ( CONF:16813, CONF:16815 ) such that it SHALL contain exactly one [1..1] @root="2.16.840.1.113883.10.20.22.4.90"

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD)->select(typeCode=vocab::ParticipationType::HLD)->reject(templateId->exists(id : datatypes::II | id.root = '2.16.840.1.113883.10.20.22.4.90'))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="HLD"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="HLD">
<templateId root="2.16.840.1.113883.10.20.22.4.90"/>
</participant>
</act>

0.040
testValidatePolicyActivityHolderTypeCode

Constraint

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD)->select(typeCode=vocab::ParticipationType::HLD)->reject(typeCode=vocab::ParticipationType::HLD)

SuccessInvalid XML


Skip Fail Test

Valid XML


<act xmlns="urn:hl7-org:v3">
<participant typeCode="HLD"/>
</act>

0.035
testValidatePolicyActivityHolderTime

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934) holder MAY contain zero or one [0..1] time (CONF:8938)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD)->select(typeCode=vocab::ParticipationType::HLD)->reject((time.oclIsUndefined() or time.isNullFlavorUndefined()) implies (not time.oclIsUndefined()))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="HLD"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="HLD">
<time/>
</participant>
</act>

0.080
testValidatePolicyActivityHolderHolderRole

Constraint

Consol Policy Activity SHOULD contain zero or one [0..1] participant (CONF:8934) holder SHALL contain exactly one [1..1] participantRole (CONF:8936)

OCL

self.participant->excluding(null)->select(typeCode=vocab::ParticipationType::HLD)->select(typeCode=vocab::ParticipationType::HLD)->reject(participantRole->one(participantRole : cda::ParticipantRole | not participantRole.oclIsUndefined() and participantRole.oclIsKindOf(cda::ParticipantRole)))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="HLD"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<participant typeCode="HLD">
<participantRole/>
</participant>
</act>

0.054
testValidatePolicyActivityEntryRelationshipTargetActActivity

Constraint

Consol Policy Activity SHALL contain at least one [1..*] entryRelationship (CONF:8939) entryRelationship The target of a policy activity with act/entryRelationship/@typeCode="REFR" SHALL be an authorization activity (templateId 2.16.840.1.113883.10.20.1.19) OR an act, with act[@classCode="ACT"] and act[@moodCode="DEF"], representing a description of the coverage plan (CONF:8942)

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::REFR)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::REFR)->reject(act->one(a : cda::Act | a.oclIsTypeOf(consol::AuthorizationActivity) or (a.classCode=vocab::x_ActClassDocumentEntryAct::ACT and a.moodCode=vocab::x_DocumentActMood::DEF)))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<entryRelationship typeCode="REFR"/>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<entryRelationship typeCode="REFR">
<act/>
</entryRelationship>
</act>

0.061
testValidatePolicyActivityEntryRelationshipDescriptionCoveragePlan

Constraint

Consol Policy Activity SHALL contain at least one [1..*] entryRelationship (CONF:8939) entryRelationship A description of the coverage plan SHALL contain one or more act/id, to represent the plan identifier, and an act/text with the name of the plan (CONF:8943)

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::REFR)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::REFR)->reject(act->select(a : cda::Act | a.classCode=vocab::x_ActClassDocumentEntryAct::ACT and (a.moodCode=vocab::x_DocumentActMood::DEF))->forAll(id->size() > 0 and text->size() = 1))

SuccessInvalid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<entryRelationship typeCode="REFR">
<act classCode="ACT" moodCode="DEF"/>
</entryRelationship>
</act>

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<entryRelationship typeCode="REFR">
<act classCode="ACT" moodCode="DEF">
<id/>
<text/>
</act>
</entryRelationship>
</act>

0.096
testValidatePolicyActivityEntryRelationshipTypeCode

Constraint

OCL

self.entryRelationship->excluding(null)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::REFR)->select(typeCode=vocab::x_ActRelationshipEntryRelationship::REFR)->reject(typeCode=vocab::x_ActRelationshipEntryRelationship::REFR)

SuccessInvalid XML


Skip Fail Test

Valid XML


<act xmlns="urn:hl7-org:v3" classCode="ACT" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.61"/>
<code codeSystemName=""/>
<statusCode code="completed"/>
<entryRelationship typeCode="REFR"/>
</act>

0.035
Properties »