Constraint Descriptor : PurposeOfUse (type: ERROR, kind: )

Constraint : PurposeOfUse

Constraint Name
PurposeOfUse (type: ERROR, kind: )
Constraint Class
IEXUAAssertionSpec
Package
iexua
Description
Purpose of Use (including breakglass). The value SHALL be one of the values of the Purpose of Use Value Set.The value set (OID=1.2.372.980010.3.5) is specified in the General Terminology Interoperability Specification.
OCL
self.attributeStatement->size() > 0 and
  			self.attributeStatement->forAll(ast : AttributeStatementType | 
  				ast.attribute->size() > 0 and 
  				ast.attribute->exists(at : AttributeType | 
  					not(at.name.oclIsUndefined()) and 
  					at.name = 'urn:oasis:names:tc:xspa:1.0:subject:purposeofuse' and 
  					at.attributeValue->size()>0 and
  					at.attributeValue->forAll(av : AttributeValueType | 
  						not(av.purposeOfUse.oclIsUndefined()) and
  						not(av.purposeOfUse.code.oclIsUndefined()) and
  						not(av.purposeOfUse.codeSystem.oclIsUndefined()) and
  						av.purposeOfUse.codeSystem = '1.2.372.980010.3.5' and
  						av.matchesCodeToValueSet(av.purposeOfUse.codeSystem, av.purposeOfUse.code)
  					)
  				)
  			)