{
  "resourceType": "StructureDefinition",
  "url": "http://electronichealth.se/fhir/StructureDefinition/NLLBasicProvenance",
  "name": "NLLBasicProvenance",
  "status": "draft",
  "fhirVersion": "4.0.0",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w3c.prov",
      "uri": "http://www.w3.org/ns/prov",
      "name": "W3C PROV"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "fhirauditevent",
      "uri": "http://hl7.org/fhir/auditevent",
      "name": "FHIR AuditEvent Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Provenance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Provenance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Provenance.extension",
        "path": "Provenance.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Provenance.extension:nllReasonText",
        "path": "Provenance.extension",
        "sliceName": "nllReasonText",
        "short": "Textual description of the reason related to this activity",
        "definition": "Textual description of the reason related to this activity. Currently only used for DELETE.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://electronichealth.se/fhir/StructureDefinition/NLLReasonDescription"
            ]
          }
        ]
      },
      {
        "id": "Provenance.target",
        "path": "Provenance.target",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/StructureDefinition/NLLDetachedDispense"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Provenance.occurred[x]",
        "path": "Provenance.occurred[x]",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Provenance.activity",
        "path": "Provenance.activity",
        "definition": "Use code DELETE to represent credit-activity (sv: backa, kreditera)",
        "mustSupport": true
      },
      {
        "id": "Provenance.agent",
        "path": "Provenance.agent",
        "definition": "An actor taking a role in an activity, in this case only a practitioner may be an actor",
        "max": "1"
      },
      {
        "id": "Provenance.agent.type",
        "path": "Provenance.agent.type",
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type",
              "version": "4.0.1",
              "code": "enterer",
              "display": "Enterer"
            }
          ]
        }
      },
      {
        "id": "Provenance.agent.who",
        "path": "Provenance.agent.who",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://electronichealth.se/fhir/StructureDefinition/NLLPractitioner"
            ],
            "aggregation": [
              "contained"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}