{
  "resourceType": "StructureDefinition",
  "id": "Patient-uv-ips",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">This profile represents the constraints applied to the Patient resource by the International Patient Summary (IPS) FHIR Implementation Guide and describes the minimum expectations for the Patient resource when used in the IPS composition or in one of the referred resources.</div>"
  },
  "url": "http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips",
  "version": "0.2.0",
  "name": "Patient_uv_ips",
  "title": "Patient (IPS)",
  "status": "draft",
  "date": "2018-03-20T15:43:56+00:00",
  "description": "This profile represents the constraints applied to the Patient resource by the International Patient Summary (IPS) FHIR Implementation Guide and describes the minimum expectations for the Patient resource when used in the IPS composition or in one of the referred resources.",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code": "001",
          "display": "World"
        }
      ]
    }
  ],
  "fhirVersion": "4.0.0",
  "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",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "Patient",
        "path": "Patient",
        "mustSupport": true
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "requirements": "Need to be able to track the patient by multiple names. Examples are your official name and a partner name.\r\nThe Alphabetic representation of the name SHALL be always provided",
        "min": 1,
        "max": "*",
        "constraint": [
          {
            "key": "ips-pat-1",
            "severity": "error",
            "human": "Patient.name.given  or Patient.name.family or both SHALL be present",
            "expression": "family.exists() or given.exists()",
            "xpath": "f:given or f:family"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "min": 0,
        "mustSupport": true
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "mustSupport": true
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "mustSupport": true
      },
      {
        "id": "Patient.address.line",
        "path": "Patient.address.line",
        "mustSupport": true
      },
      {
        "id": "Patient.address.city",
        "path": "Patient.address.city",
        "mustSupport": true
      },
      {
        "id": "Patient.address.state",
        "path": "Patient.address.state",
        "mustSupport": true
      },
      {
        "id": "Patient.address.postalCode",
        "path": "Patient.address.postalCode",
        "mustSupport": true
      },
      {
        "id": "Patient.address.country",
        "path": "Patient.address.country",
        "comment": "ISO 3166 2 or 3 letter codes shall be used in place of a full country name.\r\n\r\nRequired for cross-border exchange of IPS",
        "constraint": [
          {
            "key": "pat-cnt-2or3-char",
            "severity": "warning",
            "human": "The content of this element SHALL be selected EITHER from ValueSet ISO Country Alpha-2 http://hl7.org/fhir/ValueSet/iso3166-1-2 OR MAY be selected from ISO Country Alpha-3 Value Set http://hl7.org/fhir/ValueSet/iso3166-1-3, IF the country is not specified in value Set ISO Country Alpha-2 http://hl7.org/fhir/ValueSet/iso3166-1-2.",
            "expression": "IF country NOT IN http://hl7.org/fhir/ValueSet/iso3166-1-2 THEN country IN http://hl7.org/fhir/ValueSet/iso3166-1-3"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.contact",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "Contact"
          }
        ],
        "path": "Patient.contact",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.relationship",
        "path": "Patient.contact.relationship",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"
            ]
          }
        ],
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ContactRelationship"
            }
          ],
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/uv/ips/ValueSet/personal-relationship-uv-ips"
        }
      },
      {
        "id": "Patient.contact.name",
        "path": "Patient.contact.name",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.name.family",
        "path": "Patient.contact.name.family",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.name.given",
        "path": "Patient.contact.name.given",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.telecom",
        "path": "Patient.contact.telecom",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.address",
        "path": "Patient.contact.address",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.address.line",
        "path": "Patient.contact.address.line",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.address.city",
        "path": "Patient.contact.address.city",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.address.state",
        "path": "Patient.contact.address.state",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.address.country",
        "path": "Patient.contact.address.country",
        "mustSupport": true
      },
      {
        "id": "Patient.contact.organization",
        "path": "Patient.contact.organization",
        "mustSupport": true
      },
      {
        "id": "Patient.communication",
        "path": "Patient.communication",
        "mustSupport": true
      },
      {
        "id": "Patient.communication.language",
        "path": "Patient.communication.language",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/all-languages"
        }
      },
      {
        "id": "Patient.generalPractitioner",
        "path": "Patient.generalPractitioner",
        "mustSupport": true
      }
    ]
  }
}