From 80f334b9eb0d026325f83e1eba242efa27946694 Mon Sep 17 00:00:00 2001 From: Dan Nita Date: Fri, 9 Aug 2024 15:25:53 +0100 Subject: [PATCH 1/2] update summary data provider collection --- app/Console/Commands/AddDataProviderNetwork.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/AddDataProviderNetwork.php b/app/Console/Commands/AddDataProviderNetwork.php index 66fc1348a..b63ba61c3 100644 --- a/app/Console/Commands/AddDataProviderNetwork.php +++ b/app/Console/Commands/AddDataProviderNetwork.php @@ -28,7 +28,7 @@ class AddDataProviderNetwork extends Command public function __construct() { parent::__construct(); - $this->readMigrationFile(storage_path() . '/migration_files/data_provider_networkv3.csv'); + $this->readMigrationFile(storage_path() . '/migration_files/data_provider_networkv3-Introduction.csv'); } /** @@ -50,8 +50,9 @@ public function handle() foreach ($csvData as $item) { $teamName = strtoupper(trim($item['Data provider/Team'])); $dataProviderName = strtoupper(trim($item['Data provider network'])); + $dataProviderSummary = htmlentities(trim($item['Summary'])); - $return = $this->dataProviderNetworkTeam($dataProviderName, $teamName); + $return = $this->dataProviderNetworkTeam($dataProviderName, $teamName, $dataProviderSummary); if (!$return) { continue; } @@ -64,13 +65,14 @@ public function handle() foreach ($csvData as $item) { $teamName = strtoupper(trim($item['Data provider/Team'])); $dataProviderName = strtoupper(trim($item['Data provider network'])); + $dataProviderSummary = strtoupper(trim($item['Summary'])); if ($inputDataProviderName !== $dataProviderName) { echo 'Found Data Provider Network name ' . $dataProviderName . '. skipping ...' . PHP_EOL; continue; } - $return = $this->dataProviderNetworkTeam($dataProviderName, $teamName); + $return = $this->dataProviderNetworkTeam($dataProviderName, $teamName, $dataProviderSummary); if (!$return) { continue; } @@ -78,7 +80,7 @@ public function handle() } } - private function dataProviderNetworkTeam(string $dataProviderNetworkName, string $teamName): bool + private function dataProviderNetworkTeam(string $dataProviderNetworkName, string $teamName, string $dataProviderSummary = null): bool { // check in teams $team = Team::where('name', $teamName)->first(); @@ -94,6 +96,7 @@ private function dataProviderNetworkTeam(string $dataProviderNetworkName, string 'name' => $dataProviderNetworkName, 'enabled' => 1, 'img_url' => null, + 'summary' => $dataProviderSummary, ]); echo 'Data Provider network with name ' . $dataProviderNetworkName . ' was created.' . PHP_EOL; From d04926470d44f95ec6d77fe996422c25cbf69ead Mon Sep 17 00:00:00 2001 From: Dan Nita Date: Fri, 9 Aug 2024 15:27:37 +0100 Subject: [PATCH 2/2] update --- app/Console/Commands/AddDataProviderNetwork.php | 4 ++-- .../data_provider_networkv3-Introduction.csv | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 storage/migration_files/data_provider_networkv3-Introduction.csv diff --git a/app/Console/Commands/AddDataProviderNetwork.php b/app/Console/Commands/AddDataProviderNetwork.php index b63ba61c3..aa5a1ca5e 100644 --- a/app/Console/Commands/AddDataProviderNetwork.php +++ b/app/Console/Commands/AddDataProviderNetwork.php @@ -21,7 +21,7 @@ class AddDataProviderNetwork extends Command * * @var string */ - protected $description = 'Data Provider Network for import, based on file "../storage/migration_files/data_provider_networkv3.csv"'; + protected $description = 'Data Provider Network for import, based on file "../storage/migration_files/data_provider_networkv3-Introduction.csv"'; private $csvData = []; @@ -36,7 +36,7 @@ public function __construct() */ public function handle() { - $askDataProviderNetwork = $this->ask('Data Provider Network for import, based on file "../storage/migration_files/data_provider_networkv3.csv"? [default value all]', 'all'); + $askDataProviderNetwork = $this->ask('Data Provider Network for import, based on file "../storage/migration_files/data_provider_networkv3-Introduction.csv"? [default value all]', 'all'); $askInitDataProviderNetwork = $this->ask('Do you want to initialize the database for "Data Provider Network"? yes/no [default value no]', 'no'); if ($askInitDataProviderNetwork === 'yes') { diff --git a/storage/migration_files/data_provider_networkv3-Introduction.csv b/storage/migration_files/data_provider_networkv3-Introduction.csv new file mode 100644 index 000000000..d3f20297d --- /dev/null +++ b/storage/migration_files/data_provider_networkv3-Introduction.csv @@ -0,0 +1,12 @@ +Data provider network,Data provider/Team,Summary +SNSDE,Wessex SDE,The NHS Research Secure Data Environment (SDE) Network is made up of 12 SDEs who provide secure access to healthcare data for research and innovation. +SNSDE,NHS England,The NHS Research Secure Data Environment (SDE) Network is made up of 12 SDEs who provide secure access to healthcare data for research and innovation. +SNSDE,KMS SDE,The NHS Research Secure Data Environment (SDE) Network is made up of 12 SDEs who provide secure access to healthcare data for research and innovation. +Scottish Safe Haven Network,Public Health Scotland,"The Scottish Safe Haven Network (SSHN), which began operations in 2014, is responsible for managing access to NHS Scotland data for secondary use that benefits the public. Coordinated by Research Data Scotland, the network is made up of four accredited re" +Scottish Safe Haven Network,DataLoch,"The Scottish Safe Haven Network (SSHN), which began operations in 2014, is responsible for managing access to NHS Scotland data for secondary use that benefits the public. Coordinated by Research Data Scotland, the network is made up of four accredited re" +Scottish Safe Haven Network,Health Informatics Centre (HIC),"The Scottish Safe Haven Network (SSHN), which began operations in 2014, is responsible for managing access to NHS Scotland data for secondary use that benefits the public. Coordinated by Research Data Scotland, the network is made up of four accredited re" +Scottish Safe Haven Network,West of Scotland Safe Haven,"The Scottish Safe Haven Network (SSHN), which began operations in 2014, is responsible for managing access to NHS Scotland data for secondary use that benefits the public. Coordinated by Research Data Scotland, the network is made up of four accredited re" +Scottish Safe Haven Network,Grampian Data Safe Haven (DaSH),"The Scottish Safe Haven Network (SSHN), which began operations in 2014, is responsible for managing access to NHS Scotland data for secondary use that benefits the public. Coordinated by Research Data Scotland, the network is made up of four accredited re" +Secure eResearch Platform (SeRP),DPUK DATA Portal,SAIL (saildatabank.com) operates on SeRPUK (serp.ac.uk) as one of many tenancies. SeRP provides appropriate technology stacks in line with the tenancy requirements to support research projects executed within ownership and governance tenancies. SeRP curre +Secure eResearch Platform (SeRP),BREATHE,SAIL (saildatabank.com) operates on SeRPUK (serp.ac.uk) as one of many tenancies. SeRP provides appropriate technology stacks in line with the tenancy requirements to support research projects executed within ownership and governance tenancies. SeRP curre +Secure eResearch Platform (SeRP),UK Longitudinal Linkage Collaboration (UK LLC),SAIL (saildatabank.com) operates on SeRPUK (serp.ac.uk) as one of many tenancies. SeRP provides appropriate technology stacks in line with the tenancy requirements to support research projects executed within ownership and governance tenancies. SeRP curre \ No newline at end of file