<script id="ipdPrescriptionItemTemplate" type="text/x-jsrender">
    <tr>
        <td class="text-center prescription-item-number">1</td>
        <td>
            <select class="form-select ipdCategoryId select2Selector" name="category_id[]" placeholder="Select Category" data-id="{{:uniqueId}}" required>
                <option selected="selected" value >Select Category</option>
                {{for medicineCategories}}
                    <option value="{{:key}}">{{:value}}</option>
                {{/for}}
            </select>
        </td>
        <td>
            <div class="available-qty-div{{:uniqueId}}"  id="avlQtyDiv">
                <select class="form-select medicineId ipd-prescription-medicine select2Selector" name="medicine_id[]" data-medicine-id="{{:uniqueId}}" disabled></select>
                <small class="ipd-available-quantity{{:uniqueId}}"></small>
            </div>
        </td>
        <td>
            <input class="form-control dosage" name="dosage[]" type="text" onkeypress = 'return avoidSpace(event);' required>
        </td>
        <td>
            <select class="form-select ipdDoseDuration select2Selector" name="day[]" data-id="{{:uniqueId}}">
                {{for ipdDoseDuration}}
                    <option value="{{:key}}">{{:value}}</option>
                {{/for}}
            </select>
        </td>
        <td>
            <select class="form-select ipdMealList select2Selector" name="time[]" data-id="{{:uniqueId}}">
                {{for ipdMealList}}
                    <option value="{{:key}}">{{:value}}</option>
                {{/for}}
            </select>
        </td>
        <td>
            <select class="form-select ipdDoseInterval select2Selector" name="dose_interval[]" data-id="{{:uniqueId}}">
                {{for ipdDoseInterval}}
                    <option value="{{:key}}">{{:value}}</option>
                {{/for}}
            </select>
        </td>
        <td>
            <textarea class="form-control instruction" name="instruction[]" rows="1" onkeypress = 'return avoidSpace(event);' required></textarea>
        </td>
        <td class="text-center">
            <i class="fa fa-trash text-danger deleteIpdPrescription cursor-pointer" data-edit="0"></i>
        </td>
    </tr>


</script>

<script id="editIpdPrescriptionItemTemplate" type="text/x-jsrender">
    <tr>
        <td class="text-center edit-prescription-item-number" data-item-number="{{:uniqueId}}">1</td>
        <td>
            <select class="form-select ipdCategoryId select2Selector" name="category_id[]" placeholder="Select Category" data-id="{{:uniqueId}}" required>
                <option selected="selected" value>Select Category</option>
                {{for medicineCategories}}
                    <option value="{{:key}}">{{:value}}</option>
                {{/for}}
            </select>
        </td>
        <td>
        <div class="available-qty-div{{:uniqueId}}"  id="avlQtyDiv">
            <select class="form-select medicineId ipd-prescription-medicine select2Selector" name="medicine_id[]" data-medicine-id="{{:uniqueId}}" disabled></select>
            <small class="ipd-available-quantity{{:uniqueId}}" data-avlMedicine-id="{{:uniqueId}}"></small>
        </div>
        </td>
        <td>
            <input class="form-control" name="dosage[]" type="text" data-dosage-id="{{:uniqueId}}" onkeypress = 'return avoidSpace(event);' required>
        </td>
        <td>
            <select class="form-select ipdDoseDuration select2Selector" name="day[]" data-dose-duration-id="{{:uniqueId}}">
                {{for ipdDoseDuration}}
                    <option value="{{:key}}">{{:value}}</option>
                {{/for}}
            </select>
        </td>

        <td>
            <select class="form-select ipdMealList select2Selector" name="time[]" data-meal-id="{{:uniqueId}}">
                {{for ipdMealList}}
                    <option value="{{:key}}">{{:value}}</option>
                {{/for}}
            </select>
        </td>
        <td>
            <select class="form-select ipdDoseInterval select2Selector" name="dose_interval[]" data-dose-interval-id="{{:uniqueId}}">
                {{for ipdDoseInterval}}
                    <option value="{{:key}}">{{:value}}</option>
                {{/for}}
            </select>
        </td>
        <td>
            <textarea class="form-control" name="instruction[]" rows="1" data-instruction-id="{{:uniqueId}}" onkeypress = 'return avoidSpace(event);' required></textarea>
        </td>
        <td class="text-center">
            <i class="fa fa-trash text-danger deleteIpdPrescriptionOnEdit cursor-pointer" data-edit="1"></i>
        </td>
    </tr>

</script>
