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

Constraint : ch_pdq_014_controlActProcess

Constraint Name
ch_pdq_014_controlActProcess (type: ERROR, kind: )
Constraint Class
CHPDQControlActProcess
Package
chpdqresponse
Description
If there are more than 5 matches zero matches a special handling like in the XCPD transaction (see IHE ITI TF-2b, chapter 3.55.4.2.2.6) is necessary.
OCL
(
  				self.subject->size() > 0
  			)
  			or
  			(
  				self.subject->size() = 0 and
  				not(self.queryAck.oclIsUndefined()) and
  				not(self.queryAck.resultTotalQuantity.oclIsUndefined()) and
  				not(self.queryAck.resultTotalQuantity.value.oclIsUndefined()) and
  				self.queryAck.resultTotalQuantity.value = 0
  			)
  			or
  			(
  				self.subject->size() = 0 and
  				self.reasonOf->size() > 0 and
  				self.reasonOf->forAll(reason : MFMIMT700711UV01Reason |
  					not(reason.detectedIssueEvent.oclIsUndefined()) and
  					reason.detectedIssueEvent.triggerFor->size() > 0 and
  					reason.detectedIssueEvent.triggerFor->forAll(triggerfor :  MCAIMT900001UV01Requires | 
  						not(triggerfor.actOrderRequired.oclIsUndefined()) and
  						not(triggerfor.actOrderRequired.code.oclIsUndefined()) and
  						not(triggerfor.actOrderRequired.code.code.oclIsUndefined()) and
  						CommonOperationsStatic::matchesCodeToValueSet('1.3.6.1.4.1.12559.11.25.1.15.5', triggerfor.actOrderRequired.code.code.toLowerCase())
  					)
  				)
  			)