= 4 år sedan
förälder
incheckning
6482672e2a

+ 5 - 1
app/Http/Controllers/Controller.php

@@ -51,8 +51,12 @@ class Controller extends BaseController
         $noteTemplates = NoteTemplate::all();
         view()->share('noteTemplates', $noteTemplates);
 
-        $initiatives = ['LI', 'BI'];
+        $initiatives = ['LHI', 'BHI'];
         view()->share('intiatives', $initiatives);
+
+        $rmCodes = ['RMB','RM20', 'RM40','RM60'];
+        
+        view()->share('rmCodes', $rmCodes);
     }
 
     public function performer(){

+ 8 - 0
app/Models/Client.php

@@ -35,6 +35,14 @@ class Client extends Model
         return $this->hasOne(Pro::class, 'id', 'rme_pro_id');
     }
 
+    public function rms() {
+        return $this->hasOne(Pro::class, 'id', 'rms_pro_id');
+    }
+
+    public function rmg() {
+        return $this->hasOne(Pro::class, 'id', 'rmg_pro_id');
+    }
+
     public function prosInMeetingWith() {
         return Pro::where('in_meeting_with_client_id', $this->id)->get();
     }

+ 4 - 5
resources/views/app/patient/care-month/dashboard.blade.php

@@ -546,7 +546,7 @@
                                                 }
                                                 ?>
                                                 <input autofocus type="date" min="{{ date($y . '-' . $m . '-01') }}" max="{{ date($y . '-' . $m . '-' . $d) }}"
-                                                       {{ $isToday ? 'value="' . date('Y-m-d') . '"' : '' }}
+                                                       value="{{date('Y-m-d')}}"
                                                        class="form-control form-control-sm w-100" name="effectiveDate"
                                                        placeholder="Effective Date" required>
                                             </div>
@@ -879,10 +879,9 @@
                                     <div class="mb-2">
                                         <select class="form-control" name="rmCode">
                                             <option value="">-- Select RM Code --</option>
-                                            <?php $rmRates = $pro->rmRates();?>
-                                            @if($rmRates && count($rmRates))
-                                                @foreach($rmRates as $rmRate)
-                                                    <option value="{{ $rmRate->code }}">{{ $rmRate->code }}</option>
+                                            @if($rmCodes && count($rmCodes))
+                                                @foreach($rmCodes as $rmRate)
+                                                    <option value="{{ $rmRate }}">{{ $rmRate }}</option>
                                                 @endforeach
                                             @endif
                                         </select>

+ 85 - 0
resources/views/app/patient/settings.blade.php

@@ -201,6 +201,91 @@
                     </div>
                 </div>
 
+                <hr class="m-negator-3 my-3">
+
+                <div class="d-flex align-items-center mt-3 mb-2">
+                    <div class="font-weight-bold">Associated Pros</div>
+                </div>
+                <div class="pl-3">
+                   
+                    <div class="mb-1">
+                        RMM: <b>{{ $patient->rmm->name_display ?? ''}}</b>
+                        @if($pro->pro_type === 'ADMIN')
+                        <div moe wide>
+                            <a start show><i class="fa fa-edit"></i></a>
+                            <form url="/api/client/putRmmPro" class="mcp-theme-1">
+                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                <div class="mb-2">
+                                    <label class="mb-1 text-secondary text-sm">RMM Pro</label>
+                                    
+                                    <select class="form-control form-control-sm" name="rmmProUid">
+                                        <option value="">--select--</option>
+                                        @foreach($pros as $rmmPro)
+                                        <option value="{{$rmmPro->uid}}">{{$rmmPro->name_display}}</option>
+                                        @endforeach
+                                    </select>
+                                </div>
+                                <div>
+                                    <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
+                                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                                </div>
+                            </form>
+                        </div>
+                        @endif
+                    </div>
+                    <div class="mb-1">
+                        RME: <b>{{ $patient->rme->name_display ?? '' }}</b>
+                        @if($pro->pro_type === 'ADMIN')
+                        <div moe wide>
+                            <a start show><i class="fa fa-edit"></i></a>
+                            <form url="/api/client/putRmePro" class="mcp-theme-1">
+                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                <div class="mb-2">
+                                    <label class="mb-1 text-secondary text-sm">RME Pro</label>
+                                    <select class="form-control form-control-sm" name="rmeProUid">
+                                        <option value="">--select--</option>
+                                        @foreach($pros as $rmePro)
+                                        <option value="{{$rmePro->uid}}">{{$rmePro->name_display}}</option>
+                                        @endforeach
+                                    </select>
+                                </div>
+                                <div>
+                                    <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
+                                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                                </div>
+                            </form>
+                        </div>
+                        @endif
+                    </div>
+
+                    <div class="mb-1">
+                        RMS: <b>{{ $patient->rms->name_display ??'' }}</b>
+                        @if($pro->pro_type === 'ADMIN')
+                        <div moe wide>
+                            <a start show><i class="fa fa-edit"></i></a>
+                            <form url="/api/client/putRmsPro" class="mcp-theme-1">
+                                <input type="hidden" name="uid" value="{{$patient->uid}}">
+                                <div class="mb-2">
+                                    <label class="mb-1 text-secondary text-sm">RMS Pro</label>
+                                    
+                                    <select class="form-control form-control-sm" name="rmsProUid">
+                                        <option value="">--select--</option>
+                                        @foreach($pros as $rmsPro)
+                                        <option value="{{$rmsPro->uid}}">{{$rmsPro->name_display}}</option>
+                                        @endforeach
+                                    </select>
+                                </div>
+                                <div>
+                                    <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
+                                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                                </div>
+                            </form>
+                        </div>
+                        @endif
+                    </div>
+
+                </div>
+
             </div>
             <div class="col-6 border-left">
 

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

@@ -92,7 +92,7 @@
             <ul class="navbar-nav mr-auto">
                 <li class="nav-item"><a class="nav-link" href="{{ route('dashboard') }}"><i class="mr-1 fas fa-home"></i> Home</a> </li>
                 <li class="nav-item"><a class="nav-link" href="{{ route('patients') }}"><i class="mr-1 fas fa-user-injured"></i> Patients</a> </li>
-                @if($pro && $pro->pro_type == 'ADMIN')
+                @if($pro && ($pro->can_add_patients || $pro->pro_type== 'ADMIN'))
                 <li class="nav-item"><a class="nav-link" href="{{ route('new-patient') }}"><i class="mr-1 fas fa-user-plus"></i> New Patient</a> </li>
                 @endif
                 <li class="nav-item dropdown">
@@ -155,7 +155,7 @@
                             </a>
                         @endif
                         <a native target="_top" class="d-block ml-2 pt-1" href="{{config('stag.authUrl')}}" title="">
-                            My Apps
+                            Exit
                         </a>
                         <a native target="_top" href="{{route('logout')}}" class="d-block ml-2 pt-1">
                             Sign Out