<?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%2FProduct_Knowledge</id>
	<title>References/Product Knowledge - 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%2FProduct_Knowledge"/>
	<link rel="alternate" type="text/html" href="https://ohcnwiki.tellmey.fyi/index.php?title=References/Product_Knowledge&amp;action=history"/>
	<updated>2026-07-06T07:07:21Z</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/Product_Knowledge&amp;diff=425&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/Product_Knowledge&amp;diff=425&amp;oldid=prev"/>
		<updated>2026-07-06T04:06:05Z</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:36, 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 379:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 379:&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;facility&amp;lt;/code&amp;gt; controls scope: omit it for instance-wide, set it for facility-local. Address records by slug (&amp;lt;code&amp;gt;i-&amp;amp;lt;slug&amp;amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;f-&amp;amp;lt;facility_external_id&amp;amp;gt;-&amp;amp;lt;slug&amp;amp;gt;&amp;lt;/code&amp;gt;); the parsed parts come back as &amp;lt;code&amp;gt;slug_config&amp;lt;/code&amp;gt;.&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;facility&amp;lt;/code&amp;gt; controls scope: omit it for instance-wide, set it for facility-local. Address records by slug (&amp;lt;code&amp;gt;i-&amp;amp;lt;slug&amp;amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;f-&amp;amp;lt;facility_external_id&amp;amp;gt;-&amp;amp;lt;slug&amp;amp;gt;&amp;lt;/code&amp;gt;); the parsed parts come back as &amp;lt;code&amp;gt;slug_config&amp;lt;/code&amp;gt;.&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;code&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;names&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;storage_guidelines&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;definitional&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;base_unit&amp;lt;/code&amp;gt; carry their structure and value-set binding in the spec, not the model. &amp;lt;code&amp;gt;base_unit&amp;lt;/code&amp;gt; is required.&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;code&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;names&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;storage_guidelines&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;definitional&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;base_unit&amp;lt;/code&amp;gt; carry their structure and value-set binding in the spec, not the model. &amp;lt;code&amp;gt;base_unit&amp;lt;/code&amp;gt; is required.&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 definitions}}&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;!-- diff cache key mediawiki:diff:1.41:old-151:rev-425:wikidiff2=table:1.14.2:bc2a06be --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://ohcnwiki.tellmey.fyi/index.php?title=References/Product_Knowledge&amp;diff=151&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/Product_Knowledge&amp;diff=151&amp;oldid=prev"/>
		<updated>2026-07-04T22:44:45Z</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=definitions&lt;br /&gt;
