{
  "resourceType": "StructureDefinition",
  "id": "RelatedObservation",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2018-06-06T09:20:59.933+00:00"
  },
  "url": "http://smis.ch/fhir/StructureDefinition/RelatedObservation",
  "version": "1.0",
  "name": "RelatedObservation",
  "title": "SMIS Related Observation Profile",
  "status": "draft",
  "date": "2018-08-24",
  "publisher": "Arpage AG",
  "contact": [
    {
      "name": "Patrick Husi",
      "telecom": [
        {
          "system": "email",
          "value": "patrick.husi@arpage.ch"
        }
      ]
    }
  ],
  "description": "SMIS Related Observation Profile",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.status",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
            "valueString": "default: final"
          }
        ],
        "path": "Observation.status",
        "fixedCode": "final"
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "min": 1
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://smis.ch/fhir/StructureDefinition/Patient",
            "aggregation": [
              "referenced"
            ]
          }
        ],
        "constraint": [
          {
            "key": "smis-obs-1",
            "severity": "error",
            "human": "Either reference or identifier should be present",
            "expression": "reference.exists() or identifier.exists()",
            "xpath": "exists(f:reference) or exists(f:identifier)"
          }
        ]
      },
      {
        "id": "Observation.effective[x]:effectiveDateTime",
        "path": "Observation.effectiveDateTime",
        "sliceName": "effectiveDateTime",
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "Observation.value[x]:valueQuantity",
        "path": "Observation.valueQuantity",
        "sliceName": "valueQuantity",
        "type": [
          {
            "code": "Quantity"
          }
        ]
      }
    ]
  }
}