![Page 1: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/1.jpg)
![Page 2: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/2.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
![Page 3: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/3.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
PHARMAC / TE PĀTAKA WHAIORANGA
Our objective
“…to secure for eligible people in need of pharmaceuticals, the best health outcomes that are reasonably achievable from pharmaceutical treatment and from within the amount of funding provided.”
New Zealand Public Health and Disability Act 2000
![Page 4: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/4.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
PHARMAC Environment
• SAS 9.4
• SAS Enterprise Guide 7.15
• SAS Visual Analytics 7.3
• SAS Visual Statistics 7.3
![Page 5: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/5.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
Pharmaceutical Data
https://www.health.govt.nz/nz-health-statistics/national-collections-and-surveys/collections/pharmaceutical-collection
![Page 6: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/6.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
Type 2 Diabetes is the
single biggest medical
‘equity’ issue we are
facing in New Zealand.Dr Bryan Betty - PHARMAC
A rising tide of type 2 diabetes in younger people
![Page 7: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/7.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
Diabetes Treatment
Progression
M= Metformin
S = Sulphonylurea
I = Insulin
![Page 8: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/8.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
Sankey
1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node. The same event can appear at multiple nodes in the diagram.
2 Links between nodes make up the paths in the diagram. The width of each
link can represent either the frequency of the path or the value of a weight measure.
3 Drop-off links are links that end at the current node. Drop-off links are displayed only if some links continue onward from the current node.
Parts of a Sankey Diagram
![Page 9: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/9.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
SAS EG Sankey code
/*--Render the Diagram--*/
ods graphics / reset attrpriority=color width=5in height=3in
imagename='Sankey_2_940';
footnote j=l 'SAS 9.40';
proc sgplot data=sankey2 noborder noautolegend nocycleattrs;
styleattrs datacontrastcolors=(darkred blue cx5f9f1f)
datacolors=(darkred blue cx5f9f1f);
series x=x y=y / group=id lineattrs=(pattern=solid thickness=12)
nomissinggroup transparency=0.8 smoothconnect;
series x=x y=y / group=id2 lineattrs=(pattern=solid thickness=62 color=cx5f9f1f)
nomissinggroup transparency=0.8 smoothconnect;
highlow y=y2 low=xl high=xh / highlabel=hlabel lowlabel=llabel type=bar
intervalbarwidth=10 group=id transparency=0.3 nooutline
labelattrs=(color=black size=10 weight=bold);
highlow y=y3 low=xl high=xh / highlabel=hlabel lowlabel=llabel type=bar
intervalbarwidth=62 group=id2 transparency=0.3 nooutline
fillattrs=(color=cx5f9f1f) labelattrs=(color=black size=10 weight=bold);
scatter x=xlbl y=ylbl / datalabel=label datalabelpos=topright markerattrs=(size=0)
datalabelattrs=(size=12 weight=bold);
series x=xln y=yln / group=lid nomissinggroup lineattrs=(color=black);
scatter x=xa y=ya / datalabel=anno datalabelpos=center
markerattrs=(symbol=circlefilled color=lightblue size=18)
datalabelattrs=(size=12 weight=bold);
xaxis min=0 max=1 offsetmin=0 offsetmax=0 display=none;
yaxis min=0 max=1 offsetmin=0 offsetmax=0 display=none;
run;
footnote;
![Page 10: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/10.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
SAS Visual Analytics® Sankey
• Event
• Sequence Order
• Transaction Identifier
• Class of treatment
• Years since starting treatment
• NHI person identifier
• BGTOnly = Blood Glucose Testing only
• M= Metformin
• S = Sulphonylurea
• I = Insulin
![Page 11: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/11.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
First AttemptIs this
year 1?
![Page 12: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/12.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
The issue
MASTER_ENCRYPTED_HCU_ID FYR First_FYR Years_from_Start AlignedTypeCombAdj
/QiRj9KBRpA 2012 2012 0 M -> 0 YR
/QiRj9KBRpA 2013 2012 1 M -> 1 YR
/QiRj9KBRpA 2017 2012 5 I+OralAH -> 5 YR
![Page 13: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/13.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
Some Data Manipulation
Give everyone a -1 year bucket.
MASTER_ENCRYPTED_HCU_ID First_FYR FYR Years_from_Start AlignedTypeCombAdj
/QiRj9KBRpA 2012 2011 -1 None -1 YR
/QiRj9KBRpA 2012 2012 0 M -> 0 YR
/QiRj9KBRpA 2012 2013 1 M -> 1 YR
/QiRj9KBRpA 2012 2014 2 None 2 YR
/QiRj9KBRpA 2012 2015 3 None 3 YR
/QiRj9KBRpA 2012 2016 4 None 4 YR
/QiRj9KBRpA 2012 2017 5 I+OralAH -> 5 YR
![Page 14: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/14.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
A better product – with a sense of timeStart Year Year 1 Year 2 Year 3
What about year
-1?
![Page 15: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/15.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
Splitting the start by gender
![Page 16: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/16.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
With paths
![Page 17: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/17.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
Video
![Page 18: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/18.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
When we don’t have
facts, all we can hope for
is combining data with
assumptions to make
reasonable decisions. Cassie Kozyrkov
![Page 19: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/19.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
Final thoughts
![Page 20: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/20.jpg)
PHARMAC / TE PĀTAKA WHAIORANGA
Further Reading
Sankey Diagrams in SAS Visual Analytics® - 2015
Taking the Path More Travelled – SAS Visual
Analytics® and Path Analysis - 2015
Sankey Diagram- A Compelling, Convenient, and
Informational Path Analysis with SAS Visual
Analytics® - 2017
![Page 21: PHARMAC / TE - SAS€¦ · PHARMAC / TE PĀTAKA WHAIORANGA Sankey 1 Nodes contain the events in each path. The node displays the width of each link that enters and exits the node](https://reader030.vdocuments.us/reader030/viewer/2022041107/5f0a50897e708231d42b0c8a/html5/thumbnails/21.jpg)
Tēnā koutou katoa
Contact Details: [email protected]
Jason @ LinkedIn
• Website – www.pharmac.govt.nz
• Twitter - PHARMACnz
• Facebook - PHARMACnz
• YouTube - PHARMACgovtnz