2 ***********************************************************************
4 * Description: Pediatric Dose Calculator
5 * Author: Agnibho Mondal
6 * Website: http://code.agnibho.com
7 **********************************************************************
8 Copyright (c) 2016 Agnibho Mondal
10 **********************************************************************
11 This file is part of PDosage.
13 PDosage is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
18 PDosage is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with PDosage. If not, see <http://www.gnu.org/licenses/>.
25 ***********************************************************************
28 <div class="panel panel-default">
29 <drug-view :drug="drug" :patient="patient" :favs="favs" :id="modalId"></drug-view>
30 <div class="panel-body">
31 <template v-for="item in favList">
32 <template v-if="item">
33 <div class="panel panel-default clickable" v-on:click="launchModal(item)">
34 <div class="panel-heading">
35 <div class="panel-title">{{item.name}}</div>
37 <div class="panel-body">
38 <ul class="list-group">
39 <template v-for="f in item.form">
40 <template v-for="d in f.dose">
41 <template v-if="f.gen && d.val[0]">
42 <li class="list-group-item">{{f.mode}} {{item.name}} <strong>{{d.val[0]}}<span v-if="d.val[1]"> - {{d.val[1]}}</span> {{d.unit}}</strong> <span v-if="d.txt">{{d.txt}}</span><span v-else>per dose</span></li>
56 import DrugView from "./DrugView.vue";
59 props: ["patient", "dosage", "favs"],
60 components: {"drug-view": DrugView},
65 modalId: "drug-view-1"
71 for(var i=0; i<this.favs.length; i++){
72 arr.push(this.dosage.getDrug(this.favs[i], this.patient));
78 launchModal:function(d){
80 $("#"+this.modalId).modal("show");