info@ismena.com
Ismena websiteIsmena websiteIsmena websiteIsmena website
  • Home
  • About us
  • Technologies
    • Cloud Services
      • Google Cloud Platform
        • Networking
        • Compute
        • Storage
        • SAP on GCP
        • Google Maps
        • Data Center Modernization
    • Infrastructure
      • iSolution Services
      • Unified Communication
      • Network Security
      • Access Security & Control
      • Computing Platforms
      • Structured Cabling Infrastructure
      • Datacenter Infrastructure
      • Networking Infrastructure
      • Retail Analytics
      • Cloud Infrastructure
    • Integration
      • Apigee
      • IBM
      • Custom Connectors
      • UnifAI
    • Security
      • Security Consulting Services
      • Security Solutions
    • Data & AI
      • BigQuery, Looker
      • Gemini
    • Collaboration Tools
      • Google Workspace For Enterprise
    • ERP-CRM
      • Odoo
      • Salesforce
      • SAP on GCP
    • DevOps
      • GCP
      • SonarSource
    • Managed Service Provider
      • Managed Service Provider
    • App Development
      • App Development
    • Open Banking
      • Open banking
    • Chrome Devices
  • Unplugged Podcast
  • Blog
    • Success Stories
    • News
    • Articles
  • Careers
  • Contact Us

Technologies

Integration

Custom Connectors

Explore All Connectors

NHS OpenPrescribing Connector

NHS OpenPrescribing

Connector Details

Type

Virtual machines, Single VM , BYOL

Runs on

Google Compute Engine

Last Update

24 October, 2024

Category

Overview

Documentation

Pricing

Support

Overview

The NHS OpenPrescribing Connector facilitates seamless integration with the OpenPrescribing API, providing access to prescribing spending data and related information for the NHS in England. This includes total spending, quantity, items, drug details, organization codes, list sizes, ASTRO-PUs, and geographical boundaries specific to NHS England’s healthcare system. The connector acts as a proxy to streamline data retrieval, supporting actions for spending by code, spending by organization, drug details, organization codes, list size and ASTRO-PUs, and location data. Tailored for Google Cloud Platform (GCP), this connector enables efficient data processing and analysis for UK healthcare data.

Integration Overview

This document provides a detailed guide for each integration point, its purpose, configuration, and workflow support using the NHS OpenPrescribing Connector on GCP. The connector simplifies access to prescribing data, enabling applications to retrieve spending, drug, and organizational information for analytics, reporting, or academic research. Data can be retrieved in CSV or JSON format by appending &format=csv or &format=json to the URL. For academic use, please cite: OpenPrescribing.net, Bennett Institute for Applied Data Science, University of Oxford, 2025.

Supported Integration Action Points

  • getSpendingByCode: Retrieves total prescribing spending, quantity, and items by month for specified BNF codes.
  • getSpendingByOrg: Retrieves spending and items by organization (Sub-ICB Location, practice, PCN, ICB, or Regional Team) by month.
  • getBnfCode: Searches for BNF sections, chemicals, or presentations by name or code.
  • getOrgCode: Searches for Sub-ICB Locations or practices by code or name.
  • getOrgDetails: Retrieves list size or ASTRO-PU details for Sub-ICB Locations or practices for all available months.
  • getOrgLocation: Retrieves GeoJSON boundaries for Sub-ICB Locations or approximate locations for practices.

Detailed Integration Documentation

Spending by Code Retrieval

Action getSpendingByCode
Purpose Retrieves a comprehensive list of total prescribing spending, quantity, and items by month for specified BNF codes over the last five years. This serves as the primary entry point for accessing aggregated prescribing data.
Parameters
  • Required: None
  • Optional:
    • code: Comma-separated list of BNF codes (section, chemical, or presentation) (string, e.g., 0212000AA,0212000B0)
    • format: Response format (csv or json) (string, e.g., json)
Configuration Ensure the connector is configured with the base URL via CONNECTOR_ENV_OPENPRESCRIBING_BASE_URL environment variable set to https://openprescribing.net/api/1.0. Deploy on GCP using Cloud Functions or App Engine, and configure the environment variable in the GCP Console.
Output JSON array of objects with:
  • date, actual_cost, total_quantity, total_items, bnf_code
  • Failure: Returns error details (e.g., error-type: invalid-bnf-code)
Workflow Example
  • Deploy the connector on GCP Cloud Functions with the base URL configured.
  • Execute the getSpendingByCode action with code=0212000AA using a Cloud Function trigger or API Gateway.
  • Process the response in BigQuery for trend analysis or store in Cloud Storage for further processing.

Spending by Organization Retrieval

Action getSpendingByOrg
Purpose Retrieves spending and items by organization (Sub-ICB Location, practice, PCN, ICB, or Regional Team) by month over the last five years. Helps users obtain targeted organizational prescribing data for analysis.
Parameters
  • Required:
    • org_type: Type of organization (sicbl, practice, pcn, icb, regional_team) (string, e.g., "sicbl")
    • code: BNF code (section, chemical, or presentation) (string, e.g., "0212000AA")
  • Optional:
    • org: Organization code (string, e.g., "15N")
    • date: Specific date (YYYY-MM-DD) (string, e.g., "2023-09-01"). Required for practice org_type if org is not specified.
    • format: Response format (csv or json) (string, e.g., "json")
