{
  "resourceType": "StructureDefinition",
  "id": "AccessPolicyV2Assignment",
  "url": "https://haste-health.com/StructureDefinition/AccessPolicyV2Assignment",
  "version": "4.0.1",
  "name": "AccessPolicyV2Assignment",
  "status": "active",
  "publisher": "haste-health",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "AccessPolicyV2Assignment",
  "description": "Links an AccessPolicyV2 to the resource it applies to. Replaces AccessPolicyV2.target as its own resource so that assignments can be created and removed independently, without conflicting updates to the AccessPolicyV2 resource itself.",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Resource",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "AccessPolicyV2Assignment",
        "path": "AccessPolicyV2Assignment",
        "min": 0,
        "definition": "A set of rules that govern how a system resource is accessed and used.",
        "max": "*",
        "base": {
          "path": "AccessPolicyV2Assignment",
          "min": 0,
          "max": "*"
        },
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "AccessPolicyV2Assignment.id",
        "path": "AccessPolicyV2Assignment.id",
        "short": "Logical id of this artifact",
        "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
        "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Resource.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "AccessPolicyV2Assignment.meta",
        "path": "AccessPolicyV2Assignment.meta",
        "short": "Metadata about the resource",
        "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Resource.meta",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Meta"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "AccessPolicyV2Assignment.accessPolicy",
        "path": "AccessPolicyV2Assignment.accessPolicy",
        "definition": "The access policy that this assignment grants.",
        "short": "The access policy that this assignment grants.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://haste-health.com/StructureDefinition/AccessPolicyV2"
            ]
          }
        ],
        "min": 1,
        "max": "1"
      },
      {
        "id": "AccessPolicyV2Assignment.link",
        "path": "AccessPolicyV2Assignment.link",
        "definition": "Who the access policy applies to.",
        "short": "The target reference the access policy applies to.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://haste-health.com/StructureDefinition/ClientApplication",
              "https://haste-health.com/StructureDefinition/Membership",
              "http://hl7.org/fhir/StructureDefinition/OperationDefinition"
            ]
          }
        ],
        "min": 1,
        "max": "1"
      }
    ]
  }
}