浏览代码

Merge branch 'dev' into dev-vj

Vijayakrishnan 3 年之前
父节点
当前提交
e52a12ab14

+ 4 - 2
app/Http/Controllers/StatTreeController.php

@@ -71,6 +71,7 @@ class StatTreeController extends Controller
         $rows = json_decode($data, true);
 
         $statTree = StatTree::where('id', $statTreeID)->first();
+        $model = $statTree->model;
         DB::beginTransaction();
         DB::statement("DELETE FROM stat_tree_line WHERE stat_tree_id = :stat_tree_id", ['stat_tree_id' => $statTree->id]);
 
@@ -92,10 +93,10 @@ class StatTreeController extends Controller
                 $cell = $row[$i];
                 if(!$cell || empty($cell)) continue;
 
-                $clause = Clause::where('label', $cell)->first();
+                $clause = Clause::where('label', $cell)->where('model', 'ilike', $model)->first();
                 if(!$clause){
                     DB::rollBack();
-                    return $this->fail('No clause record found!');
+                    return $this->fail('No clause record found for ' . $cell);
                 }
                 $nextStatLineClauseId = DB::select("select nextval('stat_tree_line_clause_id_seq')");
                 $statTreeLineClause = new StatTreeLineClause;
@@ -105,6 +106,7 @@ class StatTreeController extends Controller
                 $statTreeLineClause->clause_id = $clause->id;
                 $statTreeLineClause->clause_label = $cell;
                 $statTreeLineClause->position_index = $i;
+                $statTreeLineClause->detail_json = json_encode(['model' => $model]);
                 $statTreeLineClause->save();
 
             }

+ 6 - 3
app/Http/Controllers/StatTreeLineController.php

@@ -7,6 +7,7 @@ use Illuminate\Http\Request;
 use App\Models\StatTree;
 use App\Models\StatTreeLine;
 use App\Models\Client;
+use App\Models\Pro;
 
 class StatTreeLineController extends Controller
 {
@@ -58,7 +59,7 @@ class StatTreeLineController extends Controller
         $statTreeLine = StatTreeLine::where('id', $statTreeLineID)->first();
         if (!$statTreeLine) return $this->fail('Invalid stat tree line!');
 
-        $query = $this->applyStatTreeLineQueryClauses($statTreeLine);
+        $query = $this->applyStatTreeLineQueryClauses($statTreeLine);        
         if ($query) {
             $statTreeLine->last_refresh_count = $query->count();
             $statTreeLine->save();
@@ -73,10 +74,12 @@ class StatTreeLineController extends Controller
 
         $model = $statTreeLine->statTree->model;
         $query = null;
-        if ($model === 'client') {
+        if (strcasecmp($model, 'client') == 0) {
             $query = Client::query();
         }
-
+        if (strcasecmp($model, 'pro') == 0) {
+            $query = Pro::query();
+        }
         if (!$query) return null;
 
         $clauses = [];

+ 1 - 1
app/Models/StatTree.php

@@ -17,6 +17,6 @@ class StatTree extends Model
     }
 
     public function lines(){
-        return $this->hasMany(StatTreeLine::class, 'stat_tree_id', 'id');
+        return $this->hasMany(StatTreeLine::class, 'stat_tree_id', 'id')->orderBy('id', 'ASC');
     }
 }

+ 2 - 1
app/Models/StatTreeLineClause.php

@@ -11,7 +11,8 @@ class StatTreeLineClause extends Model
     public $timestamps = false;
 
     public function clause(){
-        return $this->hasOne(Clause::class, 'id', 'clause_id');
+        $detailJson = json_decode($this->detail_json);
+        return $this->hasOne(Clause::class, 'label', 'clause_label')->where('model', 'ilike', $detailJson->model);
     }
 
 }

+ 2 - 2
resources/views/app/stat-tree/clauses/list.blade.php

@@ -1,6 +1,5 @@
 @extends ('layouts/template')
 @section('content')
-<main role="main" class="stag-content px-0">
     <div class="p-3 mcp-theme-1">
         <div class="row">
             <div class="col-12">
@@ -23,6 +22,7 @@
                                         <thead class="bg-light">
                                             <tr>
                                                 <th class="border-0">Position Index</th>
+                                                <th class="border-0">Model</th>
                                                 <th class="border-0">Label</th>
                                                 <th class="border-0">Question</th>
                                                 <th class="border-0">Answer</th>
