PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.us.davinci-crd@2.2.0-ballot
    http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-alternateRequest
description: Defines CRD-specific constraints for the Alternate Request response type
package_name: hl7.fhir.us.davinci-crd
derivation: constraint
name: CRDHooksResponseAlternateRequest
abstract: true
type: http://hl7.org/fhir/tools/StructureDefinition/CDSHooksResponse
elements:
  cards:
    mustSupport: true
    index: 0
    elements:
      suggestions:
        constraint:
          crd-respar-1: {human: Must have either one update action or one delete and one create action, severity: error, expression: (actions.count()=1 and actions.all(type='update')) or (actions.count()=2 and actions.exists(type='create') and actions.exists(type='delete') and actions.where(type='create').all(resource.exists() and resourceId.empty()) and actions.where(type='delete').all(resource.empty() and resourceId.exists()))}
        mustSupport: true
        index: 1
        elements:
          actions:
            mustSupport: true
            index: 2
            elements:
              type:
                mustSupport: true
                pattern: {type: code, value: create}
                type: code
                index: 3
              resource: {type: Resource, mustSupport: true, index: 4}
              resourceId: {mustSupport: true, index: 5}
        required: [actions]
      links: {index: 6}
    required: [suggestions]
package_version: 2.2.0-ballot
class: logical
kind: logical
url: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponse-alternateRequest
base: http://hl7.org/fhir/us/davinci-crd/StructureDefinition/CRDHooksResponseBase
version: 2.2.0-ballot
required: [cards]