We are currently updating the OP Help Center content for the release of OP 19, which is a member of the certified OP 14 family of products. OP 19’s official version is 14.19.1, which you may see in your software (such as in Help > About) and in the Help Center tabs labeled 14.19. You may also notice that the version number in content and videos may not match the version of your software, and some procedural content may not match the workflow in your software. We appreciate your patience and understanding as we make these enhancements.

SQL: How Many Patients Accessed the Portal (based on Patient)

About

This report will show patients who have accessed the portal. The list is displayed based on patient and displays the patient name, parent name, patient number. If one parent has multiple children, the report will show the parent multiple times.

A sample image of this SQL report run in the Database Viewer is shown below:

Caveats

  • This will list a parent with 3 children 3 times.
  • Add 'and (status_pat='ACTIVE')' to the SQL to show only active patients.

Code

To highlight and copy the code below to your clipboard, simply click the Copy button.

select patno, fname, lname, first_name, last_name,  email_addr from  register inner join register_contact on register.patno = register_contact.patno inner join contact on contact.id = register_contact.contact_id left outer join web_user on web_user.contact_id = register_contact.contact_id  where patno is not null and REGSTRTN_IND = 1