Configuration Ensure the connector is configured with the base URL via CONNECTOR_ENV_OPENPRESCRIBING_BASE_URL. Use GCP Secret Manager to securely store sensitive parameters if needed. Deploy on GCP Cloud Run for scalability.
Output JSON array of objects with:
  • date, org_code, actual_cost, total_items, bnf_code
  • Failure: Returns error details (e.g., error-type: invalid-parameters)
Workflow Example
  • Deploy the connector on GCP Cloud Run with the base URL configured.
  • Execute the getSpendingByOrg action with org_type=sicbl, code=0212000AA, and org=15N via an HTTP request.
  • Store the response in BigQuery for comparative analysis or use Dataflow for real-time processing.

Drug Details Retrieval

Action getBnfCode
Purpose Searches for BNF sections, chemicals, or presentations by name or code (case-insensitive). Allows tailored searches for drug information to support prescribing analysis.
Parameters
  • Required:
    • q: Search term for BNF name or code (string, e.g., "lipid")
  • Optional:
    • exact: If true, returns exact matches only (boolean, e.g., true)
    • format: Response format (csv or json) (string, e.g., "json")
Configuration Configure the connector with the base URL via CONNECTOR_ENV_OPENPRESCRIBING_BASE_URL. Deploy on GCP App Engine for reliable API access.
Output JSON array of objects with:
  • code, name, type
  • Failure: Returns error details (e.g., error-type: invalid-search-term)
Workflow Example
  • Deploy the connector on GCP App Engine with the base URL configured.
  • Execute the getBnfCode action with q=lipid using an API Gateway endpoint.
  • Save the results in Firestore for drug reference or validation in a web application.

Organization Codes Retrieval

Action getOrgCode
Purpose Searches for Sub-ICB Locations or practices by code or name. Helps users validate organization codes or build selection interfaces for applications.
Parameters
  • Required:
    • q: Search term for organization code or name (string, e.g., "Beaumont")
  • Optional:
    • org_type: Organization type (CCG or practice) (string, e.g., "CCG")
    • exact: If true, returns exact matches only (boolean, e.g., true)
    • format: Response format (csv or json) (string, e.g., "json")
Configuration Configure the connector with the base URL via CONNECTOR_ENV_OPENPRESCRIBING_BASE_URL. Use GCP Cloud Functions for serverless execution.
Output JSON array of objects with:
  • code, name, org_type
  • Failure: Returns error details (e.g., error-type: invalid-search-term)
Workflow Example
  • Deploy the connector on GCP Cloud Functions with the base URL configured.
  • Execute the getOrgCode action with q=Beaumont via a Cloud Function trigger.
  • Use the codes to populate a selection dropdown in a GCP-hosted web application.

2.5 List Size and ASTRO-PUs Retrieval

Action getOrgDetails
Purpose Retrieves list size or ASTRO-PU details for Sub-ICB Locations or practices by code or name for all available months. This enables detailed organizational metrics for analysis.
Parameters
  • Required:
    • org_type: Organization type (ccg or practice) (string, e.g., "ccg")
    • keys: Comma-separated list of fields to return (total_list_size, astro_pu_items, astro_pu_cost) (string, e.g., "total_list_size,astro_pu_cost")
  • Optional:
    • org: Organization code (e.g., Sub-ICB Location or practice code) (string, e.g., "15N")
    • format: Response format (csv or json) (string, e.g., "json")
Configuration Configure the connector with the base URL via CONNECTOR_ENV_OPENPRESCRIBING_BASE_URL. Deploy on GCP Cloud Run for scalability and use Secret Manager for secure parameter storage.
Output
  • Successful: Returns a JSON array of objects with:
    • date: Date of the data (string, e.g., "2023-09-01")
    • org_code: Organization code (string, e.g., "15N")
    • total_list_size: Total list size (integer, e.g., 10000)
    • astro_pu_items: ASTRO-PU items (integer, e.g., 500)
    • astro_pu_cost: ASTRO-PU cost (float, e.g., 12345.67)
  • Failure: Returns error details (e.g., error-type: invalid-parameters)
Workflow Example
  • Deploy the connector on GCP Cloud Run with the base URL configured.
  • Execute the getOrgDetails action with org_type=ccg and keys=total_list_size,astro_pu_cost via an HTTP request.
  • Store the response in BigQuery for population-based analysis or normalization.

2.6 Location Data Retrieval

Action getOrgLocation
Purpose Retrieves GeoJSON boundaries for Sub-ICB Locations or approximate locations for practices. This enables geographical integration for mapping or visualization in GCP-hosted applications.
Parameters
  • Required: None
  • Optional:
    • org_type: Organization type (ccg or practice) (string, e.g., "ccg")
    • q: Comma-separated list of organization codes (string, e.g., "99H,P87003")
    • format: Response format (json only for GeoJSON) (string, e.g., "json")
