{
  "resourceType": "http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition",
  "resource": "Bundle",
  "id": "ViewDefinition-Behandelaanwijzingen",
  "title": "Behandelaanwijzingen",
  "select": [
    {
      "column": [
        {
          "path": "meta.extension('http://hl7.org/fhir/4.0/StructureDefinition/extension-Meta.source').valueUri",
          "name": "Bron",
          "description": "Lookup adhv uri (AGB-Z of OID) <code>&lt;adressering-base&gt;/Organization?identifier=&lt;.meta.tag.code&gt;</code> en gebruik dan <code>Organization.name</code>",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "nvt" } ]
        },
        {
          "path": "period.start",
          "name": "Datum",
          "description": "Kunnen vage datums zijn.",
          "type": "dateTime",
          "tag": [ { "name": "Zib element", "value": "BeginDatum" } ]
        },
        {
          "path": "extension('http://nictiz.nl/fhir/StructureDefinition/zib-TreatmentDirective-Treatment').valueCodeableConcept.coding[0].display",
          "name": "Behandeling",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Behandeling" } ]
        },
        {
          "path": "modifierExtension.where(url='http://nictiz.nl/fhir/StructureDefinition/zib-TreatmentDirective-TreatmentPermitted').valueCodeableConcept.coding.display",
          "name": "Behandeling toegestaan",
          "description": "Zie UI schets voor icon mapping. N.B. obv coding.code",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "BehandelingToegestaan" } ]
        },
        {
          "path": "except.extension('http://nictiz.nl/fhir/StructureDefinition/zib-TreatmentDirective-Restrictions').value",
          "name": "Beperkingen",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Beperkingen" } ]
        },
        {
          "path": "extension('http://nictiz.nl/fhir/StructureDefinition/zib-TreatmentDirective-Verification').extension('VerifiedWith').valueCodeableConcept.text.join(' & ')",
          "name": "Geverifieerd bij",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "GeverifieerdBij" } ]
        },
        {
          "path": "extension.where(url='http://nictiz.nl/fhir/StructureDefinition/Comment').valueString",
          "name": "+Toelichting",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Toelichting" } ]
        },
        {
          "path": "category.coding.display.join(' & ')",
          "name": "+Categorie",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "nvt" } ]
        },
        {
          "path": "status",
          "name": "(status)",
          "type": "code",
          "tag": [ { "name": "Zib element", "value": "nvt" } ]
        }
      ],
      "forEach": "entry.resource.where(resourceType='Consent' and category.coding.last().code='11291000146105')"
    }
  ]
}