We are currently updating the OP Help Center content for the release of OP 14.19 or OP 19. OP 19 is a member of the certified OP 14 family of products (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: Asthma (Persistent) on Problem List

About

This report identifies active patients with a coded diagnosis of persistent asthma on their problem list (either active or inactive problem status).

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

Caveats

  • The problem list item must have either or both a SNOMED code or ICD-10 code consistent with persistent asthma in their problem list.  Simply having “asthma” listed without the code will not pull the patient into the list.
  • The code must be in the problem list.

Code

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

select patno, fname,lname,note1,problem_list, icd_1, snomed1, severity from chartnotes

inner join register on register.patno = chartnotes.patno

 where section_subheading = 'PAST MEDICAL HISTORY' and 

 (icd_1 like ('J45.%')  or snomed1 in ("426656000","426979002","427295004"))


and patno > 99
and status_pat ='ACTIVE'