<?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%2FMedication_Administration</id>
	<title>References/Medication Administration - 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%2FMedication_Administration"/>
	<link rel="alternate" type="text/html" href="https://ohcnwiki.tellmey.fyi/index.php?title=References/Medication_Administration&amp;action=history"/>
	<updated>2026-07-06T05:19:05Z</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/Medication_Administration&amp;diff=445&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/Medication_Administration&amp;diff=445&amp;oldid=prev"/>
		<updated>2026-07-06T04:15:02Z</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:45, 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 354:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 354:&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;* Set either &amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;administered_product&amp;lt;/code&amp;gt;, never both. Use &amp;lt;code&amp;gt;administered_product&amp;lt;/code&amp;gt; when a specific catalogued product was given, so the administration reconciles against inventory; use &amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt; for a coded drug with no catalog product.&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;* Set either &amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;administered_product&amp;lt;/code&amp;gt;, never both. Use &amp;lt;code&amp;gt;administered_product&amp;lt;/code&amp;gt; when a specific catalogued product was given, so the administration reconciles against inventory; use &amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt; for a coded drug with no catalog product.&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;* After create, only &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;note&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;occurrence_period_end&amp;lt;/code&amp;gt; are updatable; &amp;lt;code&amp;gt;encounter&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;request&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;patient&amp;lt;/code&amp;gt; are immutable.&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;* After create, only &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;note&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;occurrence_period_end&amp;lt;/code&amp;gt; are updatable; &amp;lt;code&amp;gt;encounter&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;request&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;patient&amp;lt;/code&amp;gt; are immutable.&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 medications}}&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/Medication_Administration&amp;diff=163&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/Medication_Administration&amp;diff=163&amp;oldid=prev"/>
		<updated>2026-07-04T22:45:18Z</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=medications&lt;br /&gt;
