Botswana AMR Implementation Guide
0.1.0 - 0.1.0

Botswana AMR Implementation Guide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

: Export WHONET Flat File - XML Representation

Draft as of 2026-03-13

Raw xml | Download


<OperationDefinition xmlns="http://hl7.org/fhir">
  <id value="ExportWHONET"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: OperationDefinition ExportWHONET</b></p><a name="ExportWHONET"> </a><a name="hcExportWHONET"> </a><p>URL: [base]/DiagnosticReport/$export-whonet</p><h3>Parameters</h3><table class="grid"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>start</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4B/datatypes.html#date">date</a></td><td/><td><div><p>Start of date range filter for specimen collection date (inclusive). Only DiagnosticReports whose specimen was collected on or after this date are included.</p>
</div></td></tr><tr><td>IN</td><td>end</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4B/datatypes.html#date">date</a></td><td/><td><div><p>End of date range filter for specimen collection date (inclusive). Only DiagnosticReports whose specimen was collected on or before this date are included.</p>
</div></td></tr><tr><td>IN</td><td>facility</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4B/datatypes.html#string">string</a></td><td/><td><div><p>Filter results by facility name. Matches against the Encounter.serviceProvider organization name or DiagnosticReport.performer organization name.</p>
</div></td></tr><tr><td>IN</td><td>format</td><td/><td>0..1</td><td><a href="http://hl7.org/fhir/R4B/datatypes.html#code">code</a></td><td/><td><div><p>Output format: 'whonet' for WHONET pipe-delimited format, 'glass' for WHO GLASS batch submission format. Defaults to 'whonet'.</p>
</div></td></tr><tr><td>OUT</td><td>return</td><td/><td>1..1</td><td><a href="http://hl7.org/fhir/R4B/binary.html">Binary</a></td><td/><td><div><p>The generated flat file returned as a Binary resource with contentType text/csv.</p>
</div></td></tr></table></div>
  </text>
  <url
       value="http://bw.health.gov/fhir/amr/OperationDefinition/ExportWHONET"/>
  <version value="0.1.0"/>
  <name value="ExportWHONET"/>
  <title value="Export WHONET Flat File"/>
  <status value="draft"/>
  <kind value="operation"/>
  <date value="2026-03-13T21:27:21-04:00"/>
  <publisher value="University of Botswana Partnership"/>
  <contact>
    <name value="University of Botswana Partnership"/>
    <telecom>
      <system value="url"/>
      <value value="https://github.com/Dokotela/bw-amr-ig"/>
    </telecom>
  </contact>
  <description
               value="Exports AMR DiagnosticReport data as a WHONET-compatible flat file or GLASS submission file. The operation flattens the FHIR resource graph (DiagnosticReport -&gt; OrganismObservation -&gt; SusceptibilityObservation) into isolate-centric rows suitable for WHONET import or WHO GLASS batch upload."/>
  <code value="export-whonet"/>
  <resource value="DiagnosticReport"/>
  <system value="false"/>
  <type value="true"/>
  <instance value="false"/>
  <parameter>
    <name value="start"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation
                   value="Start of date range filter for specimen collection date (inclusive). Only DiagnosticReports whose specimen was collected on or after this date are included."/>
    <type value="date"/>
  </parameter>
  <parameter>
    <name value="end"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation
                   value="End of date range filter for specimen collection date (inclusive). Only DiagnosticReports whose specimen was collected on or before this date are included."/>
    <type value="date"/>
  </parameter>
  <parameter>
    <name value="facility"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation
                   value="Filter results by facility name. Matches against the Encounter.serviceProvider organization name or DiagnosticReport.performer organization name."/>
    <type value="string"/>
  </parameter>
  <parameter>
    <name value="format"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation
                   value="Output format: 'whonet' for WHONET pipe-delimited format, 'glass' for WHO GLASS batch submission format. Defaults to 'whonet'."/>
    <type value="code"/>
  </parameter>
  <parameter>
    <name value="return"/>
    <use value="out"/>
    <min value="1"/>
    <max value="1"/>
    <documentation
                   value="The generated flat file returned as a Binary resource with contentType text/csv."/>
    <type value="Binary"/>
  </parameter>
</OperationDefinition>