PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.ca.baseline@1.1.6-pre
    http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-observation-results
description: Proposed constraints on the Observation Resource to represent results produced by laboratory tests or panels/studies
package_name: hl7.fhir.ca.baseline
derivation: constraint
name: ObservationProfileLaboratory
type: Observation
elements:
  category:
    mustSupport: true
    index: 1
    slicing:
      rules: open
      discriminator:
      - {path: $this, type: pattern}
      min: 1
      slices:
        laboratory:
          match:
            coding:
            - {code: laboratory, system: 'http://terminology.hl7.org/CodeSystem/observation-category'}
          schema:
            constraint:
              ca-baseline-category: {human: 'SHALL have a category from ''http://terminology.hl7.org/CodeSystem/observation-category''', severity: error, expression: 'where(coding.system=''http://terminology.hl7.org/CodeSystem/observation-category'' and coding.code.exists()).exists()'}
            short: FHIR standard classification of type of observation
            type: CodeableConcept
            mustSupport: true
            _required: true
            pattern:
              type: CodeableConcept
              value:
                coding:
                - {code: laboratory, system: 'http://terminology.hl7.org/CodeSystem/observation-category'}
            index: 2
          min: 1
  referenceRange: {index: 26}
  hasMember: {index: 27}
  value[x]:
    elements:
      value: {index: 22}
      system:
        pattern: {type: Uri, value: 'http://unitsofmeasure.org'}
        constraint:
          ca-baseline-results-2: {human: SHALL use UCUM for coded quantity units, severity: error, expression: 'where(valueQuantity.system=''http://unitsofmeasure.org'' and valueQuantity.value.exists()).exists()'}
        index: 23
    required: [value]
  interpretation: {index: 25}
  valueQuantity:
    type: Quantity
    choiceOf: value
    index: 21
    slicing:
      slices:
        valueQuantity:
          match: {}
          schema: {type: Quantity, choiceOf: value, index: 21}
  value:
    choices: [valueQuantity]
    index: 20
    slicing:
      slices:
        valueQuantity:
          match: {}
          schema:
            choices: [valueQuantity]
            index: 20
  component:
    index: 28
    elements:
      code:
        binding: {strength: preferred, valueSet: 'http://hl7.org/fhir/ValueSet/observation-codes'}
        mustSupport: true
        index: 29
      value:
        choices: [valueQuantity]
        index: 39
        slicing:
          slices:
            valueQuantity:
              match: {}
              schema:
                choices: [valueQuantity]
                index: 39
      valueCodeableConcept:
        type: CodeableConcept
        constraint:
          ca-baseline-results-1: {human: SHOULD use SNOMED CT for coded Results, severity: warning, expression: 'valueCodeableConcept.coding.system.empty() or valueCodeableConcept.coding.system = ''http://snomed.info/sct'''}
        choiceOf: value
        index: 34
        slicing:
          slices:
            valueCodeableConcept:
              match: {}
              schema:
                type: CodeableConcept
                constraint:
                  ca-baseline-results-1: {human: SHOULD use SNOMED CT for coded Results, severity: warning, expression: 'valueCodeableConcept.coding.system.empty() or valueCodeableConcept.coding.system = ''http://snomed.info/sct'''}
                choiceOf: value
                index: 34
      value[x]:
        elements:
          value: {index: 41}
          system:
            pattern: {type: Uri, value: 'http://unitsofmeasure.org'}
            constraint:
              ca-baseline-results-2: {human: SHALL use UCUM for coded quantity units, severity: error, expression: 'where(valueQuantity.system=''http://unitsofmeasure.org'' and valueQuantity.value.exists()).exists()'}
            index: 42
        required: [value]
      valueQuantity:
        type: Quantity
        choiceOf: value
        index: 40
        slicing:
          slices:
            valueQuantity:
              match: {}
              schema: {type: Quantity, choiceOf: value, index: 40}
      dataAbsentReason: {index: 43}
  effectiveDateTime:
    type: dateTime
    constraint:
      ca-baseline-datetime: {human: Datetime SHALL be at least to day, severity: error, expression: ($this as dateTime).toString().length() >= 8}
    mustSupport: true
    choiceOf: effective
    index: 7
  status: {index: 0}
  effective:
    constraint:
      ca-baseline-datetime: {human: Datetime SHALL be at least to day, severity: error, expression: ($this as dateTime).toString().length() >= 8}
    mustSupport: true
    choices: [effectiveDateTime, effectivePeriod]
    index: 6
  code:
    binding: {strength: preferred, valueSet: 'http://hl7.org/fhir/ValueSet/observation-codes'}
    mustSupport: true
    index: 3
  valueCodeableConcept:
    type: CodeableConcept
    constraint:
      ca-baseline-results-1: {human: SHOULD use SNOMED CT for coded Results, severity: warning, expression: 'valueCodeableConcept.coding.system.empty() or valueCodeableConcept.coding.system = ''http://snomed.info/sct'''}
    choiceOf: value
    index: 15
    slicing:
      slices:
        valueCodeableConcept:
          match: {}
          schema:
            type: CodeableConcept
            constraint:
              ca-baseline-results-1: {human: SHOULD use SNOMED CT for coded Results, severity: warning, expression: 'valueCodeableConcept.coding.system.empty() or valueCodeableConcept.coding.system = ''http://snomed.info/sct'''}
            choiceOf: value
            index: 15
  issued: {index: 9}
  subject:
    type: Reference
    mustSupport: true
    refers: ['http://hl7.org/fhir/StructureDefinition/Device', 'http://hl7.org/fhir/StructureDefinition/Group', 'http://hl7.org/fhir/StructureDefinition/Location', 'http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-patient']
    index: 4
  performer:
    type: Reference
    mustSupport: true
    refers: ['http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-organization', 'http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-patient', 'http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-practitioner', 'http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-practitionerrole']
    index: 10
  dataAbsentReason: {index: 24}
  effectivePeriod:
    type: Period
    constraint:
      ca-baseline-datetime: {human: Datetime SHALL be at least to day, severity: error, expression: ($this as dateTime).toString().length() >= 8}
    mustSupport: true
    choiceOf: effective
    index: 8
package_version: 1.1.6-pre
class: profile
kind: resource
url: http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-observation-results
base: http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-observation
version: 0.6.0
required: [subject, category]