<?xml version="1.0" encoding="UTF-8"?>
<nhis:message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nhis="https://www.his.bg"
  xsi:schemaLocation="https://www.his.bg https://www.his.bg/api/v1/NHIS-P005.xsd">
  <nhis:header>
    <nhis:sender value="[code]"/>
    <nhis:senderId value="[string]"/>
    <nhis:senderISName value="[string]"/>
    <nhis:recipient value="[code]"/>
    <nhis:recipientId value="[string]"/>
    <nhis:messageId value="[string]"/>
    <nhis:messageType value="[string]"/>
    <nhis:createdOn value="[dateTime]"/>
  </nhis:header>
  <nhis:contents>
    <nhis:prescription>
      <nhis:nrnPrescription value="[string]"/>
    </nhis:prescription>
    <nhis:dispense>
      <nhis:fulfilDate value="[date]"/>
      <!--Optional:-->
      <nhis:isInternationalFulfil value="[boolean]"/>
      <nhis:group>
        <!--Optional:-->
        <nhis:groupIdentifier value="[code]"/>
        <!--1 or more repetitions:-->
        <nhis:medication>
          <nhis:sequenceId value="[positiveInt]"/>
          <nhis:medicationCode value="[code]" name="[string]"/>
          <nhis:form value="[code]"/>
          <!--Zero or more repetitions:-->
          <nhis:verification>
            <!--Optional:-->
            <nhis:ppn value="[string]"/>
            <!--Optional:-->
            <nhis:gtin value="[string]"/>
            <!--Optional:-->
            <nhis:sn value="[string]"/>
            <!--Optional:-->
            <nhis:lot value="[string]"/>
            <!--Optional:-->
            <nhis:exp value="[date]"/>
          </nhis:verification>
          <!--Conditional:-->
          <nhis:nhifCode value="[code]"/>
          <nhis:quantityValue value="[decimal]"/>
          <nhis:isQuantityByForm value="[boolean]"/>
          <!--Optional:-->
          <nhis:whenPrepared value="[dateTime]"/>
          <nhis:whenHandedOver value="[dateTime]"/>
          <!--Conditional:-->
          <nhis:paidByPatient value="[decimal]"/>
          <!--Conditional:-->
          <nhis:paidByNhif value="[decimal]"/>
          <!--Optional:-->
          <nhis:substitution>
            <nhis:wasSubstituted value="[boolean]"/>
            <nhis:substitutionType value="[code]"/>
            <nhis:reason value="[string]"/>
          </nhis:substitution>
          <!--Zero or more repetitions:-->
          <nhis:dosageInstruction>
            <!--Optional:-->
            <nhis:sequence value="[positiveInt]"/>
            <!--Optional:-->
            <nhis:asNeeded value="[boolean]"/>
            <!--Optional:-->
            <nhis:route value="[code]"/>
            <nhis:doseQuantityValue value="[decimal]"/>
            <nhis:doseQuantityCode value="[string/code]"/>
            <nhis:frequency value="[positiveInt]"/>
            <nhis:period value="[decimal]"/>
            <nhis:periodUnit value="[code]"/>
            <!--Conditional:-->
            <nhis:boundsDuration value="[positiveInt]"/>
            <!--Conditional:-->
            <nhis:boundsDurationUnit value="[code]"/>
            <!--Optional:-->
            <nhis:when value="[code]"/>
            <!--Conditional:-->
            <nhis:offset value="[unsignedInt]"/>
            <!--Optional:-->
            <nhis:text value="[string]"/>
          </nhis:dosageInstruction>
        </nhis:medication>
      </nhis:group>
      <!--Optional:-->
      <nhis:isPatientReceiver value="[boolean]"/>
      <!--Conditional:-->
      <nhis:receiver>
        <nhis:identifierType value="[code]"/>
        <nhis:identifier value="[string]"/>
        <nhis:name>
          <nhis:given value="[string]"/>
          <nhis:family value="[string]"/>
        </nhis:name>
      </nhis:receiver>
    </nhis:dispense>
    <nhis:performer>
      <nhis:pphi value="[string]"/>
      <nhis:rphaNumber value="[code]"/>
      <nhis:pharmacyNumber value="[string]"/>
      <!--Conditional:-->
      <nhis:nhifContract value="[string]"/>
      <!--Optional:-->
      <nhis:phone value="[string]"/>
      <!--Optional:-->
      <nhis:email value="[string]"/>
    </nhis:performer>
  </nhis:contents>
  <Signature/>
</nhis:message>