Skip to content

Commit

Permalink
Update opioidspercentimsolid.json
Browse files Browse the repository at this point in the history
added "p" to SQL
  • Loading branch information
richiecroker committed Oct 23, 2023
1 parent cf70f5e commit fa57982
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"numerator_type": "custom",
"numerator_columns": "SUM(ome_dose) AS numerator",
"numerator_from":[
"{measures}.vw__opioids_total_dmd",
"{measures}.vw__opioids_total_dmd p",
"INNER JOIN {dmd}.vmp vmp ON CONCAT(SUBSTR(p.bnf_code,0,9),'AA', SUBSTR(p.bnf_code,-2), SUBSTR(p.bnf_code,-2)) = vmp.bnf_code -- joins prescribing data to vmp table using generic BNF code \n",
"INNER JOIN {dmd}.vpi AS vpi ON vmp.id = vpi.vmp -- joins vmp to vpi table to get ingredient strengths (strnt_nmrtr_val) \n",
"INNER JOIN {dmd}.ont AS ont ON vmp.id = ont.vmp -- joins vmp to ont table to get formulation codes \n",
Expand All @@ -32,7 +32,7 @@
"denominator_type": "custom",
"denominator_columns": "SUM(ome_dose) AS denominator",
"denominator_from":[
"{measures}.vw__opioids_total_dmd",
"{measures}.vw__opioids_total_dmd p",
"INNER JOIN {dmd}.vmp vmp ON CONCAT(SUBSTR(p.bnf_code,0,9),'AA', SUBSTR(p.bnf_code,-2), SUBSTR(p.bnf_code,-2)) = vmp.bnf_code -- joins prescribing data to vmp table using generic BNF code \n",
"INNER JOIN {dmd}.vpi AS vpi ON vmp.id = vpi.vmp -- joins vmp to vpi table to get ingredient strengths (strnt_nmrtr_val) \n",
"INNER JOIN {dmd}.ont AS ont ON vmp.id = ont.vmp -- joins vmp to ont table to get formulation codes \n",
Expand Down

0 comments on commit fa57982

Please sign in to comment.