{
  "resourceType": "http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition",
  "resource": "Bundle",
  "id": "ViewDefinition-EncounterReport",
  "title": "Huisarts SOEP Verslagen",
  "profile": "http://nictiz.nl/fhir/StructureDefinition/gp-EncounterReport",
  "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": "date",
          "name": "Datum",
          "type": "dateTime",
          "tag": [ { "name": "Zib element", "value": "SOEPVerslagDatumTijd" } ]
        },
        {
          "path": "title",
          "name": "Titel",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "nvt" } ]
        },
        {
          "path": "author.display",
          "name": "Auteur",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Auteur" } ]
        },
        {
          "path": "section.select('(' + code.coding.code + ') ' + text.`div`.replaceMatches('<[^>]*>', '')).join('\n')",
          "name": "+Regels",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "SOEPRegel" } ]
        }
      ],
      "forEach": "entry.resource.where(resourceType='Composition' and type.coding.code='67781-5')"
    }
  ]
}