{
  "resourceType": "StructureDefinition",
  "id": "provenance-relevant-history",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">to do</div>"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 3
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "sec"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/provenance-relevant-history",
  "version": "4.6.0",
  "name": "Provenance Relevant History",
  "status": "draft",
  "experimental": false,
  "date": "2013-12-03",
  "publisher": "Health Level Seven International",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/Committees/fhir-i"
        }
      ]
    }
  ],
  "description": "Guidance on using Provenance for related history elements",
  "fhirVersion": "4.6.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",
        "path": "Provenance",
        "min": 0,
        "max": "*"
      },
      {
        "id": "Provenance.target",
        "path": "Provenance.target",
        "short": "Resource version",
        "definition": "This points to the version of the resource that was created as a result of this historical record action.  Typically only a single resource will be referenced, but if the same action is performed to multiple resources in the context of a transaction, some systems may link multiple resource instances.",
        "comment": "The reference SHALL be version-specific.",
        "mustSupport": true
      },
      {
        "id": "Provenance.occurred[x]",
        "path": "Provenance.occurred[x]",
        "definition": "This indicates the time the resource action (creation, revision, deletion, etc.) occurred.",
        "comment": "Both low and high will be set to the time the record event occurred.  (In a future version, this element will likely be a choice with dateTime so that multiple values aren't needed.).",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Provenance.authorization",
        "path": "Provenance.authorization",
        "comment": "Plain text reasons can be sent in the \"text\" component with no codings.  Domains may wish to define a constrained terminology.  The authorization for the resource's existence of the resource itself will be maintained on the resource, not here.",
        "mustSupport": true
      },
      {
        "id": "Provenance.activity",
        "path": "Provenance.activity",
        "short": "Record activity",
        "definition": "Indicates what action occurred to the referenced resource.",
        "comment": "This should be captured at a sufficiently useful level of granularity.  For example \"suspended\" is more useful than \"updated\".  Domains will need to map the listed codes to their own state transitions and may wish to define additional domain-specific fine-grained codes.",
        "min": 1,
        "max": "1",
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ProvenanceHistoryRecordActivity"
            }
          ],
          "strength": "extensible",
          "description": "Types of activities that are relevant for tracking event history using Provenance.",
          "valueSet": "http://hl7.org/fhir/ValueSet/provenance-history-record-activity"
        }
      },
      {
        "id": "Provenance.agent",
        "path": "Provenance.agent",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "short": "Who was involved with change",
        "definition": "Who was involved with change.",
        "comment": "Generally the author will be specified.  Others are optional.",
        "mustSupport": true
      },
      {
        "id": "Provenance.agent.type",
        "path": "Provenance.agent.type",
        "min": 1,
        "max": "1",
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ProvenanceHistoryAgentType"
            }
          ],
          "strength": "extensible",
          "description": "Types of roles that agents can play when tracking event history using Provenance.",
          "valueSet": "http://hl7.org/fhir/ValueSet/provenance-history-agent-type"
        }
      },
      {
        "id": "Provenance.agent:Author",
        "path": "Provenance.agent",
        "sliceName": "Author",
        "short": "Author",
        "definition": "Author.",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Provenance.agent:Author.type",
        "path": "Provenance.agent.type",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
              "code": "AUT"
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "Provenance.agent:Author.who",
        "path": "Provenance.agent.who",
        "short": "Author Reference",
        "definition": "Author Reference.",
        "min": 1,
        "max": "1",
        "mustSupport": true
      }
    ]
  }
}