<?xml version="1.0" encoding="UTF-8"?>

<MedicinalProductDefinition xmlns="http://hl7.org/fhir">
  <id value="drug-and-device"/>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml">
			<p>
				<b>
					Generated Narrative
				</b>
			</p>
			<p>
				<b>
					Id
				</b>
				: drug-and-device
			</p>
			<p>
				<b>
					Identifier
				</b>
				: Wonderdrug+
			</p>
			<p>
				<b>
					Combined Pharmaceutical Dose Form
				</b>
				:
				<span title="Codes: {http://example.org.uk/fhir/doseform solution for injection}">
					solution for injection
				</span>
			</p>
			<p>
				<b>
					Packaged Product
				</b>
				:
				<a name="package"/>
			</p>
			<blockquote>
				<p>
					<b>
						Package
					</b>
				</p>
				<blockquote>
					<p>
						<b>
							Contained Item
						</b>
					</p>
					<p>
						<b>
							Item
						</b>
						:
						<a href="#liquidItem">
							Solution for Injection
						</a>
					</p>
					<p>
						<b>
							Amount
						</b>
						: 20 ml
					</p>
					<p>
						<b>
							Ingredient
						</b>
						: Wondersubstance BP
					</p>
				</blockquote>
				<blockquote>
					<p>
						<b>
							Contained Item
						</b>
					</p>
					<p>
						<b>
							Device
						</b>
						:
						<a href="#syringeDevice">
							Syringe
						</a>
					</p>
					<p>
						<b>
							Amount
						</b>
						: 1
					</p>
				</blockquote>
			</blockquote>
			<h3>
				Names
			</h3>
			<table class="grid">
				<tr>
					<td>
						-
					</td>
					<td>
						<b>
							Product Name
						</b>
					</td>
				</tr>
				<tr>
					<td>
						*
					</td>
					<td>
						Wonderdrug+ liquid 20ml
					</td>
				</tr>
			</table>
		</div>
  </text>
  <contained>
    <PackagedProductDefinition>
      <id value="package"/>
      <packageFor>
        <reference value="#"/>
      </packageFor>
      <packaging>
        <!--  can be more details of the package here, but not necessary for this use case  -->
        <containedItem>
          <item>
            <reference>
              <reference value="#liquidItem"/>
            </reference>
          </item>
          <amount>
            <value value="20"/>
            <unit value="ml"/>
            <system value="http://unitsofmeasure.org"/>
            <code value="mL"/>
          </amount>
        </containedItem>
        <containedItem>
          <item>
            <reference>
              <reference value="#syringeDevice"/>
            </reference>
          </item>
        </containedItem>
      </packaging>
    </PackagedProductDefinition>
  </contained>
  <!--  Schema appears to be broken, deviceName is not present in XSD  -->
  <!-- deviceName>
				<name value="WonderSyringe"/>
				<type value="manufacturer-name"/>
			</deviceName -->
  <contained>
    <DeviceDefinition>
      <id value="syringeDevice"/>
      <status value="active"/>
      <classification>
        <type>
          <text value="syringe"/>
        </type>
      </classification>
    </DeviceDefinition>
  </contained>
  <contained>
    <ManufacturedItemDefinition>
      <id value="liquidItem"/>
      <status value="active"/>
      <manufacturedDoseForm>
        <coding>
          <system value="http://example.org.uk/fhir/doseform"/>
          <code value="solution for injection"/>
        </coding>
      </manufacturedDoseForm>
    </ManufacturedItemDefinition>
  </contained>
  <!-- contained>
		<Ingredient>
			<id value="ingredient"/>
			<status value="active"/>
			<for>
				<reference value="ManufacturedItemDefinition/liquidItem"/>
			</for>
			<role>
				<coding>
					<system value="http://example.org.uk/fhir/ingredientRole"/>
					<code value="active"/>
				</coding>
			</role>
			<substance>
				<code>
					<concept>
						<coding>
							<system value="http://example.org.uk/fhir/ingredients"/>
							<code value="12345"/>
							<display value="Wondersubstance BP"/>
						</coding>
					</concept>
				</code>
			</substance>
		</Ingredient>
	</contained -->
  <identifier>
    <system value="http://example.org.uk/fhir/product"/>
    <value value="Wonderdrug+"/>
  </identifier>
  <combinedPharmaceuticalDoseForm>
    <coding>
      <system value="http://example.org.uk/fhir/doseform"/>
      <code value="solution for injection"/>
    </coding>
  </combinedPharmaceuticalDoseForm>
  <name>
    <productName value="Wonderdrug+ liquid 20ml"/>
  </name>
</MedicinalProductDefinition>