{
  "resourceType": "StructureDefinition",
  "id": "53356e70-4f85-44f3-9c94-7166fd890910",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-05-06T17:26:31.2433388+00:00"
  },
  "url": "https://ehealthontario.ca/API/FHIR/NamingSystem/ca-on-medications-profile-RelatedPerson-Consent",
  "name": "RelatedPerson-Consent",
  "status": "draft",
  "date": "2019-05-06T17:26:30.8506119Z",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "RelatedPerson",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "RelatedPerson.identifier",
        "path": "RelatedPerson.identifier",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.identifier.system",
        "path": "RelatedPerson.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.identifier.value",
        "path": "RelatedPerson.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.patient",
        "path": "RelatedPerson.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Patient-Consent"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.patient.reference",
        "path": "RelatedPerson.patient.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.relationship",
        "path": "RelatedPerson.relationship",
        "min": 1,
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "PatientRelationshipType"
            }
          ],
          "strength": "preferred",
          "valueSetReference": {
            "reference": "https://ehealthontario.ca/fhir/ValueSet/dhdr-ca-on-personal-relationship"
          }
        }
      },
      {
        "id": "RelatedPerson.relationship.coding",
        "path": "RelatedPerson.relationship.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.relationship.coding.system",
        "path": "RelatedPerson.relationship.coding.system",
        "min": 1,
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "description": "A set of codes further specifying the kind of Role; specific classification codes for further qualifying RoleClass codes.",
          "valueSetUri": "https://ehealthontario.ca/fhir/ValueSet/dhdr-ca-on-personal-relationship"
        }
      },
      {
        "id": "RelatedPerson.relationship.coding.code",
        "path": "RelatedPerson.relationship.coding.code",
        "comment": "e.g. \"GUARD\", \"PRN\"\r\nNote that FHIR strings may not exceed 1MB in size",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.relationship.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "RelatedPerson.relationship.coding.display",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.relationship.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "RelatedPerson.relationship.text",
        "definition": "Free text relationship for Extended Family Member or Sibling. A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
        "comment": "Required if coding. code = “EXT” or “SIB”. \r\nFree text relationship for Extended Family Member or Sibling. Very often the text is the same as a displayName of one of the codings.",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.name",
        "path": "RelatedPerson.name",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.name.use",
        "path": "RelatedPerson.name.use",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "NameUse"
            }
          ],
          "strength": "required",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/dhdr-name-use"
          }
        }
      },
      {
        "id": "RelatedPerson.name.family",
        "path": "RelatedPerson.name.family",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.name.given",
        "path": "RelatedPerson.name.given",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.telecom",
        "path": "RelatedPerson.telecom",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.telecom.system",
        "path": "RelatedPerson.telecom.system",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.telecom.value",
        "path": "RelatedPerson.telecom.value",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.telecom.use",
        "path": "RelatedPerson.telecom.use",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.gender",
        "path": "RelatedPerson.gender",
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "AdministrativeGender"
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
              "valueBoolean": true
            }
          ],
          "strength": "required",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/STU3/ValueSet/administrative-gender"
          }
        }
      },
      {
        "id": "RelatedPerson.birthDate",
        "path": "RelatedPerson.birthDate",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.address",
        "path": "RelatedPerson.address",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.address.use",
        "path": "RelatedPerson.address.use",
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "AddressUse"
            }
          ],
          "strength": "required",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/STU3/ValueSet/address-use"
          }
        }
      },
      {
        "id": "RelatedPerson.address.type",
        "path": "RelatedPerson.address.type",
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "AddressType"
            }
          ],
          "strength": "required",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/STU3/ValueSet/address-type"
          }
        }
      },
      {
        "id": "RelatedPerson.address.text",
        "path": "RelatedPerson.address.text",
        "short": "Subset of native FHIR value set. Text representation of the address."
      },
      {
        "id": "RelatedPerson.address.line",
        "path": "RelatedPerson.address.line",
        "max": "2",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.address.city",
        "path": "RelatedPerson.address.city",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.address.state",
        "path": "RelatedPerson.address.state",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.address.postalCode",
        "path": "RelatedPerson.address.postalCode",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.address.country",
        "path": "RelatedPerson.address.country",
        "mustSupport": true
      }
    ]
  }
}