|
@@ -263,31 +263,38 @@ $points = [
|
|
|
<?php
|
|
|
$missing = [];
|
|
|
foreach ($points as $p) {
|
|
|
- if(!$p['point']) {
|
|
|
+ if (!$p['point']) {
|
|
|
$missing[] = $p['category'];
|
|
|
}
|
|
|
}
|
|
|
if(count($missing)) {
|
|
|
- foreach ($missing as $m) {
|
|
|
- ?>
|
|
|
- createCalls.push($.ajax({
|
|
|
- url: "/api/visitPoint/addTopLevel",
|
|
|
- type: 'post',
|
|
|
- data: {
|
|
|
- noteUid: '{{$note->uid}}',
|
|
|
- category: '{{$m}}',
|
|
|
- additionReasonCategory: 'ON_INTAKE'
|
|
|
- },
|
|
|
- success: function(jsonSaveResponse) {},
|
|
|
- error: function(jqXHR, textStatus, errorThrown) {}
|
|
|
- }));
|
|
|
- <?php
|
|
|
+ foreach ($missing as $m) {
|
|
|
+ ?>
|
|
|
+ createCalls.push($.ajax({
|
|
|
+ url: "/api/visitPoint/addTopLevel",
|
|
|
+ type: 'post',
|
|
|
+ data: {
|
|
|
+ noteUid: '{{$note->uid}}',
|
|
|
+ category: '{{$m}}',
|
|
|
+ additionReasonCategory: 'ON_INTAKE'
|
|
|
+ },
|
|
|
+ success: function (jsonSaveResponse) {},
|
|
|
+ error: function (jqXHR, textStatus, errorThrown) {}
|
|
|
+ }));
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ Promise.all(createCalls).then(() => {
|
|
|
+ refreshDynamicStagPopup();
|
|
|
+ });
|
|
|
+ <?php
|
|
|
}
|
|
|
- ?>
|
|
|
- Promise.all(createCalls).then(() => {
|
|
|
- refreshDynamicStagPopup();
|
|
|
- });
|
|
|
- <?php
|
|
|
+ else {
|
|
|
+ if(!$note->is_signed_by_hcp) { // auto-open edit mode
|
|
|
+ ?>
|
|
|
+ button.trigger('click');
|
|
|
+ <?php
|
|
|
+ }
|
|
|
}
|
|
|
?>
|
|
|
}
|