{
  "resourceType": "StructureDefinition",
  "url": "http://colin.example.org/fhir/StructureDefinition/TrainingPatient",
  "name": "TrainingPatient",
  "status": "draft",
  "experimental": false,
  "date": "2020-07-22",
  "publisher": "NHS SCW CSU",
  "description": "this is test  profile for training",
  "purpose": "test work from training day",
  "copyright": "SCW CSU",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "cda",
      "uri": "http://hl7.org/v3/cda",
      "name": "CDA (R2)"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "loinc",
      "uri": "http://loinc.org",
      "name": "LOINC code for the element"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient",
        "path": "Patient",
        "definition": "this is test  profile for training"
      },
      {
        "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://colin.example.org/fhir/StructureDefinition/Birthplace"
            ]
          }
        ]
      },
      {
        "id": "Patient.extension:Employment",
        "path": "Patient.extension",
        "sliceName": "Employment",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://example.org/fhir/StructureDefinition/Employment"
            ]
          }
        ],
        "binding": {
          "strength": "preferred",
          "valueSet": "http://www.alpha-hospital.alp/occupations"
        }
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "min": 1,
        "max": "1",
        "mustSupport": false
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "type": [
          {
            "code": "HumanName",
            "profile": [
              "http://colin.example.org/fhir/StructureDefinition/MyHumanName"
            ]
          }
        ]
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Patient.telecom:home_number",
        "path": "Patient.telecom",
        "sliceName": "home_number",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.telecom:home_number.value",
        "path": "Patient.telecom.value",
        "min": 1
      },
      {
        "id": "Patient.telecom:home_number.use",
        "path": "Patient.telecom.use",
        "min": 1,
        "fixedCode": "home"
      },
      {
        "id": "Patient.telecom:personal_email",
        "path": "Patient.telecom",
        "sliceName": "personal_email",
        "fixedContactPoint": {
          "system": "email",
          "use": "home"
        },
        "mustSupport": true
      },
      {
        "id": "Patient.telecom:personal_email.system",
        "path": "Patient.telecom.system",
        "min": 1
      },
      {
        "id": "Patient.telecom:personal_email.value",
        "path": "Patient.telecom.value",
        "min": 1
      },
      {
        "id": "Patient.telecom:work_email",
        "path": "Patient.telecom",
        "sliceName": "work_email",
        "fixedContactPoint": {
          "system": "email",
          "use": "work"
        }
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "mustSupport": true
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1
      },
      {
        "id": "Patient.birthDate.extension",
        "path": "Patient.birthDate.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.birthDate.extension:myExtension",
        "path": "Patient.birthDate.extension",
        "sliceName": "myExtension",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/patient-birthTime"
            ]
          }
        ]
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "constraint": [
          {
            "key": "colin-2",
            "severity": "warning",
            "human": "temp period needed",
            "expression": "(use = 'temp') period.exists()",
            "source": "http://colin.example.org/fhir/StructureDefinition/TrainingPatient"
          }
        ]
      },
      {
        "id": "Patient.address.period",
        "path": "Patient.address.period",
        "constraint": [
          {
            "key": "colin.4",
            "severity": "warning",
            "human": "hjfh",
            "xpath": "period.exists()",
            "source": "http://colin.example.org/fhir/StructureDefinition/TrainingPatient"
          }
        ]
      },
      {
        "id": "Patient.contact",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "Contact"
          }
        ],
        "path": "Patient.contact"
      }
    ]
  }
}