PackagesCanonicalsLogsProblems
    Packages
    hl7.cda.us.ccda@4.0.0-ballot
    http://hl7.org/cda/us/ccda/StructureDefinition/DateOfDiagnosisAct
description: This template represents the earliest date of diagnosis, which is the date of first determination by a qualified professional of the presence of a problem or condition affecting a patient. An encounter diagnosis date may be different than this Date of Diagnosis.\n\nThe date of diagnosis is usually not the same date as the date of condition onset. A patient may have a condition for some time before it is formally diagnosed.
package_name: hl7.cda.us.ccda
derivation: constraint
name: DateOfDiagnosisAct
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:
        date-of-diagnosis-act:
          match: {root: 2.16.840.1.113883.10.20.22.4.502, extension: '2022-06-01'}
          schema:
            _required: true
            index: 1
            elements:
              root:
                pattern: {type: String, value: 2.16.840.1.113883.10.20.22.4.502}
                index: 2
              extension:
                pattern: {type: String, value: '2022-06-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: 77975-1}
        index: 7
      codeSystem:
        pattern: {type: String, value: 2.16.840.1.113883.6.1}
        index: 8
    required: [codeSystem]
  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/DateOfDiagnosisAct', severity: error, expression: value.exists() implies value.startsWith('#')}
        index: 10
  statusCode:
    index: 11
    elements:
      code:
        pattern: {type: Code, value: completed}
        index: 12
    required: [code]
  effectiveTime:
    constraint:
      value-only: {human: Interval fields SHALL NOT be present, source: 'http://hl7.org/cda/us/ccda/StructureDefinition/DateOfDiagnosisAct', severity: error, expression: (low | high | width | center).empty()}
      ts-shall-year: {human: '**SHALL** be precise to at least the year', source: 'http://hl7.org/cda/us/ccda/StructureDefinition/DateOfDiagnosisAct', severity: error, expression: nullFlavor.exists() or value.toString().length() >= 4}
    index: 13
    elements:
      value: {short: value should be used instead of low/high, index: 14}
    required: [value]
package_version: 4.0.0-ballot
class: logical
kind: logical
url: http://hl7.org/cda/us/ccda/StructureDefinition/DateOfDiagnosisAct
base: http://hl7.org/cda/stds/core/StructureDefinition/Act
version: 4.0.0-ballot
required: [effectiveTime, statusCode, templateId]