Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calculating AHRQ PQIs in Stata

    I have a database of patient-level discharges and I am trying to calculate AHRQ Prevention Quality Indicators in Stata. For each discharge I want to generate new variable for each PQI that is coded "0" No or "1" Yes.

    The attached is example code I generated for calculating PQI 1, and it works as indented. However, there are multiple PQIs and some of them have hundreds of diagnosis codes across pdx (primary diagnoses) and sdx# (secondary diagnoses 1-15). How do I efficiently code this? I looked into macros, but couldn't figure out how to specify a long list of values (>500) for a particular variable.

    Click image for larger version

Name:	Screenshot 2023-07-12 at 4.39.40 PM.png
Views:	1
Size:	54.5 KB
ID:	1720251
Working...
X