{
  "resourceType": "StructureDefinition",
  "id": "cba34a83-f0e8-4647-84ea-4dccdb85af8c",
  "meta": {
    "lastUpdated": "2018-10-25T13:12:53.525+00:00"
  },
  "url": "http://inera.se/fhir/dstu3/StructureDefinition/ViktorTestPatient",
  "name": "ViktorTestPatient",
  "status": "draft",
  "date": "2018-10-25T13:12:51.4859148+00:00",
  "description": "Test resource used as part of the FHIR Profiling training course",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.extension:birthPlace",
        "path": "Patient.extension",
        "sliceName": "birthPlace",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/birthPlace"
          }
        ]
      },
      {
        "id": "Patient.extension:birthPlace.valueAddress:valueAddress",
        "path": "Patient.extension.valueAddress",
        "sliceName": "valueAddress"
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Patient.identifier:nationalPersonIdentifier",
        "path": "Patient.identifier",
        "sliceName": "nationalPersonIdentifier",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.identifier:nationalPersonIdentifier.system",
        "path": "Patient.identifier.system",
        "definition": "Swedish national OID for person identifiers",
        "min": 1,
        "fixedUri": "urn:oid:1.2.752.129.2.1.3.1"
      },
      {
        "id": "Patient.identifier:nationalPersonIdentifier.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:hospitalPatientIdentifier",
        "path": "Patient.identifier",
        "sliceName": "hospitalPatientIdentifier",
        "max": "1"
      },
      {
        "id": "Patient.identifier:hospitalPatientIdentifier.system",
        "path": "Patient.identifier.system",
        "definition": "Swedish National OID for local system IDs",
        "min": 1,
        "fixedUri": "urn:oid:1.2.752.129.2.1.2.1"
      },
      {
        "id": "Patient.identifier:hospitalPatientIdentifier.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "min": 1
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "min": 1
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "min": 1
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "constraint": [
          {
            "key": "VJ-1",
            "severity": "warning",
            "human": "If the patient has a temporary address, the period this address is in use should be filled in",
            "expression": "(use='temp') implies period.exists()"
          }
        ]
      },
      {
        "id": "Patient.address.use",
        "path": "Patient.address.use",
        "condition": [
          "VJ-1"
        ]
      },
      {
        "id": "Patient.address.period",
        "path": "Patient.address.period",
        "condition": [
          "VJ-1"
        ]
      },
      {
        "id": "Patient.communication.extension",
        "path": "Patient.communication.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.communication.extension:communicationMethod",
        "path": "Patient.communication.extension",
        "sliceName": "communicationMethod",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://inera.se/fhir/dstu3/StructureDefinition/CommunicationMedium"
          }
        ]
      },
      {
        "id": "Patient.communication.extension:communicationMethod.valueCode:valueCode",
        "path": "Patient.communication.extension.valueCode",
        "sliceName": "valueCode",
        "min": 1,
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://inera.se/fhir/dstu3/valueSet/human-communication-methods"
          }
        }
      }
    ]
  }
}