|title=Medication Administration&lt;br /&gt;
|order=2&lt;br /&gt;
|introduced=3.0&lt;br /&gt;
|model=MedicationAdministration&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;MedicationAdministration&amp;lt;/code&amp;gt; records that a medication was given to a patient — or that giving it was attempted — fulfilling a [[References/Medication Request|&amp;lt;code&amp;gt;MedicationRequest&amp;lt;/code&amp;gt;]]. You write one each time a dose is administered against an order. The Django model is the storage layer; several columns are opaque &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt;s whose structure comes from the Pydantic resource specs in &amp;lt;code&amp;gt;care/emr/resources/medication/administration/&amp;lt;/code&amp;gt;. Both layers are documented below.&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/medication_administration.py &amp;lt;code&amp;gt;care/emr/models/medication_administration.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/medication/administration/spec.py &amp;lt;code&amp;gt;care/emr/resources/medication/administration/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/medication/valueset &amp;lt;code&amp;gt;care/emr/resources/medication/valueset/&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;MedicationAdministration&amp;lt;/code&amp;gt;&lt;br /&gt;
| The administration event that fulfils a [[References/Medication Request&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MedicationAdministration&amp;lt;/code&amp;gt; extends &amp;lt;code&amp;gt;EMRBaseModel&amp;lt;/code&amp;gt;, the shared Care EMR base that provides &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt;, audit fields, and soft-delete semantics (see [[References/Base models &amp;amp;amp; conventions|Base model]]). It maps to the FHIR [&amp;lt;nowiki/&amp;gt;https://hl7.org/fhir/medicationadministration.html &amp;lt;code&amp;gt;MedicationAdministration&amp;lt;/code&amp;gt;] resource.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;code&amp;gt;MedicationAdministration&amp;lt;/code&amp;gt; fields ==&lt;br /&gt;
&lt;br /&gt;
Each row lists the storage column type and, where the column is a &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt;, the structured shape the resource spec enforces.&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;
! Storage&lt;br /&gt;
! Spec shape&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;CharField(100)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;MedicationAdministrationStatus&amp;lt;/code&amp;gt; enum&lt;br /&gt;
| Required. Administration event status — see [[#medicationadministrationstatus-values&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;status_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt; (null)&lt;br /&gt;
| &amp;lt;code&amp;gt;Coding&amp;lt;/code&amp;gt; bound to &amp;lt;code&amp;gt;system-medication&amp;lt;/code&amp;gt; value set&lt;br /&gt;
| Optional. Coded reason for the status. The spec binds this to the medication value set, not the &amp;amp;quot;not given&amp;amp;quot; reason set you might expect&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;CharField(100)&amp;lt;/code&amp;gt; (null)&lt;br /&gt;
| &amp;lt;code&amp;gt;MedicationAdministrationCategory&amp;lt;/code&amp;gt; enum&lt;br /&gt;
| Optional. Administration setting — see [[#medicationadministrationcategory-values&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Medication &amp;amp;amp; product ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Storage&lt;br /&gt;
! Spec shape&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt; (default &amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;)&lt;br /&gt;
| &amp;lt;code&amp;gt;Coding&amp;lt;/code&amp;gt; bound to &amp;lt;code&amp;gt;system-medication&amp;lt;/code&amp;gt; value set&lt;br /&gt;
| Optional in spec. &amp;lt;code&amp;gt;{ system, version?, code, display? }&amp;lt;/code&amp;gt;. Mutually exclusive with &amp;lt;code&amp;gt;administered_product&amp;lt;/code&amp;gt; (model validator)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;administered_product&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;FK → ProductKnowledge&amp;lt;/code&amp;gt; (null, &amp;lt;code&amp;gt;CASCADE&amp;lt;/code&amp;gt;)&lt;br /&gt;
| &amp;lt;code&amp;gt;UUID4&amp;lt;/code&amp;gt; (write) / nested &amp;lt;code&amp;gt;ProductKnowledgeReadSpec&amp;lt;/code&amp;gt; (read)&lt;br /&gt;
| Optional. The specific catalog product administered. Cannot be set together with &amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dosage&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt; (null)&lt;br /&gt;
| &amp;lt;code&amp;gt;Dosage&amp;lt;/code&amp;gt; nested spec&lt;br /&gt;
| Optional. Dose, rate, route, site, and method actually administered — see [[#dosage-nested-spec&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subject &amp;amp;amp; context ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Storage&lt;br /&gt;
! Spec shape&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;patient&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;FK → Patient&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;CASCADE&amp;lt;/code&amp;gt;)&lt;br /&gt;
| not in spec (server-derived)&lt;br /&gt;
| The patient who received the medication. Set server-side from the encounter&amp;#039;s patient on create — never accepted from the client&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;encounter&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;FK → Encounter&amp;lt;/code&amp;gt; (null, &amp;lt;code&amp;gt;CASCADE&amp;lt;/code&amp;gt;)&lt;br /&gt;
| &amp;lt;code&amp;gt;UUID4&amp;lt;/code&amp;gt; (required, write)&lt;br /&gt;
| The encounter during which the medication was administered. Validated to exist; read schema returns the encounter&amp;#039;s &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;request&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;FK → MedicationRequest&amp;lt;/code&amp;gt; (null, &amp;lt;code&amp;gt;CASCADE&amp;lt;/code&amp;gt;)&lt;br /&gt;
| &amp;lt;code&amp;gt;UUID4&amp;lt;/code&amp;gt; (required, write)&lt;br /&gt;
| The order this administration fulfils. Validated to exist; read schema returns the request&amp;#039;s &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Timing &amp;amp;amp; attribution ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Storage&lt;br /&gt;
! Spec shape&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;authored_on&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;DateTimeField&amp;lt;/code&amp;gt; (null)&lt;br /&gt;
| &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt;&lt;br /&gt;
| Optional. When the record was authored, distinct from when the dose was given&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;occurrence_period_start&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;DateTimeField&amp;lt;/code&amp;gt; (default &amp;lt;code&amp;gt;datetime.now&amp;lt;/code&amp;gt;)&lt;br /&gt;
| &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt; (required)&lt;br /&gt;
| When the administration began. Required on create; defaults to now at the model level&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;occurrence_period_end&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;DateTimeField&amp;lt;/code&amp;gt; (null)&lt;br /&gt;
| &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt;&lt;br /&gt;
| Optional. End of the administration, for infusions and extended doses. Updatable via &amp;lt;code&amp;gt;MedicationAdministrationUpdateSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;recorded&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;DateTimeField&amp;lt;/code&amp;gt; (null)&lt;br /&gt;
| &amp;lt;code&amp;gt;datetime&amp;lt;/code&amp;gt;&lt;br /&gt;
| Optional. When the event was entered into the system, distinct from &amp;lt;code&amp;gt;occurrence_period_start&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;performer&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt; (default &amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt;)&lt;br /&gt;
| &amp;lt;code&amp;gt;list[MedicationAdministrationPerformer]&amp;lt;/code&amp;gt;&lt;br /&gt;
| Optional. Actors who performed the administration and their function — see [[#medicationadministrationperformer-nested-spec&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;note&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;TextField&amp;lt;/code&amp;gt; (null)&lt;br /&gt;
| &amp;lt;code&amp;gt;str&amp;lt;/code&amp;gt;&lt;br /&gt;
| Optional. Free-text annotation. Updatable via &amp;lt;code&amp;gt;MedicationAdministrationUpdateSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Enum values ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;MedicationAdministrationStatus&amp;lt;/code&amp;gt; values ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;str&amp;lt;/code&amp;gt; enum (&amp;lt;code&amp;gt;care/emr/resources/medication/administration/spec.py&amp;lt;/code&amp;gt;). These use underscores (e.g. &amp;lt;code&amp;gt;not_done&amp;lt;/code&amp;gt;), not the FHIR hyphenated forms.&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;completed&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;not_done&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;
| &amp;lt;code&amp;gt;stopped&amp;lt;/code&amp;gt;&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;on_hold&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;
| &amp;lt;code&amp;gt;cancelled&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;MedicationAdministrationCategory&amp;lt;/code&amp;gt; values ===&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;inpatient&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;outpatient&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;community&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;discharge&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;MedicationAdministrationPerformerFunction&amp;lt;/code&amp;gt; values ===&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;performer&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;verifier&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;witness&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Nested specs (JSON-field shapes) ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;Dosage&amp;lt;/code&amp;gt; (nested spec) ===&lt;br /&gt;
&lt;br /&gt;
Structured shape of the &amp;lt;code&amp;gt;dosage&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt;. Every field is optional.&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=MedicationAdministration|section=Dosage (nested spec)|name=text|type=str | None|notes=Free-text dosage instructions}}&lt;br /&gt;
{{Field|model=MedicationAdministration|section=Dosage (nested spec)|name=site|type=Coding | None|notes=Bound to &amp;lt;code&amp;gt;system-body-site&amp;lt;/code&amp;gt; value set (SNOMED CT &amp;lt;code&amp;gt;&amp;amp;lt;&amp;amp;lt; 91723000&amp;lt;/code&amp;gt;)}}&lt;br /&gt;
{{Field|model=MedicationAdministration|section=Dosage (nested spec)|name=route|type=Coding | None|notes=Bound to &amp;lt;code&amp;gt;system-route&amp;lt;/code&amp;gt; value set (SNOMED CT &amp;lt;code&amp;gt;&amp;amp;lt;&amp;amp;lt; 284009009&amp;lt;/code&amp;gt;)}}&lt;br /&gt;
{{Field|model=MedicationAdministration|section=Dosage (nested spec)|name=method|type=Coding | None|notes=Bound to &amp;lt;code&amp;gt;system-administration-method&amp;lt;/code&amp;gt; value set (SNOMED CT &amp;lt;code&amp;gt;&amp;amp;lt;&amp;amp;lt; 736665006&amp;lt;/code&amp;gt;)}}&lt;br /&gt;
{{Field|model=MedicationAdministration|section=Dosage (nested spec)|name=dose|type=Quantity | None|notes=The amount of medication administered}}&lt;br /&gt;
{{Field|model=MedicationAdministration|section=Dosage (nested spec)|name=rate|type=Quantity | None|notes=The speed of administration}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Quantity&amp;lt;/code&amp;gt; shape (&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;): &amp;lt;code&amp;gt;{ value: Decimal? (max_digits 20, decimal_places 6), unit: Coding?, code: Coding?, meta: dict? }&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Coding&amp;lt;/code&amp;gt; shape (&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;): &amp;lt;code&amp;gt;{ system: str?, version: str?, code: str (required), display: str? }&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;MedicationAdministrationPerformer&amp;lt;/code&amp;gt; (nested spec) ===&lt;br /&gt;
&lt;br /&gt;
Element shape of the &amp;lt;code&amp;gt;performer&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt; list.&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=MedicationAdministration|section=MedicationAdministrationPerformer (nested spec)|name=actor|type=UUID4 (required)|notes=The user who performed the administration. Validated server-side to reference an existing [[References/User &amp;amp;amp; Skills}}&lt;br /&gt;
{{Field|model=MedicationAdministration|section=MedicationAdministrationPerformer (nested spec)|name=function|type=MedicationAdministrationPerformerFunction | None|notes=The performer&amp;#039;s function — see [[#medicationadministrationperformerfunction-values}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Bound value sets ==&lt;br /&gt;
&lt;br /&gt;
Coded fields bind to Care system value sets (SNOMED CT). &amp;lt;code&amp;gt;ValueSetBoundCoding&amp;lt;/code&amp;gt; rejects any code outside the bound set.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field&lt;br /&gt;
! Value set&lt;br /&gt;
! Slug&lt;br /&gt;
! SNOMED CT constraint&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;status_reason&amp;lt;/code&amp;gt;&lt;br /&gt;
| Medication&lt;br /&gt;
| &amp;lt;code&amp;gt;system-medication&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;amp;lt;&amp;amp;lt; 763158003&amp;lt;/code&amp;gt; (Medicinal product)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dosage.site&amp;lt;/code&amp;gt;&lt;br /&gt;
| Body Site&lt;br /&gt;
| &amp;lt;code&amp;gt;system-body-site&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;is-a 91723000&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dosage.route&amp;lt;/code&amp;gt;&lt;br /&gt;
| Route&lt;br /&gt;
| &amp;lt;code&amp;gt;system-route&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;is-a 284009009&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dosage.method&amp;lt;/code&amp;gt;&lt;br /&gt;
| Administration Method&lt;br /&gt;
| &amp;lt;code&amp;gt;system-administration-method&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;is-a 736665006&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Three more medication value sets are defined alongside these but go unreferenced by this resource&amp;#039;s specs: Medication Not Given Reason (&amp;lt;code&amp;gt;system-medication-not-given&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;is-a 242990004&amp;lt;/code&amp;gt; + &amp;lt;code&amp;gt;is-a 182895007&amp;lt;/code&amp;gt;), Additional Instruction (&amp;lt;code&amp;gt;system-additional-instruction&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;is-a 419492006&amp;lt;/code&amp;gt;), and As Needed (&amp;lt;code&amp;gt;system-as-needed-reason&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;is-a 404684003&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== Resource specs (API schema) ==&lt;br /&gt;
&lt;br /&gt;
All specs build 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 object → read schema) and &amp;lt;code&amp;gt;de_serialize&amp;lt;/code&amp;gt; (write schema → DB object), each with a &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; hook. &amp;lt;code&amp;gt;__exclude__&amp;lt;/code&amp;gt; lists the fields those hooks handle manually rather than copying field-for-field.&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;
! Key fields / behaviour&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;BaseMedicationAdministrationSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| shared base&lt;br /&gt;
| All common fields: &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;status_reason&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;category&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;authored_on&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;occurrence_period_start&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;occurrence_period_end&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;recorded&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;encounter&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;request&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;performer&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;dosage&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;note&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;__exclude__ = [&amp;amp;quot;patient&amp;amp;quot;, &amp;amp;quot;encounter&amp;amp;quot;, &amp;amp;quot;request&amp;amp;quot;, &amp;amp;quot;administered_product&amp;amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MedicationAdministrationSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| write · create&lt;br /&gt;
| Extends base; adds &amp;lt;code&amp;gt;administered_product: UUID4 | None&amp;lt;/code&amp;gt;. Validates &amp;lt;code&amp;gt;encounter&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;request&amp;lt;/code&amp;gt; exist; rejects &amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt; + &amp;lt;code&amp;gt;administered_product&amp;lt;/code&amp;gt; set together&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MedicationAdministrationUpdateSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| write · update&lt;br /&gt;
| Narrow update schema: only &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;note&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;occurrence_period_end&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;__exclude__ = [&amp;amp;quot;patient&amp;amp;quot;, &amp;amp;quot;encounter&amp;amp;quot;, &amp;amp;quot;request&amp;amp;quot;]&amp;lt;/code&amp;gt; — those are immutable after create&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MedicationAdministrationReadSpec&amp;lt;/code&amp;gt;&lt;br /&gt;
| read · detail/list&lt;br /&gt;
| Extends base; adds audit fields &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;created_date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;modified_date&amp;lt;/code&amp;gt;, and nested &amp;lt;code&amp;gt;administered_product: dict&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Dosage&amp;lt;/code&amp;gt;&lt;br /&gt;
| nested&lt;br /&gt;
| Shape of the &amp;lt;code&amp;gt;dosage&amp;lt;/code&amp;gt; JSON field (see above)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MedicationAdministrationPerformer&amp;lt;/code&amp;gt;&lt;br /&gt;
| nested&lt;br /&gt;
| Element of the &amp;lt;code&amp;gt;performer&amp;lt;/code&amp;gt; JSON list (see above)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Validation rules ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Mutual exclusion&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;MedicationAdministrationSpec.validate_administered_product&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;model_validator(mode=&amp;amp;quot;after&amp;amp;quot;)&amp;lt;/code&amp;gt;): &amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;administered_product&amp;lt;/code&amp;gt; cannot both be set.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Existence checks&amp;#039;&amp;#039;&amp;#039; (field validators, create): &amp;lt;code&amp;gt;encounter&amp;lt;/code&amp;gt; must reference an existing &amp;lt;code&amp;gt;Encounter&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;request&amp;lt;/code&amp;gt; must reference an existing &amp;lt;code&amp;gt;MedicationRequest&amp;lt;/code&amp;gt;; each &amp;lt;code&amp;gt;performer.actor&amp;lt;/code&amp;gt; must reference an existing &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bound codings&amp;#039;&amp;#039;&amp;#039;: &amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;status_reason&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;dosage.{site,route,method}&amp;lt;/code&amp;gt; are validated against their bound value sets; unknown codes raise.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Required on create&amp;#039;&amp;#039;&amp;#039;: &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;occurrence_period_start&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;encounter&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;request&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;MedicationAdministrationSpec.perform_extra_deserialization&amp;lt;/code&amp;gt; (create only, &amp;lt;code&amp;gt;is_update == False&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
* Resolves &amp;lt;code&amp;gt;encounter&amp;lt;/code&amp;gt; from the supplied &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt; and sets &amp;lt;code&amp;gt;obj.encounter&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Derives &amp;lt;code&amp;gt;obj.patient&amp;lt;/code&amp;gt; from &amp;lt;code&amp;gt;obj.encounter.patient&amp;lt;/code&amp;gt; — &amp;lt;code&amp;gt;patient&amp;lt;/code&amp;gt; is never taken from the client.&lt;br /&gt;
* Resolves &amp;lt;code&amp;gt;request&amp;lt;/code&amp;gt; from its &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt; and sets &amp;lt;code&amp;gt;obj.request&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If &amp;lt;code&amp;gt;administered_product&amp;lt;/code&amp;gt; is supplied, resolves the &amp;lt;code&amp;gt;ProductKnowledge&amp;lt;/code&amp;gt; and sets &amp;lt;code&amp;gt;obj.administered_product&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MedicationAdministrationReadSpec.perform_extra_serialization&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* Sets &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt;; flattens &amp;lt;code&amp;gt;encounter&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;request&amp;lt;/code&amp;gt; to their &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt;s.&lt;br /&gt;
* Serializes &amp;lt;code&amp;gt;administered_product&amp;lt;/code&amp;gt; (when present) via &amp;lt;code&amp;gt;ProductKnowledgeReadSpec&amp;lt;/code&amp;gt;.&lt;br /&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; via &amp;lt;code&amp;gt;serialize_audit_users&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Related models ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;administered_product&amp;lt;/code&amp;gt; references the supply-side catalog rather than carrying a nested record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;administered_product → FK ProductKnowledge (nullable, CASCADE)&lt;br /&gt;
patient              → FK Patient (CASCADE)&lt;br /&gt;
encounter            → FK Encounter (nullable, CASCADE)&lt;br /&gt;
request              → FK MedicationRequest (nullable, CASCADE)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;dosage&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;status_reason&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;performer&amp;lt;/code&amp;gt; are stored inline as &amp;lt;code&amp;gt;JSONField&amp;lt;/code&amp;gt;s rather than in separate tables, mirroring the FHIR &amp;lt;code&amp;gt;MedicationAdministration&amp;lt;/code&amp;gt; structure; their real shape comes from the resource specs above.&lt;br /&gt;
&lt;br /&gt;
== Methods &amp;amp;amp; save behaviour ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;de_serialize(obj?)&amp;lt;/code&amp;gt; dumps the write schema with &amp;lt;code&amp;gt;model_dump(exclude_defaults=True)&amp;lt;/code&amp;gt;, so unset fields never overwrite existing values — the same path handles both create and update.&lt;br /&gt;
* Audit and soft-delete fields (&amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;created_by&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;deleted&amp;lt;/code&amp;gt;, etc.) are inherited from &amp;lt;code&amp;gt;EMRBaseModel&amp;lt;/code&amp;gt; and maintained by the platform; clients never set them.&lt;br /&gt;
&lt;br /&gt;
== API integration notes ==&lt;br /&gt;
&lt;br /&gt;
* Write requests use &amp;lt;code&amp;gt;MedicationAdministrationSpec&amp;lt;/code&amp;gt; (create) and &amp;lt;code&amp;gt;MedicationAdministrationUpdateSpec&amp;lt;/code&amp;gt; (update); reads return &amp;lt;code&amp;gt;MedicationAdministrationReadSpec&amp;lt;/code&amp;gt;. Field names mostly match the model; &amp;lt;code&amp;gt;occurrence_period_start&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;occurrence_period_end&amp;lt;/code&amp;gt; map to the FHIR &amp;lt;code&amp;gt;occurence[x]&amp;lt;/code&amp;gt; period.&lt;br /&gt;
* Send coded fields (&amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;status_reason&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;dosage.site/route/method&amp;lt;/code&amp;gt;) as &amp;lt;code&amp;gt;Coding&amp;lt;/code&amp;gt; objects (&amp;lt;code&amp;gt;system&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;code&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;display&amp;lt;/code&amp;gt;) drawn from the bound value sets — free strings and out-of-set codes are rejected.&lt;br /&gt;
* &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; values use underscores (&amp;lt;code&amp;gt;in_progress&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;not_done&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;on_hold&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;entered_in_error&amp;lt;/code&amp;gt;), not the FHIR hyphenated spellings.&lt;br /&gt;
* Provide &amp;lt;code&amp;gt;encounter&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;request&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;external_id&amp;lt;/code&amp;gt; UUIDs; &amp;lt;code&amp;gt;patient&amp;lt;/code&amp;gt; is derived server-side from the encounter and must not be sent.&lt;br /&gt;
* Set either &amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;administered_product&amp;lt;/code&amp;gt;, never both. Use &amp;lt;code&amp;gt;administered_product&amp;lt;/code&amp;gt; when a specific catalogued product was given, so the administration reconciles against inventory; use &amp;lt;code&amp;gt;medication&amp;lt;/code&amp;gt; for a coded drug with no catalog product.&lt;br /&gt;
* After create, only &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;note&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;occurrence_period_end&amp;lt;/code&amp;gt; are updatable; &amp;lt;code&amp;gt;encounter&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;request&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;patient&amp;lt;/code&amp;gt; are immutable.&lt;br /&gt;
&lt;br /&gt;
{{Related}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>