Ver código fonte

cc_hpi > cc as a sentence

Vijayakrishnan 4 anos atrás
pai
commit
fc16556bf6

+ 1 - 1
resources/views/app/patient/canvas-sections/cc_hpi/form.blade.php

@@ -185,7 +185,7 @@ $formID = rand(0, 100000);
                             window.Def.Autocompleter.Event.observeListSelections(dynID, function() {
                                 let autocomp = elem.autocomp, acData = autocomp.getSelectedItemData();
                                 self.data['current_cch']['list'][vueIndex].icd = acData[0].code;
-                                self.data['current_cch']['list'][vueIndex].memo = acData[0].data['name'];
+                                self.data['current_cch']['list'][vueIndex].name = acData[0].data['name'];
                                 return false;
                             });
                             $(elem).attr('ac-initialized', 1);

+ 1 - 3
resources/views/app/patient/canvas-sections/cc_hpi/summary.php

@@ -39,9 +39,7 @@ else {
     <p class="p-2 bg-light border mb-2">
         Patient is a <?= $patient->age_in_years ?> y.o. <?= $client->sex ?> presenting for:
         <?php foreach($lines as $i => $line): ?>
-            <?php if($i > 0):?>, <?php endif; ?>
-            <?php if(!!$line['icd']): ?><span><?= $line['icd'] ?></span><?php endif; ?>
-            <?php if(!!$line['memo']): ?><span>(<?= $line['memo'] ?>)</span><?php endif; ?>
+            <?= $line['name'] ?><?= count($lines) > 1 ? ($i === count($lines) - 2 ? ' and ' : ($i < count($lines) - 2 ? ', ' : '')) : '' ?>
         <?php endforeach; ?>
     </p>
     <p class="font-weight-bold mb-2">HPI</p>