Samson Mutunga vor 3 Jahren
Ursprung
Commit
b33cd69e85

+ 3 - 0
app/Http/Controllers/PracticeManagementController.php

@@ -326,6 +326,9 @@ SELECT effective_date, count(*), sum(number_of_units) as units FROM bill WHERE c
         $status = $request->get('status');
         if($status){
             if($status == 'CANCELLED') $query = $query->where('is_cancelled', true);
+            if($status == 'NOT_YET_SIGNED') $query = $query->where('is_signed_by_hcp', false);
+            if($status == 'NOT_YET_SIGNED_BUT_ALLY_SIGNED') $query = $query->where('is_signed_by_hcp', false)->where('is_signed_by_ally', true);
+            if($status == 'WITHOUT_BILLS') $query = $query->where('is_signed_by_hcp', true)->where('is_cancelled', false)->whereDoesntHave('bills');
         }
 
         

+ 5 - 1
resources/views/app/practice-management/notes_filters.blade.php

@@ -22,6 +22,7 @@
 	.filter-container>div:not(:last-child) {
 		margin-right: 15px;
 	}
+
 	.select2-container {
 		width: 100% !important;
 	}
@@ -87,7 +88,7 @@
 			<select multiple class="form-control form-control-sm mr-2" name="patients[]" v-model="filters.patients">
 				<option value="">All Patients</option>
 				@foreach($allPatientsWithNotes as $notePatient)
-					<option value="{{ $notePatient->id }}">{{ $notePatient->displayName() }}</option>
+				<option value="{{ $notePatient->id }}">{{ $notePatient->displayName() }}</option>
 				@endforeach
 			</select>
 		</div>
@@ -99,6 +100,9 @@
 			<select class="form-control form-control-sm mr-2" name="status" v-model="filters.status">
 				<option value="">All Notes</option>
 				<option value="CANCELLED">Cancelled</option>
+				<option value="NOT_YET_SIGNED">Notes not yet signed</option>
+				<option value="NOT_YET_SIGNED_BUT_ALLY_SIGNED">Notes not yet signed (but ally signed)</option>
+				<option value="WITHOUT_BILLS">Without Bills</option>
 			</select>
 		</div>
 	</div>