PackagesCanonicalsLogsProblems
    Packages
    hl7.cda.us.ccda@4.0.0
    http://hl7.org/cda/us/ccda/StructureDefinition/PreoperativeDiagnosis
description: 'This template represents the surgical diagnosis or diagnoses assigned to the patient before the surgical procedure and is the reason for the surgery. The preoperative diagnosis is, in the opinion of the surgeon, the diagnosis that will be confirmed during surgery.\n\n#### Templates Used\nAlthough open templates may contain any valid CDA content, the following templates are specifically called out by this template:\n\n**Required EntryRelationships**: [ProblemObservation](StructureDefinition-ProblemObservation.html)'
package_name: hl7.cda.us.ccda
derivation: constraint
name: PreoperativeDiagnosis
type: http://hl7.org/cda/stds/core/StructureDefinition/Act
elements:
  templateId:
    index: 0
    slicing:
      rules: open
      discriminator:
      - {path: root, type: value}
      - {path: extension, type: value}
      min: 1
      slices:
        preoperative-dx:
          match: {root: 2.16.840.1.113883.10.20.22.4.65, extension: '2015-08-01'}
          schema:
            _required: true
            index: 1
            elements:
              root:
                pattern: {type: String, value: 2.16.840.1.113883.10.20.22.4.65}
                index: 2
              extension:
                pattern: {type: String, value: '2015-08-01'}
                index: 3
            required: [root, extension]
            extensions: {}
  classCode:
    pattern: {type: Code, value: ACT}
    index: 4
  moodCode:
    pattern: {type: Code, value: EVN}
    index: 5
  code:
    index: 6
    elements:
      code:
        pattern: {type: Code, value: 10219-4}
        index: 7
      codeSystem:
        pattern: {type: String, value: 2.16.840.1.113883.6.1}
        index: 8
    required: [codeSystem, code]
  text:
    short: SHOULD reference the portion of section narrative text corresponding to this entry
    index: 9
    elements:
      reference:
        constraint:
          value-starts-octothorpe: {human: 'If reference/@value is present, it SHALL begin with a ''#'' and SHALL point to its corresponding narrative', source: 'http://hl7.org/cda/us/ccda/StructureDefinition/PreoperativeDiagnosis', severity: error, expression: value.exists() implies value.startsWith('#')}
        index: 10
  entryRelationship:
    index: 11
    slicing:
      rules: open
      discriminator:
      - {path: observation, type: profile}
      min: 1
      slices:
        problemObservation:
          match: {}
          schema:
            array: true
            min: 1
            _required: true
            index: 12
            elements:
              typeCode:
                pattern: {type: Code, value: SUBJ}
                index: 13
              observation: {type: 'http://hl7.org/cda/stds/core/StructureDefinition/Observation', index: 14}
            required: [observation]
package_version: 4.0.0
class: logical
kind: logical
url: http://hl7.org/cda/us/ccda/StructureDefinition/PreoperativeDiagnosis
base: http://hl7.org/cda/stds/core/StructureDefinition/Act
version: 4.0.0
required: [templateId, entryRelationship]