<?xml version="1.0" encoding="UTF-8"?>
<archetype xmlns="http://schemas.openehr.org/v1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <original_language>
    <terminology_id>
      <value>ISO_639-1</value>
    </terminology_id>
    <code_string>en</code_string>
  </original_language>
  <is_controlled>false</is_controlled>
  <description>
    <original_author id="date">2016-01-11</original_author>
    <original_author id="name">Ian McNicoll</original_author>
    <original_author id="organisation">freshEHR Clinical Informatics Ltd.</original_author>
    <original_author id="email">ian@freshehr.com</original_author>
    <lifecycle_state>in_development</lifecycle_state>
    <other_details id="licence">This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/.</other_details>
    <other_details id="custodian_organisation">openEHR Foundation</other_details>
    <other_details id="original_namespace">org.openehr</other_details>
    <other_details id="original_publisher">openEHR Foundation</other_details>
    <other_details id="custodian_namespace">org.openehr</other_details>
    <other_details id="MD5-CAM-1.0.1">210EE9A45C212800EEE2E904DFCEA37D</other_details>
    <other_details id="build_uid">ac4d5a7d-89ca-4780-9477-54577096c510</other_details>
    <other_details id="revision">0.0.1-alpha</other_details>
    <details>
      <language>
        <terminology_id>
          <value>ISO_639-1</value>
        </terminology_id>
        <code_string>en</code_string>
      </language>
      <purpose>To record conditional factors which impact the dose amount or administration rate of a medication.</purpose>
      <use />
      <misuse />
      <copyright>© openEHR Foundation</copyright>
    </details>
  </description>
  <uid>
    <value>bc96878f-bf8e-456e-b1d4-a7ed85117a61</value>
  </uid>
  <archetype_id>
    <value>openEHR-EHR-CLUSTER.conditional_medication_rules.v0</value>
  </archetype_id>
  <adl_version>1.4</adl_version>
  <concept>at0000</concept>
  <definition>
    <rm_type_name>CLUSTER</rm_type_name>
    <occurrences>
      <lower_included>true</lower_included>
      <upper_included>true</upper_included>
      <lower_unbounded>false</lower_unbounded>
      <upper_unbounded>false</upper_unbounded>
      <lower>1</lower>
      <upper>1</upper>
    </occurrences>
    <node_id>at0000</node_id>
    <attributes xsi:type="C_MULTIPLE_ATTRIBUTE">
      <rm_attribute_name>items</rm_attribute_name>
      <existence>
        <lower_included>true</lower_included>
        <upper_included>true</upper_included>
        <lower_unbounded>false</lower_unbounded>
        <upper_unbounded>false</upper_unbounded>
        <lower>1</lower>
        <upper>1</upper>
      </existence>
      <children xsi:type="C_COMPLEX_OBJECT">
        <rm_type_name>CLUSTER</rm_type_name>
        <occurrences>
          <lower_included>true</lower_included>
          <lower_unbounded>false</lower_unbounded>
          <upper_unbounded>true</upper_unbounded>
          <lower>0</lower>
        </occurrences>
        <node_id>at0005</node_id>
        <attributes xsi:type="C_MULTIPLE_ATTRIBUTE">
          <rm_attribute_name>items</rm_attribute_name>
          <existence>
            <lower_included>true</lower_included>
            <upper_included>true</upper_included>
            <lower_unbounded>false</lower_unbounded>
            <upper_unbounded>false</upper_unbounded>
            <lower>1</lower>
            <upper>1</upper>
          </existence>
          <children xsi:type="C_COMPLEX_OBJECT">
            <rm_type_name>ELEMENT</rm_type_name>
            <occurrences>
              <lower_included>true</lower_included>
              <upper_included>true</upper_included>
              <lower_unbounded>false</lower_unbounded>
              <upper_unbounded>false</upper_unbounded>
              <lower>0</lower>
              <upper>1</upper>
            </occurrences>
            <node_id>at0002</node_id>
            <attributes xsi:type="C_SINGLE_ATTRIBUTE">
              <rm_attribute_name>value</rm_attribute_name>
              <existence>
                <lower_included>true</lower_included>
                <upper_included>true</upper_included>
                <lower_unbounded>false</lower_unbounded>
                <upper_unbounded>false</upper_unbounded>
                <lower>0</lower>
                <upper>1</upper>
              </existence>
              <children xsi:type="C_DV_QUANTITY">
                <rm_type_name>DV_QUANTITY</rm_type_name>
                <occurrences>
                  <lower_included>true</lower_included>
                  <upper_included>true</upper_included>
                  <lower_unbounded>false</lower_unbounded>
                  <upper_unbounded>false</upper_unbounded>
                  <lower>1</lower>
                  <upper>1</upper>
                </occurrences>
                <node_id />
              </children>
              <children xsi:type="C_COMPLEX_OBJECT">
                <rm_type_name>DV_INTERVAL&lt;DV_QUANTITY&gt;</rm_type_name>
                <occurrences>
                  <lower_included>true</lower_included>
                  <upper_included>true</upper_included>
                  <lower_unbounded>false</lower_unbounded>
                  <upper_unbounded>false</upper_unbounded>
                  <lower>1</lower>
                  <upper>1</upper>
                </occurrences>
                <node_id />
                <attributes xsi:type="C_SINGLE_ATTRIBUTE">
                  <rm_attribute_name>upper</rm_attribute_name>
                  <existence>
                    <lower_included>true</lower_included>
                    <upper_included>true</upper_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>false</upper_unbounded>
                    <lower>0</lower>
                    <upper>1</upper>
                  </existence>
                  <children xsi:type="C_DV_QUANTITY">
                    <rm_type_name>DV_QUANTITY</rm_type_name>
                    <occurrences>
                      <lower_included>true</lower_included>
                      <upper_included>true</upper_included>
                      <lower_unbounded>false</lower_unbounded>
                      <upper_unbounded>false</upper_unbounded>
                      <lower>1</lower>
                      <upper>1</upper>
                    </occurrences>
                    <node_id />
                  </children>
                </attributes>
                <attributes xsi:type="C_SINGLE_ATTRIBUTE">
                  <rm_attribute_name>lower</rm_attribute_name>
                  <existence>
                    <lower_included>true</lower_included>
                    <upper_included>true</upper_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>false</upper_unbounded>
                    <lower>0</lower>
                    <upper>1</upper>
                  </existence>
                  <children xsi:type="C_DV_QUANTITY">
                    <rm_type_name>DV_QUANTITY</rm_type_name>
                    <occurrences>
                      <lower_included>true</lower_included>
                      <upper_included>true</upper_included>
                      <lower_unbounded>false</lower_unbounded>
                      <upper_unbounded>false</upper_unbounded>
                      <lower>1</lower>
                      <upper>1</upper>
                    </occurrences>
                    <node_id />
                  </children>
                </attributes>
              </children>
              <children xsi:type="C_COMPLEX_OBJECT">
                <rm_type_name>DV_COUNT</rm_type_name>
                <occurrences>
                  <lower_included>true</lower_included>
                  <upper_included>true</upper_included>
                  <lower_unbounded>false</lower_unbounded>
                  <upper_unbounded>false</upper_unbounded>
                  <lower>1</lower>
                  <upper>1</upper>
                </occurrences>
                <node_id />
              </children>
              <children xsi:type="C_COMPLEX_OBJECT">
                <rm_type_name>DV_INTERVAL&lt;DV_COUNT&gt;</rm_type_name>
                <occurrences>
                  <lower_included>true</lower_included>
                  <upper_included>true</upper_included>
                  <lower_unbounded>false</lower_unbounded>
                  <upper_unbounded>false</upper_unbounded>
                  <lower>1</lower>
                  <upper>1</upper>
                </occurrences>
                <node_id />
                <attributes xsi:type="C_SINGLE_ATTRIBUTE">
                  <rm_attribute_name>upper</rm_attribute_name>
                  <existence>
                    <lower_included>true</lower_included>
                    <upper_included>true</upper_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>false</upper_unbounded>
                    <lower>0</lower>
                    <upper>1</upper>
                  </existence>
                  <children xsi:type="C_COMPLEX_OBJECT">
                    <rm_type_name>DV_COUNT</rm_type_name>
                    <occurrences>
                      <lower_included>true</lower_included>
                      <upper_included>true</upper_included>
                      <lower_unbounded>false</lower_unbounded>
                      <upper_unbounded>false</upper_unbounded>
                      <lower>1</lower>
                      <upper>1</upper>
                    </occurrences>
                    <node_id />
                  </children>
                </attributes>
                <attributes xsi:type="C_SINGLE_ATTRIBUTE">
                  <rm_attribute_name>lower</rm_attribute_name>
                  <existence>
                    <lower_included>true</lower_included>
                    <upper_included>true</upper_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>false</upper_unbounded>
                    <lower>0</lower>
                    <upper>1</upper>
                  </existence>
                  <children xsi:type="C_COMPLEX_OBJECT">
                    <rm_type_name>DV_COUNT</rm_type_name>
                    <occurrences>
                      <lower_included>true</lower_included>
                      <upper_included>true</upper_included>
                      <lower_unbounded>false</lower_unbounded>
                      <upper_unbounded>false</upper_unbounded>
                      <lower>1</lower>
                      <upper>1</upper>
                    </occurrences>
                    <node_id />
                  </children>
                </attributes>
              </children>
              <children xsi:type="C_COMPLEX_OBJECT">
                <rm_type_name>DV_PROPORTION</rm_type_name>
                <occurrences>
                  <lower_included>true</lower_included>
                  <upper_included>true</upper_included>
                  <lower_unbounded>false</lower_unbounded>
                  <upper_unbounded>false</upper_unbounded>
                  <lower>1</lower>
                  <upper>1</upper>
                </occurrences>
                <node_id />
                <attributes xsi:type="C_SINGLE_ATTRIBUTE">
                  <rm_attribute_name>is_integral</rm_attribute_name>
                  <existence>
                    <lower_included>true</lower_included>
                    <upper_included>true</upper_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>false</upper_unbounded>
                    <lower>0</lower>
                    <upper>1</upper>
                  </existence>
                  <children xsi:type="C_PRIMITIVE_OBJECT">
                    <rm_type_name>BOOLEAN</rm_type_name>
                    <occurrences>
                      <lower_included>true</lower_included>
                      <upper_included>true</upper_included>
                      <lower_unbounded>false</lower_unbounded>
                      <upper_unbounded>false</upper_unbounded>
                      <lower>1</lower>
                      <upper>1</upper>
                    </occurrences>
                    <node_id />
                    <item xsi:type="C_BOOLEAN">
                      <true_valid>false</true_valid>
                      <false_valid>true</false_valid>
                    </item>
                  </children>
                </attributes>
              </children>
              <children xsi:type="C_COMPLEX_OBJECT">
                <rm_type_name>DV_TEXT</rm_type_name>
                <occurrences>
                  <lower_included>true</lower_included>
                  <upper_included>true</upper_included>
                  <lower_unbounded>false</lower_unbounded>
                  <upper_unbounded>false</upper_unbounded>
                  <lower>1</lower>
                  <upper>1</upper>
                </occurrences>
                <node_id />
              </children>
              <children xsi:type="C_COMPLEX_OBJECT">
                <rm_type_name>DV_BOOLEAN</rm_type_name>
                <occurrences>
                  <lower_included>true</lower_included>
                  <upper_included>true</upper_included>
                  <lower_unbounded>false</lower_unbounded>
                  <upper_unbounded>false</upper_unbounded>
                  <lower>1</lower>
                  <upper>1</upper>
                </occurrences>
                <node_id />
                <attributes xsi:type="C_SINGLE_ATTRIBUTE">
                  <rm_attribute_name>value</rm_attribute_name>
                  <existence>
                    <lower_included>true</lower_included>
                    <upper_included>true</upper_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>false</upper_unbounded>
                    <lower>1</lower>
                    <upper>1</upper>
                  </existence>
                  <children xsi:type="C_PRIMITIVE_OBJECT">
                    <rm_type_name>BOOLEAN</rm_type_name>
                    <occurrences>
                      <lower_included>true</lower_included>
                      <upper_included>true</upper_included>
                      <lower_unbounded>false</lower_unbounded>
                      <upper_unbounded>false</upper_unbounded>
                      <lower>1</lower>
                      <upper>1</upper>
                    </occurrences>
                    <node_id />
                    <item xsi:type="C_BOOLEAN">
                      <true_valid>true</true_valid>
                      <false_valid>true</false_valid>
                    </item>
                  </children>
                </attributes>
              </children>
            </attributes>
          </children>
          <children xsi:type="C_COMPLEX_OBJECT">
            <rm_type_name>ELEMENT</rm_type_name>
            <occurrences>
              <lower_included>true</lower_included>
              <upper_included>true</upper_included>
              <lower_unbounded>false</lower_unbounded>
              <upper_unbounded>false</upper_unbounded>
              <lower>0</lower>
              <upper>1</upper>
            </occurrences>
            <node_id>at0004</node_id>
            <attributes xsi:type="C_SINGLE_ATTRIBUTE">
              <rm_attribute_name>value</rm_attribute_name>
              <existence>
                <lower_included>true</lower_included>
                <upper_included>true</upper_included>
                <lower_unbounded>false</lower_unbounded>
                <upper_unbounded>false</upper_unbounded>
                <lower>0</lower>
                <upper>1</upper>
              </existence>
              <children xsi:type="C_DV_QUANTITY">
                <rm_type_name>DV_QUANTITY</rm_type_name>
                <occurrences>
                  <lower_included>true</lower_included>
                  <upper_included>true</upper_included>
                  <lower_unbounded>false</lower_unbounded>
                  <upper_unbounded>false</upper_unbounded>
                  <lower>1</lower>
                  <upper>1</upper>
                </occurrences>
                <node_id />
                <property>
                  <terminology_id>
                    <value>openehr</value>
                  </terminology_id>
                  <code_string>380</code_string>
                </property>
                <list>
                  <magnitude>
                    <lower_included>true</lower_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>true</upper_unbounded>
                    <lower>0.0</lower>
                  </magnitude>
                  <units>1</units>
                </list>
              </children>
            </attributes>
          </children>
          <children xsi:type="C_COMPLEX_OBJECT">
            <rm_type_name>ELEMENT</rm_type_name>
            <occurrences>
              <lower_included>true</lower_included>
              <upper_included>true</upper_included>
              <lower_unbounded>false</lower_unbounded>
              <upper_unbounded>false</upper_unbounded>
              <lower>0</lower>
              <upper>1</upper>
            </occurrences>
            <node_id>at0006</node_id>
            <attributes xsi:type="C_SINGLE_ATTRIBUTE">
              <rm_attribute_name>value</rm_attribute_name>
              <existence>
                <lower_included>true</lower_included>
                <upper_included>true</upper_included>
                <lower_unbounded>false</lower_unbounded>
                <upper_unbounded>false</upper_unbounded>
                <lower>0</lower>
                <upper>1</upper>
              </existence>
              <children xsi:type="C_DV_QUANTITY">
                <rm_type_name>DV_QUANTITY</rm_type_name>
                <occurrences>
                  <lower_included>true</lower_included>
                  <upper_included>true</upper_included>
                  <lower_unbounded>false</lower_unbounded>
                  <upper_unbounded>false</upper_unbounded>
                  <lower>1</lower>
                  <upper>1</upper>
                </occurrences>
                <node_id />
                <property>
                  <terminology_id>
                    <value>openehr</value>
                  </terminology_id>
                  <code_string>126</code_string>
                </property>
                <list>
                  <magnitude>
                    <lower_included>true</lower_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>true</upper_unbounded>
                    <lower>0.0</lower>
                  </magnitude>
                  <units>l/h</units>
                </list>
                <list>
                  <magnitude>
                    <lower_included>true</lower_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>true</upper_unbounded>
                    <lower>0.0</lower>
                  </magnitude>
                  <units>ml/h</units>
                </list>
                <list>
                  <magnitude>
                    <lower_included>true</lower_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>true</upper_unbounded>
                    <lower>0.0</lower>
                  </magnitude>
                  <units>ml/min</units>
                </list>
                <list>
                  <magnitude>
                    <lower_included>true</lower_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>true</upper_unbounded>
                    <lower>0.0</lower>
                  </magnitude>
                  <units>ml/s</units>
                </list>
              </children>
            </attributes>
          </children>
          <children xsi:type="C_COMPLEX_OBJECT">
            <rm_type_name>ELEMENT</rm_type_name>
            <occurrences>
              <lower_included>true</lower_included>
              <lower_unbounded>false</lower_unbounded>
              <upper_unbounded>true</upper_unbounded>
              <lower>0</lower>
            </occurrences>
            <node_id>at0007</node_id>
            <attributes xsi:type="C_SINGLE_ATTRIBUTE">
              <rm_attribute_name>value</rm_attribute_name>
              <existence>
                <lower_included>true</lower_included>
                <upper_included>true</upper_included>
                <lower_unbounded>false</lower_unbounded>
                <upper_unbounded>false</upper_unbounded>
                <lower>0</lower>
                <upper>1</upper>
              </existence>
              <children xsi:type="C_COMPLEX_OBJECT">
                <rm_type_name>DV_TEXT</rm_type_name>
                <occurrences>
                  <lower_included>true</lower_included>
                  <upper_included>true</upper_included>
                  <lower_unbounded>false</lower_unbounded>
                  <upper_unbounded>false</upper_unbounded>
                  <lower>1</lower>
                  <upper>1</upper>
                </occurrences>
                <node_id />
              </children>
            </attributes>
          </children>
          <cardinality>
            <is_ordered>false</is_ordered>
            <is_unique>false</is_unique>
            <interval>
              <lower_included>true</lower_included>
              <lower_unbounded>false</lower_unbounded>
              <upper_unbounded>true</upper_unbounded>
              <lower>1</lower>
            </interval>
          </cardinality>
        </attributes>
      </children>
      <cardinality>
        <is_ordered>false</is_ordered>
        <is_unique>false</is_unique>
        <interval>
          <lower_included>true</lower_included>
          <lower_unbounded>false</lower_unbounded>
          <upper_unbounded>true</upper_unbounded>
          <lower>1</lower>
        </interval>
      </cardinality>
    </attributes>
  </definition>
  <ontology>
    <term_definitions language="en">
      <items code="at0000">
        <items id="text">Conditional medication instructions</items>
        <items id="description">Details of conditions on which determine the dose amount or administration rate.</items>
      </items>
      <items code="at0002">
        <items id="text">Condition</items>
        <items id="description">The value which is required for the associated dose amount or admistration to be applied.</items>
      </items>
      <items code="at0004">
        <items id="text">Dose amount</items>
        <items id="description">The dose amount to be administered if the condition applies.</items>
      </items>
      <items code="at0005">
        <items id="text">Condition rule</items>
        <items id="description">Details of the condition and associated dose amount or administration rate.</items>
      </items>
      <items code="at0006">
        <items id="text">Dose administration rate</items>
        <items id="description">The dose administration rate to be used if the condition applies.</items>
      </items>
      <items code="at0007">
        <items id="text">Dosage formula</items>
        <items id="description">The dosage formula used to calculate the dose amount or administration rate.</items>
      </items>
    </term_definitions>
  </ontology>
</archetype>
