From d8c21b39bee6e10c490afeab33e491c5f8e33058 Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Tue, 20 Feb 2024 14:11:11 +0000 Subject: [PATCH] rename --- Tutorial.ipynb | 1733 +++------------------------------- docs/retrieving-a-dataset.md | 2 +- docs/updating-a-dataset.md | 2 +- 3 files changed, 114 insertions(+), 1623 deletions(-) diff --git a/Tutorial.ipynb b/Tutorial.ipynb index 5adc832..9ba1922 100644 --- a/Tutorial.ipynb +++ b/Tutorial.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "id": "fa7b9741", "metadata": {}, "outputs": [], @@ -11,10 +11,10 @@ "import json\n", "\n", "\n", - "client_id = \"Nout1YMmBcNBlGUb0fUdZhAE7tnplYttRf7mPXQO\"\n", - "app_id = \"NgUSJVWBGlelGLVJITtA0iATmN0QF8xffWKwGcaw\"\n", + "client_id = \"r9f9qDYkoRA2RwNu5Eni26pZhwxlFxinIosyfODL\"\n", + "app_id = \"wdG4zPgkFbP0CYStjx8tCpa4ncCSBaORcX0E4l8Z\"\n", "\n", - "api_path = \"http://localhost:8000/api/v1\"\n", + "api_path = \"https://api.dev.hdruk.cloud/api/v1\"\n", "\n", "\n", "headers = {\n", @@ -28,7 +28,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 2, "id": "d28497d4", "metadata": {}, "outputs": [ @@ -38,8 +38,8 @@ "text": [ "{\n", " \"message\": \"created\",\n", - " \"data\": 876,\n", - " \"version\": 877\n", + " \"data\": 10,\n", + " \"version\": 12\n", "}\n" ] } @@ -53,7 +53,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 3, "id": "8c59364c", "metadata": {}, "outputs": [ @@ -63,7 +63,7 @@ "201" ] }, - "execution_count": 6, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -74,20 +74,19 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 4, "id": "aeeebe94", "metadata": {}, "outputs": [ { - "ename": "KeyError", - "evalue": "'data'", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[22], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m dataset_id \u001b[38;5;241m=\u001b[39m \u001b[43mresponse\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mjson\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mdata\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\n\u001b[1;32m 2\u001b[0m dataset_id\n", - "\u001b[0;31mKeyError\u001b[0m: 'data'" - ] + "data": { + "text/plain": [ + "10" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ @@ -97,7 +96,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 9, "id": "f048faa2", "metadata": { "scrolled": false @@ -107,12 +106,11 @@ "name": "stdout", "output_type": "stream", "text": [ - "500\n" + "200\n" ] } ], "source": [ - "dataset_id = 876\n", "response = requests.get(\n", " f\"{api_path}/integrations/datasets/{dataset_id}\", headers=headers\n", ")\n", @@ -121,7 +119,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 10, "id": "887851fc", "metadata": {}, "outputs": [ @@ -130,949 +128,77 @@ "output_type": "stream", "text": [ "{\n", - " \"code\": 500,\n", - " \"message\": \"Dataset with id=876 cannot be found\",\n", - " \"details\": {\n", - " \"exception\": \"Exception\",\n", - " \"trace\": [\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Routing/Controller.php\",\n", - " \"line\": 54,\n", - " \"function\": \"show\",\n", - " \"class\": \"App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " 876\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php\",\n", - " \"line\": 43,\n", - " \"function\": \"callAction\",\n", - " \"class\": \"Illuminate\\\\Routing\\\\Controller\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " \"show\",\n", - " {\n", - " \"0\": {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " \"id\": \"876\"\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Routing/Route.php\",\n", - " \"line\": 259,\n", - " \"function\": \"dispatch\",\n", - " \"class\": \"Illuminate\\\\Routing\\\\ControllerDispatcher\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"uri\": \"api/v1/integrations/datasets/{id}\",\n", - " \"methods\": [\n", - " \"GET\",\n", - " \"HEAD\"\n", - " ],\n", - " \"action\": {\n", - " \"middleware\": [\n", - " \"api\",\n", - " \"integration.auth\",\n", - " \"check.integration.access:permissions,datasets.read\"\n", - " ],\n", - " \"uses\": \"App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController@show\",\n", - " \"controller\": \"App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController@show\",\n", - " \"namespace\": null,\n", - " \"prefix\": \"api/v1\",\n", - " \"where\": []\n", - " },\n", - " \"isFallback\": false,\n", - " \"controller\": {},\n", - " \"defaults\": [],\n", - " \"wheres\": {\n", - " \"id\": \"[0-9]+\"\n", - " },\n", - " \"parameters\": {\n", - " \"id\": \"876\"\n", - " },\n", - " \"parameterNames\": [\n", - " \"id\"\n", - " ],\n", - " \"computedMiddleware\": [\n", - " \"api\",\n", - " \"integration.auth\",\n", - " \"check.integration.access:permissions,datasets.read\"\n", - " ],\n", - " \"compiled\": {}\n", - " },\n", - " {},\n", - " \"show\"\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Routing/Route.php\",\n", - " \"line\": 205,\n", - " \"function\": \"runController\",\n", - " \"class\": \"Illuminate\\\\Routing\\\\Route\",\n", - " \"type\": \"->\",\n", - " \"args\": []\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php\",\n", - " \"line\": 806,\n", - " \"function\": \"run\",\n", - " \"class\": \"Illuminate\\\\Routing\\\\Route\",\n", - " \"type\": \"->\",\n", - " \"args\": []\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 144,\n", - " \"function\": \"Illuminate\\\\Routing\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Routing\\\\Router\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/app/Http/Middleware/CheckIntegrationAccessMiddleware.php\",\n", - " \"line\": 43,\n", - " \"function\": \"Illuminate\\\\Pipeline\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 183,\n", - " \"function\": \"handle\",\n", - " \"class\": \"App\\\\Http\\\\Middleware\\\\CheckIntegrationAccessMiddleware\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {},\n", - " \"permissions\",\n", - " \"datasets.read\"\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/app/Http/Middleware/AuthenticateIntegrationMiddleware.php\",\n", - " \"line\": 65,\n", - " \"function\": \"Illuminate\\\\Pipeline\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 183,\n", - " \"function\": \"handle\",\n", - " \"class\": \"App\\\\Http\\\\Middleware\\\\AuthenticateIntegrationMiddleware\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php\",\n", - " \"line\": 50,\n", - " \"function\": \"Illuminate\\\\Pipeline\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 183,\n", - " \"function\": \"handle\",\n", - " \"class\": \"Illuminate\\\\Routing\\\\Middleware\\\\SubstituteBindings\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php\",\n", - " \"line\": 159,\n", - " \"function\": \"Illuminate\\\\Pipeline\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php\",\n", - " \"line\": 125,\n", - " \"function\": \"handleRequest\",\n", - " \"class\": \"Illuminate\\\\Routing\\\\Middleware\\\\ThrottleRequests\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {},\n", - " [\n", - " {\n", - " \"key\": \"a75f3f172bfb296f2e10cbfc6dfc1883\",\n", - " \"maxAttempts\": 1000,\n", - " \"decayMinutes\": 1,\n", - " \"responseCallback\": null\n", - " }\n", - " ]\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php\",\n", - " \"line\": 87,\n", - " \"function\": \"handleRequestUsingNamedLimiter\",\n", - " \"class\": \"Illuminate\\\\Routing\\\\Middleware\\\\ThrottleRequests\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {},\n", - " \"api\",\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 183,\n", - " \"function\": \"handle\",\n", - " \"class\": \"Illuminate\\\\Routing\\\\Middleware\\\\ThrottleRequests\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {},\n", - " \"api\"\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php\",\n", - " \"line\": 121,\n", - " \"function\": \"Illuminate\\\\Pipeline\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php\",\n", - " \"line\": 64,\n", - " \"function\": \"handleStatefulRequest\",\n", - " \"class\": \"Illuminate\\\\Session\\\\Middleware\\\\StartSession\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {},\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 183,\n", - " \"function\": \"handle\",\n", - " \"class\": \"Illuminate\\\\Session\\\\Middleware\\\\StartSession\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 119,\n", - " \"function\": \"Illuminate\\\\Pipeline\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php\",\n", - " \"line\": 805,\n", - " \"function\": \"then\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php\",\n", - " \"line\": 784,\n", - " \"function\": \"runRouteWithinStack\",\n", - " \"class\": \"Illuminate\\\\Routing\\\\Router\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"uri\": \"api/v1/integrations/datasets/{id}\",\n", - " \"methods\": [\n", - " \"GET\",\n", - " \"HEAD\"\n", - " ],\n", - " \"action\": {\n", - " \"middleware\": [\n", - " \"api\",\n", - " \"integration.auth\",\n", - " \"check.integration.access:permissions,datasets.read\"\n", - " ],\n", - " \"uses\": \"App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController@show\",\n", - " \"controller\": \"App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController@show\",\n", - " \"namespace\": null,\n", - " \"prefix\": \"api/v1\",\n", - " \"where\": []\n", - " },\n", - " \"isFallback\": false,\n", - " \"controller\": {},\n", - " \"defaults\": [],\n", - " \"wheres\": {\n", - " \"id\": \"[0-9]+\"\n", - " },\n", - " \"parameters\": {\n", - " \"id\": \"876\"\n", - " },\n", - " \"parameterNames\": [\n", - " \"id\"\n", - " ],\n", - " \"computedMiddleware\": [\n", - " \"api\",\n", - " \"integration.auth\",\n", - " \"check.integration.access:permissions,datasets.read\"\n", - " ],\n", - " \"compiled\": {}\n", - " },\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php\",\n", - " \"line\": 748,\n", - " \"function\": \"runRoute\",\n", - " \"class\": \"Illuminate\\\\Routing\\\\Router\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {\n", - " \"uri\": \"api/v1/integrations/datasets/{id}\",\n", - " \"methods\": [\n", - " \"GET\",\n", - " \"HEAD\"\n", - " ],\n", - " \"action\": {\n", - " \"middleware\": [\n", - " \"api\",\n", - " \"integration.auth\",\n", - " \"check.integration.access:permissions,datasets.read\"\n", - " ],\n", - " \"uses\": \"App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController@show\",\n", - " \"controller\": \"App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController@show\",\n", - " \"namespace\": null,\n", - " \"prefix\": \"api/v1\",\n", - " \"where\": []\n", - " },\n", - " \"isFallback\": false,\n", - " \"controller\": {},\n", - " \"defaults\": [],\n", - " \"wheres\": {\n", - " \"id\": \"[0-9]+\"\n", - " },\n", - " \"parameters\": {\n", - " \"id\": \"876\"\n", - " },\n", - " \"parameterNames\": [\n", - " \"id\"\n", - " ],\n", - " \"computedMiddleware\": [\n", - " \"api\",\n", - " \"integration.auth\",\n", - " \"check.integration.access:permissions,datasets.read\"\n", - " ],\n", - " \"compiled\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php\",\n", - " \"line\": 737,\n", - " \"function\": \"dispatchToRoute\",\n", - " \"class\": \"Illuminate\\\\Routing\\\\Router\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php\",\n", - " \"line\": 200,\n", - " \"function\": \"dispatch\",\n", - " \"class\": \"Illuminate\\\\Routing\\\\Router\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 144,\n", - " \"function\": \"Illuminate\\\\Foundation\\\\Http\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Foundation\\\\Http\\\\Kernel\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php\",\n", - " \"line\": 21,\n", - " \"function\": \"Illuminate\\\\Pipeline\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php\",\n", - " \"line\": 31,\n", - " \"function\": \"handle\",\n", - " \"class\": \"Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 183,\n", - " \"function\": \"handle\",\n", - " \"class\": \"Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\ConvertEmptyStringsToNull\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php\",\n", - " \"line\": 21,\n", - " \"function\": \"Illuminate\\\\Pipeline\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php\",\n", - " \"line\": 40,\n", - " \"function\": \"handle\",\n", - " \"class\": \"Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 183,\n", - " \"function\": \"handle\",\n", - " \"class\": \"Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TrimStrings\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php\",\n", - " \"line\": 27,\n", - " \"function\": \"Illuminate\\\\Pipeline\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 183,\n", - " \"function\": \"handle\",\n", - " \"class\": \"Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\ValidatePostSize\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php\",\n", - " \"line\": 99,\n", - " \"function\": \"Illuminate\\\\Pipeline\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 183,\n", - " \"function\": \"handle\",\n", - " \"class\": \"Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\PreventRequestsDuringMaintenance\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php\",\n", - " \"line\": 39,\n", - " \"function\": \"Illuminate\\\\Pipeline\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 183,\n", - " \"function\": \"handle\",\n", - " \"class\": \"Illuminate\\\\Http\\\\Middleware\\\\TrustProxies\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/app/Http/Middleware/Cors.php\",\n", - " \"line\": 24,\n", - " \"function\": \"Illuminate\\\\Pipeline\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 183,\n", - " \"function\": \"handle\",\n", - " \"class\": \"App\\\\Http\\\\Middleware\\\\Cors\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " },\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php\",\n", - " \"line\": 119,\n", - " \"function\": \"Illuminate\\\\Pipeline\\\\{closure}\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php\",\n", - " \"line\": 175,\n", - " \"function\": \"then\",\n", - " \"class\": \"Illuminate\\\\Pipeline\\\\Pipeline\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {}\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php\",\n", - " \"line\": 144,\n", - " \"function\": \"sendRequestThroughRouter\",\n", - " \"class\": \"Illuminate\\\\Foundation\\\\Http\\\\Kernel\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/public/index.php\",\n", - " \"line\": 51,\n", - " \"function\": \"handle\",\n", - " \"class\": \"Illuminate\\\\Foundation\\\\Http\\\\Kernel\",\n", - " \"type\": \"->\",\n", - " \"args\": [\n", - " {\n", - " \"attributes\": {},\n", - " \"request\": {},\n", - " \"query\": {},\n", - " \"server\": {},\n", - " \"files\": {},\n", - " \"cookies\": {},\n", - " \"headers\": {}\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"file\": \"/var/www/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php\",\n", - " \"line\": 16,\n", - " \"args\": [\n", - " \"/var/www/public/index.php\"\n", - " ],\n", - " \"function\": \"require_once\"\n", - " }\n", - " ]\n", - " }\n", + " \"abstract\": \"Patient-level data set that captures information about people in contact with services commissioned as part of the adult Improving Access to Psychological Services (IAPT) programme.\",\n", + " \"contactPoint\": \"enquiries@nhsdigital.nhs.uk\",\n", + " \"keywords\": \"Depression,Anxiety,CBT,Counselling,Talking theraphy,Cognitive,National Core Study,NCS\",\n", + " \"controlledKeywords\": null,\n", + " \"datasetType\": \"Healthdata\",\n", + " \"description\": \"Collecting information about people in contact with adult psychological therapy services in England. The IAPT data set was developed with the IAPT programme as a patient level, output based, secondary uses data set which aims to deliver robust, comprehensive, nationally consistent and comparable information for patients accessing NHS-funded IAPT services in England. This national data set has been collected since April 2012 and is a mandatory submission for all NHS funded care, including care delivered by independent sector healthcare providers. Data collection on patients with depression and anxiety disorders that are offered psychological therapies, so that we can improve the delivery of care for these conditions.\\n\\nProviders of NHS-funded IAPT services are required to submit data to NHS Digital on a monthly basis.\\n\\nAs a secondary uses data set the IAPT data set re-uses clinical and operational data for purposes other than direct patient care. It defines the data items, definitions and associated value sets extracted or derived from local information systems and sent to NHS Digital for analysis purposes. Timescales for dissemination can be found under 'Our Service Levels' at the following link: https://digital.nhs.uk/services/data-access-request-service-dars/data-access-request-service-dars-process\",\n", + " \"doiName\": null,\n", + " \"shortTitle\": \"Improving Access to Psychological Therapies Data Set\",\n", + " \"title\": \"Improving Access to Psychological Therapies Data Set\",\n", + " \"publisher\": {\n", + " \"gatewayId\": \"898f0f12-749c-4e2d-aa91-004533636c6b\",\n", + " \"name\": \"Dev Testing\"\n", + " },\n", + " \"populationSize\": 0,\n", + " \"datasetSubType\": null\n", "}\n" ] } ], "source": [ - "print(json.dumps(response.json(),indent=6))" + "print(json.dumps(response.json()['data']['versions'][0]['metadata']['metadata']['summary'],indent=6))" ] }, { "cell_type": "code", - "execution_count": 34, - "id": "6b1fcb2d", + "execution_count": 11, + "id": "8f232012", "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'code': 500, 'message': 'Dataset with id=876 cannot be found', 'details': {'exception': 'Exception', 'trace': [{'file': '/var/www/vendor/laravel/framework/src/Illuminate/Routing/Controller.php', 'line': 54, 'function': 'destroy', 'class': 'App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, '876']}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php', 'line': 43, 'function': 'callAction', 'class': 'Illuminate\\\\Routing\\\\Controller', 'type': '->', 'args': ['destroy', {'0': {'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, 'id': '876'}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Routing/Route.php', 'line': 259, 'function': 'dispatch', 'class': 'Illuminate\\\\Routing\\\\ControllerDispatcher', 'type': '->', 'args': [{'uri': 'api/v1/integrations/datasets/{id}', 'methods': ['DELETE'], 'action': {'middleware': ['api', 'integration.auth', 'check.integration.access:permissions,datasets.delete'], 'uses': 'App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController@destroy', 'controller': 'App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController@destroy', 'namespace': None, 'prefix': 'api/v1', 'where': []}, 'isFallback': False, 'controller': {}, 'defaults': [], 'wheres': ['id', '[0-9]+'], 'parameters': {'id': '876'}, 'parameterNames': ['id'], 'computedMiddleware': ['api', 'integration.auth', 'check.integration.access:permissions,datasets.delete'], 'compiled': {}}, {}, 'destroy']}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Routing/Route.php', 'line': 205, 'function': 'runController', 'class': 'Illuminate\\\\Routing\\\\Route', 'type': '->', 'args': []}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php', 'line': 806, 'function': 'run', 'class': 'Illuminate\\\\Routing\\\\Route', 'type': '->', 'args': []}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 144, 'function': 'Illuminate\\\\Routing\\\\{closure}', 'class': 'Illuminate\\\\Routing\\\\Router', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/app/Http/Middleware/CheckIntegrationAccessMiddleware.php', 'line': 43, 'function': 'Illuminate\\\\Pipeline\\\\{closure}', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 183, 'function': 'handle', 'class': 'App\\\\Http\\\\Middleware\\\\CheckIntegrationAccessMiddleware', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}, 'permissions', 'datasets.delete']}, {'file': '/var/www/app/Http/Middleware/AuthenticateIntegrationMiddleware.php', 'line': 65, 'function': 'Illuminate\\\\Pipeline\\\\{closure}', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 183, 'function': 'handle', 'class': 'App\\\\Http\\\\Middleware\\\\AuthenticateIntegrationMiddleware', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php', 'line': 50, 'function': 'Illuminate\\\\Pipeline\\\\{closure}', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 183, 'function': 'handle', 'class': 'Illuminate\\\\Routing\\\\Middleware\\\\SubstituteBindings', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php', 'line': 159, 'function': 'Illuminate\\\\Pipeline\\\\{closure}', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php', 'line': 125, 'function': 'handleRequest', 'class': 'Illuminate\\\\Routing\\\\Middleware\\\\ThrottleRequests', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}, [{'key': 'a75f3f172bfb296f2e10cbfc6dfc1883', 'maxAttempts': 1000, 'decayMinutes': 1, 'responseCallback': None}]]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php', 'line': 87, 'function': 'handleRequestUsingNamedLimiter', 'class': 'Illuminate\\\\Routing\\\\Middleware\\\\ThrottleRequests', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}, 'api', {}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 183, 'function': 'handle', 'class': 'Illuminate\\\\Routing\\\\Middleware\\\\ThrottleRequests', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}, 'api']}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php', 'line': 121, 'function': 'Illuminate\\\\Pipeline\\\\{closure}', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php', 'line': 64, 'function': 'handleStatefulRequest', 'class': 'Illuminate\\\\Session\\\\Middleware\\\\StartSession', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}, {}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 183, 'function': 'handle', 'class': 'Illuminate\\\\Session\\\\Middleware\\\\StartSession', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 119, 'function': 'Illuminate\\\\Pipeline\\\\{closure}', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php', 'line': 805, 'function': 'then', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php', 'line': 784, 'function': 'runRouteWithinStack', 'class': 'Illuminate\\\\Routing\\\\Router', 'type': '->', 'args': [{'uri': 'api/v1/integrations/datasets/{id}', 'methods': ['DELETE'], 'action': {'middleware': ['api', 'integration.auth', 'check.integration.access:permissions,datasets.delete'], 'uses': 'App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController@destroy', 'controller': 'App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController@destroy', 'namespace': None, 'prefix': 'api/v1', 'where': []}, 'isFallback': False, 'controller': {}, 'defaults': [], 'wheres': ['id', '[0-9]+'], 'parameters': {'id': '876'}, 'parameterNames': ['id'], 'computedMiddleware': ['api', 'integration.auth', 'check.integration.access:permissions,datasets.delete'], 'compiled': {}}, {'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php', 'line': 748, 'function': 'runRoute', 'class': 'Illuminate\\\\Routing\\\\Router', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {'uri': 'api/v1/integrations/datasets/{id}', 'methods': ['DELETE'], 'action': {'middleware': ['api', 'integration.auth', 'check.integration.access:permissions,datasets.delete'], 'uses': 'App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController@destroy', 'controller': 'App\\\\Http\\\\Controllers\\\\Api\\\\V1\\\\IntegrationDatasetController@destroy', 'namespace': None, 'prefix': 'api/v1', 'where': []}, 'isFallback': False, 'controller': {}, 'defaults': [], 'wheres': ['id', '[0-9]+'], 'parameters': {'id': '876'}, 'parameterNames': ['id'], 'computedMiddleware': ['api', 'integration.auth', 'check.integration.access:permissions,datasets.delete'], 'compiled': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Routing/Router.php', 'line': 737, 'function': 'dispatchToRoute', 'class': 'Illuminate\\\\Routing\\\\Router', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php', 'line': 200, 'function': 'dispatch', 'class': 'Illuminate\\\\Routing\\\\Router', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 144, 'function': 'Illuminate\\\\Foundation\\\\Http\\\\{closure}', 'class': 'Illuminate\\\\Foundation\\\\Http\\\\Kernel', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php', 'line': 21, 'function': 'Illuminate\\\\Pipeline\\\\{closure}', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php', 'line': 31, 'function': 'handle', 'class': 'Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 183, 'function': 'handle', 'class': 'Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\ConvertEmptyStringsToNull', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php', 'line': 21, 'function': 'Illuminate\\\\Pipeline\\\\{closure}', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php', 'line': 40, 'function': 'handle', 'class': 'Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 183, 'function': 'handle', 'class': 'Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TrimStrings', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php', 'line': 27, 'function': 'Illuminate\\\\Pipeline\\\\{closure}', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 183, 'function': 'handle', 'class': 'Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\ValidatePostSize', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php', 'line': 99, 'function': 'Illuminate\\\\Pipeline\\\\{closure}', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 183, 'function': 'handle', 'class': 'Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\PreventRequestsDuringMaintenance', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php', 'line': 39, 'function': 'Illuminate\\\\Pipeline\\\\{closure}', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 183, 'function': 'handle', 'class': 'Illuminate\\\\Http\\\\Middleware\\\\TrustProxies', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}]}, {'file': '/var/www/app/Http/Middleware/Cors.php', 'line': 24, 'function': 'Illuminate\\\\Pipeline\\\\{closure}', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 183, 'function': 'handle', 'class': 'App\\\\Http\\\\Middleware\\\\Cors', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}, {}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'line': 119, 'function': 'Illuminate\\\\Pipeline\\\\{closure}', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php', 'line': 175, 'function': 'then', 'class': 'Illuminate\\\\Pipeline\\\\Pipeline', 'type': '->', 'args': [{}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php', 'line': 144, 'function': 'sendRequestThroughRouter', 'class': 'Illuminate\\\\Foundation\\\\Http\\\\Kernel', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/public/index.php', 'line': 51, 'function': 'handle', 'class': 'Illuminate\\\\Foundation\\\\Http\\\\Kernel', 'type': '->', 'args': [{'attributes': {}, 'request': {}, 'query': {}, 'server': {}, 'files': {}, 'cookies': {}, 'headers': {}}]}, {'file': '/var/www/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php', 'line': 16, 'args': ['/var/www/public/index.php'], 'function': 'require_once'}]}}\n" - ] + "data": { + "text/plain": [ + "['3.0.0', '3.0.0']" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "response = requests.delete(\n", - " f\"{api_path}/integrations/datasets/{dataset_id}\", headers=headers\n", - ")\n", - "print (response.json())" + "data = response.json()[\"data\"]\n", + "versions = data[\"versions\"]\n", + "[v['metadata']['metadata']['required']['version'] for v in versions]" ] }, { "cell_type": "code", - "execution_count": 16, - "id": "a0874904", + "execution_count": 14, + "id": "a2d3b278", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[12, 12]" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "[v['id'] for v in data['versions']]" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "591b9b24", "metadata": {}, "outputs": [ { @@ -1080,21 +206,34 @@ "output_type": "stream", "text": [ "{\n", - " \"message\": \"failed to translate\",\n", - " \"details\": {\n", - " \"traser_message\": {\n", - " \"error\": \"Translation not found\",\n", - " \"message\": \"Request failed with status code 404\",\n", - " \"details\": \"Translation for GWDM-1.1 to HDRUK-2.2.3 is not implemented\"\n", - " },\n", - " \"wasTranslated\": false,\n", - " \"metadata\": null,\n", - " \"statusCode\": 400\n", - " }\n", + " \"pathway\": null,\n", + " \"spatial\": \"United Kingdom,England\",\n", + " \"followup\": \"0 - 6 MONTHS\",\n", + " \"typicalAgeRange\": \"18-150\",\n", + " \"biologicalsamples\": [],\n", + " \"gender\": [],\n", + " \"psychological\": [],\n", + " \"physical\": [],\n", + " \"anthropometric\": [],\n", + " \"lifestyle\": [],\n", + " \"socioeconomic\": []\n", "}\n" ] } ], + "source": [ + "response = requests.get(\n", + " f\"{api_path}/integrations/datasets/{dataset_id}?schema_model=HDRUK&schema_version=2.2.0\", headers=headers\n", + ")\n", + "print (json.dumps(response.json()['data']['coverage'],indent=6))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a0874904", + "metadata": {}, + "outputs": [], "source": [ "response = requests.get(\n", " f\"{api_path}/integrations/datasets/{dataset_id}?schema_model=HDRUK&schema_version=2.2.3\", headers=headers\n", @@ -1104,7 +243,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "id": "9ae97f85", "metadata": {}, "outputs": [], @@ -1118,656 +257,10 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": null, "id": "14be6979", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{\n", - " \"message\": \"success\",\n", - " \"data\": {\n", - " \"id\": 875,\n", - " \"mongo_object_id\": null,\n", - " \"mongo_id\": null,\n", - " \"mongo_pid\": null,\n", - " \"datasetid\": null,\n", - " \"pid\": \"96bea284-dd48-4617-84e5-8b8f888b2fb3\",\n", - " \"source\": null,\n", - " \"discourse_topic_id\": 0,\n", - " \"is_cohort_discovery\": false,\n", - " \"commercial_use\": 0,\n", - " \"state_id\": 0,\n", - " \"uploader_id\": 0,\n", - " \"metadataquality_id\": 0,\n", - " \"user_id\": 3,\n", - " \"team_id\": 26,\n", - " \"views_count\": 0,\n", - " \"views_prev_count\": 0,\n", - " \"has_technical_details\": 1,\n", - " \"created\": \"2024-02-16 14:40:21\",\n", - " \"updated\": \"2024-02-16 15:00:55\",\n", - " \"submitted\": \"2024-02-16 14:40:21\",\n", - " \"published\": null,\n", - " \"created_at\": \"2024-02-16T14:40:21.000000Z\",\n", - " \"updated_at\": \"2024-02-16T15:00:55.000000Z\",\n", - " \"deleted_at\": null,\n", - " \"create_origin\": \"API\",\n", - " \"status\": \"ACTIVE\",\n", - " \"versions\": [\n", - " {\n", - " \"id\": 875,\n", - " \"created_at\": \"2024-02-16T14:40:21.000000Z\",\n", - " \"updated_at\": \"2024-02-16T14:40:21.000000Z\",\n", - " \"deleted_at\": null,\n", - " \"dataset_id\": 875,\n", - " \"metadata\": {\n", - " \"metadata\": {\n", - " \"required\": {\n", - " \"gatewayId\": \"875\",\n", - " \"gatewayPid\": \"96bea284-dd48-4617-84e5-8b8f888b2fb3\",\n", - " \"issued\": \"2024-02-16T14:40:21.422962Z\",\n", - " \"modified\": \"2024-02-16T14:40:21.422977Z\",\n", - " \"revisions\": [],\n", - " \"version\": \"3.0.0\"\n", - " },\n", - " \"summary\": {\n", - " \"abstract\": \"Patient-level data set that captures information about people in contact with services commissioned as part of the adult Improving Access to Psychological Services (IAPT) programme.\",\n", - " \"contactPoint\": \"enquiries@nhsdigital.nhs.uk\",\n", - " \"keywords\": \"Depression,Anxiety,CBT,Counselling,Talking theraphy,Cognitive,National Core Study,NCS\",\n", - " \"controlledKeywords\": null,\n", - " \"datasetType\": \"Healthdata\",\n", - " \"description\": \"Collecting information about people in contact with adult psychological therapy services in England. The IAPT data set was developed with the IAPT programme as a patient level, output based, secondary uses data set which aims to deliver robust, comprehensive, nationally consistent and comparable information for patients accessing NHS-funded IAPT services in England. This national data set has been collected since April 2012 and is a mandatory submission for all NHS funded care, including care delivered by independent sector healthcare providers. Data collection on patients with depression and anxiety disorders that are offered psychological therapies, so that we can improve the delivery of care for these conditions.\\n\\nProviders of NHS-funded IAPT services are required to submit data to NHS Digital on a monthly basis.\\n\\nAs a secondary uses data set the IAPT data set re-uses clinical and operational data for purposes other than direct patient care. It defines the data items, definitions and associated value sets extracted or derived from local information systems and sent to NHS Digital for analysis purposes. Timescales for dissemination can be found under 'Our Service Levels' at the following link: https://digital.nhs.uk/services/data-access-request-service-dars/data-access-request-service-dars-process\",\n", - " \"doiName\": null,\n", - " \"shortTitle\": \"Improving Access to Psychological Therapies Data Set\",\n", - " \"title\": \"Improving Access to Psychological Therapies Data Set\",\n", - " \"publisher\": {\n", - " \"gatewayId\": \"6c3eabaa-2f38-46d8-8e3b-83bc64896e30\",\n", - " \"name\": \"Lehner Inc\"\n", - " },\n", - " \"populationSize\": 0,\n", - " \"datasetSubType\": null\n", - " },\n", - " \"coverage\": {\n", - " \"pathway\": null,\n", - " \"spatial\": \"United Kingdom,England\",\n", - " \"followup\": \"0 - 6 MONTHS\",\n", - " \"typicalAgeRange\": \"18-150\",\n", - " \"biologicalsamples\": null,\n", - " \"gender\": null,\n", - " \"psychological\": null,\n", - " \"physical\": null,\n", - " \"anthropometric\": null,\n", - " \"lifestyle\": null,\n", - " \"socioeconomic\": null\n", - " },\n", - " \"provenance\": {\n", - " \"origin\": {\n", - " \"purpose\": \"OTHER,ADMINISTRATIVE\",\n", - " \"source\": \"EPR\",\n", - " \"collectionSituation\": \"COMMUNITY,PRIMARY CARE\"\n", - " },\n", - " \"temporal\": {\n", - " \"endDate\": null,\n", - " \"startDate\": \"2012-04-01\",\n", - " \"timeLag\": \"2-6 MONTHS\",\n", - " \"accrualPeriodicity\": \"MONTHLY\",\n", - " \"distributionReleaseDate\": null\n", - " }\n", - " },\n", - " \"accessibility\": {\n", - " \"access\": {\n", - " \"deliveryLeadTime\": null,\n", - " \"jurisdiction\": \"GB-ENG\",\n", - " \"dataController\": \"NHS DIGITAL\",\n", - " \"dataProcessor\": null,\n", - " \"accessRights\": \"https://digital.nhs.uk/services/data-access-request-service-dars\",\n", - " \"accessService\": \"Once your DARS application has been approved, data will be made available either by secure file transfer or through the Data Access Environment (DAE). BL\\n\\nSecure file transfer: https://digital.nhs.uk/services/transfer-data-securely\\n\\nDAE: https://digital.nhs.uk/services/data-access-environment-dae\",\n", - " \"accessRequestCost\": \"https://digital.nhs.uk/services/data-access-request-service-dars/data-access-request-service-dars-charges\"\n", - " },\n", - " \"usage\": {\n", - " \"dataUseLimitation\": \"NO RESTRICTION\",\n", - " \"dataUseRequirement\": \"INSTITUTION SPECIFIC RESTRICTIONS,PROJECT SPECIFIC RESTRICTIONS,TIME LIMIT ON USE\",\n", - " \"resourceCreator\": {\n", - " \"name\": \"NHS DIGITIAL\",\n", - " \"gatewayId\": null,\n", - " \"rorId\": null\n", - " }\n", - " },\n", - " \"formatAndStandards\": {\n", - " \"vocabularyEncodingSchemes\": \"ODS,SNOMED CT,NHS NATIONAL CODES,ICD10\",\n", - " \"conformsTo\": \"NHS DATA DICTIONARY\",\n", - " \"languages\": \"en\",\n", - " \"formats\": \"CSV\"\n", - " }\n", - " },\n", - " \"linkage\": {\n", - " \"associatedMedia\": \"https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/improving-access-to-psychological-therapies-data-set,https://digital.nhs.uk/about-nhs-digital/corporate-information-and-documents/directions-and-data-provision-notices/data-provision-notices-dpns/improving-access-to-psychological-therapies-data-set-data-provision-notice\",\n", - " \"isReferenceIn\": null,\n", - " \"tools\": \"https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/improving-access-to-psychological-therapies-data-set/submitting-iapt-data\",\n", - " \"datasetLinkage\": {\n", - " \"isDerivedFrom\": \"Data will be minimised as appropriate relative to the data access application\",\n", - " \"isPartOf\": \"mental health\",\n", - " \"linkedDatasets\": \"https://digital.nhs.uk/services/data-access-request-service-dars/register-of-approved-data-releases\",\n", - " \"isMemberOf\": null\n", - " },\n", - " \"investigations\": \"https://digital.nhs.uk/services/data-access-request-service-dars/register-of-approved-data-releases\",\n", - " \"isGeneratedUsing\": null,\n", - " \"dataUses\": null\n", - " },\n", - " \"observations\": [\n", - " {\n", - " \"observedNode\": \"EVENTS\",\n", - " \"measuredValue\": 114125,\n", - " \"observationDate\": \"2021-02-25\",\n", - " \"measuredProperty\": \"COUNT\",\n", - " \"disambiguatingDescription\": \"In December 2020 there were 114,125 referrals made into IAPT services in England.\"\n", - " },\n", - " {\n", - " \"observedNode\": \"EVENTS\",\n", - " \"measuredValue\": 81578,\n", - " \"observationDate\": \"2021-02-25\",\n", - " \"measuredProperty\": \"COUNT\",\n", - " \"disambiguatingDescription\": \"In December 2020, 81,578 referrals into IAPT services in England started a course of treatment.\"\n", - " },\n", - " {\n", - " \"observedNode\": \"EVENTS\",\n", - " \"measuredValue\": 48331,\n", - " \"observationDate\": \"2021-02-25\",\n", - " \"measuredProperty\": \"COUNT\",\n", - " \"disambiguatingDescription\": \"In December 2020, 48,331 referrals into IAPT services in England completed a course of treatment.\"\n", - " }\n", - " ],\n", - " \"structuralMetadata\": [\n", - " {\n", - " \"name\": \"IAPT.iapt.Rep_Referral\",\n", - " \"description\": \"IAPT.iapt.Rep_Referral\",\n", - " \"columns\": [\n", - " {\n", - " \"name\": \"Count of number of Non-guided Self Help (Computer) sessions (derived)\",\n", - " \"description\": \"Count of number of Non-guided Self Help (Computer) sessions (derived)\",\n", - " \"dataType\": \"Number\",\n", - " \"sensitive\": false,\n", - " \"values\": [\n", - " {\n", - " \"name\": \"Male\",\n", - " \"frequency\": 50,\n", - " \"description\": null\n", - " }\n", - " ]\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"name\": \"IAPT.iapt.Rep_Referral\",\n", - " \"description\": \"IAPT.iapt.Rep_Referral\",\n", - " \"columns\": [\n", - " {\n", - " \"name\": \"Pseudonymised Service Request Identifier\",\n", - " \"description\": \"A request for the provision of care services to a PATIENT.\",\n", - " \"dataType\": \"String\",\n", - " \"sensitive\": false,\n", - " \"values\": [\n", - " {\n", - " \"name\": \"Male\",\n", - " \"frequency\": 50,\n", - " \"description\": null\n", - " }\n", - " ]\n", - " }\n", - " ]\n", - " }\n", - " ],\n", - " \"tissuesSampleCollection\": null\n", - " },\n", - " \"app\": {\n", - " \"id\": 0\n", - " },\n", - " \"original_metadata\": {\n", - " \"identifier\": \"https://web.www.healthdatagateway.org/19525c5f-92ee-41b6-bb79-673624b27bdd\",\n", - " \"version\": \"3.0.0\",\n", - " \"issued\": \"2021-05-10T00:00:00.000Z\",\n", - " \"modified\": \"2021-05-10T00:00:00.000Z\",\n", - " \"revisions\": [],\n", - " \"summary\": {\n", - " \"title\": \"Improving Access to Psychological Therapies Data Set\",\n", - " \"abstract\": \"Patient-level data set that captures information about people in contact with services commissioned as part of the adult Improving Access to Psychological Services (IAPT) programme.\",\n", - " \"publisher\": {\n", - " \"identifier\": \"https://web.www.healthdatagateway.org/5f86cd34980f41c6f02261f4\",\n", - " \"name\": \"NHS DIGITAL\",\n", - " \"logo\": null,\n", - " \"description\": null,\n", - " \"contactPoint\": null,\n", - " \"memberOf\": \"ALLIANCE\"\n", - " },\n", - " \"contactPoint\": \"enquiries@nhsdigital.nhs.uk\",\n", - " \"keywords\": \"Depression,Anxiety,CBT,Counselling,Talking theraphy,Cognitive,National Core Study,NCS\",\n", - " \"alternateIdentifiers\": null,\n", - " \"doiName\": null\n", - " },\n", - " \"documentation\": {\n", - " \"description\": \"Collecting information about people in contact with adult psychological therapy services in England. The IAPT data set was developed with the IAPT programme as a patient level, output based, secondary uses data set which aims to deliver robust, comprehensive, nationally consistent and comparable information for patients accessing NHS-funded IAPT services in England. This national data set has been collected since April 2012 and is a mandatory submission for all NHS funded care, including care delivered by independent sector healthcare providers. Data collection on patients with depression and anxiety disorders that are offered psychological therapies, so that we can improve the delivery of care for these conditions.\\n\\nProviders of NHS-funded IAPT services are required to submit data to NHS Digital on a monthly basis.\\n\\nAs a secondary uses data set the IAPT data set re-uses clinical and operational data for purposes other than direct patient care. It defines the data items, definitions and associated value sets extracted or derived from local information systems and sent to NHS Digital for analysis purposes. Timescales for dissemination can be found under 'Our Service Levels' at the following link: https://digital.nhs.uk/services/data-access-request-service-dars/data-access-request-service-dars-process\",\n", - " \"associatedMedia\": \"https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/improving-access-to-psychological-therapies-data-set,https://digital.nhs.uk/about-nhs-digital/corporate-information-and-documents/directions-and-data-provision-notices/data-provision-notices-dpns/improving-access-to-psychological-therapies-data-set-data-provision-notice\",\n", - " \"isPartOf\": \"mental health\"\n", - " },\n", - " \"coverage\": {\n", - " \"spatial\": \"United Kingdom,England\",\n", - " \"typicalAgeRange\": \"18-150\",\n", - " \"physicalSampleAvailability\": null,\n", - " \"followup\": \"0 - 6 MONTHS\",\n", - " \"pathway\": null\n", - " },\n", - " \"provenance\": {\n", - " \"origin\": {\n", - " \"purpose\": \"OTHER,ADMINISTRATIVE\",\n", - " \"source\": \"EPR\",\n", - " \"collectionSituation\": \"COMMUNITY,PRIMARY CARE\"\n", - " },\n", - " \"temporal\": {\n", - " \"accrualPeriodicity\": \"MONTHLY\",\n", - " \"distributionReleaseDate\": null,\n", - " \"startDate\": \"2012-04-01\",\n", - " \"endDate\": null,\n", - " \"timeLag\": \"2-6 MONTHS\"\n", - " }\n", - " },\n", - " \"accessibility\": {\n", - " \"usage\": {\n", - " \"dataUseLimitation\": \"NO RESTRICTION\",\n", - " \"dataUseRequirements\": \"INSTITUTION SPECIFIC RESTRICTIONS,PROJECT SPECIFIC RESTRICTIONS,TIME LIMIT ON USE\",\n", - " \"resourceCreator\": \"NHS DIGITIAL\",\n", - " \"investigations\": \"https://digital.nhs.uk/services/data-access-request-service-dars/register-of-approved-data-releases\",\n", - " \"isReferencedBy\": null\n", - " },\n", - " \"access\": {\n", - " \"accessRights\": \"https://digital.nhs.uk/services/data-access-request-service-dars\",\n", - " \"accessService\": \"Once your DARS application has been approved, data will be made available either by secure file transfer or through the Data Access Environment (DAE). BL\\n\\nSecure file transfer: https://digital.nhs.uk/services/transfer-data-securely\\n\\nDAE: https://digital.nhs.uk/services/data-access-environment-dae\",\n", - " \"accessRequestCost\": \"https://digital.nhs.uk/services/data-access-request-service-dars/data-access-request-service-dars-charges\",\n", - " \"deliveryLeadTime\": null,\n", - " \"jurisdiction\": \"GB-ENG\",\n", - " \"dataProcessor\": null,\n", - " \"dataController\": \"NHS DIGITAL\"\n", - " },\n", - " \"formatAndStandards\": {\n", - " \"vocabularyEncodingScheme\": \"ODS,SNOMED CT,NHS NATIONAL CODES,ICD10\",\n", - " \"conformsTo\": \"NHS DATA DICTIONARY\",\n", - " \"language\": \"en\",\n", - " \"format\": \"CSV\"\n", - " }\n", - " },\n", - " \"enrichmentAndLinkage\": {\n", - " \"qualifiedRelation\": \"https://digital.nhs.uk/services/data-access-request-service-dars/register-of-approved-data-releases\",\n", - " \"derivation\": \"Data will be minimised as appropriate relative to the data access application\",\n", - " \"tools\": \"https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/improving-access-to-psychological-therapies-data-set/submitting-iapt-data\"\n", - " },\n", - " \"observations\": [\n", - " {\n", - " \"observedNode\": \"EVENTS\",\n", - " \"measuredValue\": 114125,\n", - " \"measuredProperty\": \"COUNT\",\n", - " \"observationDate\": \"2021-02-25\",\n", - " \"disambiguatingDescription\": \"In December 2020 there were 114,125 referrals made into IAPT services in England.\"\n", - " },\n", - " {\n", - " \"observedNode\": \"EVENTS\",\n", - " \"measuredValue\": 81578,\n", - " \"measuredProperty\": \"COUNT\",\n", - " \"observationDate\": \"2021-02-25\",\n", - " \"disambiguatingDescription\": \"In December 2020, 81,578 referrals into IAPT services in England started a course of treatment.\"\n", - " },\n", - " {\n", - " \"observedNode\": \"EVENTS\",\n", - " \"measuredValue\": 48331,\n", - " \"measuredProperty\": \"COUNT\",\n", - " \"observationDate\": \"2021-02-25\",\n", - " \"disambiguatingDescription\": \"In December 2020, 48,331 referrals into IAPT services in England completed a course of treatment.\"\n", - " }\n", - " ],\n", - " \"structuralMetadata\": [\n", - " {\n", - " \"name\": \"IAPT.iapt.Rep_Referral\",\n", - " \"description\": \"IAPT.iapt.Rep_Referral\",\n", - " \"elements\": [\n", - " {\n", - " \"name\": \"Count of number of Non-guided Self Help (Computer) sessions (derived)\",\n", - " \"description\": \"Count of number of Non-guided Self Help (Computer) sessions (derived)\",\n", - " \"dataType\": \"Number\",\n", - " \"sensitive\": false\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"name\": \"IAPT.iapt.Rep_Referral\",\n", - " \"description\": \"IAPT.iapt.Rep_Referral\",\n", - " \"elements\": [\n", - " {\n", - " \"name\": \"Pseudonymised Service Request Identifier\",\n", - " \"description\": \"A request for the provision of care services to a PATIENT.\",\n", - " \"dataType\": \"String\",\n", - " \"sensitive\": false\n", - " }\n", - " ]\n", - " }\n", - " ]\n", - " },\n", - " \"gwdmVersion\": \"1.1\"\n", - " },\n", - " \"version\": 1\n", - " },\n", - " {\n", - " \"id\": 876,\n", - " \"created_at\": \"2024-02-16T15:00:55.000000Z\",\n", - " \"updated_at\": \"2024-02-16T15:00:55.000000Z\",\n", - " \"deleted_at\": null,\n", - " \"dataset_id\": 875,\n", - " \"metadata\": {\n", - " \"metadata\": {\n", - " \"required\": {\n", - " \"gatewayId\": \"875\",\n", - " \"gatewayPid\": \"96bea284-dd48-4617-84e5-8b8f888b2fb3\",\n", - " \"issued\": \"2021-05-10T00:00:00.000Z\",\n", - " \"modified\": \"2024-02-16T15:00:55.934192Z\",\n", - " \"revisions\": [\n", - " {\n", - " \"url\": \"https://placeholder.blah/96bea284-dd48-4617-84e5-8b8f888b2fb3?version=3.0.0\",\n", - " \"version\": \"3.0.0\"\n", - " }\n", - " ],\n", - " \"version\": \"3.0.1\"\n", - " },\n", - " \"summary\": {\n", - " \"abstract\": \"Patient-level data set that captures information about people in contact with services commissioned as part of the adult Improving Access to Psychological Services (IAPT) programme.\",\n", - " \"contactPoint\": \"enquiries@nhsdigital.nhs.uk\",\n", - " \"keywords\": \"Depression,Anxiety,CBT,Counselling,Talking theraphy,Cognitive,National Core Study,NCS\",\n", - " \"controlledKeywords\": null,\n", - " \"datasetType\": \"Healthdata\",\n", - " \"description\": \"Collecting information about people in contact with adult psychological therapy services in England. The IAPT data set was developed with the IAPT programme as a patient level, output based, secondary uses data set which aims to deliver robust, comprehensive, nationally consistent and comparable information for patients accessing NHS-funded IAPT services in England. This national data set has been collected since April 2012 and is a mandatory submission for all NHS funded care, including care delivered by independent sector healthcare providers. Data collection on patients with depression and anxiety disorders that are offered psychological therapies, so that we can improve the delivery of care for these conditions.\\n\\nProviders of NHS-funded IAPT services are required to submit data to NHS Digital on a monthly basis.\\n\\nAs a secondary uses data set the IAPT data set re-uses clinical and operational data for purposes other than direct patient care. It defines the data items, definitions and associated value sets extracted or derived from local information systems and sent to NHS Digital for analysis purposes. Timescales for dissemination can be found under 'Our Service Levels' at the following link: https://digital.nhs.uk/services/data-access-request-service-dars/data-access-request-service-dars-process\",\n", - " \"doiName\": null,\n", - " \"shortTitle\": \"UPDATED TITLE\",\n", - " \"title\": \"UPDATED TITLE\",\n", - " \"publisher\": {\n", - " \"name\": \"Lehner Inc\",\n", - " \"gatewayId\": \"6c3eabaa-2f38-46d8-8e3b-83bc64896e30\",\n", - " \"rorId\": null\n", - " },\n", - " \"populationSize\": 0,\n", - " \"datasetSubType\": null\n", - " },\n", - " \"coverage\": {\n", - " \"pathway\": null,\n", - " \"spatial\": \"United Kingdom,England\",\n", - " \"followup\": \"0 - 6 MONTHS\",\n", - " \"typicalAgeRange\": \"18-150\",\n", - " \"biologicalsamples\": null,\n", - " \"gender\": null,\n", - " \"psychological\": null,\n", - " \"physical\": null,\n", - " \"anthropometric\": null,\n", - " \"lifestyle\": null,\n", - " \"socioeconomic\": null\n", - " },\n", - " \"provenance\": {\n", - " \"origin\": {\n", - " \"purpose\": \"OTHER,ADMINISTRATIVE\",\n", - " \"source\": \"EPR\",\n", - " \"collectionSituation\": \"COMMUNITY,PRIMARY CARE\"\n", - " },\n", - " \"temporal\": {\n", - " \"endDate\": null,\n", - " \"startDate\": \"2012-04-01\",\n", - " \"timeLag\": \"2-6 MONTHS\",\n", - " \"accrualPeriodicity\": \"MONTHLY\",\n", - " \"distributionReleaseDate\": null\n", - " }\n", - " },\n", - " \"accessibility\": {\n", - " \"access\": {\n", - " \"deliveryLeadTime\": null,\n", - " \"jurisdiction\": \"GB-ENG\",\n", - " \"dataController\": \"NHS DIGITAL\",\n", - " \"dataProcessor\": null,\n", - " \"accessRights\": \"https://digital.nhs.uk/services/data-access-request-service-dars\",\n", - " \"accessService\": \"Once your DARS application has been approved, data will be made available either by secure file transfer or through the Data Access Environment (DAE). BL\\n\\nSecure file transfer: https://digital.nhs.uk/services/transfer-data-securely\\n\\nDAE: https://digital.nhs.uk/services/data-access-environment-dae\",\n", - " \"accessRequestCost\": \"https://digital.nhs.uk/services/data-access-request-service-dars/data-access-request-service-dars-charges\"\n", - " },\n", - " \"usage\": {\n", - " \"dataUseLimitation\": \"NO RESTRICTION\",\n", - " \"dataUseRequirement\": \"INSTITUTION SPECIFIC RESTRICTIONS,PROJECT SPECIFIC RESTRICTIONS,TIME LIMIT ON USE\",\n", - " \"resourceCreator\": {\n", - " \"name\": \"NHS DIGITIAL\",\n", - " \"gatewayId\": null,\n", - " \"rorId\": null\n", - " }\n", - " },\n", - " \"formatAndStandards\": {\n", - " \"vocabularyEncodingSchemes\": \"ODS,SNOMED CT,NHS NATIONAL CODES,ICD10\",\n", - " \"conformsTo\": \"NHS DATA DICTIONARY\",\n", - " \"languages\": \"en\",\n", - " \"formats\": \"CSV\"\n", - " }\n", - " },\n", - " \"linkage\": {\n", - " \"associatedMedia\": \"https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/improving-access-to-psychological-therapies-data-set,https://digital.nhs.uk/about-nhs-digital/corporate-information-and-documents/directions-and-data-provision-notices/data-provision-notices-dpns/improving-access-to-psychological-therapies-data-set-data-provision-notice\",\n", - " \"isReferenceIn\": null,\n", - " \"tools\": \"https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/improving-access-to-psychological-therapies-data-set/submitting-iapt-data\",\n", - " \"datasetLinkage\": {\n", - " \"isDerivedFrom\": \"Data will be minimised as appropriate relative to the data access application\",\n", - " \"isPartOf\": \"mental health\",\n", - " \"linkedDatasets\": \"https://digital.nhs.uk/services/data-access-request-service-dars/register-of-approved-data-releases\",\n", - " \"isMemberOf\": null\n", - " },\n", - " \"investigations\": \"https://digital.nhs.uk/services/data-access-request-service-dars/register-of-approved-data-releases\",\n", - " \"isGeneratedUsing\": null,\n", - " \"dataUses\": null\n", - " },\n", - " \"observations\": [\n", - " {\n", - " \"observedNode\": \"EVENTS\",\n", - " \"measuredValue\": 114125,\n", - " \"observationDate\": \"2021-02-25\",\n", - " \"measuredProperty\": \"COUNT\",\n", - " \"disambiguatingDescription\": \"In December 2020 there were 114,125 referrals made into IAPT services in England.\"\n", - " },\n", - " {\n", - " \"observedNode\": \"EVENTS\",\n", - " \"measuredValue\": 81578,\n", - " \"observationDate\": \"2021-02-25\",\n", - " \"measuredProperty\": \"COUNT\",\n", - " \"disambiguatingDescription\": \"In December 2020, 81,578 referrals into IAPT services in England started a course of treatment.\"\n", - " },\n", - " {\n", - " \"observedNode\": \"EVENTS\",\n", - " \"measuredValue\": 48331,\n", - " \"observationDate\": \"2021-02-25\",\n", - " \"measuredProperty\": \"COUNT\",\n", - " \"disambiguatingDescription\": \"In December 2020, 48,331 referrals into IAPT services in England completed a course of treatment.\"\n", - " }\n", - " ],\n", - " \"structuralMetadata\": [\n", - " {\n", - " \"name\": \"IAPT.iapt.Rep_Referral\",\n", - " \"description\": \"IAPT.iapt.Rep_Referral\",\n", - " \"columns\": [\n", - " {\n", - " \"name\": \"Count of number of Non-guided Self Help (Computer) sessions (derived)\",\n", - " \"description\": \"Count of number of Non-guided Self Help (Computer) sessions (derived)\",\n", - " \"dataType\": \"Number\",\n", - " \"sensitive\": false,\n", - " \"values\": [\n", - " {\n", - " \"name\": \"Male\",\n", - " \"frequency\": 50,\n", - " \"description\": null\n", - " }\n", - " ]\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"name\": \"IAPT.iapt.Rep_Referral\",\n", - " \"description\": \"IAPT.iapt.Rep_Referral\",\n", - " \"columns\": [\n", - " {\n", - " \"name\": \"Pseudonymised Service Request Identifier\",\n", - " \"description\": \"A request for the provision of care services to a PATIENT.\",\n", - " \"dataType\": \"String\",\n", - " \"sensitive\": false,\n", - " \"values\": [\n", - " {\n", - " \"name\": \"Male\",\n", - " \"frequency\": 50,\n", - " \"description\": null\n", - " }\n", - " ]\n", - " }\n", - " ]\n", - " }\n", - " ],\n", - " \"tissuesSampleCollection\": null\n", - " },\n", - " \"app\": {\n", - " \"id\": 0\n", - " },\n", - " \"id\": \"875\",\n", - " \"original_metadata\": {\n", - " \"identifier\": \"https://web.www.healthdatagateway.org/19525c5f-92ee-41b6-bb79-673624b27bdd\",\n", - " \"version\": \"3.0.1\",\n", - " \"issued\": \"2021-05-10T00:00:00.000Z\",\n", - " \"modified\": \"2021-05-10T00:00:00.000Z\",\n", - " \"revisions\": [],\n", - " \"summary\": {\n", - " \"title\": \"UPDATED TITLE\",\n", - " \"abstract\": \"Patient-level data set that captures information about people in contact with services commissioned as part of the adult Improving Access to Psychological Services (IAPT) programme.\",\n", - " \"publisher\": {\n", - " \"identifier\": \"https://web.www.healthdatagateway.org/5f86cd34980f41c6f02261f4\",\n", - " \"name\": \"NHS DIGITAL\",\n", - " \"logo\": null,\n", - " \"description\": null,\n", - " \"contactPoint\": null,\n", - " \"memberOf\": \"ALLIANCE\"\n", - " },\n", - " \"contactPoint\": \"enquiries@nhsdigital.nhs.uk\",\n", - " \"keywords\": \"Depression,Anxiety,CBT,Counselling,Talking theraphy,Cognitive,National Core Study,NCS\",\n", - " \"alternateIdentifiers\": null,\n", - " \"doiName\": null\n", - " },\n", - " \"documentation\": {\n", - " \"description\": \"Collecting information about people in contact with adult psychological therapy services in England. The IAPT data set was developed with the IAPT programme as a patient level, output based, secondary uses data set which aims to deliver robust, comprehensive, nationally consistent and comparable information for patients accessing NHS-funded IAPT services in England. This national data set has been collected since April 2012 and is a mandatory submission for all NHS funded care, including care delivered by independent sector healthcare providers. Data collection on patients with depression and anxiety disorders that are offered psychological therapies, so that we can improve the delivery of care for these conditions.\\n\\nProviders of NHS-funded IAPT services are required to submit data to NHS Digital on a monthly basis.\\n\\nAs a secondary uses data set the IAPT data set re-uses clinical and operational data for purposes other than direct patient care. It defines the data items, definitions and associated value sets extracted or derived from local information systems and sent to NHS Digital for analysis purposes. Timescales for dissemination can be found under 'Our Service Levels' at the following link: https://digital.nhs.uk/services/data-access-request-service-dars/data-access-request-service-dars-process\",\n", - " \"associatedMedia\": \"https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/improving-access-to-psychological-therapies-data-set,https://digital.nhs.uk/about-nhs-digital/corporate-information-and-documents/directions-and-data-provision-notices/data-provision-notices-dpns/improving-access-to-psychological-therapies-data-set-data-provision-notice\",\n", - " \"isPartOf\": \"mental health\"\n", - " },\n", - " \"coverage\": {\n", - " \"spatial\": \"United Kingdom,England\",\n", - " \"typicalAgeRange\": \"18-150\",\n", - " \"physicalSampleAvailability\": null,\n", - " \"followup\": \"0 - 6 MONTHS\",\n", - " \"pathway\": null\n", - " },\n", - " \"provenance\": {\n", - " \"origin\": {\n", - " \"purpose\": \"OTHER,ADMINISTRATIVE\",\n", - " \"source\": \"EPR\",\n", - " \"collectionSituation\": \"COMMUNITY,PRIMARY CARE\"\n", - " },\n", - " \"temporal\": {\n", - " \"accrualPeriodicity\": \"MONTHLY\",\n", - " \"distributionReleaseDate\": null,\n", - " \"startDate\": \"2012-04-01\",\n", - " \"endDate\": null,\n", - " \"timeLag\": \"2-6 MONTHS\"\n", - " }\n", - " },\n", - " \"accessibility\": {\n", - " \"usage\": {\n", - " \"dataUseLimitation\": \"NO RESTRICTION\",\n", - " \"dataUseRequirements\": \"INSTITUTION SPECIFIC RESTRICTIONS,PROJECT SPECIFIC RESTRICTIONS,TIME LIMIT ON USE\",\n", - " \"resourceCreator\": \"NHS DIGITIAL\",\n", - " \"investigations\": \"https://digital.nhs.uk/services/data-access-request-service-dars/register-of-approved-data-releases\",\n", - " \"isReferencedBy\": null\n", - " },\n", - " \"access\": {\n", - " \"accessRights\": \"https://digital.nhs.uk/services/data-access-request-service-dars\",\n", - " \"accessService\": \"Once your DARS application has been approved, data will be made available either by secure file transfer or through the Data Access Environment (DAE). BL\\n\\nSecure file transfer: https://digital.nhs.uk/services/transfer-data-securely\\n\\nDAE: https://digital.nhs.uk/services/data-access-environment-dae\",\n", - " \"accessRequestCost\": \"https://digital.nhs.uk/services/data-access-request-service-dars/data-access-request-service-dars-charges\",\n", - " \"deliveryLeadTime\": null,\n", - " \"jurisdiction\": \"GB-ENG\",\n", - " \"dataProcessor\": null,\n", - " \"dataController\": \"NHS DIGITAL\"\n", - " },\n", - " \"formatAndStandards\": {\n", - " \"vocabularyEncodingScheme\": \"ODS,SNOMED CT,NHS NATIONAL CODES,ICD10\",\n", - " \"conformsTo\": \"NHS DATA DICTIONARY\",\n", - " \"language\": \"en\",\n", - " \"format\": \"CSV\"\n", - " }\n", - " },\n", - " \"enrichmentAndLinkage\": {\n", - " \"qualifiedRelation\": \"https://digital.nhs.uk/services/data-access-request-service-dars/register-of-approved-data-releases\",\n", - " \"derivation\": \"Data will be minimised as appropriate relative to the data access application\",\n", - " \"tools\": \"https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/improving-access-to-psychological-therapies-data-set/submitting-iapt-data\"\n", - " },\n", - " \"observations\": [\n", - " {\n", - " \"observedNode\": \"EVENTS\",\n", - " \"measuredValue\": 114125,\n", - " \"measuredProperty\": \"COUNT\",\n", - " \"observationDate\": \"2021-02-25\",\n", - " \"disambiguatingDescription\": \"In December 2020 there were 114,125 referrals made into IAPT services in England.\"\n", - " },\n", - " {\n", - " \"observedNode\": \"EVENTS\",\n", - " \"measuredValue\": 81578,\n", - " \"measuredProperty\": \"COUNT\",\n", - " \"observationDate\": \"2021-02-25\",\n", - " \"disambiguatingDescription\": \"In December 2020, 81,578 referrals into IAPT services in England started a course of treatment.\"\n", - " },\n", - " {\n", - " \"observedNode\": \"EVENTS\",\n", - " \"measuredValue\": 48331,\n", - " \"measuredProperty\": \"COUNT\",\n", - " \"observationDate\": \"2021-02-25\",\n", - " \"disambiguatingDescription\": \"In December 2020, 48,331 referrals into IAPT services in England completed a course of treatment.\"\n", - " }\n", - " ],\n", - " \"structuralMetadata\": [\n", - " {\n", - " \"name\": \"IAPT.iapt.Rep_Referral\",\n", - " \"description\": \"IAPT.iapt.Rep_Referral\",\n", - " \"elements\": [\n", - " {\n", - " \"name\": \"Count of number of Non-guided Self Help (Computer) sessions (derived)\",\n", - " \"description\": \"Count of number of Non-guided Self Help (Computer) sessions (derived)\",\n", - " \"dataType\": \"Number\",\n", - " \"sensitive\": false\n", - " }\n", - " ]\n", - " },\n", - " {\n", - " \"name\": \"IAPT.iapt.Rep_Referral\",\n", - " \"description\": \"IAPT.iapt.Rep_Referral\",\n", - " \"elements\": [\n", - " {\n", - " \"name\": \"Pseudonymised Service Request Identifier\",\n", - " \"description\": \"A request for the provision of care services to a PATIENT.\",\n", - " \"dataType\": \"String\",\n", - " \"sensitive\": false\n", - " }\n", - " ]\n", - " }\n", - " ]\n", - " },\n", - " \"gwdmVersion\": \"1.1\"\n", - " },\n", - " \"version\": 2\n", - " }\n", - " ]\n", - " }\n", - "}\n" - ] - } - ], + "outputs": [], "source": [ "response = requests.put(\n", " f\"{api_path}/integrations/datasets/{dataset_id}\", headers=headers, json=newmetadata\n", @@ -1777,7 +270,7 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": null, "id": "dfce3deb", "metadata": {}, "outputs": [], @@ -1789,23 +282,16 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": null, "id": "e75312a6", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "3\n" - ] - } - ], + "outputs": [], "source": [ "data = response.json()[\"data\"]\n", "versions = data[\"versions\"]\n", - "#print(json.dumps(versions, indent=6))\n", - "print(len(versions))" + "\n", + "\n", + "[v['metadata']['metadata']['required']['version'] for v in versions]" ] }, { @@ -1814,7 +300,12 @@ "id": "b8544866", "metadata": {}, "outputs": [], - "source": [] + "source": [ + "response = requests.delete(\n", + " f\"{api_path}/integrations/datasets/{dataset_id}\", headers=headers\n", + ")\n", + " " + ] } ], "metadata": { diff --git a/docs/retrieving-a-dataset.md b/docs/retrieving-a-dataset.md index e50fe74..4ff7f2a 100644 --- a/docs/retrieving-a-dataset.md +++ b/docs/retrieving-a-dataset.md @@ -47,7 +47,7 @@ You can request to get your dataset metadata back using a different schema model #### BioSchema -=== " python requests " +=== " python " ```python diff --git a/docs/updating-a-dataset.md b/docs/updating-a-dataset.md index f9686a2..0fd95e1 100644 --- a/docs/updating-a-dataset.md +++ b/docs/updating-a-dataset.md @@ -1,6 +1,6 @@ Method `PUT` [`/api/v1/integrations/datasets/{id}`](https://api.dev.hdruk.cloud/api/documentation#/Dataset%20Integrations/create_datasets_from_app) you can update your dataset metadata with a new version -=== " python requests " +=== " python " ```python