{
  "resourceType": "StructureDefinition",
  "id": "PractitionerRoleABeOrderLab",
  "url": "https://www.alberta.ca/fhir/ab-eorder-lab/StructureDefinition/PractitionerRoleABeOrderLab",
  "version": "1.1.0",
  "name": "PractitionerRoleABeOrderLab",
  "title": "PractitionerRole (AB:eOrder-Lab)",
  "status": "draft",
  "description": "This profile defines a set of constraints to the FHIR PractitionerRole resource for use in Alberta eOrder Laboratory (AB:eOrder-Lab). It re-profiles the CA-eReC PractitionerRole profile and it includes constraints that represent the minimum expectations for the PractitionerRole resource when used in the AB:Order-Lab.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "PractitionerRole",
  "baseDefinition": "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-PractitionerRole",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "PractitionerRole",
        "path": "PractitionerRole",
        "comment": "PractitionerRole resources included in Alberta eOrder Laboratory Bundles have rules that certain attributes are not to be contained in PractitionerRole resources. These are mechanically enforced through invariants at the AB:eOrder-Lab Bundle level."
      },
      {
        "id": "PractitionerRole.active",
        "path": "PractitionerRole.active",
        "comment": "If PractitionerRole.active is populated it must always be Active at the time of patient referral and/or consult",
        "patternBoolean": true
      },
      {
        "id": "PractitionerRole.practitioner",
        "path": "PractitionerRole.practitioner",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.alberta.ca/fhir/ab-eorder-lab/StructureDefinition/PractitionerABeOrderLab"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.practitioner.identifier.type",
        "path": "PractitionerRole.practitioner.identifier.type",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "PractitionerRole.code",
        "path": "PractitionerRole.code",
        "binding": {
          "strength": "preferred",
          "valueSet": "https://www.alberta.ca/fhir/ValueSet/provider-role-type-ab"
        }
      },
      {
        "id": "PractitionerRole.location",
        "path": "PractitionerRole.location",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.alberta.ca/fhir/ab-eorder-lab/StructureDefinition/LocationABeOrderLab"
            ]
          }
        ]
      },
      {
        "id": "PractitionerRole.location.identifier.type",
        "path": "PractitionerRole.location.identifier.type",
        "min": 1,
        "mustSupport": true
      }
    ]
  }
}