Portal Patient revising Profile Demographics broken

Situation
When a patient is revising Profile Demographics an error shows up.

OpenEMR Version
I’m using OpenEMR version latest with pre-patch from @sjpadgett

Browser:
I’m using: Chrome

Operating System
I’m using: Win 10

Logs
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 2 column 1 of the JSON data

{"success":false,"message":"DataAdapter (default) Error Selecting SQL: Unknown column 'patient_data.interpretter' in 'field list' (retry attempts: 0)","errors":[],"stackTrace":["0 \/var\/www\/portal\/patient\/fwk\/libs\/verysimple\/Phreeze\/DataSet.php(137): DataAdapter->Select('select\\n\\t\\t\\t `pat...')","1 \/var\/www\/portal\/patient\/fwk\/libs\/verysimple\/Phreeze\/DataSet.php(109): DataSet->_verifyRs()","2 \/var\/www\/portal\/patient\/fwk\/libs\/verysimple\/Phreeze\/DataSet.php(277): DataSet->Next()","3 \/var\/www\/portal\/patient\/libs\/Controller\/PatientController.php(124): DataSet->ToObjectArray(false, Array)","4 \/var\/www\/portal\/patient\/libs\/Controller\/PatientController.php(83): PatientController->startupQuery('3')","5 \/var\/www\/portal\/patient\/fwk\/libs\/verysimple\/Phreeze\/Dispatcher.php(169): PatientController->ListView()","6 \/var\/www\/portal\/patient\/index.php(52): Dispatcher::Dispatch(Object(Phreezer), Object(SavantRenderEngine), '', NULL, Object(GenericRouter))","7 {main}"]}
<div class="container">

    <h1>Oh Snap!</h1>

    <!-- this is used by app.js for scraping -->
    <!-- ERROR Error 2: Invalid argument supplied for foreach() /ERROR -->

    <h3 onclick="$('#stacktrace').show('slow');" class="well" style="cursor: pointer;">Error 2: Invalid argument supplied for foreach()</h3>

    <p>You may want to try returning to the the previous page and verifying that all fields have been filled out correctly.</p>

    <p>If you continue to experience this error please contact support.</p>

    <div id="stacktrace" class="well hide">
        <p style="font-weight: bold;">Stack Trace:</p>
                    <p style="white-space: nowrap; overflow: auto; padding-bottom: 15px; font-family: courier new, courier; font-size: 8pt;"><pre>#0 /var/www/portal/patient/libs/Controller/PatientController.php(84): Includer::IncludeException(2, 'Invalid argumen...', '/var/www/portal...', 84, Array)
#1 /var/www/portal/patient/fwk/libs/verysimple/Phreeze/Dispatcher.php(169): PatientController-&gt;ListView()
#2 /var/www/portal/patient/index.php(52): Dispatcher::Dispatch(Object(Phreezer), Object(SavantRenderEngine), '', NULL, Object(GenericRouter))
#3 {main}</pre></p>
            </div>

</div> <!-- /container -->

<!-- footer -->
<div class="container">
    <hr>
    <footer>
        <p class="muted">
            <small>Onsite Patient Portal Rel v5.0.2 Copyright &copy; 2020 By
                sjpadgett@gmail.com
            </small>
        </p>
    </footer>
</div>
</body>
</html>```

@madmax
Looks like you’ve deleted Error Selecting SQL: Unknown column ‘patient_data.interpretter’ in DEM layout.
You should never delete from DEM layout but instead hide with UOR!
Need to add back all deleted for portal profile to work. If needed check the demo for values.

Is there some SQL i can run to fix this?

You can look at the sql/database.sql maybe.

1 Like

Using the demo site I was able to compare and just re-adding the fields as they are on the demo back into the layout and saving was enough! All working again.

Thought that’s what I said! If you want to exclude from portal then use the ‘Exclude from Portal’ option for fields to exclude
You can also add the UOR ‘unused’ for core demographics…

Will they ever be adding a more dynamic system with the demographics in the future?

To where it can see whats in the DB rather then statically expect it? Not sure how hard that is to implement but would be nice as a feature down the line… one day :slight_smile: