{
  "resourceType": "StructureDefinition",
  "id": "cc9bd2be-58e7-4cd7-b2ff-fde67f6aa7a7",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2024-03-27T23:40:02.0371865+00:00"
  },
  "url": "http://ehealth.bc.ca/fhir/StructureDefinition/RelatedPerson",
  "name": "RelatedPerson",
  "status": "draft",
  "date": "2022-02-23T23:30:49.6930773+00:00",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "RelatedPerson",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "RelatedPerson",
        "path": "RelatedPerson",
        "comment": "Consent-Given-By relationship"
      },
      {
        "id": "RelatedPerson.id",
        "path": "RelatedPerson.id",
        "comment": "See Mappings",
        "min": 1,
        "mapping": [
          {
            "identity": "source-HA",
            "map": "\"RelatedPerson\"+(relatedPerson.NAME.FAMILY)"
          },
          {
            "identity": "source-eForm",
            "map": "\"RelatedPerson\"+(relatedPerson.NAME.FAMILY)"
          }
        ]
      },
      {
        "id": "RelatedPerson.meta",
        "path": "RelatedPerson.meta"
      },
      {
        "id": "RelatedPerson.meta.versionId",
        "path": "RelatedPerson.meta.versionId",
        "fixedId": "2022.01"
      },
      {
        "id": "RelatedPerson.meta.profile",
        "path": "RelatedPerson.meta.profile",
        "comment": "Apply \"http://ehealth.bc.ca/fhir/StructureDefinition/RelatedPerson\"",
        "min": 1,
        "max": "1"
      },
      {
        "id": "RelatedPerson.implicitRules",
        "path": "RelatedPerson.implicitRules",
        "max": "0"
      },
      {
        "id": "RelatedPerson.language",
        "path": "RelatedPerson.language",
        "max": "0"
      },
      {
        "id": "RelatedPerson.text",
        "path": "RelatedPerson.text",
        "max": "0"
      },
      {
        "id": "RelatedPerson.contained",
        "path": "RelatedPerson.contained",
        "max": "0"
      },
      {
        "id": "RelatedPerson.identifier",
        "path": "RelatedPerson.identifier",
        "max": "0"
      },
      {
        "id": "RelatedPerson.active",
        "path": "RelatedPerson.active",
        "max": "0"
      },
      {
        "id": "RelatedPerson.patient.id",
        "path": "RelatedPerson.patient.id",
        "max": "0"
      },
      {
        "id": "RelatedPerson.patient.reference",
        "path": "RelatedPerson.patient.reference",
        "comment": "See Mappings",
        "min": 1,
        "mapping": [
          {
            "identity": "source-HA",
            "map": "fullURL + \"Patient/\" + (Patient ID)",
            "comment": "e.g. http://ehealth.bc.ca/fha/fhir/"
          }
        ]
      },
      {
        "id": "RelatedPerson.patient.type",
        "path": "RelatedPerson.patient.type",
        "max": "0"
      },
      {
        "id": "RelatedPerson.patient.identifier",
        "path": "RelatedPerson.patient.identifier",
        "max": "0"
      },
      {
        "id": "RelatedPerson.patient.display",
        "path": "RelatedPerson.patient.display",
        "max": "0"
      },
      {
        "id": "RelatedPerson.relationship",
        "path": "RelatedPerson.relationship",
        "min": 1,
        "max": "1"
      },
      {
        "id": "RelatedPerson.relationship.id",
        "path": "RelatedPerson.relationship.id",
        "max": "0"
      },
      {
        "id": "RelatedPerson.relationship.coding",
        "path": "RelatedPerson.relationship.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "RelatedPerson.relationship.coding.id",
        "path": "RelatedPerson.relationship.coding.id",
        "max": "0"
      },
      {
        "id": "RelatedPerson.relationship.coding.system",
        "path": "RelatedPerson.relationship.coding.system",
        "code": [
          {
            "system": "https://ehealthbc.ca/NamingSystem/ca-bc-panorama-consent-givenBy-relationship"
          }
        ],
        "comment": "See Code",
        "min": 1
      },
      {
        "id": "RelatedPerson.relationship.coding.version",
        "path": "RelatedPerson.relationship.coding.version",
        "max": "0"
      },
      {
        "id": "RelatedPerson.relationship.coding.code",
        "path": "RelatedPerson.relationship.coding.code",
        "comment": "Refer to IMMS Codeset spreadsheet: Consent - ConsentGivenByRelationship",
        "min": 1
      },
      {
        "id": "RelatedPerson.relationship.coding.display",
        "path": "RelatedPerson.relationship.coding.display",
        "comment": "Refer to IMMS Codeset spreadsheet: Consent - ConsentGivenByRelationship",
        "min": 1
      },
      {
        "id": "RelatedPerson.relationship.coding.userSelected",
        "path": "RelatedPerson.relationship.coding.userSelected",
        "max": "0"
      },
      {
        "id": "RelatedPerson.relationship.text",
        "path": "RelatedPerson.relationship.text",
        "max": "0"
      },
      {
        "id": "RelatedPerson.name",
        "path": "RelatedPerson.name",
        "comment": "Consent Given By",
        "min": 1,
        "max": "1"
      },
      {
        "id": "RelatedPerson.name.id",
        "path": "RelatedPerson.name.id",
        "max": "0"
      },
      {
        "id": "RelatedPerson.name.use",
        "path": "RelatedPerson.name.use",
        "max": "0"
      },
      {
        "id": "RelatedPerson.name.text",
        "path": "RelatedPerson.name.text",
        "max": "0"
      },
      {
        "id": "RelatedPerson.name.family",
        "path": "RelatedPerson.name.family",
        "min": 1
      },
      {
        "id": "RelatedPerson.name.given",
        "path": "RelatedPerson.name.given",
        "comment": "FIRST Name sends in first place of Given Name, MIDDLE Name sends in second place of Given Name",
        "min": 1,
        "max": "1"
      },
      {
        "id": "RelatedPerson.name.prefix",
        "path": "RelatedPerson.name.prefix",
        "max": "0"
      },
      {
        "id": "RelatedPerson.name.suffix",
        "path": "RelatedPerson.name.suffix",
        "max": "0"
      },
      {
        "id": "RelatedPerson.name.period",
        "path": "RelatedPerson.name.period",
        "max": "0"
      },
      {
        "id": "RelatedPerson.telecom",
        "path": "RelatedPerson.telecom",
        "max": "0"
      },
      {
        "id": "RelatedPerson.gender",
        "path": "RelatedPerson.gender",
        "max": "0"
      },
      {
        "id": "RelatedPerson.birthDate",
        "path": "RelatedPerson.birthDate",
        "max": "0"
      },
      {
        "id": "RelatedPerson.address",
        "path": "RelatedPerson.address",
        "max": "0"
      },
      {
        "id": "RelatedPerson.photo",
        "path": "RelatedPerson.photo",
        "max": "0"
      },
      {
        "id": "RelatedPerson.period",
        "path": "RelatedPerson.period",
        "max": "0"
      },
      {
        "id": "RelatedPerson.communication",
        "path": "RelatedPerson.communication",
        "max": "0"
      }
    ]
  }
}