{
  "resourceType": "StructureDefinition",
  "id": "e922ac52-b6d3-44f2-91ec-86ba8f301910",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2018-02-25T16:04:33.353+00:00"
  },
  "url": "http://trilliumbridge.eu/fhir/StructureDefinition/observation-imaging-uv-trillium2",
  "name": "Observation-imaging-uv-trillium2",
  "status": "draft",
  "experimental": true,
  "date": "2018-02-06T08:53:52.315+00:00",
  "contact": [
    {
      "name": "Giorgio Cangioli"
    }
  ],
  "description": "This profile represents the contraints applied to the Observation resource by the Trillium II project, which specifies an imaging observation for the international patient summary based on the FHIR standard STU3.",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.extension",
        "path": "Observation.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Observation.extension:partOf",
        "path": "Observation.extension",
        "sliceName": "partOf",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/event-partOf"
          }
        ]
      },
      {
        "id": "Observation.extension:partOf.valueReference:valueReference",
        "path": "Observation.extension.valueReference",
        "sliceName": "valueReference",
        "type": [
          {
            "code": "Reference",
            "profile": "http://trilliumbridge.eu/fhir/StructureDefinition/imagingstudy-uv-trillium2"
          }
        ]
      },
      {
        "id": "Observation.extension:partOf.valueReference:valueReference.identifier",
        "path": "Observation.extension.valueReference.identifier",
        "max": "0"
      },
      {
        "id": "Observation.extension:partOf.valueReference:valueReference.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.extension.valueReference.display",
        "max": "0"
      },
      {
        "id": "Observation.extension:derivedFrom",
        "path": "Observation.extension",
        "sliceName": "derivedFrom",
        "type": [
          {
            "code": "Extension",
            "profile": "http://trilliumbridge.eu/fhir/StructureDefinition/derivedfrom-observation-uv-trillium2"
          }
        ]
      },
      {
        "id": "Observation.extension:derivedFrom.valueReference:valueReference",
        "path": "Observation.extension.valueReference",
        "sliceName": "valueReference",
        "type": [
          {
            "code": "Reference",
            "profile": "http://trilliumbridge.eu/fhir/StructureDefinition/documentreference-uv-trillium2",
            "versioning": "independent"
          },
          {
            "code": "Reference",
            "targetProfile": "http://trilliumbridge.eu/fhir/StructureDefinition/imagingstudy-reftoevidences-uv-trillium2",
            "versioning": "independent"
          }
        ]
      },
      {
        "id": "Observation.extension:reasonCode",
        "path": "Observation.extension",
        "sliceName": "reasonCode",
        "short": "Why was event performed?",
        "definition": "Describes why the event occurred in coded or textual form.",
        "comment": "For free text (uncoded data) use reasonCode.text.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/event-reasonCode"
          }
        ]
      },
      {
        "id": "Observation.basedOn",
        "path": "Observation.basedOn",
        "max": "0"
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "min": 1,
        "max": "1",
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "http://hl7.org/fhir/observation-category",
              "code": "imaging",
              "display": "Imaging"
            }
          ]
        }
      },
      {
        "id": "Observation.category.coding.system",
        "path": "Observation.category.coding.system",
        "fixedUri": "http://hl7.org/fhir/observation-category"
      },
      {
        "id": "Observation.category.coding.code",
        "path": "Observation.category.coding.code",
        "fixedCode": "imaging"
      },
      {
        "id": "Observation.category.coding.userSelected",
        "path": "Observation.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Observation.category.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.category.text",
        "max": "0"
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "label": "Diagnostic Procedure Code",
        "definition": "Describes what was observed. Sometimes this is called the observation \"name\".\r\nIn this profile the code of the containing observation (the organizer result in the CDA implementation) may correspond to the procedure code (e.g. Chest X-Ray).",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ObservationCode"
            }
          ],
          "strength": "extensible",
          "valueSetUri": "http://trilliumbridge.eu/fhir/ValueSet/imaging-obs-code"
        }
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "definition": "The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed.  Comments: Indirect characteristics may be those of a specimen, fetus, donor,  other observer (for example a relative or EMT), or any observation made about the subject.\r\n\r\nIn this profile is constrained to the patient",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://trilliumbridge.eu/fhir/StructureDefinition/patient-uv-trillium2"
          }
        ]
      },
      {
        "id": "Observation.subject.identifier",
        "path": "Observation.subject.identifier",
        "max": "0"
      },
      {
        "id": "Observation.context",
        "path": "Observation.context",
        "max": "0"
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "label": "Date/Time of the Imaging Procedure",
        "definition": "The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself."
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "label": "Human Observer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
          },
          {
            "code": "Reference",
            "targetProfile": "http://trilliumbridge.eu/fhir/StructureDefinition/practitioner-uv-trillium2"
          },
          {
            "code": "Reference",
            "targetProfile": "http://trilliumbridge.eu/fhir/StructureDefinition/organization-observation-uv-trillium2"
          }
        ]
      },
      {
        "id": "Observation.performer.identifier",
        "path": "Observation.performer.identifier",
        "max": "0"
      },
      {
        "id": "Observation.valueString:valueString",
        "path": "Observation.valueString",
        "sliceName": "valueString",
        "label": "Overall Conclusion",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Observation.dataAbsentReason",
        "path": "Observation.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.interpretation",
        "path": "Observation.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.comment",
        "path": "Observation.comment",
        "max": "0"
      },
      {
        "id": "Observation.bodySite",
        "path": "Observation.bodySite",
        "label": "body site"
      },
      {
        "id": "Observation.method",
        "path": "Observation.method",
        "max": "0"
      },
      {
        "id": "Observation.specimen",
        "path": "Observation.specimen",
        "max": "0"
      },
      {
        "id": "Observation.device",
        "path": "Observation.device",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://trilliumbridge.eu/fhir/StructureDefinition/device-observer-uv-trillium2"
          }
        ]
      },
      {
        "id": "Observation.device.identifier",
        "path": "Observation.device.identifier",
        "max": "0"
      },
      {
        "id": "Observation.device.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.device.display",
        "max": "0"
      },
      {
        "id": "Observation.referenceRange",
        "path": "Observation.referenceRange",
        "max": "0"
      },
      {
        "id": "Observation.related",
        "path": "Observation.related",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Observation.related:hasMember",
        "path": "Observation.related",
        "sliceName": "hasMember",
        "constraint": [
          {
            "key": "hasMemberOrComponent",
            "severity": "error",
            "human": "component and hasMember are mutually exclusive",
            "expression": "../related[type='has-member'] or ../component"
          }
        ]
      },
      {
        "id": "Observation.related:hasMember.type",
        "path": "Observation.related.type",
        "min": 1,
        "fixedCode": "has-member"
      },
      {
        "id": "Observation.related:hasMember.target",
        "path": "Observation.related.target",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://trilliumbridge.eu/fhir/StructureDefinition/observation-imaging-member-uv-trillium2"
          }
        ]
      },
      {
        "id": "Observation.related:hasMember.target.identifier",
        "path": "Observation.related.target.identifier",
        "max": "0"
      },
      {
        "id": "Observation.related:hasMember.target.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.related.target.display",
        "max": "0"
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "value[x]"
            }
          ],
          "rules": "open"
        },
        "requirements": "Required if not(exists(Observation.valueString))",
        "constraint": [
          {
            "key": "hasMemberOrComponent",
            "severity": "error",
            "human": "component and hasMember are mutually exclusive",
            "expression": "../related[type='has-member'] or ../component"
          }
        ]
      },
      {
        "id": "Observation.component:observationText",
        "path": "Observation.component",
        "sliceName": "observationText",
        "max": "1"
      },
      {
        "id": "Observation.component:observationText.code",
        "path": "Observation.component.code",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ObservationCode"
            }
          ],
          "strength": "example",
          "valueSetReference": {
            "reference": "http://trilliumbridge.eu/fhir/ValueSet/imaging-obs-code"
          }
        }
      },
      {
        "id": "Observation.component:observationText.code.coding",
        "path": "Observation.component.code.coding",
        "binding": {
          "strength": "extensible",
          "valueSetUri": "http://trilliumbridge.eu/fhir/ValueSet/imaging-txtobs-code"
        }
      },
      {
        "id": "Observation.component:observationText.valueString:valueString",
        "path": "Observation.component.valueString",
        "sliceName": "valueString",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Observation.component:observationText.dataAbsentReason",
        "path": "Observation.component.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.component:observationText.interpretation",
        "path": "Observation.component.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.component:observationText.referenceRange",
        "path": "Observation.component.referenceRange",
        "max": "0"
      },
      {
        "id": "Observation.component:observationCode",
        "path": "Observation.component",
        "sliceName": "observationCode",
        "max": "1"
      },
      {
        "id": "Observation.component:observationCode.code.coding",
        "path": "Observation.component.code.coding",
        "binding": {
          "strength": "extensible",
          "valueSetUri": "http://trilliumbridge.eu/fhir/ValueSet/imaging-codedobs-code"
        }
      },
      {
        "id": "Observation.component:observationCode.valueCodeableConcept:valueCodeableConcept",
        "path": "Observation.component.valueCodeableConcept",
        "sliceName": "valueCodeableConcept",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "Observation.component:observationCode.valueCodeableConcept:valueCodeableConcept.coding",
        "path": "Observation.component.valueCodeableConcept.coding",
        "binding": {
          "strength": "example",
          "valueSetUri": "http://trilliumbridge.eu/fhir/ValueSet/imaging-codedobs-value"
        }
      },
      {
        "id": "Observation.component:observationCode.dataAbsentReason",
        "path": "Observation.component.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.component:observationCode.interpretation",
        "path": "Observation.component.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.component:observationCode.referenceRange",
        "path": "Observation.component.referenceRange",
        "max": "0"
      },
      {
        "id": "Observation.component:numericMeasurement",
        "path": "Observation.component",
        "sliceName": "numericMeasurement"
      },
      {
        "id": "Observation.component:numericMeasurement.code",
        "path": "Observation.component.code",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ObservationCode"
            }
          ],
          "strength": "extensible",
          "description": "Codes identifying names of numeric measurements",
          "valueSetUri": "http://trilliumbridge.eu/fhir/ValueSet/imaging-num-measure-code"
        }
      },
      {
        "id": "Observation.component:numericMeasurement.value[x]",
        "path": "Observation.component.value[x]",
        "type": [
          {
            "code": "Quantity"
          },
          {
            "code": "Range"
          },
          {
            "code": "Ratio"
          }
        ]
      },
      {
        "id": "Observation.component:numericMeasurement.dataAbsentReason",
        "path": "Observation.component.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.component:numericMeasurement.interpretation",
        "path": "Observation.component.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.component:linearMeasurement",
        "path": "Observation.component",
        "sliceName": "linearMeasurement"
      },
      {
        "id": "Observation.component:linearMeasurement.code",
        "path": "Observation.component.code",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ObservationCode"
            }
          ],
          "strength": "extensible",
          "valueSetUri": "http://trilliumbridge.eu/fhir/ValueSet/imaging-linear-measure-code"
        }
      },
      {
        "id": "Observation.component:linearMeasurement.value[x]",
        "path": "Observation.component.value[x]",
        "type": [
          {
            "code": "Quantity"
          },
          {
            "code": "Range"
          },
          {
            "code": "Ratio"
          },
          {
            "code": "SampledData"
          }
        ]
      },
      {
        "id": "Observation.component:linearMeasurement.dataAbsentReason",
        "path": "Observation.component.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.component:linearMeasurement.interpretation",
        "path": "Observation.component.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.component:areaMeasurement",
        "path": "Observation.component",
        "sliceName": "areaMeasurement"
      },
      {
        "id": "Observation.component:areaMeasurement.code",
        "path": "Observation.component.code",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ObservationCode"
            }
          ],
          "strength": "extensible",
          "valueSetReference": {
            "reference": "http://trilliumbridge.eu/fhir/ValueSet/imaging-area-measure-code"
          }
        }
      },
      {
        "id": "Observation.component:areaMeasurement.value[x]",
        "path": "Observation.component.value[x]",
        "type": [
          {
            "code": "Quantity"
          },
          {
            "code": "Range"
          },
          {
            "code": "Ratio"
          }
        ]
      },
      {
        "id": "Observation.component:areaMeasurement.dataAbsentReason",
        "path": "Observation.component.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.component:areaMeasurement.interpretation",
        "path": "Observation.component.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.component:volumeMeasurement",
        "path": "Observation.component",
        "sliceName": "volumeMeasurement"
      },
      {
        "id": "Observation.component:volumeMeasurement.code",
        "path": "Observation.component.code",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ObservationCode"
            }
          ],
          "strength": "extensible",
          "valueSetUri": "http://trilliumbridge.eu/fhir/ValueSet/imaging-volume-measure-code"
        }
      },
      {
        "id": "Observation.component:volumeMeasurement.value[x]",
        "path": "Observation.component.value[x]",
        "type": [
          {
            "code": "Quantity"
          },
          {
            "code": "Range"
          },
          {
            "code": "Ratio"
          }
        ]
      },
      {
        "id": "Observation.component:volumeMeasurement.dataAbsentReason",
        "path": "Observation.component.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.component:volumeMeasurement.interpretation",
        "path": "Observation.component.interpretation",
        "max": "0"
      }
    ]
  }
}