{
  "resourceType": "StructureDefinition",
  "id": "1b7733a8-d54b-4d83-95d4-2d36e29503d7",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2020-05-13T16:29:49.508+00:00"
  },
  "url": "http://example.org/fhir/StructureDefinition/MyUSCorePatientProfile",
  "name": "MyUSCorePatientProfile",
  "status": "draft",
  "date": "2020-05-13T16:29:46.2494141+00:00",
  "description": "This is my Fhir Class test.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "argonaut-dq-dstu2",
      "uri": "http://unknown.org/Argonaut-DQ-DSTU2",
      "name": "Argonaut-DQ-DSTU2"
    },
    {
      "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/us/core/StructureDefinition/us-core-patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "use"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.telecom:PrivateNumber",
        "path": "Patient.telecom",
        "sliceName": "PrivateNumber",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.telecom:PrivateNumber.system",
        "path": "Patient.telecom.system",
        "fixedCode": "phone"
      },
      {
        "id": "Patient.telecom:PrivateNumber.value",
        "path": "Patient.telecom.value",
        "fixedString": "home"
      },
      {
        "id": "Patient.telecom:PrivateNumber.use",
        "path": "Patient.telecom.use",
        "fixedCode": "home"
      },
      {
        "id": "Patient.telecom:WorkNumber",
        "path": "Patient.telecom",
        "sliceName": "WorkNumber",
        "max": "1"
      },
      {
        "id": "Patient.telecom:WorkNumber.system",
        "path": "Patient.telecom.system",
        "fixedCode": "phone"
      },
      {
        "id": "Patient.telecom:WorkNumber.value",
        "path": "Patient.telecom.value",
        "fixedString": "work"
      },
      {
        "id": "Patient.telecom:WorkNumber.use",
        "path": "Patient.telecom.use",
        "fixedCode": "work"
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "constraint": [
          {
            "key": "tempAddress",
            "severity": "error",
            "human": "If address is temp then require a period of time",
            "expression": "(use = 'temp') implies period.exists()",
            "source": "http://example.org/fhir/StructureDefinition/MyUSCorePatientProfile"
          }
        ]
      },
      {
        "id": "Patient.address.period",
        "path": "Patient.address.period",
        "condition": [
          "tempAddress"
        ]
      },
      {
        "id": "Patient.managingOrganization",
        "path": "Patient.managingOrganization",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization"
            ]
          }
        ]
      }
    ]
  }
}