|
@@ -43,6 +43,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="col-md-6 mb-2">
|
|
|
+ <div class="card">
|
|
|
+ <div class="card-header">CPT Codes Billed</div>
|
|
|
+ <div class="card-body">
|
|
|
+ <div id="cptCodesBilled"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -57,12 +65,13 @@
|
|
|
clientsWePaidToAcquire: <?= json_encode($clientsWePaidToAcquire) ?>,
|
|
|
activeClients: <?= json_encode($activeClients) ?>,
|
|
|
activeHCPs: <?= json_encode($activeHCPs) ?>,
|
|
|
+ cptCodesBilled: <?= json_encode($cptCodesBilled) ?>
|
|
|
},
|
|
|
methods: {
|
|
|
- dateValueDataObjectBarGraph: function (data, dateLabel, valueLabel, chartID, yAxisLegend){
|
|
|
+ dateValueDataObjectBarGraph: function(data, dateLabel, valueLabel, chartID, yAxisLegend) {
|
|
|
var dates = [];
|
|
|
var values = [];
|
|
|
- for(var i = 0; i < data.length; i++){
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
var d = data[i];
|
|
|
dates.push(d[dateLabel]);
|
|
|
values.push(d[valueLabel]);
|
|
@@ -89,10 +98,8 @@
|
|
|
},
|
|
|
bar: {
|
|
|
width: {
|
|
|
- ratio: 0.5 // this makes bar width 50% of length between ticks
|
|
|
+ ratio: 0.5
|
|
|
}
|
|
|
- // or
|
|
|
- //width: 100 // this makes bar width 100px
|
|
|
},
|
|
|
axis: {
|
|
|
x: {
|
|
@@ -108,7 +115,7 @@
|
|
|
initClientsWePaidToAcquire: function() {
|
|
|
var data = this.clientsWePaidToAcquire;
|
|
|
this.dateValueDataObjectBarGraph(data, 'date_trunc', 'count', '#clientsWePaidToAcquire', 'Clients we paid to acquire');
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
initActiveClients: function() {
|
|
|
var data = this.activeClients;
|
|
@@ -118,10 +125,34 @@
|
|
|
var data = this.activeHCPs;
|
|
|
this.dateValueDataObjectBarGraph(data, 'date_trunc', 'count', '#activeHCPs', 'Active HCPs');
|
|
|
},
|
|
|
+ initCpdCodesBilled: function() {
|
|
|
+ var chart = c3.generate({
|
|
|
+ bindto: '#cptCodesBilled',
|
|
|
+ data: {
|
|
|
+ columns: [
|
|
|
+ ['99202', 30],
|
|
|
+ ['99203', 3],
|
|
|
+ ],
|
|
|
+ type: 'bar'
|
|
|
+ },
|
|
|
+ bar: {
|
|
|
+ width: {
|
|
|
+ ratio: 0.5
|
|
|
+ }
|
|
|
+ },
|
|
|
+ axis: {
|
|
|
+ x: {
|
|
|
+ type: 'category',
|
|
|
+ tick: { centered: true},
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
init: function() {
|
|
|
this.initClientsWePaidToAcquire();
|
|
|
this.initActiveClients();
|
|
|
this.initActiveHCPs();
|
|
|
+ this.initCpdCodesBilled();
|
|
|
},
|
|
|
},
|
|
|
mounted: function() {
|