{
  "resourceType": "StructureDefinition",
  "url": "http://ehealthontario.on.ca/fhir/StructureDefinition/ReferralSourceType",
  "name": "ReferralSourceType",
  "status": "draft",
  "description": "The purpose of this extension is to support multiple locations for a requester for family doc or provider.",
  "fhirVersion": "4.0.0",
  "kind": "complex-type",
  "abstract": false,
  "context": [
    {
      "type": "element",
      "expression": "ServiceRequest"
    }
  ],
  "type": "Extension",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "Extension",
        "path": "Extension",
        "short": "Optional Extensions Element",
        "definition": "The purpose of this extension is to support multiple locations for a requester for family doc or provider.",
        "base": {
          "path": "Extension"
        },
        "constraint": [
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Extension.value[x]",
        "path": "Extension.value[x]",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.hl7.org/fhir/location.html"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      }
    ]
  }
}