#715: NextD request on mapping payer_type variable --------------------------+----------------------- Reporter: afurmanchuck | Owner: nsmith Type: problem | Status: assigned Priority: critical | Milestone: Component: data-stds | Resolution: Keywords: | Blocked By: Blocking: 713 | --------------------------+-----------------------
Comment (by xsong): KUMC uses the following Oracle sql to generate statistics of primary payer coverage w.r.t. encounter types to assess the magnitude of payer mapping problem: {{{ with all_enc as ( select count(distinct ENCOUNTERID) overall from &&PCORNET_CDM.ENCOUNTER ) ,collect_cnt as ( select ENC_TYPE ,count(distinct ENCOUNTERID) Enc_Cnt ,sum(case when PAYER_TYPE_PRIMARY is not null then 1 else 0 end) With_Primary_Payor_Cnt from &&PCORNET_CDM.ENCOUNTER group by ENC_TYPE ) select cnt.ENC_TYPE ,cnt.Enc_Cnt ,round(cnt.Enc_Cnt/ae.overall,3) Enc_Prop ,cnt.With_Primary_Payor_Cnt ,round(cnt.With_Primary_Payor_Cnt/cnt.Enc_Cnt,3) With_Primary_Payor_Prop from collect_cnt cnt cross join all_enc ae order by cnt.Enc_Cnt desc ; }}} And the output in the console looks like: ||Enc_Type||Enc_Cnt ||Enc_Prop||With_Primary_Payor_Cnt||With_Primary_Payor_Prop|| ||OA ||18,098,859 ||63.6% ||1,190,028 ||6.6% || ||**AV** ||7,845,401 ||27.6% ||**3,789,460** ||48.3% || ||OT ||961,490 ||3.4% ||271,384 ||28.2% || ||UN ||893,362 ||3.1% ||3,693 ||0.4% || ||**ED** ||325,843 ||1.1% ||147,606 ||45.3% || ||**IP** ||179,686 ||0.6% ||102,105 ||56.8% || ||**EI** ||104,863 ||0.4% ||62,056 ||59.2% || ||**IS** ||49,716 ||0.2% ||941 ||1.9% || ||**OS** ||5,401 ||0.0% ||4,973 ||92.1% || The types of encounters used for NextD are highlighted. -- Ticket URL: <http://informatics.gpcnetwork.org/trac/Project/ticket/715#comment:18> gpc-informatics <http://informatics.gpcnetwork.org/> Greater Plains Network - Informatics _______________________________________________ Gpc-dev mailing list Gpc-dev@listserv.kumc.edu http://listserv.kumc.edu/mailman/listinfo/gpc-dev