@@ -33,6 +33,7 @@
                                             @foreach($clauses as $clause)
                                             <tr>
                                                 <td>{{ $clause->position_index }}</td>
+                                                <td>{{$clause->model}}</td>
                                                 <td>{{$clause->label}}</td>
                                                 <td>{{$clause->question}}</td>
                                                 <td>{{ $clause->answer }}</td>
@@ -49,6 +50,5 @@
             </div>
         </div>
     </div>
-</main>
 
 @endsection

+ 1 - 1
resources/views/app/stat-tree/clauses/replace-all.blade.php

@@ -1,7 +1,7 @@
 @extends ('layouts/template')
 @section('content')
 
-<main id="replaceAllComponent" role="main" class="stag-content px-0" v-cloak>
+<main id="replaceAllComponent" v-cloak>
     <div class="p-3 mcp-theme-1">
         <div class="card">
             <div class="card-header">

+ 0 - 2
resources/views/app/stat-tree/stat-tree-lines/single.blade.php

@@ -1,6 +1,5 @@
 @extends ('layouts/template')
 @section('content')
-<main role="main" class="stag-content px-0">
     <div class="p-3 mcp-theme-1">
         <div class="card">
             <div class="card-header">
@@ -35,6 +34,5 @@
             </div>
         </div>
     </div>
-</main>
 
 @endsection

+ 0 - 2
resources/views/app/stat-tree/stat-trees/create.blade.php

@@ -1,7 +1,6 @@
 @extends ('layouts/template')
 @section('content')
 <div id="statTreeComponent" v-cloak>
-    <main role="main" class="stag-content px-0">
         <div class="p-3 mcp-theme-1">
             <div class="card">
                 <div class="card-header">
@@ -34,7 +33,6 @@
                 </div>
             </div>
         </div>
-    </main>
 </div>
 
 <script type="text/javascript">

+ 0 - 2
resources/views/app/stat-tree/stat-trees/list.blade.php

@@ -1,7 +1,6 @@
 @extends ('layouts/template')
 @section('content')
 
-<main role="main" class="stag-content px-0">
     <div class="p-3 mcp-theme-1">
         <div class="row">
             <div class="col-12">
@@ -48,6 +47,5 @@
             </div>
         </div>
     </div>
-</main>
 
 @endsection

+ 0 - 2
resources/views/app/stat-tree/stat-trees/single.blade.php

@@ -1,7 +1,6 @@
 @extends ('layouts/template')
 @section('content')
 
-<main role="main" class="stag-content px-0">
     <div class="p-3 mcp-theme-1">
         <div class="card">
             <div class="card-header">
@@ -30,6 +29,5 @@
             </div>
         </div>
     </div>
-</main>
 
 @endsection

+ 124 - 116
resources/views/app/stat-tree/stat-trees/sub/dashboard.blade.php

@@ -1,131 +1,135 @@
 @extends('app.stat-tree.stat-trees.single')
 @section('page')
 
