{
  "resourceType": "StructureDefinition",
  "id": "0a19a3fd-f868-40c7-986b-f068b729eca1",
  "meta": {
    "lastUpdated": "2021-02-08T14:02:54.272+00:00"
  },
  "url": "https://simplifier.net/ofsti-mconnecta/observacio",
  "name": "Observacio",
  "status": "draft",
  "date": "2021-02-08T12:38:29.585+00:00",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "sct-concept",
      "uri": "http://snomed.info/conceptdomain",
      "name": "SNOMED CT Concept Domain Binding"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "sct-attr",
      "uri": "http://snomed.org/attributebinding",
      "name": "SNOMED CT Attribute Binding"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation",
        "path": "Observation",
        "short": "Mesures i afirmacions senzilles",
        "definition": "Recurs que té com a finalitat recollir les dades concretes preses des dels elements de mobilitat (App, WebAPP, Wereable, Dispositiu mèdic), en el format codi/valor. En el missatge existiran tants recursos Observation com codis/valors s’enviïn, i el codi d’aquestes farà referència a les variables clíniques associades al element de mobilitat, tots ells encapsulats en el corresponent recurs entry."
      },
      {
        "id": "Observation.identifier",
        "path": "Observation.identifier",
        "max": "0"
      },
      {
        "id": "Observation.basedOn",
        "path": "Observation.basedOn",
        "short": "Referència al IDRecomanació",
        "definition": "Aquest element ens permet relacionar el recurs Observation (Observació) amb el recurs ServiceRequest, que és el que conté el ID de recomanació.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/ServiceRequest"
            ]
          }
        ]
      },
      {
        "id": "Observation.basedOn.reference",
        "path": "Observation.basedOn.reference",
        "short": "Referència recurs IDRecomanacio",
        "definition": "Referència al recurs, dins el mateix missatge, al que es troba associada l’observació. Serà sempre l’identificador (element id) del recurs ServiceRequest.",
        "min": 1
      },
      {
        "id": "Observation.basedOn.type",
        "path": "Observation.basedOn.type",
        "short": "Tipus de referència",
        "definition": "Tipus de recurs, dins el mateix missatge, al que es troba associada l’observació. Serà sempre ServiceRequest.",
        "min": 1
      },
      {
        "id": "Observation.basedOn.identifier",
        "path": "Observation.basedOn.identifier",
        "max": "0"
      },
      {
        "id": "Observation.basedOn.display",
        "path": "Observation.basedOn.display",
        "max": "0"
      },
      {
        "id": "Observation.partOf",
        "path": "Observation.partOf",
        "max": "0"
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "definition": "Situació en la que es troba l’observació que serà sempre preliminary (preliminar).",
        "fixedCode": "final"
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "max": "0"
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "short": "Tipus observació (code / type)",
        "definition": "Element que recull les dades relatives a la definició de la variable clínica enviada."
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "short": "Codi definit per un sistema de terminologia",
        "definition": "Element que recull les dades relatives a la codificació emprada.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Observation.code.coding.system",
        "path": "Observation.code.coding.system",
        "short": "Identitat del sistema terminològic",
        "definition": "Referència al sistema de codificació emprat per a la variable clínica. Serà la referència al Servei Terminològic, on hauran d’estar catalogades totes les variables clíniques emprades a la plataforma mConnecta i susceptibles de ser associades a Elements de Mobilitat.",
        "min": 1
      },
      {
        "id": "Observation.code.coding.version",
        "path": "Observation.code.coding.version",
        "max": "0"
      },
      {
        "id": "Observation.code.coding.code",
        "path": "Observation.code.coding.code",
        "short": "Codi de la dada",
        "definition": "El codi de la variable clínica, segons el catàleg de variables clíniques de mConnecta i d’acord amb el Servei Terminològic.",
        "min": 1
      },
      {
        "id": "Observation.code.coding.display",
        "path": "Observation.code.coding.display",
        "short": "Descripció literal",
        "definition": "La descripció de la variable clínica, segons el catàleg de variables clíniques de mConnecta i d’acord amb el Servei Terminològic.",
        "min": 1
      },
      {
        "id": "Observation.code.coding.userSelected",
        "path": "Observation.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Observation.code.text",
        "path": "Observation.code.text",
        "max": "0"
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "definition": "Element que inclou la informació relativa al recurs al qual està associat aquest recurs Observation.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ]
      },
      {
        "id": "Observation.subject.reference",
        "path": "Observation.subject.reference",
        "definition": "Cadena alfanumèrica que inclou la referència al recurs pacient que s’ha informat al element fullUrl del recurs entry que conté al recurs Patient. Aquest ha d’anar precedit de la partícula “urn:uuid:” per a indicar que la referència és al propi contenidor (Bundle). \r\n\r\nA reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
        "min": 1
      },
      {
        "id": "Observation.subject.type",
        "path": "Observation.subject.type",
        "definition": "El tipus de recurs al que està relacionat el recurs Observation. En el cas concret que ens ocupa estarà relacionat al recurs Patient\r\n\r\nThe expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).",
        "min": 1,
        "fixedUri": "Patient"
      },
      {
        "id": "Observation.subject.identifier",
        "path": "Observation.subject.identifier",
        "max": "0"
      },
      {
        "id": "Observation.subject.display",
        "path": "Observation.subject.display",
        "max": "0"
      },
      {
        "id": "Observation.focus",
        "path": "Observation.focus",
        "max": "0"
      },
      {
        "id": "Observation.encounter",
        "path": "Observation.encounter",
        "max": "0"
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "short": "Data i hora del moment en que es va obtenir l'observació.",
        "definition": "Data i hora del moment en que es va obtenir l'observació. El seu format serà YYYY-MM-DDThh:mm:ss.sss+zz:zz: YYYY any en quatre dígits, MM mes en dos dígits, DD dia del mes en dos dígits, “T”, HH hora en format 24h, mm minuts, ss.sss segons i mili-segons, zz:zz diferència respecte a l’hora GMT (Zona Horària)",
        "min": 1,
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "Observation.issued",
        "path": "Observation.issued",
        "max": "0"
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "max": "0"
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "definition": "valueString->El valor que s’envia per a la variable clínica que no disposa d’unitat de mesura. Aquest, tot i ser un element de tipus de dada cadena de caràcters (string) podrà ser un valor de qualsevol tipus i ja es determinarà la seva validesa en les validacions posteriors que es facin del missatge. Aquest element serà excloent, dins el recurs Observation, amb l’element valueQuantity, que s’emprarà per a variables clíniques amb una unitat de mesura informada.\r\n\r\nvalueQuantity.value ->El valor que s’envia per a la variable clínica que disposa d’unitat de mesura. Haurà de ser numèric.\r\nvalueQuantity.unit ->Literal amb la descripció de la unitat de mesura (p. ex. Graus Centígrads).",
        "min": 1,
        "type": [
          {
            "code": "Quantity"
          },
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Observation.dataAbsentReason",
        "path": "Observation.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.interpretation",
        "path": "Observation.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.note",
        "path": "Observation.note",
        "max": "0"
      },
      {
        "id": "Observation.bodySite",
        "path": "Observation.bodySite",
        "max": "0"
      },
      {
        "id": "Observation.method",
        "path": "Observation.method",
        "max": "0"
      },
      {
        "id": "Observation.specimen",
        "path": "Observation.specimen",
        "max": "0"
      },
      {
        "id": "Observation.device",
        "path": "Observation.device",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Device"
            ]
          }
        ]
      },
      {
        "id": "Observation.device.reference",
        "path": "Observation.device.reference",
        "min": 1
      },
      {
        "id": "Observation.device.type",
        "path": "Observation.device.type",
        "min": 1,
        "fixedUri": "Device"
      },
      {
        "id": "Observation.device.identifier",
        "path": "Observation.device.identifier",
        "max": "0"
      },
      {
        "id": "Observation.device.display",
        "path": "Observation.device.display",
        "max": "0"
      },
      {
        "id": "Observation.referenceRange",
        "path": "Observation.referenceRange",
        "max": "0"
      },
      {
        "id": "Observation.hasMember",
        "path": "Observation.hasMember",
        "max": "0"
      },
      {
        "id": "Observation.derivedFrom",
        "path": "Observation.derivedFrom",
        "max": "0"
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "max": "0"
      },
      {
        "id": "Observation.component.code.coding",
        "path": "Observation.component.code.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Observation.component.code.coding.system",
        "path": "Observation.component.code.coding.system",
        "min": 1
      },
      {
        "id": "Observation.component.code.coding.version",
        "path": "Observation.component.code.coding.version",
        "max": "0"
      },
      {
        "id": "Observation.component.code.coding.code",
        "path": "Observation.component.code.coding.code",
        "min": 1
      },
      {
        "id": "Observation.component.code.coding.display",
        "path": "Observation.component.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.component.code.coding.userSelected",
        "path": "Observation.component.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Observation.component.code.text",
        "path": "Observation.component.code.text",
        "max": "0"
      },
      {
        "id": "Observation.component.value[x]",
        "path": "Observation.component.value[x]",
        "type": [
          {
            "code": "Quantity"
          },
          {
            "code": "string"
          },
          {
            "code": "boolean"
          },
          {
            "code": "integer"
          }
        ]
      },
      {
        "id": "Observation.component.dataAbsentReason",
        "path": "Observation.component.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.component.interpretation",
        "path": "Observation.component.interpretation",
        "max": "1"
      },
      {
        "id": "Observation.component.interpretation.coding",
        "path": "Observation.component.interpretation.coding",
        "max": "1"
      },
      {
        "id": "Observation.component.interpretation.coding.system",
        "path": "Observation.component.interpretation.coding.system",
        "min": 1
      },
      {
        "id": "Observation.component.interpretation.coding.version",
        "path": "Observation.component.interpretation.coding.version",
        "max": "0"
      },
      {
        "id": "Observation.component.interpretation.coding.code",
        "path": "Observation.component.interpretation.coding.code",
        "min": 1
      },
      {
        "id": "Observation.component.interpretation.coding.display",
        "path": "Observation.component.interpretation.coding.display",
        "min": 1
      },
      {
        "id": "Observation.component.interpretation.coding.userSelected",
        "path": "Observation.component.interpretation.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Observation.component.interpretation.text",
        "path": "Observation.component.interpretation.text",
        "max": "0"
      },
      {
        "id": "Observation.component.referenceRange",
        "path": "Observation.component.referenceRange",
        "max": "1"
      },
      {
        "id": "Observation.component.referenceRange.low.value",
        "path": "Observation.component.referenceRange.low.value",
        "min": 1
      },
      {
        "id": "Observation.component.referenceRange.low.unit",
        "path": "Observation.component.referenceRange.low.unit",
        "min": 1
      },
      {
        "id": "Observation.component.referenceRange.low.system",
        "path": "Observation.component.referenceRange.low.system",
        "min": 1
      },
      {
        "id": "Observation.component.referenceRange.low.code",
        "path": "Observation.component.referenceRange.low.code",
        "min": 1
      },
      {
        "id": "Observation.component.referenceRange.high.value",
        "path": "Observation.component.referenceRange.high.value",
        "min": 1
      },
      {
        "id": "Observation.component.referenceRange.high.unit",
        "path": "Observation.component.referenceRange.high.unit",
        "min": 1
      },
      {
        "id": "Observation.component.referenceRange.high.system",
        "path": "Observation.component.referenceRange.high.system",
        "min": 1
      },
      {
        "id": "Observation.component.referenceRange.high.code",
        "path": "Observation.component.referenceRange.high.code",
        "min": 1
      },
      {
        "id": "Observation.component.referenceRange.type",
        "path": "Observation.component.referenceRange.type",
        "max": "0"
      },
      {
        "id": "Observation.component.referenceRange.appliesTo",
        "path": "Observation.component.referenceRange.appliesTo",
        "max": "0"
      },
      {
        "id": "Observation.component.referenceRange.age",
        "path": "Observation.component.referenceRange.age",
        "max": "0"
      }
    ]
  }
}