<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ohcnwiki.tellmey.fyi/index.php?action=history&amp;feed=atom&amp;title=References%2FSupply_Delivery</id>
	<title>References/Supply Delivery - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ohcnwiki.tellmey.fyi/index.php?action=history&amp;feed=atom&amp;title=References%2FSupply_Delivery"/>
	<link rel="alternate" type="text/html" href="https://ohcnwiki.tellmey.fyi/index.php?title=References/Supply_Delivery&amp;action=history"/>
	<updated>2026-07-06T05:22:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.4</generator>
	<entry>
		<id>https://ohcnwiki.tellmey.fyi/index.php?title=References/Supply_Delivery&amp;diff=455&amp;oldid=prev</id>
		<title>Admin: Automated edit (via update-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://ohcnwiki.tellmey.fyi/index.php?title=References/Supply_Delivery&amp;diff=455&amp;oldid=prev"/>
		<updated>2026-07-06T04:18:07Z</updated>

		<summary type="html">&lt;p&gt;Automated edit (via update-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:48, 6 July 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 264:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 264:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;patient&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt; are mutually exclusive on an order (patient dispense vs location-to-location move).&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;patient&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt; are mutually exclusive on an order (patient dispense vs location-to-location move).&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;extensions&amp;lt;/code&amp;gt; holds deployment-specific data, but only registered extension keys are persisted.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;lt;code&amp;gt;extensions&amp;lt;/code&amp;gt; holds deployment-specific data, but only registered extension keys are persisted.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Navbox supply}}&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Related}}&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Related}}&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://ohcnwiki.tellmey.fyi/index.php?title=References/Supply_Delivery&amp;diff=179&amp;oldid=prev</id>
		<title>Admin: OHC identity seed</title>
		<link rel="alternate" type="text/html" href="https://ohcnwiki.tellmey.fyi/index.php?title=References/Supply_Delivery&amp;diff=179&amp;oldid=prev"/>
		<updated>2026-07-04T22:45:49Z</updated>

		<summary type="html">&lt;p&gt;OHC identity seed&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Doc header&lt;br /&gt;
