소스 검색

RPM work matrix - polish

Vijayakrishnan 3 년 전
부모
커밋
c8a2785595

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

@@ -1044,6 +1044,7 @@ SELECT client.name_first, client.name_last,
        client.dob,
        client.is_enrolled_in_rm,
        client.most_recent_completed_mcp_note_date,
+       client.cell_number,
        care_month.uid as care_month_uid,
        care_month.id as care_month_id,
        care_month.start_date,
@@ -1055,6 +1056,8 @@ SELECT client.name_first, client.name_last,
        care_month.rm_num_measurements_not_stamped_by_non_hcp,
        care_month.rm_num_measurements_not_stamped_by_rmm,
        care_month.rm_num_measurements_not_stamped_by_rme,
+       care_month.mcp_pro_id as care_month_mcp_pro_id,
+       care_month.rmm_pro_id as care_month_rmm_pro_id,
        client.mcp_pro_id,
        client.default_na_pro_id,
        client.rmm_pro_id,

+ 1 - 1
app/Models/Client.php

@@ -35,7 +35,7 @@ class Client extends Model
         return $this->hasOne(ClientPrimaryCoverage::class, 'id', 'temporary_outsider_new_client_primary_coverage_id');
     }
 
-    public function displayName($_flat = false)
+    public function displayName($_flat = true)
     {
         if($_flat) return $this->name_first . ' ' . $this->name_last;
         return $this->name_last . ', ' . $this->name_first;

+ 13 - 0
resources/views/app/patient/care-month/_work_matrix.blade.php

@@ -255,6 +255,19 @@ $days = $daysWithUnstamped;
                                                 </div>
                                             </div>
                                         </div>
+                                        <div class="mb-2 border border-info p-2 mt-2 bg-light">
+                                            <span>I have had interactive communication with <b>{{$patient->displayName()}}</b> during this care month.</span>
+                                            <div class="d-flex border-top mt-2">
+                                                <label class="mt-2 mb-0 d-inline-flex align-items-center mr-3">
+                                                    <input type="radio" class="mr-2" name="didProInteractWithClientAboutRm" value="true" required {{$careMonth->has_mcp_interacted_with_client_about_rm ? 'checked' : ''}}>
+                                                    <span>Yes</span>
+                                                </label>
+                                                <label class="mt-2 mb-0 d-inline-flex align-items-center">
+                                                    <input type="radio" class="mr-2" name="didProInteractWithClientAboutRm" value="false" required {{!$careMonth->has_mcp_interacted_with_client_about_rm ? 'checked' : ''}}>
+                                                    <span>No</span>
+                                                </label>
+                                            </div>
+                                        </div>
                                         <div class="form-group m-0">
                                             <button type="button" class="btn btn-primary btn-sm mr-2 btn-bulk-stamp">Next</button>
                                             <button cancel class="btn btn-default border btn-sm mr-2">Cancel</button>

+ 10 - 12
resources/views/app/practice-management/remote-monitoring.blade.php

@@ -85,20 +85,20 @@
                                 $oPatient = \App\Models\Client::where('uid', $iPatient->client_uid)->first();
 
                                 $daysDiff = -1;
-                                if($oPatient->most_recent_completed_mcp_note_date) {
+                                if($iPatient->most_recent_completed_mcp_note_date) {
                                     $careMonthLastDay = date_add(date_create($rcmStartDate), date_interval_create_from_date_string("1 month"));
                                     $careMonthLastDay = date_sub($careMonthLastDay, date_interval_create_from_date_string("1 day"));
-                                    $daysDiff = date_diff($careMonthLastDay, date_create($oPatient->most_recent_completed_mcp_note_date))->days;
+                                    $daysDiff = date_diff($careMonthLastDay, date_create($iPatient->most_recent_completed_mcp_note_date))->days;
                                 }
                                 $lastVisitWithin90Days = ($daysDiff !== -1 && $daysDiff <= 90);
 
-                                $careMonth = \App\Models\CareMonth::where('uid', $iPatient->care_month_uid)->first();
+                                // $careMonth = \App\Models\CareMonth::where('uid', $iPatient->care_month_uid)->first();
                                 $performerRole = false;
                                 if ($pro->pro_type === 'ADMIN') {
                                     $performerRole = 'ADMIN';
-                                } else if ($careMonth->mcp_pro_id === $pro->id) {
+                                } else if ($iPatient->care_month_mcp_pro_id === $pro->id) {
                                     $performerRole = 'MCP';
-                                } else if ($careMonth->rmm_pro_id === $pro->id) {
+                                } else if ($iPatient->care_month_rmm_pro_id === $pro->id) {
                                     $performerRole = 'RMM';
                                 }
 
@@ -111,7 +111,7 @@
                                     <td>{{friendly_date($iPatient->dob)}}</td>
                                     <td>{!! $iPatient->is_enrolled_in_rm === 'YES' ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
                                     <td>{!! $oPatient->hasBPDevice() ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
-                                    <td>{!! $oPatient->hasBPDevice() ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
+                                    <td>{!! $oPatient->hasWeightScaleDevice() ? '<i class="fa fa-check text-success"></i>' : 'No' !!}</td>
                                     <td>
                                         {{$iPatient->most_recent_cellular_bp_sbp_mm_hg ?: '-'}}/{{$iPatient->most_recent_cellular_bp_dbp_mm_hg ?: '-'}}
                                         @if($iPatient->most_recent_cellular_bp_measurement_at)
@@ -180,11 +180,9 @@
                                                             </div>
                                                         </div>
                                                         <div class="mb-2">
-                                                            <div class="row">
-                                                                <div class="col-12">
-                                                                    <div cm-rte data-content="Interacted with the patient" data-name="contentText"></div>
-                                                                </div>
-                                                            </div>
+                                                            <label class="text-sm text-secondary mb-1">Memo</label>
+                                                            <textarea class="form-control form-control-sm w-100" name="contentText"
+                                                                   required>Interacted with the patient</textarea>
                                                         </div>
                                                         <div class="d-flex align-items-center">
                                                             <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
@@ -209,7 +207,7 @@
                                                         <input type="hidden" name="uid" value="{{ $iPatient->client_uid }}">
                                                         <div class="mb-2">
                                                             <label for="" class="text-sm text-secondary mb-1">Cell Number</label>
-                                                            <input type="text" class="form-control form-control-sm" name="cellNumber" value="{{$oPatient->cell_number}}">
+                                                            <input type="text" class="form-control form-control-sm" name="cellNumber" value="{{$iPatient->cell_number}}">
                                                         </div>
                                                         <div class="mb-2">
                                                             <label for="" class="text-sm text-secondary mb-1">Message</label>