{
  "resourceType": "StructureDefinition",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2018-03-08T16:05:00.196+00:00"
  },
  "url": "http://hl7.org/fhir/ips/StructureDefinition/observation-pathology-uv-ips",
  "version": "0.2",
  "name": "Observation-pathology-uv-ips",
  "title": "Observation (pathology result)",
  "status": "draft",
  "experimental": true,
  "date": "2018-03-21",
  "publisher": "HL7 International",
  "contact": [
    {
      "name": "François Macary - Phast"
    }
  ],
  "description": "This profile constrains the Observation resource to represent results produced by pathology studies in a patient summary",
  "purpose": "This profile constrains the Observation resource to represent a pathology in vitro study. In case of a multiple-observation study, the results of the study appear as sub-observations. In this case this top-level Observation acts as a grouper of all the observations belonging to the study.  The top-level observation may carry a conclusion in the value element and or a global interpretation by the producer of the study, in the comment element.",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "short": "Laboratory result for a simple test or for a panel/study",
        "definition": "This observation may represent the result of a simple laboratory test such as hematocrit or it may group the set of results produced by a multi-test study or panel such as a complete blood count, a dynamic function test, a urine specimen study. In the latter case, the observation carries the overall conclusion of the study and references the atomic results of the study  as \"has-member\" child observations",
        "comment": "Represents either a lab simple observation or the group of observations produced by a laboratory study."
      },
      {
        "id": "Observation.basedOn",
        "path": "Observation.basedOn",
        "max": "0"
      },
      {
        "id": "Observation.status",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
            "valueString": "default: final"
          }
        ],
        "path": "Observation.status",
        "definition": "The status of the result value. Only final results feed patient summaries.",
        "fixedCode": "final"
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "definition": "A code that classifies the general type of observation being made. In this profile, fixed to \"laboratory\".",
        "comment": "\"laboratory\" includes laboratory medicine and pathology",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": "http://hl7.org/fhir/ips/StructureDefinition/CodeableConcept-uv-ips"
          }
        ]
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "definition": "Describes what was observed. Sometimes this is called the observation \"name\".  In this profile this code represents either a simple laboratory test or a laboratory study with multiple child observations",
        "comment": "In the context of this Observation-laboratory-uv-ips profile, when the observation plays the role of a grouper of member sub-observations, the code represent the group (for instance a panel code). In case no code is available, at least a text shall be provided.",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": "http://hl7.org/fhir/ips/StructureDefinition/CodeableConcept-uv-ips"
          }
        ],
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ObservationCode"
            }
          ],
          "strength": "extensible",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ips/ValueSet/laboratory-tests-and-panels"
          }
        }
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient",
            "aggregation": [
              "referenced"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.subject.identifier",
        "path": "Observation.subject.identifier",
        "max": "0"
      },
      {
        "id": "Observation.context.identifier",
        "path": "Observation.context.identifier",
        "max": "0"
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner",
            "aggregation": [
              "referenced"
            ]
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient",
            "aggregation": [
              "referenced"
            ]
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/ips/StructureDefinition/organization-laboratory-uv-ips"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.performer.identifier",
        "path": "Observation.performer.identifier",
        "max": "0"
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "type": [
          {
            "code": "string"
          },
          {
            "code": "Range"
          },
          {
            "code": "Ratio"
          },
          {
            "code": "time"
          },
          {
            "code": "dateTime"
          },
          {
            "code": "Period"
          },
          {
            "code": "CodeableConcept",
            "profile": "http://hl7.org/fhir/ips/StructureDefinition/CodeableConcept-uv-ips"
          },
          {
            "code": "Quantity",
            "profile": "http://hl7.org/fhir/ips/StructureDefinition/Quantity-uv-ips"
          }
        ],
        "condition": [
          "value"
        ],
        "constraint": [
          {
            "key": "val-1",
            "severity": "error",
            "human": "if no \"related\" element is present then Observation must have a\" value\"",
            "expression": "hasValue() or related.exists"
          }
        ],
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ips/ValueSet/lab-result-coded-value-uv-ips"
          }
        }
      },
      {
        "id": "Observation.dataAbsentReason",
        "path": "Observation.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.interpretation.coding",
        "path": "Observation.interpretation.coding",
        "type": [
          {
            "code": "Coding",
            "profile": "http://hl7.org/fhir/ips/StructureDefinition/coding-uv-ips"
          }
        ]
      },
      {
        "id": "Observation.bodySite",
        "path": "Observation.bodySite",
        "max": "0"
      },
      {
        "id": "Observation.method.coding",
        "path": "Observation.method.coding",
        "type": [
          {
            "code": "Coding",
            "profile": "http://hl7.org/fhir/ips/StructureDefinition/coding-uv-ips"
          }
        ]
      },
      {
        "id": "Observation.specimen",
        "path": "Observation.specimen",
        "comment": "The specimen is often implied by the observation code. \r\nIn the context of this Observation-laboratory-uv-ips profile, specimen should be provided only when it is not implied by the Observation.code, and when further information about the specimen needs to be captured (such as specimen source body site). \r\nIn case of a laboratory panel/study using a single specimen , which needs  further description (like a CSF microbiology study), the specimen is introduced by this element.\r\nIn case of a dynamic function test using multiple specimens, each specimen shall be further described, if needed, within the sub-observation that was produced on this specimen.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/ips/StructureDefinition/specimen-uv-ips"
          }
        ]
      },
      {
        "id": "Observation.specimen.identifier",
        "path": "Observation.specimen.identifier",
        "max": "0"
      },
      {
        "id": "Observation.device.identifier",
        "path": "Observation.device.identifier",
        "max": "0"
      },
      {
        "id": "Observation.referenceRange.type",
        "path": "Observation.referenceRange.type",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept",
            "profile": "http://hl7.org/fhir/ips/StructureDefinition/CodeableConcept-uv-ips"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.related",
        "path": "Observation.related",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type"
            }
          ],
          "rules": "open"
        },
        "definition": "A  reference to another Observation profiled by observation-member-laboratory-uv-trillium2. The target observation is considered as a sub-observation of the current one, which plays the role of a grouper",
        "comment": "This element is used in the context of Trillium II international patient summary when there is a need to group a collection of observations, because they belong to the same panel, or because they share a common interpretation comment, or a common media attachment (illustrative image or graph). In these cases, the current observation profiled as observation-laboratory-uv-trillium2 is the grouper, and its set of sub-observations are related observations  using the type \"has-member\" and the profile observation-member-laboratory-uv-trillium2."
      },
      {
        "id": "Observation.related.type",
        "path": "Observation.related.type",
        "short": "has-member: the related observation is a sub-observation of the current one, which acts as a grouper",
        "definition": "A code specifying the kind of relationship that exists with the target resource.\r\nThe only authorized value in this profile is \"has-member\"",
        "min": 1,
        "fixedCode": "has-member"
      },
      {
        "id": "Observation.related:sub-observation",
        "path": "Observation.related",
        "sliceName": "sub-observation",
        "short": "sub-observation member of this observation",
        "definition": "A  reference to an Observation resource playing the role of sub-observation of the current one. For instance an individial test member of a panel.",
        "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes below](observation.html#4.20.4)."
      },
      {
        "id": "Observation.related:sub-observation.type",
        "path": "Observation.related.type",
        "definition": "Fixed to has-member, introducing a sub-observation (observation member of the current one)",
        "min": 1,
        "fixedCode": "has-member",
        "mustSupport": true
      },
      {
        "id": "Observation.related:sub-observation.target",
        "path": "Observation.related.target",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/ips/StructureDefinition/observation-member-pathology-uv-ips"
          }
        ]
      },
      {
        "id": "Observation.related:attachment",
        "path": "Observation.related",
        "sliceName": "attachment",
        "short": "attachment associated to this observation",
        "definition": "A  reference to another Observation, which is constrained to valueAttachment, in order to convey an illustrative media content."
      },
      {
        "id": "Observation.related:attachment.type",
        "path": "Observation.related.type",
        "definition": "fixed to derived-from, to introduce the attachment linked to the observation.",
        "min": 1,
        "fixedCode": "derived-from"
      },
      {
        "id": "Observation.related:attachment.target",
        "path": "Observation.related.target",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/ips/StructureDefinition/observation-attachment-uv-ips"
          }
        ]
      },
      {
        "id": "Observation.related:attachment.target.identifier",
        "path": "Observation.related.target.identifier",
        "max": "0"
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "max": "0"
      }
    ]
  }
}