{"action":"created","comment":{"url":"https://api.github.com/repos/openemr/openemr/pulls/comments/194811628","pull_request_review_id":128054089,"id":194811628,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDgxMTYyOA==","diff_hunk":"@@ -76,444 +76,459 @@ function sensitivity_compare($a, $b)\n <?php include_once(\"{$GLOBALS['srcdir']}/ajax/facility_ajax_jav.inc.php\"); ?>\n <script language=\"JavaScript\">\n \n- var mypcc = '<?php echo $GLOBALS['phone_country_code'] ?>';\n \n- // Process click on issue title.\n- function newissue() {\n-  dlgopen('../../patient_file/summary/add_edit_issue.php', '_blank', 700, 535, '', '', {\n-      buttons: [\n-          {text: '<?php echo xla('Close'); ?>', close: true, style: 'default btn-sm'}\n-      ]\n-  });\n-  return false;\n- }\n+    var mypcc = '<?php echo $GLOBALS['phone_country_code'] ?>';\n \n- // callback from add_edit_issue.php:\n- function refreshIssue(issue, title) {\n-  var s = document.forms[0]['issues[]'];\n-  s.options[s.options.length] = new Option(title, issue, true, true);\n- }\n+    // Process click on issue title.\n+    function newissue() {\n+        dlgopen('../../patient_file/summary/add_edit_issue.php', '_blank', 700, 535, '', '', {\n+            buttons: [\n+            {text: '<?php echo xla('Close'); ?>', close: true, style: 'default btn-sm'}\n+            ]\n+        });\n+        return false;\n+    }\n \n+     // callback from add_edit_issue.php:\n+     function refreshIssue(issue, title) {\n+      var s = document.forms[0]['issues[]'];\n+      s.options[s.options.length] = new Option(title, issue, true, true);\n+     }\n+     \n     <?php\n- //Gets validation rules from Page Validation list.\n- //Note that for technical reasons, we are bypassing the standard validateUsingPageRules() call.\n+    //Gets validation rules from Page Validation list.\n+    //Note that for technical reasons, we are bypassing the standard validateUsingPageRules() call.\n+    $collectthis = collectValidationPageRules(\"/interface/forms/newpatient/common.php\");\n     $collectthis = collectValidationPageRules(\"/interface/forms/newpatient/common.php\");\n     if (empty($collectthis)) {\n          $collectthis = \"undefined\";\n     } else {\n          $collectthis = $collectthis[\"new_encounter\"][\"rules\"];\n     }\n     ?>\n- var collectvalidation = <?php echo($collectthis); ?>;\n- $(document).ready(function(){\n-   window.saveClicked = function(event) {\n-     var submit = submitme(1, event, 'new-encounter-form', collectvalidation);\n-     if (submit) {\n-       top.restoreSession();\n-       $('#new-encounter-form').submit();\n-     }\n-   }\n-   $(\".enc_issue\").on('click', function(e) {\n-       e.preventDefault();e.stopPropagation();\n-       dlgopen('', '', 700, 650, '', '', {\n-           buttons: [\n-               {text: '<?php echo xla('Close'); ?>', close: true, style: 'default btn-sm'}\n-           ],\n-           allowResize: true,\n-           allowDrag: true,\n-           dialogId: '',\n-           type: 'iframe',\n-           url: $(this).attr('href')\n-       });\n-   });\n-   $('.datepicker').datetimepicker({\n-        <?php $datetimepicker_timepicker = false; ?>\n-        <?php $datetimepicker_showseconds = false; ?>\n-        <?php $datetimepicker_formatInput = true; ?>\n-        <?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>\n-        <?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>\n-   });\n- });\n-\n-function bill_loc(){\n-var pid=<?php echo attr($pid);?>;\n-var dte=document.getElementById('form_date').value;\n-var facility=document.forms[0].facility_id.value;\n-ajax_bill_loc(pid,dte,facility);\n-}\n-\n-// Handler for Cancel clicked when creating a new encounter.\n-// Show demographics or encounters list depending on what frame we're in.\n- function cancelClickedNew() {\n-     if (top.tab_mode) {\n-         window.parent.left_nav.loadFrame('ens1', window.name, 'patient_file/history/encounters.php');\n-     }\n-     var target = window;\n-     while (target != top) {\n-         if (target.name == 'RBot') {\n-             target.parent.left_nav.loadFrame('ens1', window.name, 'patient_file/history/encounters.php');\n-             break;\n-         }\n-         else if (target.name == 'RTop') {\n-             target.parent.left_nav.loadFrame('dem1', window.name, 'patient_file/summary/demographics.php');\n-             break;\n-         }\n-         target = target.parent;\n-     }\n-     return false;\n- }\n-\n- // Handler for cancel clicked when not creating a new encounter.\n- // Just reload the view mode.\n- function cancelClickedOld() {\n-     location.href = '<?php echo \"$rootdir/patient_file/encounter/forms.php\"; ?>';\n-     return false;\n- }\n-\n-</script>\n-</head>\n-\n-<?php if ($viewmode) { ?>\n-<body class=\"body_top\">\n-<?php } else { ?>\n-<body class=\"body_top\" onload=\"javascript:document.new_encounter.reason.focus();\">\n-<?php } ?>\n-\n-<!-- Required for the popup date selectors -->\n-<div id=\"overDiv\" style=\"position:absolute; visibility:hidden; z-index:1000;\"></div>\n-\n-<form id=\"new-encounter-form\" method='post' action=\"<?php echo $rootdir ?>/forms/newpatient/save.php\" name='new_encounter'>\n-\n-<div style='float:left'>\n-<?php if ($viewmode) { ?>\n-<input type=hidden name='mode' value='update'>\n-<input type=hidden name='id' value='<?php echo (isset($_GET[\"id\"])) ? attr($_GET[\"id\"]) : '' ?>'>\n-<span class=title><?php echo xlt('Patient Encounter Form'); ?></span>\n-<?php } else { ?>\n-<input type='hidden' name='mode' value='new'>\n-<span class='title'><?php echo xlt('New Encounter Form'); ?></span>\n-<?php } ?>\n-</div>\n-\n-<div>\n-    <div style = 'float:left; margin-left:8px;margin-top:-3px'>\n-      <a href=\"javascript:saveClicked(undefined);\" class=\"css_button link_submit\"><span><?php echo xlt('Save'); ?></span></a>\n-<?php if ($viewmode || empty($_GET[\"autoloaded\"])) { // not creating new encounter ?>\n-    </div>\n-    <div style = 'float:left; margin-top:-3px'>\n-      <a href=\"\" class=\"css_button link_submit\" onClick=\"return cancelClickedOld()\">\n-      <span><?php echo xlt('Cancel'); ?></span></a>\n-    <?php } else { // not $viewmode ?>\n-      <a href=\"\" class=\"css_button link_submit\" onClick=\"return cancelClickedNew()\">\n-      <span><?php echo xlt('Cancel'); ?></span></a>\n-    <?php } // end not $viewmode ?>\n-    </div>\n- </div>\n-\n-<br> <br>\n-\n-<table width='96%'>\n-\n- <tr>\n-  <td width='33%' nowrap class='bold'><?php echo xlt('Consultation Brief Description'); ?>:</td>\n-  <td width='34%' rowspan='2' align='center' valign='center' class='text'>\n-   <table>\n-\n-    <tr>\n-     <td class='bold' nowrap><?php echo xlt('Visit Category:'); ?></td>\n-     <td class='text'>\n-      <select class=\"form-control\" name='pc_catid' id='pc_catid'>\n-          <option value='_blank'>-- <?php echo xlt('Select One'); ?> --</option>\n-            <?php\n-            //Bring only patient ang group categories\n-            $visitSQL = \"SELECT pc_catid, pc_catname, pc_cattype \n-                       FROM openemr_postcalendar_categories\n-                       WHERE pc_active = 1 and pc_cattype IN (0,3) and pc_constant_id  != 'no_show' ORDER BY pc_seq\";\n-\n-            $visitResult = sqlStatement($visitSQL);\n-            $therapyGroupCategories = [];\n-\n-            while ($row = sqlFetchArray($visitResult)) {\n-                $catId = $row['pc_catid'];\n-                $name = $row['pc_catname'];\n-\n-                if ($row['pc_cattype'] == 3) {\n-                    $therapyGroupCategories[] = $catId;\n-                }\n-\n-                if ($catId === \"_blank\") {\n-                    continue;\n-                }\n-\n-                if ($row['pc_cattype'] == 3 && !$GLOBALS['enable_group_therapy']) {\n-                    continue;\n-                }\n-\n-                // Fetch acl for category of given encounter. Only if has write auth for a category, then can create an encounter of that category.\n-                $postCalendarCategoryACO = fetchPostCalendarCategoryACO($catId);\n-                if ($postCalendarCategoryACO) {\n-                    $postCalendarCategoryACO = explode('|', $postCalendarCategoryACO);\n-                    $authPostCalendarCategoryWrite = acl_check($postCalendarCategoryACO[0], $postCalendarCategoryACO[1], '', 'write');\n-                } else { // if no aco is set for category\n-                    $authPostCalendarCategoryWrite = true;\n-                }\n-\n-                //if no permission for category write, don't show in drop-down\n-                if (!$authPostCalendarCategoryWrite) {\n-                    continue;\n-                }\n-\n-                $optionStr = '<option value=\"%pc_catid%\" %selected%>%pc_catname%</option>';\n-                $optionStr = str_replace(\"%pc_catid%\", attr($catId), $optionStr);\n-                $optionStr = str_replace(\"%pc_catname%\", text(xl_appt_category($name)), $optionStr);\n-                if ($viewmode) {\n-                    $selected = ($result['pc_catid'] == $catId) ? \" selected\" : \"\";\n-                } else {\n-                    $selected = ($GLOBALS['default_visit_category'] == $catId) ? \" selected\" : \"\";\n-                }\n-\n-                  $optionStr = str_replace(\"%selected%\", $selected, $optionStr);\n-                  echo $optionStr;\n+    var collectvalidation = <?php echo($collectthis); ?>;\n+    $(document).ready(function(){\n+        window.saveClicked = function(event) {\n+            var submit = submitme(1, event, 'new-encounter-form', collectvalidation);\n+            if (submit) {\n+            top.restoreSession();\n+            $('#new-encounter-form').submit();\n             }\n-            ?>\n-      </select>\n-     </td>\n-    </tr>\n-\n-    <tr>\n-     <td class='bold' nowrap><?php echo xlt('Facility:'); ?></td>\n-     <td class='text'>\n-      <select class=\"form-control\" name='facility_id' onChange=\"bill_loc()\">\n-<?php\n+        }\n \n-if ($viewmode) {\n-    $def_facility = $result['facility_id'];\n-} else {\n-    $dres = sqlStatement(\"select facility_id from users where username = ?\", array($_SESSION['authUser']));\n-    $drow = sqlFetchArray($dres);\n-    $def_facility = $drow['facility_id'];\n-}\n+        $(\".enc_issue\").on('click', function(e) {\n+           e.preventDefault();e.stopPropagation();\n+           dlgopen('', '', 700, 650, '', '', {\n+                         \n+               buttons: [{text: '<?php echo xla('Close'); ?>', close: true, style: 'default btn-sm'}],\n+                 \n+               allowResize: true,\n+               allowDrag: true,\n+               dialogId: '',\n+               type: 'iframe',\n+               url: $(this).attr('href')\n+           });\n+        });\n+\n+        $('.datepicker').datetimepicker({\n+            <?php $datetimepicker_timepicker = false; ?>\n+            <?php $datetimepicker_showseconds = false; ?>\n+            <?php $datetimepicker_formatInput = true; ?>\n+            <?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>\n+            <?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>\n+        });\n+    });\n+\n+    function bill_loc(){\n+        var pid = <?php echo attr($pid);?>;\n+        var dte = document.getElementById('form_date').value;\n+        var facility = document.forms[0].facility_id.value;\n+        ajax_bill_loc(pid, dte, facility);\n+    }\n \n-$facilities = $facilityService->getAllServiceLocations();\n-if ($facilities) {\n-    foreach ($facilities as $iter) {\n-        if ($iter['billing_location'] == 1) {\n-            $posCode = $iter['pos_code'];\n+    // Handler for Cancel clicked when creating a new encounter.\n+    // Show demographics or encounters list depending on what frame we're in.\n+    function cancelClickedNew() {\n+        if (top.tab_mode) {\n+            window.parent.left_nav.loadFrame('ens1', window.name, 'patient_file/history/encounters.php');\n         }\n-    ?>\n-       <option value=\"<?php echo attr($iter['id']); ?>\" <?php if ($def_facility == $iter['id']) {\n-            echo \"selected\";\n-}?>><?php echo text($iter['name']); ?></option>\n-<?php\n-    }\n-}\n-?>\n-      </select>\n-     </td>\n-    </tr>\n-    <tr>\n-        <td class='bold' nowrap><?php echo xlt('Billing Facility'); ?>:</td>\n-        <td class='text'>\n-            <div id=\"ajaxdiv\">\n-            <?php\n-            billing_facility('billing_facility', $result['billing_facility']);\n-            ?>\n-            </div>\n-        </td>\n-     </tr>\n-        <?php if ($GLOBALS['set_pos_code_encounter']) { ?>\n-        <tr>\n-            <td><span class='bold' nowrap><?php echo xlt('POS Code'); ?>: </span></td>\n-            <td colspan=\"6\">\n-                <select class=\"form-control\" name=\"pos_code\">\n-                <?php\n-\n-                $pc = new POSRef();\n-\n-                foreach ($pc->get_pos_ref() as $pos) {\n-                    echo \"<option value=\\\"\" . attr($pos[\"code\"]) . \"\\\" \";\n-                    if ($pos[\"code\"] == $result['pos_code'] || $pos[\"code\"] == $posCode) {\n-                        echo \"selected\";\n-                    }\n-\n-                    echo \">\" . text($pos['code'])  . \": \". xlt($pos['title']);\n-                    echo \"</option>\\n\";\n-                }\n-\n-                ?>\n-                </select>\n-            </td>\n-       </tr>\n-        <?php } ?>\n-    <tr>\n-<?php\n- $sensitivities = acl_get_sensitivities();\n-if ($sensitivities && count($sensitivities)) {\n-    usort($sensitivities, \"sensitivity_compare\");\n-?>\n-   <td class='bold' nowrap><?php echo xlt('Sensitivity:'); ?></td>\n-    <td class='text'>\n-     <select class=\"form-control\" name='form_sensitivity'>\n-<?php\n-foreach ($sensitivities as $value) {\n-   // Omit sensitivities to which this user does not have access.\n-    if (acl_check('sensitivities', $value[1])) {\n-        echo \"       <option value='\" . attr($value[1]) . \"'\";\n-        if ($viewmode && $result['sensitivity'] == $value[1]) {\n-            echo \" selected\";\n+        var target = window;\n+        while (target != top) {\n+            if (target.name == 'RBot') {\n+                target.parent.left_nav.loadFrame('ens1', window.name, 'patient_file/history/encounters.php');\n+                break;\n+            }\n+            else if (target.name == 'RTop') {\n+                target.parent.left_nav.loadFrame('dem1', window.name, 'patient_file/summary/demographics.php');\n+                break;\n+            }\n+            target = target.parent;\n         }\n-\n-        echo \">\" . xlt($value[3]) . \"</option>\\n\";\n+        return false;\n     }\n-}\n \n-echo \"       <option value=''\";\n-if ($viewmode && !$result['sensitivity']) {\n-    echo \" selected\";\n+    // Handler for cancel clicked when not creating a new encounter.\n+    // Just reload the view mode.\n+    function cancelClickedOld() {\n+        location.href = '<?php echo \"$rootdir/patient_file/encounter/forms.php\"; ?>';\n+        return false;\n+    }\n+    \n+</script>\n+<style>\n+@media only screen and (max-width: 1024px) {\n+    #visit-details [class*=\"col-\"], #visit-issues [class*=\"col-\"]{\n+    width: 100%;\n+    text-align:left!Important;\n }\n-\n-echo \">\" . xlt('None'). \"</option>\\n\";\n-?>\n-     </select>\n-    </td>\n+</style>\n <?php\n+if ($viewmode) {\n+    $body_javascript = '';\n+    $heading_caption = 'Patient Encounter Form';\n } else {\n-?>\n-    <td colspan='2'><!-- sensitivities not used --></td>\n-<?php\n+    $body_javascript = 'onload=\"javascript:document.new_encounter.reason.focus();\"';\n+    $heading_caption ='New Encounter Form';\n }\n-?>\n-    </tr>\n \n-    <tr<?php if (!$GLOBALS['gbl_visit_referral_source']) {\n-        echo \" style='visibility:hidden;'\";\n-} ?>>\n-     <td class='bold' nowrap><?php echo xlt('Referral Source'); ?>:</td>\n-     <td class='text'>\n-<?php\n-  echo generate_select_list('form_referral_source', 'refsource', $viewmode ? $result['referral_source'] : '', '');\n-?>\n-     </td>\n-    </tr>\n-\n-    <?php if ($GLOBALS['enable_group_therapy']) { ?>\n-        <!-- select group name - showing just if therapy group type is selected -->\n-    <tr id=\"therapy_group_name\" style=\"display: none\">\n-        <td class='bold' nowrap><?php echo xlt('Group name'); ?>:</td>\n-        <td>\n-            <input type='text' class=\"input-sm\" size='10' name='form_group' id=\"form_group\" style='width:100%;cursor:pointer;cursor:hand' placeholder='<?php echo xla('Click to select');?>' value='<?php echo $viewmode && in_array($result['pc_catid'], $therapyGroupCategories) ? attr(getGroup($result['external_id'])['group_name']) : ''; ?>' onclick='sel_group()' title='<?php echo xla('Click to select group'); ?>' readonly />\n-            <input type='hidden' name='form_gid' value='<?php echo $viewmode && in_array($result['pc_catid'], $therapyGroupCategories) ? attr($result['external_id']) : '' ?>' />\n-        </td>\n-    </tr>\n-\n-    <?php }?>\n-    <tr>\n-     <td class='bold' nowrap><?php echo xlt('Date of Service:'); ?></td>\n-     <td class='text' nowrap>\n-      <input type='text' size='10' class='datepicker input-sm' name='form_date' id='form_date' <?php echo $disabled ?>\n-       value='<?php echo $viewmode ? attr(oeFormatShortDate(substr($result['date'], 0, 10))) : oeFormatShortDate(date('Y-m-d')); ?>'\n-       title='<?php echo xla('Date of service'); ?>' />\n-     </td>\n-    </tr>\n-\n-    <tr<?php if ($GLOBALS['ippf_specific']) {\n-        echo \" style='visibility:hidden;'\";\n-} ?>>\n-     <td class='bold' nowrap><?php echo xlt('Onset/hosp. date:'); ?></td>\n-     <td class='text' nowrap><!-- default is blank so that while generating claim the date is blank. -->\n-      <input type='text' size='10' class='datepicker input-sm' name='form_onset_date' id='form_onset_date'\n-       value='<?php echo $viewmode && $result['onset_date']!='0000-00-00 00:00:00' ? attr(oeFormatShortDate(substr($result['onset_date'], 0, 10))) : ''; ?>'\n-       title='<?php echo xla('Date of onset or hospitalization'); ?>' />\n-     </td>\n-    </tr>\n-    <tr>\n-     <td class='text' colspan='2' style='padding-top:1em'>\n-     </td>\n-    </tr>\n-   </table>\n-\n-  </td>\n-\n-\n-  <td class='bold' width='33%' nowrap>\n \n-<?php\n-  // To see issues stuff user needs write access to all issue types.\n-  $issuesauth = true;\n-foreach ($ISSUE_TYPES as $type => $dummy) {\n-    if (!acl_check_issue($type, '', 'write')) {\n-        $issuesauth = false;\n-        break;\n-    }\n+if ($GLOBALS['enable_help'] == 1) {\n+    $help_icon = '<a class=\"pull-right oe-help-redirect\" data-target=\"#myModal\" data-toggle=\"modal\" href=\"#\" id=\"help-href\" name=\"help-href\" style=\"color:#676666\" title=\"' . xl(\"Click to view Help\") . '\"><i class=\"fa fa-question-circle\" aria-hidden=\"true\"></i></a>';\n+} elseif ($GLOBALS['enable_help'] == 2) {\n+    $help_icon = '<a class=\"pull-right oe-help-redirect\" data-target=\"#myModal\" data-toggle=\"modal\" href=\"#\" id=\"help-href\" name=\"help-href\" style=\"color:#DCD6D0 !Important\" title=\"' . xl(\"Enable help in Administration > Globals > Features > Enable Help Modal\") . '\"><i class=\"fa fa-question-circle\" aria-hidden=\"true\"></i></a>';\n+} elseif ($GLOBALS['enable_help'] == 0) {\n+     $help_icon = '';\n }\n-\n-if ($issuesauth) {\n ?>\n-  <div style='float:left'>\n-<?php echo xlt('Issues (Injuries/Medical/Allergy)'); ?>\n-  </div>\n-  <div style='float:left;margin-left:8px;margin-top:-3px'>\n-    <?php if (acl_check('patients', 'med', '', 'write')) { ?>\n-       <a href=\"../../patient_file/summary/add_edit_issue.php\" class=\"css_button_small link_submit enc_issue\"\n-        onclick=\"top.restoreSession()\"><span><?php echo xlt('Add'); ?></span></a>\n-        <?php } ?>\n-  </div>\n-<?php } ?>\n-\n-  </td>\n- </tr>\n-\n- <tr>\n-  <td class='text' valign='top'>\n-   <textarea name='reason' cols='40' rows='12' wrap='virtual' style='width:96%'\n-    ><?php echo $viewmode ? text($result['reason']) : text($GLOBALS['default_chief_complaint']); ?></textarea>\n-  </td>\n-  <td class='text' valign='top'>\n-\n-<?php if ($issuesauth) { ?>\n-   <select class=\"form-control\" multiple name='issues[]' size='8' style='width:100%'\n-    title='<?php echo xla('Hold down [Ctrl] for multiple selections or to unselect'); ?>'>\n-<?php\n-while ($irow = sqlFetchArray($ires)) {\n-    $list_id = $irow['id'];\n-    $tcode = $irow['type'];\n-    if ($ISSUE_TYPES[$tcode]) {\n-        $tcode = $ISSUE_TYPES[$tcode][2];\n-    }\n-\n-    echo \"    <option value='\" . attr($list_id) . \"'\";\n-    if ($viewmode) {\n-        $perow = sqlQuery(\"SELECT count(*) AS count FROM issue_encounter WHERE \" .\n-        \"pid = ? AND encounter = ? AND list_id = ?\", array($pid,$encounter,$list_id));\n-        if ($perow['count']) {\n-            echo \" selected\";\n-        }\n-    } else {\n-        // For new encounters the invoker may pass an issue ID.\n-        if (!empty($_REQUEST['issue']) && $_REQUEST['issue'] == $list_id) {\n-            echo \" selected\";\n-        }\n+</head>\n+<body class=\"body_top\" <?php echo $body_javascript;?>>\n+    <div class=\"container\">\n+        <div class=\"row\">\n+            <div class=\"col-xs-12\">\n+                <!-- Required for the popup date selectors -->\n+                <div id=\"overDiv\" style=\"position:absolute; visibility:hidden; z-index:1000;\"></div>\n+                <div class=\"\">\n+                    <div class=\"page-header\">\n+                        <h2><?php echo xlt($heading_caption); ?><?php echo $help_icon; ?></h2>\n+                    </div>\n+                </div>\n+            </div>\n+        </div>\n+        <div class=\"row\">\n+            <div class=\"col-xs-12\">\n+                <form id=\"new-encounter-form\" method='post' action=\"<?php echo $rootdir ?>/forms/newpatient/save.php\" name='new_encounter'>\n+                    <fieldset>\n+                        <legend><?php echo xlt('Visit Details')?></legend>\n+                        <div id = \"visit-details\">\n+                            <div class=\"form-group \">\n+                                    <label for=\"pc_catid\" class=\"control-label col-sm-2 text-right\"><?php echo xlt('Visit Category:'); ?></label>\n+                                    <div class=\"col-sm-3\">\n+                                        <select  name='pc_catid' id='pc_catid' class='form-control col-sm-12'>\n+                                            <option value='_blank'>-- <?php echo xlt('Select One'); ?> --</option>\n+                                            <?php\n+                                            //Bring only patient ang group categories\n+                                            $visitSQL = \"SELECT pc_catid, pc_catname, pc_cattype \n+                                                       FROM openemr_postcalendar_categories\n+                                                       WHERE pc_active = 1 and pc_cattype IN (0,3) and pc_constant_id  != 'no_show' ORDER BY pc_seq\";\n+\n+                                            $visitResult = sqlStatement($visitSQL);\n+                                            $therapyGroupCategories = [];\n+\n+                                            while ($row = sqlFetchArray($visitResult)) {\n+                                                $catId = $row['pc_catid'];\n+                                                $name = $row['pc_catname'];\n+\n+                                                if ($row['pc_cattype'] == 3) {\n+                                                    $therapyGroupCategories[] = $catId;\n+                                                }\n+\n+                                                if ($catId === \"_blank\") {\n+                                                    continue;\n+                                                }\n+\n+                                                if ($row['pc_cattype'] == 3 && !$GLOBALS['enable_group_therapy']) {\n+                                                    continue;\n+                                                }\n+\n+                                                // Fetch acl for category of given encounter. Only if has write auth for a category, then can create an encounter of that category.\n+                                                $postCalendarCategoryACO = fetchPostCalendarCategoryACO($catId);\n+                                                if ($postCalendarCategoryACO) {\n+                                                    $postCalendarCategoryACO = explode('|', $postCalendarCategoryACO);\n+                                                    $authPostCalendarCategoryWrite = acl_check($postCalendarCategoryACO[0], $postCalendarCategoryACO[1], '', 'write');\n+                                                } else { // if no aco is set for category\n+                                                    $authPostCalendarCategoryWrite = true;\n+                                                }\n+\n+                                                //if no permission for category write, don't show in drop-down\n+                                                if (!$authPostCalendarCategoryWrite) {\n+                                                    continue;\n+                                                }\n+\n+                                                $optionStr = '<option value=\"%pc_catid%\" %selected%>%pc_catname%</option>';\n+                                                $optionStr = str_replace(\"%pc_catid%\", attr($catId), $optionStr);\n+                                                $optionStr = str_replace(\"%pc_catname%\", text(xl_appt_category($name)), $optionStr);\n+                                                if ($viewmode) {\n+                                                    $selected = ($result['pc_catid'] == $catId) ? \" selected\" : \"\";\n+                                                } else {\n+                                                    $selected = ($GLOBALS['default_visit_category'] == $catId) ? \" selected\" : \"\";\n+                                                }\n+\n+                                                  $optionStr = str_replace(\"%selected%\", $selected, $optionStr);\n+                                                  echo $optionStr;\n+                                            }\n+                                            ?>\n+                                        </select>\n+                                    </div>\n+                                    <?php\n+                                        $sensitivities = acl_get_sensitivities();\n+                                    if ($sensitivities && count($sensitivities)) {\n+                                        usort($sensitivities, \"sensitivity_compare\");\n+                                        ?>\n+                                        <label for=\"pc_catid\" class=\"control-label col-sm-2 text-right\"><?php echo xlt('Sensitivity:'); ?> &nbsp;<i id='sensitivity-tooltip' class=\"fa fa-info-circle text-primary\" aria-hidden=\"true\"></i></label>\n+                                        <div class=\"col-sm-3\">\n+                                        <select name='form_sensitivity' id='form_sensitivity' class='form-control col-sm-12' >\n+                                            <?php\n+                                            foreach ($sensitivities as $value) {\n+                                               // Omit sensitivities to which this user does not have access.\n+                                                if (acl_check('sensitivities', $value[1])) {\n+                                                    echo \"       <option value='\" . attr($value[1]) . \"'\";\n+                                                    if ($viewmode && $result['sensitivity'] == $value[1]) {\n+                                                        echo \" selected\";\n+                                                    }\n+\n+                                                    echo \">\" . xlt($value[3]) . \"</option>\\n\";\n+                                                }\n+                                            }\n+\n+                                            echo \"       <option value=''\";\n+                                            if ($viewmode && !$result['sensitivity']) {\n+                                                echo \" selected\";\n+                                            }\n+\n+                                            echo \">\" . xlt('None'). \"</option>\\n\";\n+                                            ?>\n+                                        </select>\n+                                        <?php\n+                                    } else {\n+                                    ?>\n+                                            \n+                                    <?php\n+                                    }\n+                                    ?>\n+                                    </div>\n+                                    <div class=\"clearfix\"></div>\n+                                </div>\n+                                <div class=\"form-group\">\n+                                    <label for='form_date' class=\"control-label col-sm-2 text-right\"><?php echo xlt('Date of Service:'); ?></label>\n+                                    <div class=\"col-sm-3\">\n+                                        <input type='text' class='form-control datepicker col-sm-12' name='form_date' id='form_date' <?php echo $disabled ?>\n+                                        value='<?php echo $viewmode ? attr(oeFormatShortDate(substr($result['date'], 0, 10))) : oeFormatShortDate(date('Y-m-d')); ?>'\n+                                        title='<?php echo xla('Date of service'); ?>'/>\n+                                    </div>\n+                                \n+                                    <div\n+                                        <?php\n+                                        if ($GLOBALS['ippf_specific']) {\n+                                            echo \" style='visibility:hidden;'\";\n+                                        } ?>>\n+                                        <label for='form_onset_date' class=\"control-label col-sm-2 text-right\"><?php echo xlt('Onset/hosp. date:'); ?> &nbsp;<i id='onset-tooltip' class=\"fa fa-info-circle text-primary\" aria-hidden=\"true\"></i></label>\n+                                        <div class=\"col-sm-3\">\n+                                            <input type='text' class='form-control datepicker col-sm-12' name='form_onset_date' id='form_onset_date'\n+                                            value='<?php echo $viewmode && $result['onset_date']!='0000-00-00 00:00:00' ? attr(oeFormatShortDate(substr($result['onset_date'], 0, 10))) : ''; ?>'\n+                                            title='<?php echo xla('Date of onset or hospitalization'); ?>' />\n+                                        </div>\n+                                    </div>\n+                                    <div class=\"clearfix\"></div>\n+                                </div>\n+                                <div class=\"form-group\"\n+                                    <?php\n+                                    if (!$GLOBALS['gbl_visit_referral_source']) {\n+                                        echo \"style='display:none'\";\n+                                    } ?>>\">\n+                                    <label  class=\"control-label col-sm-2 text-right\"><?php echo xlt('Referral Source'); ?>:</label>\n+                                    <div class=\"col-sm-3\">\n+                                        <?php echo generate_select_list('form_referral_source', 'refsource', $viewmode ? $result['referral_source'] : '', '');?>\n+                                    </div>\n+                                    <div class=\"clearfix\"></div>\n+                                </div>\n+                                <?php if ($GLOBALS['enable_group_therapy']) { ?>\n+                                <div class=\"form-group\"id=\"therapy_group_name\" style=\"display: none\">\n+                                    <label for=\"form_group\" class=\"control-label col-sm-2 text-right\"><?php echo xlt('Group name'); ?>:</label>\n+                                    <div class=\"col-sm-3\">\n+                                        <input type='text'name='form_group' class='form-control col-sm-12' id=\"form_group\"  placeholder='<?php echo xla('Click to select');?>' value='<?php echo $viewmode && in_array($result['pc_catid'], $therapyGroupCategories) ? attr(getGroup($result['external_id'])['group_name']) : ''; ?>' onclick='sel_group()' title='<?php echo xla('Click to select group'); ?>' readonly />\n+                                        <input type='hidden' name='form_gid' value='<?php echo $viewmode && in_array($result['pc_catid'], $therapyGroupCategories) ? attr($result['external_id']) : '' ?>' />\n+                                    </div>\n+                                    <div class=\"clearfix\"></div>\n+                                </div>\n+                                <?php }?>\n+                                <?php if ($GLOBALS['set_pos_code_encounter']) { ?>\n+                                <div class=\"form-group\">\n+                                    <label for='facility_id' class=\"control-label col-sm-2 text-right\"><?php echo xlt('POS Code'); ?>:</label>\n+                                    <div class=\"col-sm-8\">\n+                                        <select name=\"pos_code\" id=\"pos_code\" class='form-control col-sm-9'>\n+                                        <?php\n+                                        $pc = new POSRef();\n+                                        foreach ($pc->get_pos_ref() as $pos) {\n+                                            echo \"<option value=\\\"\" . attr($pos[\"code\"]) . \"\\\" \";\n+                                            if ($pos[\"code\"] == $result['pos_code'] || $pos[\"code\"] == $posCode) {\n+                                                echo \"selected\";\n+                                            }\n+                                            echo \">\" . text($pos['code'])  . \": \". xlt($pos['title']);\n+                                            echo \"</option>\\n\";\n+                                        }\n+                                        ?>\n+                                        </select>\n+                                    </div>\n+                                    <div class=\"clearfix\"></div>\n+                                    </div>\n+                                <?php }?>\n+                                <div class=\"form-group\">\n+                                    <label for='facility_id' class=\"control-label col-sm-2 text-right\"><?php echo xlt('Facility'); ?>:</label>\n+                                    <div class=\"col-sm-8\">\n+                                        <select name='facility_id' id='facility_id' class='form-control col-sm-9' onChange=\"bill_loc()\">\n+                                            <?php\n+                                            if ($viewmode) {\n+                                                $def_facility = $result['facility_id'];\n+                                            } else {\n+                                                $dres = sqlStatement(\"select facility_id from users where username = ?\", array($_SESSION['authUser']));\n+                                                $drow = sqlFetchArray($dres);\n+                                                $def_facility = $drow['facility_id'];\n+                                            }\n+                                            $facilities = $facilityService->getAllServiceLocations();\n+                                            if ($facilities) {\n+                                                foreach ($facilities as $iter) {\n+                                                    if ($iter['billing_location'] == 1) {\n+                                                        $posCode = $iter['pos_code'];\n+                                                    }\n+                                            ?>\n+                                            <option value=\"<?php echo attr($iter['id']); ?>\"\n+                                                <?php\n+                                                if ($def_facility == $iter['id']) {\n+                                                    echo \"selected\";\n+                                                }?>><?php echo text($iter['name']); ?>\n+                                            </option>\n+                                            <?php\n+                                                }\n+                                            }\n+                                            ?>\n+                                        </select>\n+                                    </div>\n+                                    <div class=\"clearfix\"></div>\n+                                </div>\n+                                <div class=\"form-group\">\n+                                    <label for='billing_facility' class=\"control-label col-sm-2 text-right\"><?php echo xlt('Billing Facility'); ?>:</label>\n+                                    <div id=\"ajaxdiv\" class=\"col-sm-8\">\n+                                        <?php\n+                                            billing_facility('billing_facility', $result['billing_facility']);\n+                                        ?>\n+                                    </div>\n+                                    <div class=\"clearfix\"></div>\n+                                </div>\n+                        </div>\n+                    </fieldset>\n+                    <fieldset>\n+                        <legend><?php echo xlt('Reason for Visit')?></legend>\n+                            <div class=\"form-group\">\n+                                <div class=\"col-sm-10 col-sm-offset-1\">\n+                                    <textarea name=\"reason\" id=\"reason\" class=\"form-control\" cols=\"80\" rows=\"4\" ><?php echo $viewmode ? text($result['reason']) : text($GLOBALS['default_chief_complaint']); ?></textarea>\n+                                </div>\n+                            </div>\n+                    </fieldset>\n+                    <fieldset>\n+                        <legend><?php echo xlt('Link/Add Issues (Injuries/Medical/Allergy) to Current Visit')?></legend>\n+                            <div id = \"visit-issues\">\n+                                <div class=\"form-group clearfix\">\n+                                    <div class=\"col-sm-6 col-lg-offset-3\">\n+                                        <?php\n+                                        // To see issues stuff user needs write access to all issue types.\n+                                        $issuesauth = true;\n+                                        foreach ($ISSUE_TYPES as $type => $dummy) {\n+                                            if (!acl_check_issue($type, '', 'write')) {\n+                                                $issuesauth = false;\n+                                                break;\n+                                            }\n+                                        }\n+                                        if ($issuesauth) {\n+                                        ?>\n+                                            <div class=\"col-sm-12\">\n+                                                <div class=\"col-sm-12 pull-left\" style=\"padding-bottom:5px\">\n+                                                    <div class=\"btn-group\" role=\"group\">\n+                                                        <?php if (acl_check('patients', 'med', '', 'write')) { ?>\n+                                                       <a href=\"../../patient_file/summary/add_edit_issue.php\" class=\"css_button_small link_submit enc_issue\"\n+                                                        onclick=\"top.restoreSession()\"><span><?php echo xlt('Add Issue'); ?></span></a>\n+                                                        <?php } ?>\n+                                                    </div>\n+                                                </div>\n+                                                <div class=\"col-sm-12 pull-left\">\n+                                                    <select multiple name='issues[]' class='col-sm-12'\n+                                                            title='<?php echo xla('Hold down [Ctrl] for multiple selections or to unselect'); ?>' size='6'>\n+                                                        <?php\n+                                                        while ($irow = sqlFetchArray($ires)) {\n+                                                            $list_id = $irow['id'];\n+                                                            $tcode = $irow['type'];\n+                                                            if ($ISSUE_TYPES[$tcode]) {\n+                                                                $tcode = $ISSUE_TYPES[$tcode][2];\n+                                                            }\n+                                                            echo \"    <option value='\" . attr($list_id) . \"'\";\n+                                                            if ($viewmode) {\n+                                                                $perow = sqlQuery(\"SELECT count(*) AS count FROM issue_encounter WHERE \" .\n+                                                                \"pid = ? AND encounter = ? AND list_id = ?\", array($pid, $encounter, $list_id));\n+                                                                if ($perow['count']) {\n+                                                                    echo \" selected\";\n+                                                                }\n+                                                            } else {\n+                                                                // For new encounters the invoker may pass an issue ID.\n+                                                                if (!empty($_REQUEST['issue']) && $_REQUEST['issue'] == $list_id) {\n+                                                                    echo \" selected\";\n+                                                                }\n+                                                            }\n+                                                            echo \">\" . text($tcode) . \": \" . text($irow['begdate']) . \" \" .\n+                                                            text(substr($irow['title'], 0, 40)) . \"</option>\\n\";\n+                                                        }\n+                                                        ?>\n+                                                    </select>\n+                                                </div>\n+                                                <div class=\"col-sm-12\">\n+                                                    <p><i><?php echo xlt('To link this encounter/consult to an existing issue, click the '\n+                                                    . 'desired issue above to highlight it and then click [Save]. '\n+                                                    . 'Hold down [Ctrl] button to select multiple issues.'); ?></i></p>\n+                                                </div>\n+                                            </div>\n+                                        <?php\n+                                        }\n+                                        ?>\n+                                    </div>\n+                                </div>\n+                            </div>\n+                    </fieldset>\n+                    <?php //can change position of buttons by creating a class 'position-override' and adding rule text-align:center or right as the case may be in individual stylesheets ?>\n+                    <div class=\"form-group clearfix\">\n+                        <div class=\"col-sm-12 text-left position-override\">\n+                            <button type=\"button\" class=\"btn btn-default btn-save\" onclick=\"top.restoreSession(); saveClicked(undefined);\"><?php echo xlt('Save');?></button>\n+                            <?php if ($viewmode || !isset($_GET[\"autoloaded\"]) || $_GET[\"autoloaded\"] != \"1\") { ?>\n+                                <button type=\"button\" class=\"btn btn-link btn-cancel btn-separate-left\" onclick=\"top.restoreSession(); location.href='<?php echo \"$rootdir/patient_file/encounter/encounter_top.php\";?>';\"><?php echo xlt('Cancel');?></button>\n+                            <?php } else { // not $viewmode ?>\n+                            <button class=\"btn btn-link btn-cancel btn-separate-left link_submit\" onClick=\"return cancelClicked()\">\n+                                    <?php echo xlt('Cancel'); ?></button>\n+                            <?php } // end not $viewmode ?>\n+                        </div>\n+                    </div>\n+                    <div class=\"clearfix\"></div>\n+                </form>\n+            </div>\n+        </div>\n+    </div><!--end of container div-->\n+     <br>\n+    <?php\n+    //home of the help modal ;)\n+    //$GLOBALS['enable_help'] = 0; // Please comment out line if you want help modal to function on this page\n+    if ($GLOBALS['enable_help'] == 1) {\n+        echo \"<script>var helpFile = 'common_help.php'</script>\";\n+        //help_modal.php lives in interface, set path accordingly\n+        require_once \"../../help_modal.php\";","path":"interface/forms/newpatient/common.php","position":856,"original_position":856,"commit_id":"c55867ae56d68cce81353d42e85f7cb6f674c056","original_commit_id":"c55867ae56d68cce81353d42e85f7cb6f674c056","user":{"login":"zbig01","id":12654295,"node_id":"MDQ6VXNlcjEyNjU0Mjk1","avatar_url":"https://avatars1.githubusercontent.com/u/12654295?v=4","gravatar_id":"","url":"https://api.github.com/users/zbig01","html_url":"https://github.com/zbig01","followers_url":"https://api.github.com/users/zbig01/followers","following_url":"https://api.github.com/users/zbig01/following{/other_user}","gists_url":"https://api.github.com/users/zbig01/gists{/gist_id}","starred_url":"https://api.github.com/users/zbig01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbig01/subscriptions","organizations_url":"https://api.github.com/users/zbig01/orgs","repos_url":"https://api.github.com/users/zbig01/repos","events_url":"https://api.github.com/users/zbig01/events{/privacy}","received_events_url":"https://api.github.com/users/zbig01/received_events","type":"User","site_admin":false},"body":"globals.inc.php entry to allow for 3 states for the modal \r\n\r\n````\r\narray(\r\n               '0' => xl('Hide Help Modal'),\r\n               '1' => xl('Show Help Modal'),\r\n               '2' => xl('Disable Help Modal'),\r\n           ),\r\n````\r\n","created_at":"2018-06-12T16:46:36Z","updated_at":"2018-06-12T16:46:36Z","html_url":"https://github.com/openemr/openemr/pull/1701#discussion_r194811628","pull_request_url":"https://api.github.com/repos/openemr/openemr/pulls/1701","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/openemr/openemr/pulls/comments/194811628"},"html":{"href":"https://github.com/openemr/openemr/pull/1701#discussion_r194811628"},"pull_request":{"href":"https://api.github.com/repos/openemr/openemr/pulls/1701"}},"in_reply_to_id":194795563},"pull_request":{"url":"https://api.github.com/repos/openemr/openemr/pulls/1701","id":194202693,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0MjAyNjkz","html_url":"https://github.com/openemr/openemr/pull/1701","diff_url":"https://github.com/openemr/openemr/pull/1701.diff","patch_url":"https://github.com/openemr/openemr/pull/1701.patch","issue_url":"https://api.github.com/repos/openemr/openemr/issues/1701","number":1701,"state":"open","locked":false,"title":"Restyled New Encounter Form with Help file","user":{"login":"zbig01","id":12654295,"node_id":"MDQ6VXNlcjEyNjU0Mjk1","avatar_url":"https://avatars1.githubusercontent.com/u/12654295?v=4","gravatar_id":"","url":"https://api.github.com/users/zbig01","html_url":"https://github.com/zbig01","followers_url":"https://api.github.com/users/zbig01/followers","following_url":"https://api.github.com/users/zbig01/following{/other_user}","gists_url":"https://api.github.com/users/zbig01/gists{/gist_id}","starred_url":"https://api.github.com/users/zbig01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbig01/subscriptions","organizations_url":"https://api.github.com/users/zbig01/orgs","repos_url":"https://api.github.com/users/zbig01/repos","events_url":"https://api.github.com/users/zbig01/events{/privacy}","received_events_url":"https://api.github.com/users/zbig01/received_events","type":"User","site_admin":false},"body":"New encounter form restyled , now uses the styleguide based stylesheets\r\n\r\n - Documentation/help_files/common_help.php\r\n - interface/forms/newpatient/common.php","created_at":"2018-06-12T08:28:53Z","updated_at":"2018-06-12T16:46:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"86d3fe0a5966ee30f7e4e84ca7e25408dfb98836","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":433468182,"node_id":"MDU6TGFiZWw0MzM0NjgxODI=","url":"https://api.github.com/repos/openemr/openemr/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openemr/openemr/pulls/1701/commits","review_comments_url":"https://api.github.com/repos/openemr/openemr/pulls/1701/comments","review_comment_url":"https://api.github.com/repos/openemr/openemr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openemr/openemr/issues/1701/comments","statuses_url":"https://api.github.com/repos/openemr/openemr/statuses/c55867ae56d68cce81353d42e85f7cb6f674c056","head":{"label":"zbig01:zbig01-go-25","ref":"zbig01-go-25","sha":"c55867ae56d68cce81353d42e85f7cb6f674c056","user":{"login":"zbig01","id":12654295,"node_id":"MDQ6VXNlcjEyNjU0Mjk1","avatar_url":"https://avatars1.githubusercontent.com/u/12654295?v=4","gravatar_id":"","url":"https://api.github.com/users/zbig01","html_url":"https://github.com/zbig01","followers_url":"https://api.github.com/users/zbig01/followers","following_url":"https://api.github.com/users/zbig01/following{/other_user}","gists_url":"https://api.github.com/users/zbig01/gists{/gist_id}","starred_url":"https://api.github.com/users/zbig01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbig01/subscriptions","organizations_url":"https://api.github.com/users/zbig01/orgs","repos_url":"https://api.github.com/users/zbig01/repos","events_url":"https://api.github.com/users/zbig01/events{/privacy}","received_events_url":"https://api.github.com/users/zbig01/received_events","type":"User","site_admin":false},"repo":{"id":82410111,"node_id":"MDEwOlJlcG9zaXRvcnk4MjQxMDExMQ==","name":"openemr","full_name":"zbig01/openemr","owner":{"login":"zbig01","id":12654295,"node_id":"MDQ6VXNlcjEyNjU0Mjk1","avatar_url":"https://avatars1.githubusercontent.com/u/12654295?v=4","gravatar_id":"","url":"https://api.github.com/users/zbig01","html_url":"https://github.com/zbig01","followers_url":"https://api.github.com/users/zbig01/followers","following_url":"https://api.github.com/users/zbig01/following{/other_user}","gists_url":"https://api.github.com/users/zbig01/gists{/gist_id}","starred_url":"https://api.github.com/users/zbig01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbig01/subscriptions","organizations_url":"https://api.github.com/users/zbig01/orgs","repos_url":"https://api.github.com/users/zbig01/repos","events_url":"https://api.github.com/users/zbig01/events{/privacy}","received_events_url":"https://api.github.com/users/zbig01/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zbig01/openemr","description":"Official OpenEMR repository","fork":true,"url":"https://api.github.com/repos/zbig01/openemr","forks_url":"https://api.github.com/repos/zbig01/openemr/forks","keys_url":"https://api.github.com/repos/zbig01/openemr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zbig01/openemr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zbig01/openemr/teams","hooks_url":"https://api.github.com/repos/zbig01/openemr/hooks","issue_events_url":"https://api.github.com/repos/zbig01/openemr/issues/events{/number}","events_url":"https://api.github.com/repos/zbig01/openemr/events","assignees_url":"https://api.github.com/repos/zbig01/openemr/assignees{/user}","branches_url":"https://api.github.com/repos/zbig01/openemr/branches{/branch}","tags_url":"https://api.github.com/repos/zbig01/openemr/tags","blobs_url":"https://api.github.com/repos/zbig01/openemr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zbig01/openemr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zbig01/openemr/git/refs{/sha}","trees_url":"https://api.github.com/repos/zbig01/openemr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zbig01/openemr/statuses/{sha}","languages_url":"https://api.github.com/repos/zbig01/openemr/languages","stargazers_url":"https://api.github.com/repos/zbig01/openemr/stargazers","contributors_url":"https://api.github.com/repos/zbig01/openemr/contributors","subscribers_url":"https://api.github.com/repos/zbig01/openemr/subscribers","subscription_url":"https://api.github.com/repos/zbig01/openemr/subscription","commits_url":"https://api.github.com/repos/zbig01/openemr/commits{/sha}","git_commits_url":"https://api.github.com/repos/zbig01/openemr/git/commits{/sha}","comments_url":"https://api.github.com/repos/zbig01/openemr/comments{/number}","issue_comment_url":"https://api.github.com/repos/zbig01/openemr/issues/comments{/number}","contents_url":"https://api.github.com/repos/zbig01/openemr/contents/{+path}","compare_url":"https://api.github.com/repos/zbig01/openemr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zbig01/openemr/merges","archive_url":"https://api.github.com/repos/zbig01/openemr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zbig01/openemr/downloads","issues_url":"https://api.github.com/repos/zbig01/openemr/issues{/number}","pulls_url":"https://api.github.com/repos/zbig01/openemr/pulls{/number}","milestones_url":"https://api.github.com/repos/zbig01/openemr/milestones{/number}","notifications_url":"https://api.github.com/repos/zbig01/openemr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zbig01/openemr/labels{/name}","releases_url":"https://api.github.com/repos/zbig01/openemr/releases{/id}","deployments_url":"https://api.github.com/repos/zbig01/openemr/deployments","created_at":"2017-02-18T19:15:18Z","updated_at":"2018-06-12T08:24:40Z","pushed_at":"2018-06-12T08:24:37Z","git_url":"git://github.com/zbig01/openemr.git","ssh_url":"git@github.com:zbig01/openemr.git","clone_url":"https://github.com/zbig01/openemr.git","svn_url":"https://github.com/zbig01/openemr","homepage":"http://open-emr.org/","size":404780,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openemr:master","ref":"master","sha":"18ed01245f94b7676fb3cc15c7644a241ffc10e4","user":{"login":"openemr","id":283089,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MzA4OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/283089?v=4","gravatar_id":"","url":"https://api.github.com/users/openemr","html_url":"https://github.com/openemr","followers_url":"https://api.github.com/users/openemr/followers","following_url":"https://api.github.com/users/openemr/following{/other_user}","gists_url":"https://api.github.com/users/openemr/gists{/gist_id}","starred_url":"https://api.github.com/users/openemr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openemr/subscriptions","organizations_url":"https://api.github.com/users/openemr/orgs","repos_url":"https://api.github.com/users/openemr/repos","events_url":"https://api.github.com/users/openemr/events{/privacy}","received_events_url":"https://api.github.com/users/openemr/received_events","type":"Organization","site_admin":false},"repo":{"id":679584,"node_id":"MDEwOlJlcG9zaXRvcnk2Nzk1ODQ=","name":"openemr","full_name":"openemr/openemr","owner":{"login":"openemr","id":283089,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MzA4OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/283089?v=4","gravatar_id":"","url":"https://api.github.com/users/openemr","html_url":"https://github.com/openemr","followers_url":"https://api.github.com/users/openemr/followers","following_url":"https://api.github.com/users/openemr/following{/other_user}","gists_url":"https://api.github.com/users/openemr/gists{/gist_id}","starred_url":"https://api.github.com/users/openemr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openemr/subscriptions","organizations_url":"https://api.github.com/users/openemr/orgs","repos_url":"https://api.github.com/users/openemr/repos","events_url":"https://api.github.com/users/openemr/events{/privacy}","received_events_url":"https://api.github.com/users/openemr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openemr/openemr","description":"OpenEMR is the most popular open source electronic health records and medical practice management solution. ONC certified with international usage, OpenEMR's goal is a superior alternative to its proprietary counterparts.","fork":false,"url":"https://api.github.com/repos/openemr/openemr","forks_url":"https://api.github.com/repos/openemr/openemr/forks","keys_url":"https://api.github.com/repos/openemr/openemr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openemr/openemr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openemr/openemr/teams","hooks_url":"https://api.github.com/repos/openemr/openemr/hooks","issue_events_url":"https://api.github.com/repos/openemr/openemr/issues/events{/number}","events_url":"https://api.github.com/repos/openemr/openemr/events","assignees_url":"https://api.github.com/repos/openemr/openemr/assignees{/user}","branches_url":"https://api.github.com/repos/openemr/openemr/branches{/branch}","tags_url":"https://api.github.com/repos/openemr/openemr/tags","blobs_url":"https://api.github.com/repos/openemr/openemr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openemr/openemr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openemr/openemr/git/refs{/sha}","trees_url":"https://api.github.com/repos/openemr/openemr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openemr/openemr/statuses/{sha}","languages_url":"https://api.github.com/repos/openemr/openemr/languages","stargazers_url":"https://api.github.com/repos/openemr/openemr/stargazers","contributors_url":"https://api.github.com/repos/openemr/openemr/contributors","subscribers_url":"https://api.github.com/repos/openemr/openemr/subscribers","subscription_url":"https://api.github.com/repos/openemr/openemr/subscription","commits_url":"https://api.github.com/repos/openemr/openemr/commits{/sha}","git_commits_url":"https://api.github.com/repos/openemr/openemr/git/commits{/sha}","comments_url":"https://api.github.com/repos/openemr/openemr/comments{/number}","issue_comment_url":"https://api.github.com/repos/openemr/openemr/issues/comments{/number}","contents_url":"https://api.github.com/repos/openemr/openemr/contents/{+path}","compare_url":"https://api.github.com/repos/openemr/openemr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openemr/openemr/merges","archive_url":"https://api.github.com/repos/openemr/openemr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openemr/openemr/downloads","issues_url":"https://api.github.com/repos/openemr/openemr/issues{/number}","pulls_url":"https://api.github.com/repos/openemr/openemr/pulls{/number}","milestones_url":"https://api.github.com/repos/openemr/openemr/milestones{/number}","notifications_url":"https://api.github.com/repos/openemr/openemr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openemr/openemr/labels{/name}","releases_url":"https://api.github.com/repos/openemr/openemr/releases{/id}","deployments_url":"https://api.github.com/repos/openemr/openemr/deployments","created_at":"2010-05-21T19:54:08Z","updated_at":"2018-06-12T06:56:32Z","pushed_at":"2018-06-12T08:28:53Z","git_url":"git://github.com/openemr/openemr.git","ssh_url":"git@github.com:openemr/openemr.git","clone_url":"https://github.com/openemr/openemr.git","svn_url":"https://github.com/openemr/openemr","homepage":"http://open-emr.org/","size":403533,"stargazers_count":780,"watchers_count":780,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":649,"mirror_url":null,"archived":false,"open_issues_count":207,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":649,"open_issues":207,"watchers":780,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openemr/openemr/pulls/1701"},"html":{"href":"https://github.com/openemr/openemr/pull/1701"},"issue":{"href":"https://api.github.com/repos/openemr/openemr/issues/1701"},"comments":{"href":"https://api.github.com/repos/openemr/openemr/issues/1701/comments"},"review_comments":{"href":"https://api.github.com/repos/openemr/openemr/pulls/1701/comments"},"review_comment":{"href":"https://api.github.com/repos/openemr/openemr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openemr/openemr/pulls/1701/commits"},"statuses":{"href":"https://api.github.com/repos/openemr/openemr/statuses/c55867ae56d68cce81353d42e85f7cb6f674c056"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"zbig01"}}