{
  "resourceType": "http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition",
  "resource": "Bundle",
  "id": "ViewDefinition-Labuitslagen",
  "title": "Laboratoriumuitslagen",
  "profile": "http://nictiz.nl/fhir/StructureDefinition/zib-LaboratoryTestResult-Observation",
  "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": "specimen.resolve().collection.collectedDateTime | effectiveDateTime",
          "name": "Datum",
          "type": "dateTime",
          "tag": [ { "name": "Zib element", "value": "Monster/ AfnameDatumTijd, LaboratoriumTest/ TestDatumTijd" } ]
        },
        {
          "path": "code.text | code.coding[0].display",
          "name": "Test",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "LaboratoriumTest/ TestCode" } ]
        },
        {
          "path": "valueString | valueQuantity.value.toString() + iif(valueQuantity.code.exists(),' ' + valueQuantity.code,'')",
          "name": "Testuitslag",
          "description": "<b>Epic:</b> Indien lab-order geannuleerd, dan krijgt dit alsnog de status <code>Definitief</code> met een Testuitslag van <code>GEANNULEERD</code>. Dit is voor nu akkoord bevonden door stuurgroep Zorgviewer.",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "LaboratoriumTest/ TestUitslag" } ]
        },
        {
          "path": "interpretation.text",
          "name": "Interpretatie",
          "description": "<code>AA</code>: uitroepteken icon, kritiek<br/><code>281302008</code> of <code>H</code>: pijl omhoog, boven de bovengrens<br/><code>281300000</code> of <code>L</code>: pijl naar beneden, onder de ondergrens<br/>N.B. <code>Resistent</code>, <code>Intermediar</code> en <code>Sensitief</code> vanuit de standaard zijn niet van toepassing op de klinische chemie.",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "LaboratoriumTest/ InterpretatieVlaggen" } ]
        },
        {
          "path": "referenceRange.low.value.toString() + ' - ' + referenceRange.high.value.toString() + iif(referenceRange.high.code.exists(),' ' + referenceRange.high.code,'')",
          "name": "Onder- en bovengrens",
          "description": "Indien <code>low.code</code> en <code>high.code</code> niet gelijk zijn aan elkaar toon dan <code>code</code> bij beide.",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "LaboratoriumTest/ ReferentieOndergrens, LaboratoriumTest/ ReferentieBovengrens" } ]
        },
        {
          "path": "specimen.resolve().type.text",
          "name": "Materiaal",
          "description": "<b>Sanday:</b> Levert geen type materiaal",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Monster/ Monstermateriaal" } ]
        },
        {
          "path": "status",
          "name": "Status",
          "description": "<b>Epic:</b> Indien lab-order geannuleerd, dan krijgt dit alsnog de status <code>Definitief</code> met een Testuitslag van <code>GEANNULEERD</code>. Dit is voor nu akkoord bevonden door stuurgroep Zorgviewer.",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "ResultaatStatus" } ]
        },
        {
          "path": "comment | note.text",
          "name": "+Commentaar",
          "description": "<b>LET OP:</b> <code>note.text</code> is een FHIR R4 veld",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Toelichting" } ]
        },
        {
          "path": "specimen.resolve().note.text",
          "name": "+Toelichting materiaal",
          "type": "string",
          "tag": [ { "name": "Zib element", "value": "Monster/ Toelichting" } ]
        }
      ],
      "forEach": "entry.resource.where(resourceType='Observation' and (meta.profile='http://nictiz.nl/fhir/StructureDefinition/zib-LaboratoryTestResult-Observation' or category.coding.code='laboratory'))"
    }
  ]
}