{
  "resourceType": "http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition",
  "resource": "Bundle",
  "id": "ViewDefinition-MedicationStatement",
  "title": "Medicatie Gebruik",
  "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": "effectivePeriod.start",
          "name": "Start",
          "description": "",
          "type": "dateTime",
          "tag": [ { "name": "Zib element", "value": "Gebruiksperiode::TijdsInterval/startDatumTijd" } ]
        },
        {
          "path": "effectivePeriod.end",
          "name": "Eind",
          "description": "",
          "type": "dateTime",
          "tag": [ { "name": "Zib element", "value": "Gebruiksperiode::TijdsInterval/eindDatumTijd" } ]
        },
        {
          "path": "medication.display",
          "name": "Medicatie",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Gebruiksproduct::FarmaceutischProduct" } ]
        },
        {
          "path": "dosage.text",
          "name": "Dosering & instructies",
          "description": "N.B. Als text niet beschikbaar dan samenstellen uit discrete informatie en markeren met een icoontje &#9432;",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Gebruiksinstructie/Omschrijving, Gebruiksinstructie/AanvullendeInstructie" } ]
        },
        {
          "path": "dosage.route.text",
          "name": "Toedieningsweg",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Gebruiksinstructie/Toedieningsweg" } ]
        },
        {
          "path": "medication.resolve().form.coding.display",
          "name": "+Medicatie vorm",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Gebruiksproduct::FarmaceutischProduct/FarmaceutischeVorm" } ]
        },
        {
          "path": "dateAsserted",
          "name": "+Registratiedatum",
          "type": "dateTime",
          "tag": [ { "name": "Zib element", "value": "MedicatieGebruikDatumTijd" } ]
        },
        {
          "path": "extension('http://nictiz.nl/fhir/StructureDefinition/zib-MedicationUse-Prescriber').valueReference.display",
          "name": "+Voorschrijver",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Voorschrijver::Zorgverlener" } ]
        }
      ],
      "forEach": "entry.resource.where(resourceType='MedicationStatement')"
    }
  ]
}