{
  "resourceType": "StructureDefinition",
  "url": "http://phr.kanta.fi/StructureDefinition/fiphr-sd-functionalStatus",
  "name": "FIPHRFunctionalStatus",
  "status": "draft",
  "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",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "Observation.meta",
        "path": "Observation.meta",
        "min": 1
      },
      {
        "id": "Observation.meta.profile",
        "path": "Observation.meta.profile",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Observation.meta.profile:fiphrProfile",
        "path": "Observation.meta.profile",
        "sliceName": "fiphrProfile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "http://phr.kanta.fi/StructureDefinition/fiphr-sd-functionalStatus"
      },
      {
        "id": "Observation.language",
        "path": "Observation.language",
        "min": 1
      },
      {
        "id": "Observation.text",
        "path": "Observation.text",
        "min": 1
      },
      {
        "id": "Observation.identifier",
        "path": "Observation.identifier",
        "min": 1
      },
      {
        "id": "Observation.identifier.system",
        "path": "Observation.identifier.system",
        "min": 1
      },
      {
        "id": "Observation.identifier.value",
        "path": "Observation.identifier.value",
        "min": 1
      },
      {
        "id": "Observation.identifier.assigner",
        "path": "Observation.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Observation.basedOn",
        "path": "Observation.basedOn",
        "max": "0"
      },
      {
        "id": "Observation.partOf",
        "path": "Observation.partOf",
        "max": "0"
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "short": "Finnish PHR: The status of the result value.",
        "definition": "Finnish PHR: Only status 'final' shall be used in FinnishPHR.",
        "fixedCode": "final"
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "min": 1
      },
      {
        "id": "Observation.category.coding",
        "path": "Observation.category.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            },
            {
              "type": "value",
              "path": "code"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Observation.category.coding:fiphrCategory",
        "path": "Observation.category.coding",
        "sliceName": "fiphrCategory",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "valueSet": "http://phr.kanta.fi/ValueSet/fiphr-vs-observationcategory"
        }
      },
      {
        "id": "Observation.category.coding:fiphrCategory.system",
        "path": "Observation.category.coding.system",
        "min": 1,
        "fixedUri": "http://phr.kanta.fi/CodeSystem/fiphr-cs-observationcategory"
      },
      {
        "id": "Observation.category.coding:fiphrCategory.code",
        "path": "Observation.category.coding.code",
        "min": 1,
        "fixedCode": "functioning"
      },
      {
        "id": "Observation.category.coding:fiphrCategory.display",
        "path": "Observation.category.coding.display",
        "min": 1,
        "fixedString": "Functioning"
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Observation.code.coding:fiphrCode",
        "path": "Observation.code.coding",
        "sliceName": "fiphrCode",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "valueSet": "http://phr.kanta.fi/ValueSet/fiphr-vs-functionalStatusresults"
        }
      },
      {
        "id": "Observation.code.coding:fiphrCode.system",
        "path": "Observation.code.coding.system",
        "min": 1,
        "fixedUri": "http://phr.kanta.fi/CodeSystem/fiphr-cs-functionalStatusResults"
      },
      {
        "id": "Observation.code.coding:fiphrCode.code",
        "path": "Observation.code.coding.code",
        "min": 1
      },
      {
        "id": "Observation.code.coding:fiphrCode.display",
        "path": "Observation.code.coding.display",
        "min": 1
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phr.kanta.fi/StructureDefinition/fiphr-sd-patient"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Observation.subject.reference",
        "path": "Observation.subject.reference",
        "min": 1
      },
      {
        "id": "Observation.subject.identifier.assigner",
        "path": "Observation.subject.identifier.assigner",
        "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]",
        "min": 1
      },
      {
        "id": "Observation.issued",
        "path": "Observation.issued",
        "min": 1
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phr.kanta.fi/StructureDefinition/fiphr-sd-patient"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Observation.performer.reference",
        "path": "Observation.performer.reference",
        "min": 1
      },
      {
        "id": "Observation.performer.identifier.assigner",
        "path": "Observation.performer.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "min": 1,
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Observation.dataAbsentReason",
        "path": "Observation.dataAbsentReason",
        "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.hasMember",
        "path": "Observation.hasMember",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Observation",
              "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
            ]
          }
        ]
      },
      {
        "id": "Observation.hasMember.identifier.assigner",
        "path": "Observation.hasMember.identifier.assigner",
        "max": "0"
      }
    ]
  }
}