-<div id="app" class="row">
-    @if(count($statTree->lines))
-    <div class="col-12">
-        <div class="d-flex align-items-center justify-content-between mb-2">
-            <h6 class="font-weight-bold">Lines</h6>
-            <div>
-                <a href="#" @click="refreshTreeCountQueries" class="btn btn-sm btn-danger text-white">
-                <span v-if="!refreshing"><i class="fas fa-sync-alt"></i> Refresh Counts</span> 
-                <span v-else><i class="fas fa-circle-notch fa-spin"></i> Refreshing...</span> 
-                </a>
+<div id="statTreeViewPage">
+    <div id="statTreeView" class="row">
+        @if(count($statTree->lines))
+        <div class="col-12">
+            <div class="d-flex align-items-center justify-content-between mb-2">
+                <h6 class="font-weight-bold">Lines</h6>
+                <div>
+                    <button @click="refreshTreeCountQueries" class="btn btn-sm btn-danger text-white">
+                        <span v-if="!refreshing"><i class="fas fa-sync-alt"></i> Refresh Counts</span>
+                        <span v-else><i class="fas fa-circle-notch fa-spin"></i> Refreshing...</span>
+                    </button>
+                </div>
+            </div>
+            <div class="table-responsive">
+                <table class="table table-condensed border p-0 m-0">
+                    <thead class="bg-light">
+                        <tr>
+                            <th class="border-bottom-0">#</th>
+                            <th class="border-bottom-0">Model</th>
+                            <th class="border-bottom-0">Clauses</th>
+                            <th class="border-bottom-0">Query</th>
+                            <th class="border-bottom-0">Count</th>
+                            <th class="border-bottom-0">Actions</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        @foreach($statTree->lines as $line)
+                        <tr>
+                            <td>
+                                <a href="{{ route('practice-management.statTreeLines.view.dashboard', $line) }}" target="_blank">
+                                    {{ $line->tree_order_position_index }}
+                                </a>
+                            </td>
+                            <td>{{ ucwords($line->statTree->model) }}</td>
+                            <td>
+                                @foreach($line->lineClauses as $c)
+                                | {{ $c->clause_label }}
+                                @endforeach
+                            </td>
+                            <td>
+                                SELECT COUNT(*) FROM {{ $statTree->model }} WHERE
+                                @foreach($line->lineClauses as $c)
+                                {{ $c->clause->clause_text ?? '' }} @if(!$loop->last) AND @endif
+                                @endforeach
+                            </td>
+                            <td>
+                                <span id="line-{{ $line->id }}">{{ $line->last_refresh_count }}</span>
+                            </td>
+                            <td>
+                                <a href="#" data-id="{{$line->id}}" refresh-line-query native>Refresh</a>
+                            </td>
+                        </tr>
+                        @endforeach
+                    </tbody>
+                </table>
             </div>
         </div>
-        <div class="table-responsive">
-            <table class="table table-condensed border p-0 m-0">
-                <thead class="bg-light">
-                    <tr>
-                        <th class="border-bottom-0">#</th>
-                        <th class="border-bottom-0">Clauses</th>
-                        <th class="border-bottom-0">Query</th>
-                        <th class="border-bottom-0">Count</th>
-                        <th class="border-bottom-0">Actions</th>
-                    </tr>
-                </thead>
-                <tbody>
-                    @foreach($statTree->lines as $line)
-                    <tr>
-                        <td>
-                            <a href="{{ route('practice-management.statTreeLines.view.dashboard', $line) }}">
-                                {{ $line->tree_order_position_index }}
-                            </a>
-                        </td>
-                        <td>
-                            @foreach($line->lineClauses as $c)
-                            | {{ $c->clause_label }}
-                            @endforeach
-                        </td>
-                        <td>
-                            SELECT COUNT(*) FROM {{ $statTree->model }} WHERE
-                            @foreach($line->lineClauses as $c)
-                            {{ $c->clause->clause_text ?? '' }} @if(!$loop->last) AND @endif
-                            @endforeach
-                        </td>
-                        <td>
-                            <span id="line-{{ $line->id }}">{{ $line->last_refresh_count }}</span>
-                        </td>
-                        <td>
-                            <a href="#" data-id="{{$line->id}}" refresh-line-query>Refresh</a>
-                        </td>
-                    </tr>
-                    @endforeach
-                </tbody>
-            </table>
-        </div>
-    </div>
-    @endif
+        @endif
 
-    <div class="col-12">
-        <h6 class="font-weight-bold bg-light p-3 mt-3">Replace Stat Tree Lines</h6>
-        <div class="row">
-            <div class="col-md-6">
-                <div class="bg-white p-3">
-                    <h6 class="font-weight-bold">TSV</h6>
-                    <div class="input-group">
-                        <textarea v-model="content" class="form-control" rows="10" @keyup="splitContents"></textarea>
+        <div class="col-12">
+            <h6 class="font-weight-bold bg-light p-3 mt-3">Replace Stat Tree Lines</h6>
+            <div class="row">
+                <div class="col-md-6">
+                    <div class="bg-white p-3">
+                        <h6 class="font-weight-bold">TSV</h6>
+                        <div class="input-group">
+                            <textarea v-model="content" class="form-control" rows="10" @keyup="splitContents"></textarea>
+                        </div>
                     </div>
                 </div>
-            </div>
-            <div class="col-md-6">
-                <div class="bg-white p-3">
-                    <h6 class="font-weight-bold">JSON Structure</h6>
-                    <textarea class="form-control" rows="10">@{{jsonStructure}}</textarea>
+                <div class="col-md-6">
+                    <div class="bg-white p-3">
+                        <h6 class="font-weight-bold">JSON Structure</h6>
+                        <textarea class="form-control" rows="10">@{{jsonStructure}}</textarea>
+                    </div>
                 </div>
             </div>
