{
  "resourceType": "http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition",
  "resource": "Bundle",
  "id": "ViewDefinition-Procedure",
  "title": "Verrichtingen",
  "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": "performedPeriod.start",
          "name": "Datum",
          "description": "​Kunnen vage datums zijn.",
          "type": "dateTime",
          "tag": [ { "name": "Zib element", "value": "VerrichtingBeginDatum" } ]
        },
        {
          "path": "code.text | code.coding[0].display",
          "name": "Verrichting",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "VerrichtingType" } ]
        },
        {
          "path": "location.display",
          "name": "Locatie",
          "description": "Zie discussie hier: <a href=\"https://bits.nictiz.nl/browse/MM-5002\">BITS ticket MM-5002</a>",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Locatie::Zorgaanbieder" } ]
        },
        {
          "path": "performer.actor.display.join('\n')",
          "name": "Uitgevoerd door",
          "description": "Meestal alleen specialisme",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Uitvoerder" } ]
        },
        {
          "path": "code.coding[0].select(system.lookup('CodeSystems').display+'#' + code + ' ' + iif(exists(display),display,''))",
          "name": "+Verrichtingcode",
          "description": "Meerdere codes mogelijk.<br/>Ignore NullFlavor.​<br/>Lookup system label middels <code>&lt;terminologie-base&gt;/CodeSystem?url=&lt;.system&gt;</code> en gebruik dan <code>CodeSystem.title</code>",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "VerrichtingType" } ]
        },
        {
          "path": "bodySite.extension('http://nictiz.nl/fhir/StructureDefinition/BodySite-Qualifier').valueCodeableConcept.text",
          "name": "+Lateraliteit",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "ProbleemLateraliteit" } ]
        }
      ],
      "forEach": "entry.resource.where(resourceType='Procedure')"
    }
  ]
}