|title=Product Knowledge&lt;br /&gt;
|order=8&lt;br /&gt;
|introduced=3.0&lt;br /&gt;
|model=ProductKnowledge&lt;br /&gt;
|reference=References/Base models &amp;amp;amp; conventions&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ProductKnowledge&amp;lt;/code&amp;gt; is the reusable definition of a product — its coding, base presentation unit, ingredients and nutrients, drug characteristics, and storage rules. Define it once and every concrete &amp;lt;code&amp;gt;Product&amp;lt;/code&amp;gt; points back to it instead of carrying duplicate data. A definition is either instance-wide or scoped to a single facility.&lt;br /&gt;
&lt;br /&gt;
The Django model is only the storage layer: &amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;names&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;storage_guidelines&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;definitional&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;base_unit&amp;lt;/code&amp;gt; are opaque &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt;s whose real structure lives in the Pydantic resource specs. Every enum, nested JSON shape, validation rule, and read/write difference below comes from those specs.&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/product_knowledge.py &amp;lt;code&amp;gt;care/emr/models/product_knowledge.py&amp;lt;/code&amp;gt;]&lt;br /&gt;
* Spec: [&amp;lt;nowiki/&amp;gt;https://github.com/ohcnetwork/care/blob/develop/care/emr/resources/inventory/product_knowledge/spec.py &amp;lt;code&amp;gt;care/emr/resources/inventory/product_knowledge/spec.py&amp;lt;/code&amp;gt;]&lt;br /&gt;
* Value sets: [&amp;lt;nowiki/&amp;gt;https://github.com/ohcnetwork/care/blob/develop/care/emr/resources/inventory/product_knowledge/valueset.py &amp;lt;code&amp;gt;care/emr/resources/inventory/product_knowledge/valueset.py&amp;lt;/code&amp;gt;]&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;ProductKnowledge&amp;lt;/code&amp;gt;&lt;br /&gt;
| Foundational, reusable definition of a product (medication, nutritional product, or consumable)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ProductKnowledge&amp;lt;/code&amp;gt; extends [[References/Base models &amp;amp;amp; conventions|&amp;lt;code&amp;gt;SlugBaseModel&amp;lt;/code&amp;gt;]], which extends &amp;lt;code&amp;gt;EMRBaseModel&amp;lt;/code&amp;gt; (the shared base providing &amp;lt;code&amp;gt;external_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;, soft-delete via &amp;lt;code&amp;gt;deleted&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;, and &amp;lt;code&amp;gt;history&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;meta&amp;lt;/code&amp;gt; JSON). &amp;lt;code&amp;gt;SlugBaseModel&amp;lt;/code&amp;gt; sets &amp;lt;code&amp;gt;FACILITY_SCOPED = True&amp;lt;/code&amp;gt; and adds the slug helpers &amp;lt;code&amp;gt;calculate_slug&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parse_slug&amp;lt;/code&amp;gt;, so a record is addressable by an instance slug (&amp;lt;code&amp;gt;i-&amp;amp;lt;slug&amp;amp;gt;&amp;lt;/code&amp;gt;) or a facility slug (&amp;lt;code&amp;gt;f-&amp;amp;lt;facility_external_id&amp;amp;gt;-&amp;amp;lt;slug&amp;amp;gt;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;code&amp;gt;ProductKnowledge&amp;lt;/code&amp;gt; fields ==&lt;br /&gt;
&lt;br /&gt;
=== Identity &amp;amp;amp; scope ===&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=ProductKnowledge|section=Identity &amp;amp;amp; scope|name=facility|type=FK → facility.Facility|notes=&amp;lt;code&amp;gt;PROTECT&amp;lt;/code&amp;gt;, nullable. Null means an instance-level definition; set means facility-scoped. Excluded from the spec base (&amp;lt;code&amp;gt;__exclude__ = [&amp;amp;quot;facility&amp;amp;quot;]&amp;lt;/code&amp;gt;); set on write via a &amp;lt;code&amp;gt;facility&amp;lt;/code&amp;gt; UUID, surfaced on read as &amp;lt;code&amp;gt;is_instance_level&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=Identity &amp;amp;amp; scope|name=slug|type=CharField(255)|notes=Slug value; combined with &amp;lt;code&amp;gt;facility&amp;lt;/code&amp;gt; to form the addressable slug. Set server-side from &amp;lt;code&amp;gt;slug_value&amp;lt;/code&amp;gt; on write}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=Identity &amp;amp;amp; scope|name=alternate_identifier|type=CharField(255)|notes=Nullable; secondary external identifier}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=Identity &amp;amp;amp; scope|name=status|type=CharField(255)|notes=Lifecycle status. Spec-constrained to &amp;lt;code&amp;gt;ProductKnowledgeStatusOptions&amp;lt;/code&amp;gt; (required)}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=Identity &amp;amp;amp; scope|name=product_type|type=CharField(255)|notes=Product category. Spec-constrained to &amp;lt;code&amp;gt;ProductTypeOptions&amp;lt;/code&amp;gt; (required)}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=Identity &amp;amp;amp; scope|name=category|type=FK → emr.ResourceCategory|notes=&amp;lt;code&amp;gt;CASCADE&amp;lt;/code&amp;gt;, nullable; classifies the product into a [[References/Resource Category}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Naming ===&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=ProductKnowledge|section=Naming|name=name|type=CharField(255)|notes=Primary display name (required in spec)}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=Naming|name=names|type=JSONField (list)|notes=Nullable; list of &amp;lt;code&amp;gt;ProductName { name_type: ProductNameTypes, name: str }&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;name_type&amp;lt;/code&amp;gt; is bound to the &amp;lt;code&amp;gt;ProductNameTypes&amp;lt;/code&amp;gt; enum, not a FHIR value set}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=Naming|name=names_cache|type=CharField(2048)|notes=Nullable; denormalized space-joined string of &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; plus every &amp;lt;code&amp;gt;names&amp;lt;/code&amp;gt; entry, rebuilt on each &amp;lt;code&amp;gt;save()&amp;lt;/code&amp;gt; to power search. Platform-maintained, absent from every spec — never set it from clients}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Coding &amp;amp;amp; definition (JSON fields) ===&lt;br /&gt;
&lt;br /&gt;
The model stores these as bare &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt;s; the spec enforces the shapes below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Model type&lt;br /&gt;
! Spec type / shape&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt; (dict)&lt;br /&gt;
| &amp;lt;code&amp;gt;Coding | None&amp;lt;/code&amp;gt;&lt;br /&gt;
| Nullable; product code as a [[#coding&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;base_unit&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt; (dict)&lt;br /&gt;
| &amp;lt;code&amp;gt;ValueSetBoundCoding[CARE_UCUM_UNITS]&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Required&amp;#039;&amp;#039;&amp;#039;. A &amp;lt;code&amp;gt;Coding&amp;lt;/code&amp;gt; bound to the UCUM units value set (&amp;lt;code&amp;gt;system-ucum-units&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;names&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt; (list)&lt;br /&gt;
| &amp;lt;code&amp;gt;list[ProductName] | None&amp;lt;/code&amp;gt;&lt;br /&gt;
| See [[#productname&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;storage_guidelines&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt; (list)&lt;br /&gt;
| &amp;lt;code&amp;gt;list[StorageGuideline] | None&amp;lt;/code&amp;gt;&lt;br /&gt;
| See [[#storageguideline&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;definitional&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt; (dict)&lt;br /&gt;
| &amp;lt;code&amp;gt;ProductDefinitionSpec | None&amp;lt;/code&amp;gt;&lt;br /&gt;
| Type-specific definition payload. See [[#productdefinitionspec&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Enums ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ProductTypeOptions&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;product_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;medication&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;nutritional_product&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;consumable&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ProductKnowledgeStatusOptions&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;draft&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;active&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;retired&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;unknown&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ProductNameTypes&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;names[].name_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;trade_name&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;alias&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;original_name&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;preferred&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;DrugCharacteristicCode&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;definitional.drug_characteristic[].code&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;imprint_code&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;size&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;shape&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;color&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;coating&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;scoring&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;logo&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Nested spec shapes ==&lt;br /&gt;
&lt;br /&gt;
These are plain Pydantic &amp;lt;code&amp;gt;BaseModel&amp;lt;/code&amp;gt;s in &amp;lt;code&amp;gt;spec.py&amp;lt;/code&amp;gt;, not value-set bound unless noted.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ProductName&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;names[]&amp;lt;/code&amp;gt; — alternate names for the product.&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;
! Required&lt;br /&gt;
! Notes&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductName|name=name_type|type=ProductNameTypes|notes=yes}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductName|name=name|type=str|notes=yes}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;StorageGuideline&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;storage_guidelines[]&amp;lt;/code&amp;gt; — a storage note paired with a stability duration.&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;
! Required&lt;br /&gt;
! Notes&lt;br /&gt;
{{Field|model=ProductKnowledge|section=StorageGuideline|name=note|type=str|notes=yes}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=StorageGuideline|name=stability_duration|type=DurationSpec { value: int, unit: Coding }|notes=yes}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ProductDefinitionSpec&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;definitional&amp;lt;/code&amp;gt; — type-specific definition payload.&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;
! Default&lt;br /&gt;
! Notes&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductDefinitionSpec|name=dosage_form|type=ValueSetBoundCoding[MEDICATION_FORM_CODES] | None|notes=required (nullable)}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductDefinitionSpec|name=intended_routes|type=list[Coding]|notes=&amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductDefinitionSpec|name=ingredients|type=list[ProductIngredient]|notes=&amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductDefinitionSpec|name=nutrients|type=list[ProductNutrient]|notes=&amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductDefinitionSpec|name=drug_characteristic|type=list[DrugCharacteristic]|notes=&amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt;}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ProductIngredient&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;definitional.ingredients[]&amp;lt;/code&amp;gt;.&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;
! Required&lt;br /&gt;
! Notes&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductIngredient|name=is_active|type=bool|notes=yes}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductIngredient|name=substance|type=ValueSetBoundCoding[CARE_SUBSTANCE_VALUSET]|notes=yes}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductIngredient|name=strength|type=ProductStrength|notes=yes}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ProductNutrient&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;definitional.nutrients[]&amp;lt;/code&amp;gt;.&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;
! Required&lt;br /&gt;
! Notes&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductNutrient|name=item|type=ValueSetBoundCoding[CARE_NUTRIENTS_VALUESET]|notes=yes}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductNutrient|name=amount|type=ProductStrength|notes=yes}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ProductStrength&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Shared by &amp;lt;code&amp;gt;ProductIngredient.strength&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ProductNutrient.amount&amp;lt;/code&amp;gt;.&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;
! Required&lt;br /&gt;
! Notes&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductStrength|name=ratio|type=Ratio { numerator: Quantity, denominator: Quantity }|notes=yes}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=ProductStrength|name=quantity|type=Quantity|notes=yes}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;DrugCharacteristic&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;definitional.drug_characteristic[]&amp;lt;/code&amp;gt;.&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;
! Required&lt;br /&gt;
! Notes&lt;br /&gt;
{{Field|model=ProductKnowledge|section=DrugCharacteristic|name=code|type=DrugCharacteristicCode|notes=yes}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=DrugCharacteristic|name=value|type=str|notes=yes}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Shared common types ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;Coding&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
From &amp;lt;code&amp;gt;care/emr/resources/common/coding.py&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;extra=&amp;amp;quot;forbid&amp;amp;quot;&amp;lt;/code&amp;gt;).&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;
! Required&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;system&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;str | None&amp;lt;/code&amp;gt;&lt;br /&gt;
| no&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;str | None&amp;lt;/code&amp;gt;&lt;br /&gt;
| no&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;str&amp;lt;/code&amp;gt;&lt;br /&gt;
| yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;display&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;str | None&amp;lt;/code&amp;gt;&lt;br /&gt;
| no&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code&amp;gt;ValueSetBoundCoding[&amp;amp;lt;slug&amp;amp;gt;]&amp;lt;/code&amp;gt; is a &amp;lt;code&amp;gt;Coding&amp;lt;/code&amp;gt; subclass that additionally validates &amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt; against the named value set on deserialization.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;Quantity&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
From &amp;lt;code&amp;gt;care/emr/resources/common/quantity.py&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;extra=&amp;amp;quot;forbid&amp;amp;quot;&amp;lt;/code&amp;gt;).&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=ProductKnowledge|section=Quantity|name=value|type=Decimal | None|notes=max 20 digits, 6 decimal places}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=Quantity|name=unit|type=Coding | None|notes=human-readable unit}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=Quantity|name=code|type=Coding | None|notes=machine-processable unit}}&lt;br /&gt;
{{Field|model=ProductKnowledge|section=Quantity|name=meta|type=dict | None|notes=}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Ratio { numerator: Quantity, denominator: Quantity }&amp;lt;/code&amp;gt; — both required.&lt;br /&gt;
&lt;br /&gt;
== Resource specs (API schema) ==&lt;br /&gt;
&lt;br /&gt;
Every spec builds on &amp;lt;code&amp;gt;EMRResource&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;care/emr/resources/base.py&amp;lt;/code&amp;gt;), which provides &amp;lt;code&amp;gt;serialize&amp;lt;/code&amp;gt; (DB → Pydantic), &amp;lt;code&amp;gt;de_serialize&amp;lt;/code&amp;gt; (Pydantic → DB), and the &amp;lt;code&amp;gt;perform_extra_serialization&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;perform_extra_deserialization&amp;lt;/code&amp;gt; hooks. &amp;lt;code&amp;gt;EMRResource.serialize&amp;lt;/code&amp;gt; copies only non-FK database fields that are declared spec fields and not in &amp;lt;code&amp;gt;__exclude__&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Spec class&lt;br /&gt;
! Role&lt;br /&gt;
! Adds / behaviour&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;BaseProductKnowledgeSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| shared base&lt;br /&gt;
| &amp;lt;code&amp;gt;__exclude__ = [&amp;amp;quot;facility&amp;amp;quot;]&amp;lt;/code&amp;gt;. Fields: &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;alternate_identifier&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;product_type&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;base_unit&amp;lt;/code&amp;gt; (required, UCUM-bound), &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;names&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;storage_guidelines&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;definitional&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ProductKnowledgeUpdateSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| write · update&lt;br /&gt;
| Adds &amp;lt;code&amp;gt;category: str | None&amp;lt;/code&amp;gt; (resource-category &amp;#039;&amp;#039;&amp;#039;slug&amp;#039;&amp;#039;&amp;#039;) and &amp;lt;code&amp;gt;slug_value: SlugType&amp;lt;/code&amp;gt; (required). On deserialize, resolves &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; via &amp;lt;code&amp;gt;ResourceCategory.objects.get(slug=...)&amp;lt;/code&amp;gt; and sets &amp;lt;code&amp;gt;obj.slug = self.slug_value&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ProductKnowledgeWriteSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| write · create&lt;br /&gt;
| Extends the update spec; adds &amp;lt;code&amp;gt;facility: UUID4 | None&amp;lt;/code&amp;gt;. On deserialize, runs the update-spec logic, then resolves &amp;lt;code&amp;gt;facility&amp;lt;/code&amp;gt; via &amp;lt;code&amp;gt;Facility.objects.get(external_id=...)&amp;lt;/code&amp;gt; when supplied&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ProductKnowledgeReadSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| read · detail/list&lt;br /&gt;
| Adds &amp;lt;code&amp;gt;is_instance_level: bool&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category: dict | None&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;slug_config: dict&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;slug: str&amp;lt;/code&amp;gt;. On serialize, sets &amp;lt;code&amp;gt;id = external_id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;is_instance_level = not facility_id&amp;lt;/code&amp;gt;, serializes &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; via &amp;lt;code&amp;gt;ResourceCategoryReadSpec&amp;lt;/code&amp;gt;, and sets &amp;lt;code&amp;gt;slug_config = parse_slug(slug)&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Validation &amp;amp;amp; bound value sets ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; ∈ &amp;lt;code&amp;gt;ProductKnowledgeStatusOptions&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;product_type&amp;lt;/code&amp;gt; ∈ &amp;lt;code&amp;gt;ProductTypeOptions&amp;lt;/code&amp;gt;, both required.&lt;br /&gt;
* &amp;lt;code&amp;gt;base_unit&amp;lt;/code&amp;gt; is &amp;#039;&amp;#039;&amp;#039;required&amp;#039;&amp;#039;&amp;#039; and bound to &amp;lt;code&amp;gt;CARE_UCUM_UNITS&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;system-ucum-units&amp;lt;/code&amp;gt;, system &amp;lt;code&amp;gt;http://unitsofmeasure.org&amp;lt;/code&amp;gt;).&lt;br /&gt;
* &amp;lt;code&amp;gt;definitional.dosage_form&amp;lt;/code&amp;gt; is bound to &amp;lt;code&amp;gt;MEDICATION_FORM_CODES&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;ingredients[].substance&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;CARE_SUBSTANCE_VALUSET&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;nutrients[].item&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;CARE_NUTRIENTS_VALUESET&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;intended_routes&amp;lt;/code&amp;gt; stay free &amp;lt;code&amp;gt;Coding&amp;lt;/code&amp;gt;s.&lt;br /&gt;
* &amp;lt;code&amp;gt;slug_value&amp;lt;/code&amp;gt; uses &amp;lt;code&amp;gt;SlugType&amp;lt;/code&amp;gt;: 5–50 chars, URL-safe (&amp;lt;code&amp;gt;^[a-zA-Z0-9][a-zA-Z0-9_-]*[a-zA-Z0-9]$&amp;lt;/code&amp;gt;), starting and ending alphanumeric.&lt;br /&gt;
* &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; on write is a slug string; an unknown slug raises &amp;lt;code&amp;gt;DoesNotExist&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;.get(...)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Server-maintained behaviour ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;facility&amp;lt;/code&amp;gt; never flows through the generic field loop (it sits in &amp;lt;code&amp;gt;__exclude__&amp;lt;/code&amp;gt;); only &amp;lt;code&amp;gt;ProductKnowledgeWriteSpec&amp;lt;/code&amp;gt; (create) sets it, from the &amp;lt;code&amp;gt;facility&amp;lt;/code&amp;gt; UUID.&lt;br /&gt;
* &amp;lt;code&amp;gt;slug&amp;lt;/code&amp;gt; is set server-side from &amp;lt;code&amp;gt;slug_value&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;names_cache&amp;lt;/code&amp;gt; is rebuilt in the model&amp;#039;s &amp;lt;code&amp;gt;save()&amp;lt;/code&amp;gt; (see below).&lt;br /&gt;
* On read, &amp;lt;code&amp;gt;is_instance_level&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;slug_config&amp;lt;/code&amp;gt;, and the serialized &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt; are computed in &amp;lt;code&amp;gt;perform_extra_serialization&amp;lt;/code&amp;gt; — none are stored columns.&lt;br /&gt;
&lt;br /&gt;
== Methods &amp;amp;amp; save behaviour ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;save()&amp;lt;/code&amp;gt; side effects ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;save()&amp;lt;/code&amp;gt; rebuilds &amp;lt;code&amp;gt;names_cache&amp;lt;/code&amp;gt; before persisting:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;names_cache&amp;lt;/code&amp;gt; is reset to &amp;lt;code&amp;gt;&amp;amp;quot;&amp;amp;lt;name&amp;amp;gt; &amp;amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
# For each entry in &amp;lt;code&amp;gt;names&amp;lt;/code&amp;gt;, the entry&amp;#039;s &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; (dict key or attribute) is appended, space-separated.&lt;br /&gt;
# &amp;lt;code&amp;gt;super().save()&amp;lt;/code&amp;gt; persists the record, including the slug logic inherited from &amp;lt;code&amp;gt;SlugBaseModel&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;names_cache&amp;lt;/code&amp;gt; is platform-maintained — write to &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;names&amp;lt;/code&amp;gt; instead of setting it directly.&lt;br /&gt;
&lt;br /&gt;
== API integration notes ==&lt;br /&gt;
&lt;br /&gt;
* Exposed through Care&amp;#039;s REST API; aligns with the FHIR &amp;lt;code&amp;gt;MedicationKnowledge&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NutritionProduct&amp;lt;/code&amp;gt; concepts.&lt;br /&gt;
* &amp;lt;code&amp;gt;product_type&amp;lt;/code&amp;gt; decides what &amp;lt;code&amp;gt;definitional&amp;lt;/code&amp;gt; means (&amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;nutritional_product&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;consumable&amp;lt;/code&amp;gt;).&lt;br /&gt;
* &amp;lt;code&amp;gt;facility&amp;lt;/code&amp;gt; controls scope: omit it for instance-wide, set it for facility-local. Address records by slug (&amp;lt;code&amp;gt;i-&amp;amp;lt;slug&amp;amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;f-&amp;amp;lt;facility_external_id&amp;amp;gt;-&amp;amp;lt;slug&amp;amp;gt;&amp;lt;/code&amp;gt;); the parsed parts come back as &amp;lt;code&amp;gt;slug_config&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;names&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;storage_guidelines&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;definitional&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;base_unit&amp;lt;/code&amp;gt; carry their structure and value-set binding in the spec, not the model. &amp;lt;code&amp;gt;base_unit&amp;lt;/code&amp;gt; is required.&lt;br /&gt;
&lt;br /&gt;
{{Related}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>