{
  "resourceType": "StructureDefinition",
  "id": "related-person-re",
  "url": "http://electronichealth.se/fhir/NDI/StructureDefinition/related-person-re",
  "version": "0.1.0",
  "name": "RelatedPersonRe",
  "status": "draft",
  "description": "Profile for expressing relationship to patient that can be used to restrict access to patient data.",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "RelatedPerson",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "RelatedPerson.patient",
        "path": "RelatedPerson.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/NDI/StructureDefinition/patient-data-access"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.relationship",
        "path": "RelatedPerson.relationship",
        "min": 1,
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "http://electronichealth.se/fhir/NDI/ValueSet/re-related-person-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
      },
      {
        "id": "RelatedPerson.relationship.coding.version",
        "path": "RelatedPerson.relationship.coding.version",
        "mustSupport": true
      },
      {
        "id": "RelatedPerson.relationship.coding.code",
        "path": "RelatedPerson.relationship.coding.code",
        "min": 1,
        "mustSupport": true
      }
    ]
  }
}