An R script to extract a year of "Finalised Secondary Care Medicines Data (SCMD) with indicative price" data directly from the NHSBSA Open Data Portal (ODP)
The time period of the API call can be changed. The API call may be adapted to extract other data from the ODP.
- Open Power BI
- Select "Get data from other sources"
- Double click "R script"
- Copy the contents of "dashboard_olympics_May25_API_call.R" into the box which appears
- Click "Ok"
In order for this R script to work in Power BI, all relevant R packages must be installed locally.