-        </div>
-        <template v-if="rows.length">
-            <div class="row my-3">
-                <div class="col">
-                    <div class="bg-white p-3">
-                        <h6 class="font-weight-bold">Table output:</h6>
-                        <div class="table-responsive">
-                            <table class="table table-bordered table-hover">
-                                <tbody>
-                                    <tr v-for="(row, rowIndex) in rows">
-                                        <td v-for="(column, columnIndex) in columns[rowIndex]">
-                                            <input class="border-0" type="text" v-model="columns[rowIndex][columnIndex]" @keyup="updateColumns(rowIndex, columnIndex)">
-                                        </td>
-                                        </td>
-                                </tbody>
-                            </table>
+            <template v-if="rows.length">
+                <div class="row my-3">
+                    <div class="col">
+                        <div class="bg-white p-3">
+                            <h6 class="font-weight-bold">Table output:</h6>
+                            <div class="table-responsive">
+                                <table class="table table-bordered table-hover">
+                                    <tbody>
+                                        <tr v-for="(row, rowIndex) in rows">
+                                            <td v-for="(column, columnIndex) in columns[rowIndex]">
+                                                <input class="border-0" type="text" v-model="columns[rowIndex][columnIndex]" @keyup="updateColumns(rowIndex, columnIndex)">
+                                            </td>
+                                        </tr>
+                                    </tbody>
+                                </table>
+                            </div>
                         </div>
                     </div>
                 </div>
-            </div>
-        </template>
-        <div class="row">
-            <div class="col-md-12">
-                <div class="px-3">
-                    <button type="button" class="btn btn-sm btn-primary" @click="submit">Submit</button>
-                    <button type="button" class="btn btn-sm btn-secondary" @click="generateAutoFilledJson">Fill</button>
+            </template>
+            <div class="row">
+                <div class="col-md-12">
+                    <div class="px-3">
+                        <button type="button" class="btn btn-sm btn-primary" @click="submit">Submit</button>
+                        <button type="button" class="btn btn-sm btn-secondary" @click="generateAutoFilledJson">Fill</button>
+                    </div>
                 </div>
             </div>
         </div>
-    </div>
 
+    </div>
 </div>
 
