{
  "resourceType": "StructureDefinition",
  "id": "sgrdv-base-request-provenance",
  "url": "http://sante.quebec/fhir/StructureDefinition/sgrdv-base-request-provenance",
  "name": "SGRDVBaseRequestProvenance",
  "title": "Provenance de la demande de base (SGRDV)",
  "status": "active",
  "experimental": true,
  "description": "Provenance de la demande, commune aux surfaces SGRDV et systèmes source pour toutes les opérations. Le système source (portail, DMÉ, SIP-C, SGRDV core) est identifié sur agent.who via une logical reference : Reference.identifier.system pointe vers un NamingSystem reconnu, Reference.identifier.value est facultative et n'est peuplée que si le système souhaite distinguer une instance ou un tenant. Le Device cible de la Reference n'est jamais matérialisé dans le payload (ni en entry, ni en contained).",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Provenance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Provenance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Provenance.target",
        "path": "Provenance.target",
        "mustSupport": true
      },
      {
        "id": "Provenance.recorded",
        "path": "Provenance.recorded",
        "mustSupport": true
      },
      {
        "id": "Provenance.agent",
        "path": "Provenance.agent",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Provenance.agent.who",
        "path": "Provenance.agent.who",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://sante.quebec/fhir/StructureDefinition/sgrdv-base-source-system-device"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Provenance.agent.who.reference",
        "path": "Provenance.agent.who.reference",
        "max": "0"
      },
      {
        "id": "Provenance.agent.who.identifier",
        "path": "Provenance.agent.who.identifier",
        "min": 1
      },
      {
        "id": "Provenance.agent.who.identifier.system",
        "path": "Provenance.agent.who.identifier.system",
        "min": 1
      },
      {
        "id": "Provenance.agent.onBehalfOf",
        "path": "Provenance.agent.onBehalfOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://sante.quebec/fhir/StructureDefinition/sgrdv-base-find-organization"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Provenance.agent.onBehalfOf.reference",
        "path": "Provenance.agent.onBehalfOf.reference",
        "max": "0"
      },
      {
        "id": "Provenance.agent.onBehalfOf.identifier",
        "path": "Provenance.agent.onBehalfOf.identifier",
        "min": 1
      },
      {
        "id": "Provenance.agent.onBehalfOf.identifier.type",
        "path": "Provenance.agent.onBehalfOf.identifier.type",
        "min": 1
      },
      {
        "id": "Provenance.agent.onBehalfOf.identifier.type.coding",
        "path": "Provenance.agent.onBehalfOf.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Provenance.agent.onBehalfOf.identifier.type.coding.system",
        "path": "Provenance.agent.onBehalfOf.identifier.type.coding.system",
        "fixedUri": "http://sante.quebec/fhir/CodeSystem/sgrdv-identifier-type"
      },
      {
        "id": "Provenance.agent.onBehalfOf.identifier.type.coding.code",
        "path": "Provenance.agent.onBehalfOf.identifier.type.coding.code",
        "fixedCode": "CodeEtablissement"
      },
      {
        "id": "Provenance.agent.onBehalfOf.identifier.system",
        "path": "Provenance.agent.onBehalfOf.identifier.system",
        "min": 1
      },
      {
        "id": "Provenance.agent.onBehalfOf.identifier.value",
        "path": "Provenance.agent.onBehalfOf.identifier.value",
        "min": 1
      }
    ]
  }
}