{
  "resourceType": "StructureDefinition",
  "url": "https://fhir.catsalut.cat/r4/mConnectaHES/StructureDefinition/HESConnecta_Observation",
  "name": "HESConnecta_Observation",
  "status": "draft",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.identifier",
        "path": "Observation.identifier",
        "mustSupport": true
      },
      {
        "id": "Observation.identifier.value",
        "path": "Observation.identifier.value",
        "min": 1
      },
      {
        "id": "Observation.basedOn",
        "path": "Observation.basedOn",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.catsalut.cat/r4/mConnectaHES/StructureDefinition/HESConnecta_ServiceRequest"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.basedOn.reference",
        "path": "Observation.basedOn.reference",
        "min": 1
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "mustSupport": true
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "comment": "vertical del caso de uso en el que se enmarca la medida\r\n\r\nIn addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
        "mustSupport": true
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "comment": "// aquí indicaremos información adicional vital signs, por ejemplo...\r\n\r\n*All* code-value and, if present, component.code-component.value pairs need to be taken into account to correctly understand the meaning of the observation.",
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "min": 1
      },
      {
        "id": "Observation.code.coding.system",
        "path": "Observation.code.coding.system",
        "min": 1
      },
      {
        "id": "Observation.code.coding.code",
        "path": "Observation.code.coding.code",
        "min": 1
      },
      {
        "id": "Observation.code.coding.display",
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.catsalut.cat/r4/mConnectaHES/StructureDefinition/HESConnecta_Patient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.subject.identifier",
        "path": "Observation.subject.identifier",
        "min": 1
      },
      {
        "id": "Observation.subject.identifier.type",
        "path": "Observation.subject.identifier.type",
        "min": 1
      },
      {
        "id": "Observation.subject.identifier.type.coding.code",
        "path": "Observation.subject.identifier.type.coding.code",
        "min": 1,
        "fixedCode": "CIP-CatSalut"
      },
      {
        "id": "Observation.subject.identifier.type.coding.display",
        "path": "Observation.subject.identifier.type.coding.display",
        "min": 1,
        "fixedString": "Codi d'identificació personal únic del Servei Català de la Salut (CIP-CatSalut)"
      },
      {
        "id": "Observation.subject.identifier.system",
        "path": "Observation.subject.identifier.system",
        "min": 1,
        "fixedUri": "urn:oid:2.16.724.4.9.10.1"
      },
      {
        "id": "Observation.subject.identifier.value",
        "path": "Observation.subject.identifier.value",
        "min": 1
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "type": [
          {
            "code": "dateTime"
          },
          {
            "code": "Period"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.interpretation",
        "path": "Observation.interpretation",
        "mustSupport": true
      },
      {
        "id": "Observation.note",
        "path": "Observation.note",
        "mustSupport": true
      },
      {
        "id": "Observation.device",
        "path": "Observation.device",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.catsalut.cat/r4/mConnectaHES/StructureDefinition/HESConnecta-Device"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.device.reference",
        "path": "Observation.device.reference",
        "min": 1
      },
      {
        "id": "Observation.referenceRange",
        "path": "Observation.referenceRange",
        "mustSupport": true
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Observation.component.code",
        "path": "Observation.component.code",
        "binding": {
          "strength": "preferred"
        }
      }
    ]
  }
}