Package: {{ pckg.quantity }} {{ pckg.type.coding[0].display }} [{{ pckg.material[0].coding[0].display }}]

{% for pckgitem in pckg.containedItem %} {% assign innerpckg = pckg.package %}
{% comment %}Include the ppd-package (recursive, with pckg as the object to parse) {% endcomment %}
{% endfor %} {% assign mids = entry | where: "resource.resourceType", "ManufacturedItemDefinition" %} {% for midr in mids %} {% assign mid = midr.resource %} {% assign fmid = mid.id | prepend: 'ManufacturedItemDefinition/' %} {% for pckgcontainedItem in pckg.containedItem %} {% if pckgcontainedItem.item.reference.reference == fmid %} {% for pckgitem in pckg.containedItem %}
Containing: {{ pckgitem.amount.value }} {{ pckgitem.amount.unit }}

Dose form: {{ mid.manufacturedDoseForm.coding[0].display }}

Presentation unit: {{ mid.unitOfPresentation.coding[0].display }}

{% assign midings = entry | where: "resource.resourceType", "Ingredient" %} {% for midingr in midings %} {% assign miding = midingr.resource %} {% assign midid = mid.id | prepend: 'ManufacturedItemDefinition/' %} {% if miding.for[2].reference == midid %}
Ingredient {{ miding.idxxx }}

Status: {{ miding.status | capitalize }}

Role: {{ miding.role.coding[0].display }}

Substance: {{ miding.substance.code.concept.coding[0].display }}

{% for strn in miding.substance.strength %} {% if strn.concentrationRatio %}

Concentration strength: {{ strn.concentrationRatio.numerator.value }}{{ strn.concentrationRatio.numerator.unit }} / {{ strn.concentrationRatio.denominator.value }}{{ strn.concentrationRatio.denominator.unit }}

{% endif %} {% endfor %} {% for strn in miding.substance.strength %} {% if strn.presentationRatio %}

Presentation strength: {{ strn.presentationRatio.numerator.value }} {{ strn.presentationRatio.numerator.unit }} / {{ strn.presentationRatio.denominator.value }} {{ strn.presentationRatio.denominator.unit }}

{% endif %} {% endfor %}
{% comment %}{% endcomment %} {% endif %} {% endfor %}
{% endfor %} {% endif %} {% endfor %} {% endfor %}