Configuration Configure the connector with the base URL via CONNECTOR_ENV_OPENPRESCRIBING_BASE_URL. Deploy on GCP Cloud Functions and integrate with Google Maps API for visualization.
Output
  • Successful: Returns a JSON object with:
    • type: FeatureCollection (string, e.g., "FeatureCollection")
    • features: Array of GeoJSON features, each with:
      • type: Feature type (string, e.g., "Feature")
      • geometry: Object with type (string, e.g., "Point") and coordinates (array of numbers)
      • properties: Object with code (string, e.g., "15N") and name (string, e.g., "Gloucestershire CCG")
  • Failure: Returns error details (e.g., error-type: invalid-org-code)
Workflow Example
  • Deploy the connector on GCP Cloud Functions with the base URL configured.
  • Execute the getOrgLocation action with org_type=ccg and q=15N using a Cloud Function trigger.
  • Use the GeoJSON data with Google Maps API to plot boundaries or store in BigQuery for spatial analysis.

Workflow Creation with the Connector

Example Workflow: Prescribing Spending and Organizational Analysis

Retrieve Drug Details
  • Use the getBnfCode action with q=lipid to fetch relevant BNF codes.
  • Identify target codes (e.g., "0212000AA" for Rosuvastatin).
  • Store results in Firestore for reference.
Query Spending by Code
  • Execute the getSpendingByCode action with code=0212000AA to fetch aggregated spending data.
  • Process the response in BigQuery to display trends in a Data Studio dashboard.
Perform Spending by Organization
  • Use the getSpendingByOrg action with org_type=sicbl, code=0212000AA, and org=15N to retrieve organizational data.
  • Save the results in Cloud Storage for comparative reporting.
Explore Organizational Details
  • Execute the getOrgDetails action with org_type=ccg, org=15N, and keys=total_list_size,astro_pu_cost to fetch metrics.
  • Analyze list sizes and costs in BigQuery for normalization.
Enhance with Location Data
  • Execute the getOrgLocation action with org_type=ccg and q=15N to fetch GeoJSON boundaries.
  • Integrate the data with Google Maps API in a GCP-hosted web application for improved visualization.

Assumptions Made

  • Authentication: The OpenPrescribing API currently requires no API key, but the documentation notes this may change. The connector assumes no authentication is needed unless specified otherwise by the API provider. If authentication is introduced, GCP Secret Manager can be used to manage API keys securely.
  • Deployment Environment: The connector is assumed to be deployed on GCP services like Cloud Functions, Cloud Run, or App Engine, based on the need for serverless or scalable solutions. Specific deployment details (e.g., runtime, memory) are not specified and should be configured based on application needs.
  • Error Handling: Error responses are assumed to follow the format specified in the OpenAPI schema (e.g., “error-type” for specific errors). Detailed error codes beyond HTTP 400 are not provided in the YAML, so generic error handling is assumed.
  • GeoJSON Integration: The GeoJSON output from getOrgLocation is assumed to be compatible with Google Maps API for visualization, as it is a common use case for GeoJSON data on GCP.

Pricing

Request a Quote

Support

For Technical support please contact us on

custom-connectors-support@isolutions.sa

iSolution logo - white - transparent 250 px

iSolution logo - white - transparent 250 px

A tech solution company dedicated to providing innovation thus empowering businesses to thrive in the digital age.

  • Home
  • About us
  • Blog
  • Careers
  • Success Stories
  • News
  • Articles
  • Contact Us
  • Terms and conditions
  • Privacy Policy
© Copyright 2024 iSolution | All Rights Reserved
  • Home
  • About us
  • Technologies
    • Cloud Services
      • Google Cloud Platform
        • Networking
        • Compute
        • Storage
        • SAP on GCP
        • Google Maps
        • Data Center Modernization
    • Infrastructure
      • iSolution Services
      • Unified Communication
      • Network Security
      • Access Security & Control
      • Computing Platforms
      • Structured Cabling Infrastructure
      • Datacenter Infrastructure
      • Networking Infrastructure
      • Retail Analytics
      • Cloud Infrastructure
    • Integration
      • Apigee
      • IBM
      • Custom Connectors
      • UnifAI
    • Security
      • Security Consulting Services
      • Security Solutions
    • Data & AI
      • BigQuery, Looker
      • Gemini
    • Collaboration Tools
      • Google Workspace For Enterprise
    • ERP-CRM
      • Odoo
      • Salesforce
      • SAP on GCP
    • DevOps
      • GCP
      • SonarSource
    • Managed Service Provider
      • Managed Service Provider
    • App Development
      • App Development
    • Open Banking
      • Open banking
    • Chrome Devices
  • Unplugged Podcast
  • Blog
    • Success Stories
    • News
    • Articles
  • Careers
  • Contact Us
Ismena website

Register To Palo Alto & iSolution Event

Register to IBM x iSolution Event

Register to Gemini in Action Workshop

[forminator_form id=”14485″]

Registration To Amman Unplugged Event

[forminator_form id=”14419″]

Register to Gemini in Action Workshop

[forminator_form id=”14298″]

Tech and Culture Riyadh

[forminator_form id=”13094″]