|type=reference&lt;br /&gt;
|domain=supply&lt;br /&gt;
|title=Supply Delivery&lt;br /&gt;
|order=5&lt;br /&gt;
|introduced=3.0&lt;br /&gt;
|model=SupplyDelivery&lt;br /&gt;
|reference=References/Invoice&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A supply delivery records product moving into a destination location — either from another location or from an external supplier. Deliveries and dispensing together drive facility stock: &amp;lt;code&amp;gt;supply delivered − supply dispensed = current stock&amp;lt;/code&amp;gt;. Each delivery belongs to a &amp;lt;code&amp;gt;DeliveryOrder&amp;lt;/code&amp;gt;, the shipment grouping usually created from a [[References/Supply Request|supply request]].&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Source:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* Model: [&amp;lt;nowiki/&amp;gt;https://github.com/ohcnetwork/care/blob/develop/care/emr/models/supply_delivery.py &amp;lt;code&amp;gt;care/emr/models/supply_delivery.py&amp;lt;/code&amp;gt;]&lt;br /&gt;
* Resource specs: [&amp;lt;nowiki/&amp;gt;https://github.com/ohcnetwork/care/blob/develop/care/emr/resources/inventory/supply_delivery/spec.py &amp;lt;code&amp;gt;spec.py&amp;lt;/code&amp;gt;] · [&amp;lt;nowiki/&amp;gt;https://github.com/ohcnetwork/care/blob/develop/care/emr/resources/inventory/supply_delivery/delivery_order.py &amp;lt;code&amp;gt;delivery_order.py&amp;lt;/code&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
The Django model is a thin store: &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;delivery_type&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;supplied_item_condition&amp;lt;/code&amp;gt; are plain &amp;lt;code&amp;gt;CharField&amp;lt;/code&amp;gt;s, and &amp;lt;code&amp;gt;extensions&amp;lt;/code&amp;gt; is an opaque &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt;. Enum values, validation, and the read/write schema split live in the Pydantic resource specs below.&lt;br /&gt;
&lt;br /&gt;
== Models ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Model&lt;br /&gt;
! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SupplyDelivery&amp;lt;/code&amp;gt;&lt;br /&gt;
| A single line of delivered product (quantity, condition, source product/inventory)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;DeliveryOrder&amp;lt;/code&amp;gt;&lt;br /&gt;
| Groups deliveries for a shipment between an origin and destination&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Both extend [[References/Base models &amp;amp;amp; conventions|&amp;lt;code&amp;gt;EMRBaseModel&amp;lt;/code&amp;gt;]], which supplies &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt;, the &amp;lt;code&amp;gt;created_by&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;updated_by&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;created_date&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;modified_date&amp;lt;/code&amp;gt; audit fields, soft-delete via &amp;lt;code&amp;gt;deleted&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;history&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;meta&amp;lt;/code&amp;gt; JSON.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;code&amp;gt;SupplyDelivery&amp;lt;/code&amp;gt; fields ==&lt;br /&gt;
&lt;br /&gt;
=== Delivered item &amp;amp;amp; quantity ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Notes&lt;br /&gt;
{{Field|model=SupplyDelivery|section=Delivered item &amp;amp;amp; quantity|name=supplied_item|type=FK → Product (CASCADE)|notes=Nullable. The product delivered. Required at the API layer only when the order has no &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt; (external delivery); scoped to &amp;lt;code&amp;gt;order.destination.facility&amp;lt;/code&amp;gt; on write}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=Delivered item &amp;amp;amp; quantity|name=supplied_inventory_item|type=FK → InventoryItem (CASCADE)|notes=Nullable. Specific inventory item (batch/lot) drawn from. Required at the API layer when the order has an &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt; (intra-facility move); scoped to &amp;lt;code&amp;gt;order.origin.facility&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=Delivered item &amp;amp;amp; quantity|name=supplied_item_quantity|type=DecimalField(max_digits=20, decimal_places=6)|notes=Nullable in DB. On write a &amp;lt;code&amp;gt;Decimal&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;decimal_places=0&amp;lt;/code&amp;gt; (whole units); on read serialized as &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt;. Auto-derived as &amp;lt;code&amp;gt;pack_quantity × pack_size&amp;lt;/code&amp;gt; when both are given}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=Delivered item &amp;amp;amp; quantity|name=supplied_item_pack_quantity|type=IntegerField|notes=Nullable; default &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;. Number of packs delivered}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=Delivered item &amp;amp;amp; quantity|name=supplied_item_pack_size|type=IntegerField|notes=Nullable; default &amp;lt;code&amp;gt;None&amp;lt;/code&amp;gt;. Units per pack}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=Delivered item &amp;amp;amp; quantity|name=supplied_item_condition|type=CharField(255)|notes=Optional. Condition of the delivered item — enum &amp;lt;code&amp;gt;SupplyDeliveryConditionOptions&amp;lt;/code&amp;gt; (see below)}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Status &amp;amp;amp; classification ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Notes&lt;br /&gt;
{{Field|model=SupplyDelivery|section=Status &amp;amp;amp; classification|name=status|type=CharField(255)|notes=Required. Lifecycle state — enum &amp;lt;code&amp;gt;SupplyDeliveryStatusOptions&amp;lt;/code&amp;gt; (see below)}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=Status &amp;amp;amp; classification|name=delivery_type|type=CharField(255)|notes=Enum &amp;lt;code&amp;gt;SupplyDeliveryTypeOptions&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;product&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;device&amp;lt;/code&amp;gt;). Stored on the model but not exposed on the current Create/Update specs, so it can&amp;#039;t be set through the API}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Links &amp;amp;amp; pricing ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Notes&lt;br /&gt;
{{Field|model=SupplyDelivery|section=Links &amp;amp;amp; pricing|name=supply_request|type=FK → SupplyRequest (CASCADE)|notes=Nullable. Request this delivery fulfils. Set by &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt; on write}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=Links &amp;amp;amp; pricing|name=order|type=FK → DeliveryOrder (CASCADE)|notes=Nullable in DB, but &amp;#039;&amp;#039;&amp;#039;required on create&amp;#039;&amp;#039;&amp;#039; (referenced by &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt;). Optional on update}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=Links &amp;amp;amp; pricing|name=total_purchase_price|type=DecimalField(max_digits=20, decimal_places=6)|notes=Nullable. Total purchase cost. Spec: &amp;lt;code&amp;gt;Decimal&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;max_digits=20, decimal_places=6&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=Links &amp;amp;amp; pricing|name=extensions|type=JSONField|notes=Default &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;. Validated per registered extension handler for &amp;lt;code&amp;gt;ExtensionResource.supply_delivery&amp;lt;/code&amp;gt; (see [[#resource-specs-api-schema}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;SupplyDelivery&amp;lt;/code&amp;gt; enum values ===&lt;br /&gt;
&lt;br /&gt;
These are &amp;lt;code&amp;gt;str&amp;lt;/code&amp;gt; enums in &amp;lt;code&amp;gt;spec.py&amp;lt;/code&amp;gt; — the stored value equals the member value (snake_case), not a FHIR URI.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;SupplyDeliveryStatusOptions&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt;) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;in_progress&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;completed&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;abandoned&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;entered_in_error&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;SupplyDeliveryConditionOptions&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;supplied_item_condition&amp;lt;/code&amp;gt;) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;damaged&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;SupplyDeliveryTypeOptions&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;delivery_type&amp;lt;/code&amp;gt;) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;product&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;device&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related models ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;DeliveryOrder&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code&amp;gt;DeliveryOrder&amp;lt;/code&amp;gt; is one logical shipment. It groups its &amp;lt;code&amp;gt;SupplyDelivery&amp;lt;/code&amp;gt; rows and moves stock between two facility locations, or from an external supplier into a facility.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;supplier        → FK Organization (CASCADE, nullable)      -- external/source supplier&lt;br /&gt;
origin          → FK FacilityLocation (CASCADE, nullable)  -- related_name=&amp;quot;origin_delivery_orders&amp;quot;&lt;br /&gt;
destination     → FK FacilityLocation (CASCADE)            -- related_name=&amp;quot;destination_delivery_orders&amp;quot;&lt;br /&gt;
patient         → FK Patient (PROTECT, nullable)           -- patient the order is dispensed to&lt;br /&gt;
patient_invoice → FK Invoice (PROTECT, nullable)           -- linked billing invoice&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Type&lt;br /&gt;
! Notes&lt;br /&gt;
{{Field|model=SupplyDelivery|section=DeliveryOrder|name=name|type=CharField(255)|notes=Required. Human-readable order name}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=DeliveryOrder|name=status|type=CharField(255)|notes=Required. Order lifecycle — enum &amp;lt;code&amp;gt;SupplyDeliveryOrderStatusOptions&amp;lt;/code&amp;gt; (see below)}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=DeliveryOrder|name=note|type=TextField|notes=Nullable. Free-text note}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=DeliveryOrder|name=tags|type=ArrayField[int]|notes=Default &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt;. Tag IDs; rendered via &amp;lt;code&amp;gt;SingleFacilityTagManager&amp;lt;/code&amp;gt; on read}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=DeliveryOrder|name=supplier|type=FK → Organization (CASCADE)|notes=Nullable. On write must be an Organization with &amp;lt;code&amp;gt;org_type = product_supplier&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=DeliveryOrder|name=origin|type=FK → FacilityLocation (CASCADE)|notes=Nullable. Source location; absence means stock is entering from an external &amp;lt;code&amp;gt;supplier&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=DeliveryOrder|name=destination|type=FK → FacilityLocation (CASCADE)|notes=&amp;#039;&amp;#039;&amp;#039;Required.&amp;#039;&amp;#039;&amp;#039; Receiving location}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=DeliveryOrder|name=patient|type=FK → Patient (PROTECT)|notes=Nullable. Patient the order is dispensed to. Cannot be set together with &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=DeliveryOrder|name=patient_invoice|type=FK → Invoice (PROTECT)|notes=Nullable. Linked billing invoice; serialized as &amp;lt;code&amp;gt;patient_invoice_id&amp;lt;/code&amp;gt; on read}}&lt;br /&gt;
{{Field|model=SupplyDelivery|section=DeliveryOrder|name=extensions|type=JSONField|notes=Default &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;. Validated for &amp;lt;code&amp;gt;ExtensionResource.supply_delivery_order&amp;lt;/code&amp;gt;}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;patient&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;patient_invoice&amp;lt;/code&amp;gt; use &amp;lt;code&amp;gt;PROTECT&amp;lt;/code&amp;gt;: a referenced patient or invoice can&amp;#039;t be deleted while a delivery order points to it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;code&amp;gt;SupplyDeliveryOrderStatusOptions&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt;) ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;draft&amp;lt;/code&amp;gt;&lt;br /&gt;
| Allowed on create&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;pending&amp;lt;/code&amp;gt;&lt;br /&gt;
| Allowed on create&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;in_progress&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;completed&amp;lt;/code&amp;gt;&lt;br /&gt;
| Terminal (in &amp;lt;code&amp;gt;SUPPLY_DELIVERY_ORDER_COMPLETED_STATUSES&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;abandoned&amp;lt;/code&amp;gt;&lt;br /&gt;
| Terminal (in &amp;lt;code&amp;gt;SUPPLY_DELIVERY_ORDER_COMPLETED_STATUSES&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;entered_in_error&amp;lt;/code&amp;gt;&lt;br /&gt;
| Terminal (in &amp;lt;code&amp;gt;SUPPLY_DELIVERY_ORDER_COMPLETED_STATUSES&amp;lt;/code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Resource specs (API schema) ==&lt;br /&gt;
&lt;br /&gt;
Every spec extends &amp;lt;code&amp;gt;EMRResource&amp;lt;/code&amp;gt; ([&amp;lt;nowiki/&amp;gt;https://github.com/ohcnetwork/care/blob/develop/care/emr/resources/base.py &amp;lt;code&amp;gt;base.py&amp;lt;/code&amp;gt;]): &amp;lt;code&amp;gt;serialize&amp;lt;/code&amp;gt; builds the read payload from the DB object (&amp;lt;code&amp;gt;perform_extra_serialization&amp;lt;/code&amp;gt; hook), &amp;lt;code&amp;gt;de_serialize&amp;lt;/code&amp;gt; builds the DB object from the request (&amp;lt;code&amp;gt;perform_extra_deserialization&amp;lt;/code&amp;gt; hook), and &amp;lt;code&amp;gt;to_json()&amp;lt;/code&amp;gt; dumps the model excluding &amp;lt;code&amp;gt;meta&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;SupplyDelivery&amp;lt;/code&amp;gt; specs ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Spec&lt;br /&gt;
! Role&lt;br /&gt;
! Exposes / behaviour&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;BaseSupplyDeliverySpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| shared&lt;br /&gt;
| &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; (required), &amp;lt;code&amp;gt;supplied_item_condition?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;total_purchase_price?&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;__exclude__ = [&amp;amp;quot;supplied_item&amp;amp;quot;, &amp;amp;quot;supply_request&amp;amp;quot;, &amp;amp;quot;supplied_inventory_item&amp;amp;quot;]&amp;lt;/code&amp;gt; (these are resolved by hooks, not direct field copy)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SupplyDeliveryWriteSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| write · create&lt;br /&gt;
| Adds &amp;lt;code&amp;gt;supplied_item_pack_quantity?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;supplied_item_pack_size?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;supplied_item_quantity&amp;lt;/code&amp;gt; (Decimal, &amp;lt;code&amp;gt;decimal_places=0&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;supplied_item?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;supplied_inventory_item?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;supply_request?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;order&amp;lt;/code&amp;gt; (&amp;#039;&amp;#039;&amp;#039;required&amp;#039;&amp;#039;&amp;#039;), &amp;lt;code&amp;gt;extensions&amp;lt;/code&amp;gt;. Mixes in &amp;lt;code&amp;gt;ExtensionValidator&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SupplyDeliveryUpdateSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| write · update&lt;br /&gt;
| &amp;lt;code&amp;gt;order?&amp;lt;/code&amp;gt; only (plus shared base fields + &amp;lt;code&amp;gt;extensions&amp;lt;/code&amp;gt;). Mixes in &amp;lt;code&amp;gt;ExtensionValidator&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SupplyDeliveryReadSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| read · list&lt;br /&gt;
| &amp;lt;code&amp;gt;supplied_item_quantity: int&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;created_date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;modified_date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;supplied_item_pack_quantity?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;supplied_item_pack_size?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;extensions&amp;lt;/code&amp;gt;, and nested objects &amp;lt;code&amp;gt;supplied_item&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;supplied_inventory_item&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;supply_request&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;order&amp;lt;/code&amp;gt; (serialized as &amp;lt;code&amp;gt;dict&amp;lt;/code&amp;gt;). Mixes in &amp;lt;code&amp;gt;ExtensionListRenderer&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SupplyDeliveryRetrieveSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| read · detail&lt;br /&gt;
| Extends &amp;lt;code&amp;gt;SupplyDeliveryReadSpec&amp;lt;/code&amp;gt;; adds &amp;lt;code&amp;gt;created_by&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;updated_by&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;UserSpec&amp;lt;/code&amp;gt;). Mixes in &amp;lt;code&amp;gt;ExtensionRetrieveRenderer&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Write validation (&amp;lt;code&amp;gt;SupplyDeliveryWriteSpec&amp;lt;/code&amp;gt;):&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;validate_quantity&amp;lt;/code&amp;gt;: when both &amp;lt;code&amp;gt;supplied_item_pack_quantity&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;supplied_item_pack_size&amp;lt;/code&amp;gt; are set, &amp;lt;code&amp;gt;supplied_item_quantity&amp;lt;/code&amp;gt; is overwritten with their product.&lt;br /&gt;
* &amp;lt;code&amp;gt;validate_supplied_item&amp;lt;/code&amp;gt; (resolves &amp;lt;code&amp;gt;order&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt;):&lt;br /&gt;
** if &amp;lt;code&amp;gt;order.origin&amp;lt;/code&amp;gt; is set → &amp;lt;code&amp;gt;supplied_inventory_item&amp;lt;/code&amp;gt; is &amp;#039;&amp;#039;&amp;#039;required&amp;#039;&amp;#039;&amp;#039; (intra-facility stock move);&lt;br /&gt;
** if &amp;lt;code&amp;gt;order.origin&amp;lt;/code&amp;gt; is &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; set → &amp;lt;code&amp;gt;supplied_item&amp;lt;/code&amp;gt; is &amp;#039;&amp;#039;&amp;#039;required&amp;#039;&amp;#039;&amp;#039; (external delivery);&lt;br /&gt;
** &amp;lt;code&amp;gt;supplied_item&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;supplied_inventory_item&amp;lt;/code&amp;gt; &amp;#039;&amp;#039;&amp;#039;cannot both&amp;#039;&amp;#039;&amp;#039; be provided.&lt;br /&gt;
* &amp;lt;code&amp;gt;perform_extra_deserialization&amp;lt;/code&amp;gt;: resolves &amp;lt;code&amp;gt;order&amp;lt;/code&amp;gt; by &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt;; resolves &amp;lt;code&amp;gt;supplied_item&amp;lt;/code&amp;gt; scoped to &amp;lt;code&amp;gt;order.destination.facility&amp;lt;/code&amp;gt;; if &amp;lt;code&amp;gt;order.origin&amp;lt;/code&amp;gt; exists, resolves &amp;lt;code&amp;gt;supplied_inventory_item&amp;lt;/code&amp;gt; scoped to &amp;lt;code&amp;gt;order.origin.facility&amp;lt;/code&amp;gt;; resolves &amp;lt;code&amp;gt;supply_request&amp;lt;/code&amp;gt; by &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Update (&amp;lt;code&amp;gt;SupplyDeliveryUpdateSpec&amp;lt;/code&amp;gt;):&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;perform_extra_deserialization&amp;lt;/code&amp;gt; re-resolves &amp;lt;code&amp;gt;order&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt; only when &amp;lt;code&amp;gt;order&amp;lt;/code&amp;gt; is provided.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Read serialization:&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;perform_extra_serialization&amp;lt;/code&amp;gt; sets &amp;lt;code&amp;gt;id = external_id&amp;lt;/code&amp;gt; and inlines related objects via their read specs — &amp;lt;code&amp;gt;supplied_item&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;ProductReadSpec&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;supplied_inventory_item&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;InventoryItemReadSpec&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;supply_request&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;SupplyRequestReadSpec&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;order&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;SupplyDeliveryOrderReadSpec&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;DeliveryOrder&amp;lt;/code&amp;gt; specs ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Spec&lt;br /&gt;
! Role&lt;br /&gt;
! Exposes / behaviour&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;BaseSupplyDeliveryOrderSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| shared&lt;br /&gt;
| &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; (required), &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; (required), &amp;lt;code&amp;gt;note?&amp;lt;/code&amp;gt;. Mixes in &amp;lt;code&amp;gt;ExtensionValidator&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SupplyDeliveryOrderWriteSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| write · create/update&lt;br /&gt;
| Adds &amp;lt;code&amp;gt;supplier?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;origin?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;destination&amp;lt;/code&amp;gt; (&amp;#039;&amp;#039;&amp;#039;required&amp;#039;&amp;#039;&amp;#039;), &amp;lt;code&amp;gt;patient?&amp;lt;/code&amp;gt; (all by &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SupplyDeliveryOrderReadSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| read · list&lt;br /&gt;
| Nested &amp;lt;code&amp;gt;origin?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;destination&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;supplier?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;patient?&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;dict&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;tags&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;patient_invoice_id?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;created_date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;modified_date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;created_by?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;updated_by?&amp;lt;/code&amp;gt;. Mixes in &amp;lt;code&amp;gt;ExtensionListRenderer&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;SupplyDeliveryOrderRetrieveSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| read · detail&lt;br /&gt;
| Extends &amp;lt;code&amp;gt;SupplyDeliveryOrderReadSpec&amp;lt;/code&amp;gt; (no extra fields). Mixes in &amp;lt;code&amp;gt;ExtensionRetrieveRenderer&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Write validation (&amp;lt;code&amp;gt;SupplyDeliveryOrderWriteSpec.perform_extra_deserialization&amp;lt;/code&amp;gt;):&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* resolves &amp;lt;code&amp;gt;destination&amp;lt;/code&amp;gt; (required), &amp;lt;code&amp;gt;origin?&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;patient?&amp;lt;/code&amp;gt; by &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt;;&lt;br /&gt;
* resolves &amp;lt;code&amp;gt;supplier?&amp;lt;/code&amp;gt; constrained to &amp;lt;code&amp;gt;org_type = product_supplier&amp;lt;/code&amp;gt;;&lt;br /&gt;
* &amp;lt;code&amp;gt;patient&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt; &amp;#039;&amp;#039;&amp;#039;cannot&amp;#039;&amp;#039;&amp;#039; be provided together;&lt;br /&gt;
* on create the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; &amp;#039;&amp;#039;&amp;#039;must be &amp;lt;code&amp;gt;draft&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;pending&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Read serialization:&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;id = external_id&amp;lt;/code&amp;gt;; inlines &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;destination&amp;lt;/code&amp;gt; via &amp;lt;code&amp;gt;FacilityLocationListSpec&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;supplier&amp;lt;/code&amp;gt; via &amp;lt;code&amp;gt;OrganizationReadSpec&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;patient&amp;lt;/code&amp;gt; via &amp;lt;code&amp;gt;PatientListSpec&amp;lt;/code&amp;gt;; renders &amp;lt;code&amp;gt;tags&amp;lt;/code&amp;gt; via &amp;lt;code&amp;gt;SingleFacilityTagManager&amp;lt;/code&amp;gt;; exposes the linked invoice as &amp;lt;code&amp;gt;patient_invoice_id&amp;lt;/code&amp;gt; (string); attaches audit users.&lt;br /&gt;
&lt;br /&gt;
=== Extensions ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;extensions&amp;lt;/code&amp;gt; is not free-form JSON. On write, &amp;lt;code&amp;gt;ExtensionValidator&amp;lt;/code&amp;gt; runs each registered handler for the resource type (&amp;lt;code&amp;gt;supply_delivery&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;supply_delivery_order&amp;lt;/code&amp;gt;): unknown keys are dropped, and known keys are validated and re-serialized. On read, &amp;lt;code&amp;gt;ExtensionListRenderer&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;ExtensionRetrieveRenderer&amp;lt;/code&amp;gt; render every registered extension for the resource (list vs retrieve variants).&lt;br /&gt;
&lt;br /&gt;
== API integration notes ==&lt;br /&gt;
&lt;br /&gt;
* Coded fields carry the snake_case enum values above (e.g. &amp;lt;code&amp;gt;status = &amp;amp;quot;in_progress&amp;amp;quot;&amp;lt;/code&amp;gt;), not FHIR URIs. Validate against the enum, not free text.&lt;br /&gt;
* A delivery is created against a &amp;lt;code&amp;gt;DeliveryOrder&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;order&amp;lt;/code&amp;gt; is required on create). The order&amp;#039;s &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt; decides whether you send &amp;lt;code&amp;gt;supplied_inventory_item&amp;lt;/code&amp;gt; (intra-facility) or &amp;lt;code&amp;gt;supplied_item&amp;lt;/code&amp;gt; (external) — never both.&lt;br /&gt;
* Send &amp;lt;code&amp;gt;supplied_item_pack_quantity&amp;lt;/code&amp;gt; + &amp;lt;code&amp;gt;supplied_item_pack_size&amp;lt;/code&amp;gt; to have &amp;lt;code&amp;gt;supplied_item_quantity&amp;lt;/code&amp;gt; computed server-side; otherwise send &amp;lt;code&amp;gt;supplied_item_quantity&amp;lt;/code&amp;gt; directly (whole units).&lt;br /&gt;
* A &amp;lt;code&amp;gt;DeliveryOrder&amp;lt;/code&amp;gt; must start in &amp;lt;code&amp;gt;draft&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;pending&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;completed&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;abandoned&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;entered_in_error&amp;lt;/code&amp;gt; are terminal.&lt;br /&gt;
* &amp;lt;code&amp;gt;patient&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;origin&amp;lt;/code&amp;gt; are mutually exclusive on an order (patient dispense vs location-to-location move).&lt;br /&gt;
* &amp;lt;code&amp;gt;extensions&amp;lt;/code&amp;gt; holds deployment-specific data, but only registered extension keys are persisted.&lt;br /&gt;
&lt;br /&gt;
{{Related}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>