diff --git a/README.md b/README.md index bb17b7aa0..682c84e53 100644 --- a/README.md +++ b/README.md @@ -3,28 +3,27 @@ National Integration Adaptor - [GP2GP Requesting Adaptor](https://digital.nhs.uk Incumbent providers (e.g. TPP, EMIS, SystemOne) would have to make changes to their GP Connect interface implementations in order to deploy GP2GP Adaptor in their infrastructure to support the losing practice scenario - i.e. whereby a -different practice transfers patient data from the incumbent. In particular, they would need to implement 1.6.0 version +different practice transfers patient data from the incumbent. In particular, they would need to implement the 1.6.2 version that is required by the GPC Consumer and GP2GP adaptors. -This business case is not always easy to be accepted by the incumbent providers, as they would have to invest time to +This business case is not always easy for the incumbent providers to accept, as they would have to invest time to make those changes. -The motivation for the GP2GP FHIR Request Adaptor is to remove the dependency from incumbent providers to do that work. +The motivation for the GP2GP FHIR Request Adaptor is to remove the dependency on incumbent providers to do that work. The idea is to build an adaptor that could be installed and configured in a New Market Entrant (NME) infrastructure, -and could work with the incumbent’s GPC < 1.6.0. +and could work with the incumbent’s GPC < 1.6.2. -Adaptor consists of two main components: +The Adaptor consists of two main components: - GPC API Facade - GP2GP Translator -Both are Java Spring Boot applications, released as separate docker images. - +Both are Java Spring Boot applications, released as separate Docker images. ## Table of contents 1. [Guidance for setting up the GP2GP adaptors in INT](/getting-started-instructions.md) 1. [Guidance for operating the adaptor as a New Market Entrant](/OPERATING.md) -1. [Guidance on integrating with the adaptors APIs](#endpoints) +1. [Guidance on integrating with the Adaptor's APIs](#endpoints) 1. [Guidance for developing the adaptor](/developer-information.md) 1. [Documentation on how this adaptor maps GP2GP concepts to GPConnect concepts](https://github.com/NHSDigital/patient-switching-adaptors-mapping-documentation) @@ -34,7 +33,7 @@ The Adaptor's facade provides two main endpoints for interacting with patient re ### POST /Patient/$gpc.migratestructuredrecord -The migratestructuredrecord endpoint is the primary endpoint for the adaptor. +The migratestructuredrecord endpoint is the primary endpoint for the Adaptor. This endpoint initiates the electronic health record (EHR) transfer process. To use this endpoint, you need to provide the following headers: @@ -42,7 +41,7 @@ To use this endpoint, you need to provide the following headers: - FROM-ASID : ASID identifier of the winning New Market Entrant (NME) - TO-ODS : ODS identifier of the losing incumbent - FROM-ODS : ODS identifier of the winning New Market Entrant (NME) -- ConversationId : A unique UUID for the request. If not provided, the adaptor will generate one and include it in the response headers. +- ConversationId : A unique UUID for the request. If not provided, the Adaptor will generate one and include it in the response headers. It must be used for all further calls for the patient's NHS number. If a `ConversationId` header is provided where the value is populated but does not contain a valid UUID, then the @@ -64,7 +63,7 @@ following response will be returned: "display": "Bad request" }] }, - "diagnostics": "ConversationId header must be either be empty or a valid UUID" + "diagnostics": "ConversationId header must either be empty or a valid UUID" }] } ``` @@ -73,7 +72,7 @@ For more details on how to query the losing practice details, see the [requestin [requesting site requirements]: https://nhse-dsic.atlassian.net/wiki/spaces/DCSDCS/pages/12512034968/GP2GP+Requesting+Adaptor#Registration-Process-&-EHR-Request -The endpoint also requires a JSON body that includes the needed patient NHS number. +The endpoint also requires a JSON body that includes the patient's NHS number. Request Body Example: ```json @@ -103,13 +102,13 @@ Request Body Example: Responds with one of: 1. Initial request: If you successfully configure the endpoint described above and call it, you should receive a 202-accepted response. This means the adaptor has received the request and is making the relevant requests. -2. Polling the request: after receiving a 202 response, we recommend polling the endpoint at regular intervals using an +2. Polling the request: After receiving a 202 response, we recommend polling the endpoint at regular intervals using an increasing call gap strategy until you get a 200 response. Each poll can return one of the following responses: - 204 No content: this response indicates that we are still processing the requests / waiting for the EHR message response. - 200 Success: this response indicates we have successfully received and converted the EHR to JSON; you will also receive the FHIR bundle in the response's body. An example of this response can be found within [expectedBundle.json](gp2gp-translator/src/integrationTest/resources/json/expectedBundle.json). - - 400,404,500,501: The endpoint can return all these possible error codes. These will all provide a detailed error with an operationOutcome JSON model response in the body. This looks like... + - 400,404,500,501: The endpoint can return all these possible error codes. These will all provide a detailed error with an OperationOutcome JSON response in the body. This looks like... ```json { @@ -145,7 +144,7 @@ Responds with one of: ### POST /$gpc.ack This endpoint finalizes the EHR transfer process. -If you do not call this endpoint after receiving an EHR from the migratestructuredrecord enpoint, then you risk the losing practise triggering off the manual postal transfer. +If you do not call this endpoint after receiving an EHR from the migratestructuredrecord endpoint, then you risk the losing practice triggering the manual postal transfer. To use this endpoint, you need to provide the following headers: @@ -159,21 +158,21 @@ Endpoint calling: This endpoint is a fire-and-forget endpoint. - If your request is successful, you will get a 200: Success response. - If your request is unsuccessful, you will get a 500: Server error response. -- If you receive a 500 response, you can retry again at any point, however, it should be noted that you must receive a 200: Success response from the migratestructuredrecord for the given conversation ID to receive a 200: Success from this endpoint. +- If you receive a 500 response, you can retry at any point, however, it should be noted that you must receive a 200: Success response from the migratestructuredrecord for the given conversation ID to receive a 200: Success from this endpoint. ## Licensing -This code is dual licensed under the MIT license and the OGL (Open Government License). +This code is dual-licensed under the MIT license and the OGL (Open Government License). Any new work added to this repository must conform to the conditions of these licenses. -In particular this means that this project may not depend on GPL-licensed or AGPL-licensed libraries, +In particular, this means that this project may not depend on GPL-licensed or AGPL-licensed libraries, as these would violate the terms of those libraries' licenses. -The contents of this repository are protected by Crown Copyright (C). +The contents of this repository are protected by Crown Copyright ©. ## Performance Case 1: Performance Testing with JMeter -We conducted a performance test of the Adaptor using the JMeter tool. +A performance test of the Adaptor was conducted using the JMeter tool. The use case focused on simulating a patient transfer request, where Electronic Health Record (EHR) requests were sent to the Adaptor, expecting a bundle in return. This test involved two text attachments with sizes of 2.44 MB and 0.7 MB, respectively. @@ -202,7 +201,7 @@ indicating sufficient capacity for additional load. Case 2: Performance Testing via TPP/EMIS and Medicus In a separate series of tests, up to 10 concurrent patient transfers were completed, -involving varying attachment types (100, 500, 1000) and file sizes (1 KB, 100 KB, 500 KB, 3.5 MB, 5 MB). +involving varying attachment counts (100, 500, 1000) and file sizes (1 KB, 100 KB, 500 KB, 3.5 MB, 5 MB). These tests were conducted with TPP/EMIS as the sending systems and Medicus as the receiving system. Resource Allocation: @@ -219,18 +218,18 @@ Message Queue: Results: A single patient record of 10 MB was processed in approximately 20 seconds. -On average, the transfer of up to 10 patients was completed within 1 to 1 minute and 40 seconds. +On average, the transfer of up to 10 patients was completed within 1 minute to 1 minute and 40 seconds. -![report1.jpg](test-suite%2Fnon-functional-tests%2Ftest-scenario%2Fperf_report%2Freport1.jpg) +![report1.jpg](test-suite/non-functional-tests/test-scenario/perf_report/report1.jpg) Overall performance statistics: -![report2.png](test-suite%2Fnon-functional-tests%2Ftest-scenario%2Fperf_report%2Freport2.png) +![report2.png](test-suite/non-functional-tests/test-scenario/perf_report/report2.png) -Active transfers per one iteration was 400: -![report4.png](test-suite%2Fnon-functional-tests%2Ftest-scenario%2Fperf_report%2Freport4.png) +Active transfers per iteration were 400: +![report4.png](test-suite/non-functional-tests/test-scenario/perf_report/report4.png) Response time: -![report5.png](test-suite%2Fnon-functional-tests%2Ftest-scenario%2Fperf_report%2Freport5.png) +![report5.png](test-suite/non-functional-tests/test-scenario/perf_report/report5.png) -Results can be seen in using graphs by importing results8.jtl into Jmeter. +Results can be visualised by importing results8.jtl into JMeter. diff --git a/REDACTIONS.md b/REDACTIONS.md index a1156475d..257ff9125 100644 --- a/REDACTIONS.md +++ b/REDACTIONS.md @@ -1,52 +1,52 @@ -# **GP2GP Redactions** +# GP2GP Redactions Redaction is the process of restricting access or ‘hiding’ information in the online viewer from the patient and anyone they have granted proxy access to. It does not remove the information from the patient’s record. Before information is shared, sensitive information which could be harmful to a patient or is about or refers to other -people (third parties) should be assessed, and a decision taken about whether or not to redact it. +people (third parties) should be assessed, and a decision taken about whether to redact it. Individual words, sentences, or paragraphs within an entry cannot be redacted. The entire entry, for instance the -consultation or document must be either shared (visible online) or redacted i.e. made not visible online). +consultation or document, must be either shared (visible online) or redacted (i.e. made not visible online). -## **Why are redactions used** +## Why are Redactions used? When GP records are shared with patients or their representatives (nominated proxy), the GP practice is responsible for ensuring that only appropriate information is disclosed. To ensure this happens, information in both the existing record and any new items should be checked and where necessary, redacted. Most records will not have content that requires redaction. For individual requests for full online record access (i.e. -past, historic and current records) it is best practice for all of the records to be checked in advance of being shared. +past, historic and current records) it is best practice for all the records to be checked in advance of being shared. -For more information about redactions please review the NHS England Documentation for redactions: +For more information about Redactions, please review the NHS England documentation: -[*https://www.england.nhs.uk/long-read/redacting-information-for-online-record-access/*](https://www.england.nhs.uk/long-read/redacting-information-for-online-record-access/) +[https://www.england.nhs.uk/long-read/redacting-information-for-online-record-access/](https://www.england.nhs.uk/long-read/redacting-information-for-online-record-access/) -## Enabling redactions support in the GP2GP adaptors +## Enabling Redactions support in the GP2GP adaptors -The GP2GP Adaptor needs to be deployed with the necessary configuration for redactions to be enabled. +The GP2GP Adaptor needs to be deployed with the necessary configuration for Redactions to be enabled. -To enable Redactions, the GP2GP Adaptor should be deployed with the following environment variable set as follows: +To enable Redactions, the GP2GP Adaptor should be deployed with the following environment variable: ***`GP2GP_REDACTIONS_ENABLED: true`*** -To disable Redactions, the GP2GP Adaptor should be deployed with the following environment variable set as follows: +To disable Redactions, the GP2GP Adaptor should be deployed with the following environment variable: ***`GP2GP_REDACTIONS_ENABLED: false`*** -Note that if redactions are not enabled, the resultant XML be produced with an `interactionId` of `RCMR_IN030000UK06` and +Note that if Redactions are not enabled, the resultant XML will be produced with an `interactionId` of `RCMR_IN030000UK06` and redaction security labels will not be populated. -**This setting should be set to `false` until the incumbent systems have enabled redactions functionality across their -whole estate. If in any doubt please contact NIA Support.** +**This setting should be set to `false` until the incumbent systems have enabled Redactions functionality across their +whole estate. If in any doubt, please contact NIA Support.** -## How are redactions identified +## How are Redactions identified? When sending a patient record using the GP2GP System, a JSON FHIR Bundle is sent. Certain resources (covered below) can be marked as redacted by applying a `NOPAT` security label within the resource metadata. `NOPAT` is a code within the -*ActCode Code System* and signifies that the information should not not be disclosed to the patient, family or +*ActCode Code System* and signifies that the information should not be disclosed to the patient, family or caregivers. This label should be applied to the `meta.security` element with the `system`, `code` and `display` values set exactly as @@ -54,12 +54,12 @@ below: ```json { - "meta":{ - "security":[ + "meta": { + "security": [ { - "system":"http://hl7.org/fhir/v3/ActCode", - "code":"NOPAT", - "display":"no disclosure to patient, family or caregivers without attending provider's authorization" + "system" : "http://hl7.org/fhir/v3/ActCode", + "code" : "NOPAT", + "display" : "no disclosure to patient, family or caregivers without attending provider's authorization" } ] } @@ -70,13 +70,13 @@ When a patient record is received from an incumbent system using the GP2GP Syste will be provided. Certain elements within the XML may be marked as redacted by a `confidentialityCode` security label containing a `code` value of `NOPAT`. -This security label should be applied to element being redacted and should be exactly as below: +This security label should be applied to the element being redacted and should be exactly as below: ```xml ``` -## **GP2GP Requesting Adaptor Redactions** +## GP2GP Requesting Adaptor Redactions This section details the resource types which can be redacted when using the GP2GP Request Adaptor. @@ -86,19 +86,19 @@ This section details the resource types which can be redacted when using the GP2 Laboratory Results consist of a number of resources which can have the `NOPAT` security label applied. -**TPP only allows laboratory results to be marked as redacted at the consultation level, it is not possible to redact individual items.** +**TPP only allows laboratory results to be marked as redacted at the consultation level; it is not possible to redact individual items.** #### Diagnostic Report -**Both Optum and TPP do not allow confidentiality tags to be added to `DiagnosticReport` resources in their respective systems. This has been raised with Optium to investigate further.** +**Neither Optum nor TPP allows confidentiality tags to be added to `DiagnosticReport` resources in their respective systems. This has been raised with Optum to investigate further.** #### Specimen -**Both Optum and TPP do not allow confidentiality tags to be added to `Specimen` resources in their respective systems. This has been raised with Optium to investigate further.** +**Neither Optum nor TPP allows confidentiality tags to be added to `Specimen` resources in their respective systems. This has been raised with Optum to investigate further.** #### Observation \- Filing Comment -To mark an `Observation (Filing Comment)` as redacted, the `NOPAT` security label should be applied to either of the following elements: +To mark an `Observation (Filing Comment)` as redacted, the `NOPAT` security label should be applied to any of the following elements: 1. The actual `NarrativeStatement / confidentialityCode`. 2. The `CompoundStatement / confidentialityCode` when the `CompoundStatement` is the parent of the actual `NarrativeStatement`. @@ -108,7 +108,7 @@ This will populate the `Observation(Filing Comment)` in the resultant JSON FHIR #### Observation \- Test Group Header -To mark an `Observation (Test Group)` as redacted, the `NOPAT` security label should be applied to either of the following elements: +To mark an `Observation (Test Group)` as redacted, the `NOPAT` security label should be applied to any of the following elements: 1. The actual `CompoundStatement / confidentialityCode`. 2. The associated `RequestStatement / confidentialityCode`. @@ -118,13 +118,13 @@ This will populate the `Observation(Test Group)` in the resultant JSON FHIR with #### Observation \- Test Result -To mark an `Observation (Test Result)` as redacted, the `NOPAT` security label should be applied to either of the following elements: +To mark an `Observation (Test Result)` as redacted, the `NOPAT` security label should be applied to any of the following elements: 1. The actual `ObservationStatement / confidentialityCode`. 2. The associated `RequestStatement / confidentialityCode`. 3. The containing `EhrComposition / confidentialityCode`. -This will populate the `Observation(Test Result)` in the resultant JSON FHIR with the `NOPAT` security label. +This will populate the `Observation (Test Result)` in the resultant JSON FHIR with the `NOPAT` security label. ### Allergy Intolerance @@ -133,11 +133,11 @@ To mark a `Drug Allergy` or `Non-Drug Allergy` as redacted, the `NOPAT` security 1. The actual `ObservationStatement / confidentialityCode`. 2. The containing `EhrComposition / confidentialityCode`. -This will populate the `AllergyIntollerance` in the resultant JSON FHIR with the `NOPAT` security label. +This will populate the `AllergyIntolerance` in the resultant JSON FHIR with the `NOPAT` security label. ### Condition -To mark a `Condition` as redacted, the `NOPAT` security label should be applied to either of the following elements: +To mark a `Condition` as redacted, the `NOPAT` security label should be applied to any of the following elements: 1. `LinkSet / confidentialityCode`. 2. `EhrComposition / confidentialityCode`. @@ -156,13 +156,13 @@ This will populate the relevant `Immunization` in the resultant JSON FHIR with t ### Medication Request / Medication Statement -To mark a `MedicationRequest` and associated `MedicationStatement` as redacted, the `NOPAT` security label should be applied to the `MedicationStatement / confidentialityCode` element. +To mark a `MedicationRequest` and associated `MedicationStatement` as redacted, the `NOPAT` security label should be applied to the `MedicationStatement / confidentialityCode` element. -This will populate the relevant `MedicationRequest` and `MedicationStatement` resources in the resultant JSON FHIR with the `NOPAT` security label. +This will populate the relevant `MedicationRequest` and `MedicationStatement` resources in the resultant JSON FHIR with the `NOPAT` security label. ### Document Reference -To mark a `DocumentReference` as redacted, the `NOPAT` security label should be applied to a `NarrativeStatement / reference / referredToExternalDocument / confidentialityCode` element. +To mark a `DocumentReference` as redacted, the `NOPAT` security label should be applied to the `NarrativeStatement / reference / referredToExternalDocument / confidentialityCode` element. This will populate the relevant `DocumentReference` resource in the resultant JSON FHIR with the `NOPAT` security label. @@ -170,8 +170,8 @@ This will populate the relevant `DocumentReference` resource in the resultant JS To mark a `ProcedureRequest` as redacted, the `NOPAT` security label should be applied to either of the following elements: -4. `PlanStatement / confidentialityCode`. -5. `EhrComposition / confidentialityCode` . +1. `PlanStatement / confidentialityCode`. +2. `EhrComposition / confidentialityCode`. This will populate the relevant `ProcedureRequest` in the resultant JSON FHIR with the `NOPAT` security label. @@ -181,8 +181,8 @@ This will populate the relevant `ProcedureRequest` in the resultant JSON FHIR wi To mark a `ReferralRequest` as redacted, the `NOPAT` security label should be applied to either of the following elements: -6. `RequestStatement / confidentialityCode`. -7. `EhrComposition / confidentialityCode`. +1. `RequestStatement / confidentialityCode`. +2. `EhrComposition / confidentialityCode`. This will populate the relevant `ReferralRequest` in the resultant JSON FHIR with the `NOPAT` security label. @@ -190,14 +190,12 @@ This will populate the relevant `ReferralRequest` in the resultant JSON FHIR wit An Observation can contain a variety of data. In addition to the *laboratory results observations* documented above, the following observation resources can also be redacted. -#### - #### Observation \- Blood Pressure -To mark an `Observation(Blood Pressure)` as redacted either of the following conditions must occur: +To mark an `Observation(Blood Pressure)` as redacted, any of the following conditions must occur: 1. The `CompoundStatement / confidentialityCode` where the `CompoundStatement` is the `Battery` containing the measurements has the `NOPAT` security label applied. -2. When any contained `ObservationStatement / confidentialityCode` within a `CompoundStatement` which is a `Battery` have the `NOPAT` security label applied. +2. Any contained `ObservationStatement / confidentialityCode` within a `CompoundStatement` which is a `Battery` has the `NOPAT` security label applied. 3. `EhrComposition / confidentialityCode` has the `NOPAT` security label applied. This will populate the `Observation(Blood Pressure)` in the resultant JSON FHIR with the `NOPAT` security label. @@ -217,15 +215,6 @@ To mark an `Encounter` as redacted, the `NOPAT` security label should be applied This will populate the relevant `Encounter` in the resultant JSON FHIR with the `NOPAT` security label. -### Referral Request - -To mark a `ReferralRequest` as redacted, the `NOPAT` security label should be applied to either: - -1. The relevant `RequestStatement / confidentialityCode`. -2. The associated `ehrComposition / confidentialityCode` - -This will populate the relevant `ReferralRequest.meta` field in the resultant JSON FHIR with the `NOPAT` security label. - ### List \- Topic **EMIS and TPP do not support the concept of redacting at a topic level.** \ No newline at end of file diff --git a/developer-information.md b/developer-information.md index c323c7c68..c5e2aaf49 100644 --- a/developer-information.md +++ b/developer-information.md @@ -65,17 +65,17 @@ You can also review what commits have gone in by using the git log command or ID Deploy this commit to the AWS Path to Live environment. -1. Clicking through to the successful Jenkins build of your commit -1. Navigate to the "Push Image" section of the pipeline, looking for an entry which looks like +1. Clicking through to the successful GH Actions build of your commit +1. Navigate to the "Build / Generate Build Id" section of the pipeline, looking for an entry which looks like ``` - docker push ...amazonaws.com/pss_gpc_facade: + Run chmod +x ./create_build_id.sh + Generated the build tag: PR-001-000a0a1 ``` 1. Make a note of the so it can be deployed in the step below. -1. Log into the [Jenkins Terraform project][jenkins-terraform] and specify project=`nia`, Environment=`ptl`, +1. Navigate to the [Terraform project](https://github.com/NHSDigital/integration-adaptors-deployment) and specify project=`nia`, Environment=`ptl`, component=`pss`, action=`apply`, variables=`pss_build_id=` and click the Build button waiting for the build to finish successfully -[jenkins-terraform]: http://ec2-35-177-12-25.eu-west-2.compute.amazonaws.com/job/Terraform/build?delay=0sec Perform an end to end smoke test of the adaptor by transferring the patient 9732596910 from C88046 to P83007 using the [instructions on Confluence][e2e-ptl-test-instructions] by setting the `to-ods: C88046` and `to-asid: 858000001001`. diff --git a/getting-started-with-windows.md b/getting-started-with-windows.md index 16ac2a03a..86d8bf3dd 100644 --- a/getting-started-with-windows.md +++ b/getting-started-with-windows.md @@ -1,123 +1,120 @@ -## Getting started for Windows Users -Before cloning the project, we need to create a `.gitconfig` file. -1. Open a terminal or command prompt/git bash and execute: `git config --global -e` +## Getting Started for Windows Users + +Before cloning the project, we need to configure the `.gitconfig` file. + +1. Open a terminal or Command Prompt / Git Bash and execute: `git config --global -e` 2. You should see a file appear inside the prompt window: -``` - [user] - name = user name - email = useremail@gmail.com -``` + ``` + [user] + name = user name + email = useremail@gmail.com + ``` 3. Close the window and cancel any operation. - Navigate to: - 1. Go to directory C:\Users\UserName - 2. Open the file `.gitconfig` in any text editor - 3. Add the following line to the end of the script and uncomment by deleting the # symbol: +4. Navigate to the `.gitconfig` file and edit it: + 1. Go to directory `C:\Users\UserName`. + 2. Open the file `.gitconfig` in any text editor. + 3. Add the following section to the end of the file: ``` - [core] - autocrlf = input + [core] + autocrlf = input ``` The file should look like the following: - ``` - [user] - name = user name - email = useremail@gmail.com - [core] - autocrlf = input + [user] + name = user name + email = useremail@gmail.com + [core] + autocrlf = input ``` NOTE: These steps should be done before cloning the project as the `core` element is essential. - If the project has already been cloned, it should be deleted and cloned again with `core` setting applied. - + If the project has already been cloned, it should be deleted and cloned again with the `core` setting applied. -4. Install WSL2 and Ubuntu Terminal (You can follow this [tutorial](https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-10#2-install-wsl) or follow these steps) - 1. Open Windows Powershell OR Command Prompt (If you need permissions then open as admin) - 2. Install WSL for the first time +5. Install WSL2 and Ubuntu Terminal (you can follow this [tutorial](https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-10#2-install-wsl) or follow these steps): + 1. Open Windows PowerShell or Command Prompt (if you need permissions, then open as admin). + 2. Install WSL for the first time: ``` wsl --install ``` - 3. Run to check the version + 3. Run the following to check the version: ``` wsl -l -v ``` - 4. Then Run (depending on versions. need to check which versions are in version 1 and se to version 2) + 4. Set WSL to default to version 2: ``` wsl --set-default-version 2 ``` - 5. Then Run + 5. Install Ubuntu: ``` wsl --install -d Ubuntu - ``` - 6. Once Ubuntu is installed your command prompt should look like this: - ``` - computername@1234:/mnt/c/Users/UserName$ - ``` - 7. To access the wsl (Ubuntu installed) open command prompt and use: - ``` - wsl - ``` - 8. Close down command prompt. - - -5. Once installed WSL2 and Ubuntu Terminal is installed, - open command prompt and Run the following commands: - ``` - wsl (this should open Ubuntu terminal inside command prompt) + ``` + 6. Once Ubuntu is installed, your Command Prompt should look like this: + ``` + computername@1234:/mnt/c/Users/UserName$ + ``` + 7. To access WSL (Ubuntu), open Command Prompt and use: + ``` + wsl + ``` + 8. Close Command Prompt. + +6. Once WSL2 and Ubuntu Terminal are installed, open Command Prompt and run the following commands: + ``` + wsl sudo apt update sudo apt upgrade sudo apt install bpython bpython ``` - -6. Now we need to configure JAVA_HOME: - run in order (inside the Ubuntu terminal) - - ``` - sudo apt install openjdk-21-jdk - sudo apt update - ``` -7. Now we need to configure JAVA_HOME variable + +7. Now we need to configure the JAVA_HOME variable: ``` nano ~/.bashrc ``` + 8. The command above will open a file. Use the down arrow key and navigate to the last line of the file. -9. Add the following at the end of the script: - ``` - JAVA_HOME=$(dirname $( readlink -f $(which java) )) - JAVA_HOME=$(realpath "$JAVA_HOME"/../) - export JAVA_HOME - ``` -10. Write Out the file with the shortcut provided and then exit. - ``` - sudo update-alternatives --config java - sudo apt update - ``` -11. Use this command to check if JAVA21 is installed - ``` - java -version - ``` +9. Add the following at the end of the file: + ``` + JAVA_HOME=$(dirname $( readlink -f $(which java) )) + JAVA_HOME=$(realpath "$JAVA_HOME"/../) + export JAVA_HOME + ``` + +10. Write out the file with the shortcut provided and then exit. + ``` + sudo update-alternatives --config java + sudo apt update + ``` + +11. Use this command to check if Java 21 is installed: + ``` + java -version + ``` + 12. You should be presented with this: - ``` - openjdk version "21.0.0" - ``` + ``` + openjdk version "21.0.0" + ``` -13. To install unzip run in the Ubuntu Terminal +13. To install unzip, run the following in the Ubuntu terminal: ``` sudo apt-get install unzip ``` -14. To install postgresql in the Ubuntu Terminal: + +14. To install PostgreSQL in the Ubuntu terminal: ``` sudo apt install postgresql postgresql-contrib ``` -15. WSL needs to be enabled in docker: - 1. Open docker desktop > settings > resources > WSL INTEGRATION - 2. Tick the box where it says "Ubuntu" or the name of your ubuntu terminal +15. WSL needs to be enabled in Docker: + 1. Open Docker Desktop > Settings > Resources > WSL INTEGRATION. + 2. Tick the box where it says "Ubuntu" or the name of your Ubuntu terminal. -16. Use the IntelliJ terminal to run the project use the `wsl`. +16. To run the project, use the `wsl` command in the IntelliJ terminal. ### Troubleshooting: + [Microsoft Docs for installing Linux on Windows](https://learn.microsoft.com/en-us/windows/wsl/install) [Error code 0x80070520](https://www.majorgeeks.com/content/page/microsoft_store_error_0x80070520.html) @@ -126,4 +123,4 @@ Update WSL version: `wsl --update --web-download` [Windows Subsystem for Linux Documentation](https://learn.microsoft.com/en-us/windows/wsl/) -[Other WSL related issues](https://learn.microsoft.com/en-us/windows/wsl/troubleshooting) \ No newline at end of file +[Other WSL-related issues](https://learn.microsoft.com/en-us/windows/wsl/troubleshooting)