-<script src="{{ asset('js/tsvToArray.js') }}"></script>
-
-<script type="text/javascript">
-    var app = new Vue({
-        el: '#app',
-        data: {
-            content: '',
-            rowSplitter: '\n',
-            columnSplitter: '\t',
-            rows: [],
-            columns: [],
-            maxColumn: 0,
-            jsonStructure: '',
-            isAutoFilled: false,
-            refreshing: false,
-            refreshingLine: false
-        },
-        delimiters: ['@{{', '}}'],
-        methods: {
+<script>
+    (function() {
+        function init() {
+            new Vue({
+                el: '#statTreeView',
+                data: {
+                    content: '',
+                    rowSplitter: '\n',
+                    columnSplitter: '\t',
+                    rows: [],
+                    columns: [],
+                    maxColumn: 0,
+                    jsonStructure: '',
+                    isAutoFilled: false,
+                    refreshing: false,
+                    refreshingLine: false
+                },
+                delimiters: ['@{{', '}}'],
+                methods: {
             updateColumns(rowIndex, columnIndex) {
                 try {
                     this.rows[rowIndex] = this.columns[rowIndex].join(this.columnSplitter);
@@ -205,8 +209,9 @@
                 }, function(response) {
                     self.refreshing = false;
                     if (response.success) {
-                        // location.href = "{{ route('practice-management.statTrees.view.dashboard', $statTree) }}";
-                        location.reload();
+                        fastLoad("{{ route('practice-management.statTrees.view.dashboard', $statTree) }}");
+                        //fastReload()
+
                     } else {
                         toastr.error(response.message);
                     }
@@ -214,7 +219,7 @@
             },
             initRefreshLineQuery: function() {
                 var self = this;
-                
+
                 $('[refresh-line-query]').click(function() {
                     var element = $(this);
                     var id = element.data('id');
@@ -242,10 +247,10 @@
         mounted: function() {
             this.init();
         },
-        updated: function(){
+        updated: function() {
             var self = this;
-            self.$nextTick(function(){
-                
+            self.$nextTick(function() {
+
             });
         },
         watch: {
@@ -260,7 +265,10 @@
                 })
             }
         }
-    });
+            });
+        }
+        addMCInitializer('statTreeView', init, '#statTreeViewPage')
+    }).call(window);
 </script>
 
 @endsection

+ 2 - 0
resources/views/layouts/template.blade.php

@@ -64,6 +64,8 @@
     {{-- pdfjs --}}
     <script src="https://mozilla.github.io/pdf.js/build/pdf.js"></script>
 
+    <script src="{{ asset('js/tsvToArray.js') }}"></script>
+
     {{-- WebSockets --}}
     <script src="https://cdnjs.cloudflare.com/ajax/libs/sockjs-client/1.5.0/sockjs.min.js"
             integrity="sha512-5yJ548VSnLflcRxWNqVWYeQZnby8D8fJTmYRLyvs445j1XmzR8cnWi85lcHx3CUEeAX+GrK3TqTfzOO6LKDpdw=="

+ 260 - 0
spec/stat-tree-report-builder-spec.txt

@@ -0,0 +1,260 @@
+
+	clause
+		model
+		label
+		question
+		answer
+		clause_text
+		position_index // for rendering, no logical consequence
+
+			EXAMPLE:
+
+				MODEL | QUESTION / LABEL | ANSWER | CLAUSE_TEXT
+
+Client	Active?	YES	(is_active IS TRUE)
+Client	Active?	NO	(is_active IS FALSE)
+Client	MCP assigned?	YES	(mcp_pro_id IS NOT NULL)
+Client	MCP assigned?	NO	(mcp_pro_id IS NULL)
+Client	Future MCP appointment?	YES	()
+Client	Future MCP appointment?	NO	()
+Client	MCB Primary?	YES	()
+Client	MCB Primary?	NO	()
+Client	Has active RM device?	YES	()
+Client	Has active RM device?	NO	()
+Client	Active device type?	Weight	()
+Client	Active device type?	BP	()
+Client	Active device type?	Weight ONLY	()
+Client	Active device type?	BP ONLY	()
+Client	Active device type?	Weight + BP	()
+Client	Type 2 Diabetic	-	()
+Pro	Active?	YES	(is_active IS TRUE)
+Pro	Active?	NO	(is_active IS FALSE)
+Pro	Is HCP?	YES	(is_hcp IS TRUE)
+Pro	Is HCP?	NO	(is_hcp IS NOT TRUE)
+
+			WORK:::::::::::::::
+
+				- FRONTEND: paste a tsv into a textarea and see it as a table.
+				- BACKEND PHP: take in a tsv, foreach over and spit it back as a JSON.
+
+	stat_tree
+		name
+		model
+		slug
+		max_line_length
+		last_refreshed_at
+		tsv_text_for_lines
+
+			EXAMPLE tsv_text_for_lines:
+
+Active? YES
+	MCP assigned? YES
+		MCB Primary? NO
+			Has active RM device? YES
+	MCP assigned? NO
+		MCB Primary? YES
+Active? NO
+	MCB Primary? YES
+		Has active RM device? YES
+		Has active RM device? NO
+	MCB Primary? NO
+		Has active RM device? YES
+		Has active RM device? NO
+	Has active RM device? YES
+	Has active RM device? NO
+
+Active? YES
+	Is HCP? YES
+	Is HCP? NO
+Active? NO
+	Is HCP? YES
+	Is HCP? NO
+
+
+	stat_tree_line
+		stat_tree_id
+		tree_order_position_index
+		last_refresh_count
+		tsv_text_for_report_columns
+
+			EXAMPLE tsv_text_for_report_columns:
+
+				LABEL | DISPLAY_KEY | DISPLAY_FUNCTION | RECORD_ROUTE_NAME
+
+	stat_tree_line_clause
+		stat_tree_line_id
+		clause_id
+		clause_label
+		position_index
+
+	stat_tree_line_report_column
+		stat_tree_line_id
+		label
+		position_index
+		display_key // if super simple
+		display_function // if custom on model
+		record_route_name
+
+------------------------------------------------------------------------------------------------
+
+	api/clause/replaceAll
+		tsvText
+
+			LOGIC:
+
+				delete all lines
+				foreach line, create record
+
+	api/statTree/create
+		name
+		table
+		slug
+
+			LOGIC:
+
+				confirm no duplicate
+				create statTree
+
+	api/statTree/delete
+		uid
+
+			LOGIC:
+
+				delete it
+
+	api/statTree/updateBasic // can't change table
+		uid
+		name
+		slug
+
+			LOGIC:
+
+				confirm no duplicate
+				update
+
+	api/statTree/refreshCount
+		uid
+
+			LOGIC:
+
+				public function refreshCount($statTreeID){
+					$statTree = StatTree::get($statTreeID);
+					foreach($statTree->lines as $line){
+						this->updateStatTreeLineCount($line);
+					}
+					$statTree->last_refreshed_at = now();
+				}
+
+				private function refreshCount($line){
+					$table = $line->statTree->table;
+					$query = "SELECT COUNT(*) FROM $table WHERE ";
+					$allClauses = $line->statTreeLineClauses;
+					for($i = 0; $i < count($allClauses); $i++){
+						$query .= $allClauses[$i] . ($i == count($allClauses) - 1 ? '' : ' AND ');
+					}
+					$count = runRawSqlSafelyForCount($query);
+					$line->last_refresh_count = $count;
+					return count;
+				}
+
+	api/statTree/replaceAllLines
+		uid
+		tsvText
+
+			LOGIC:
+
+				EXAMPLE tsv_text_for_lines:
+
+					Active patient? YES
+						MCP assigned? YES
+							MCB Primary? NO
+								Has active RM device? YES
+						MCP assigned? NO
+							MCB Primary? YES
+					Active patient? NO
+						MCB Primary? YES
+							Has active RM device? YES	
+							Has active RM device? NO	
+						MCB Primary? NO
+							Has active RM device? YES
+							Has active RM device? NO
+						Has active RM device? YES	
+						Has active RM device? NO
+
+				public function replaceAllLines($statTree, $tsvText){
+					// fill in missing blanks down the rows
+					// foreach fully filled row, create a stat_tree_line
+				}
+
+
+	api/statTreeLine/replaceAllReportColumns
+		uid
+		tsvText
+
+			LOGIC:
+
+				EXAMPLE tsv_text_for_report_columns:
+
+					LABEL | DISPLAY_KEY | DISPLAY_FUNCTION | RECORD_ROUTE_NAME
+
+					public function replaceAllReportColumns($statTreeLine, $tsvText){
+						// fill in missing blanks down the rows
+					}
+
+------------------------------------------------------------------------------------------------
+
+/stat-tree/{{$statTree->slug}}
+
+	Stat Tree: {{ $statTree->name }} | Last refreshed: {{ $statTree->last_refreshed_at }}
+
+	<table>
+		<tr>
+			@for($i = 0; $statTree->max_line_length - 2; $i++)
+				<th></th>
+			@endfor
+			<th>Count</th>
+		</tr>
+		@foreach($statTree->lines as $line) // ->lines returns by tree_order_position_index
+			@for($i = 0; $statTree->max_line_length - 2; $i++)
+				<td>
+					{{ $i == $line->all_clauses_length - 1 ? $line->clause->label : '-' }}
+				</td>
+			@endfor
+			<td>{{ $line->last_refresh_count }}</td>
+		@endforeach
+	</table>
+
+------------------------------------------------------------------------------------------------
+
+/dynamic-stat-tree/{{statTree->slug}}?top-level-filters=(BASE64OFTHEM)
+
+	Top level filters:
+		-(WHERE mcp_pro_id=2)
+
+	// render same thing as static stat-tree, but with this filter and dynamic count
+
+------------------------------------------------------------------------------------------------
+
+/stat-tree-line/{{uid}}
+
+	Stat Tree: {{ $statTree->name }}
+	Table: {{ $line-> }}
+	Line: {{ $line->all_clauses_text }}
+
+	@foreach($columns as $column)
+		<th></th>
+
+	@foreach($records as $record)
+		@foreach($columns as $column)
+		<td>{{ $record->{{$column->display_function ? $column->display_function : $column->display_key }} }}</td>
+
+	(PAGINATE)
+
+------------------------------------------------------------------------------------------------
+
+/dynamic-stat-tree-line/{{uid}}?top-level-filters=(BASE64OFTHEM)
+
+	Top level filters:
+		-(WHERE mcp_pro_id=2)
+
+	// render same thing as static stat-tree-line, but with this filter