Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

See also: FHIR interaction: create

  1. Make sure you know the following pieces of information, which will have been issued to you by the Integration Team:

    1. Your client ID

    2. Your client secret

    3. The URL for your endpoint on the sandbox environment

      1. The example below assumes you have a server host of: acme.fhir-api.sandbox.patientsknowbest.com

  2. Generate an access token by following the OAuth 2.0 Client credentials walkthrough

    1. The example below assumes you have been granted an access token of: abcdef

  3. Create the new Patient resource by POST-ing the Patient resource to the Patient type service on your own endpoint (replacing the values with your own as required)

Request

Code Block
curl -X POST --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: Bearer abcdef" 
  "https://acme.fhir-api.sandbox.patientsknowbest.com/fhir/Patient" 
  --data "{ \"resourceType\": \"Patient\", \"name\": [ { \"family\": \"Bloggs\", \"given\": [ \"Joe\" ] } ] }"

...

See also: FHIR interaction: search

  1. Make sure you know the following pieces of information, which will have been issued to you by the Integration Team:

    1. Your client ID

    2. Your client secret

    3. The URL for your endpoint on the sandbox environment

      1. The example below assumes you have a server host of: acme.fhir-api.sandbox.patientsknowbest.com

  2. Generate an access token by following the OAuth 2.0 Client credentials walkthrough

    1. The example below assumes you have been granted an access token of: abcdef

  3. Search for all Appointment resources by executing the following query

Request

Code Block
curl -X GET --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: Bearer abcdef" 
  "https://acme.fhir-api.sandbox.patientsknowbest.com/fhir/Appointment"

...

See also: FHIR interaction: create

  1. Make sure you know the following pieces of information, which will have been issued to you by the Integration Team:

    1. Your client ID

    2. Your client secret

    3. The URL for your endpoint on the sandbox environment

      1. The example below assumes you have a server host of: acme.fhir-api.sandbox.patientsknowbest.com

  2. Make sure you know the following pieces of information, which will depend on the data you have sent to PKB:

    1. The id of the Patient for whom the Appointment is scheduled

      1. The example below assumes the relevant patient is: Patient/f7fffd5c-122f-4b15-bdb5-c87b9dc1850a

  3. Generate an access token by following the OAuth 2.0 Client credentials walkthrough

    1. The example below assumes you have been granted an access token of: abcdef

  4. Create the new Appointment resource by POST-ing the Appointment resource to the Appointment type service on your own endpoint (replacing the values with your own as required)

Request

Code Block
curl -X POST --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: Bearer abcdef" 
  "https://acme.fhir-api.sandbox.patientsknowbest.com/fhir/Appointment" 
  --data "{ \"resourceType\": \"Appointment\", \"status\": \"booked\", \"start\": \"2022-07-28T13:38:32\", \"end\": \"2022-07-28T14:38:32\", \"participant\": [ { \"actor\": { \"reference\": \"Patient/f7fffd5c-122f-4b15-bdb5-c87b9dc1850a\" }, \"status\": \"accepted\" } ] }"

...

See also: FHIR interaction: read

  1. Make sure you know the following pieces of information, which will have been issued to you by the Integration Team:

    1. Your client ID

    2. Your client secret

    3. The URL for your endpoint on the sandbox environment

      1. The example below assumes you have a server host of: acme.fhir-api.sandbox.patientsknowbest.com

  2. Make sure you know the following pieces of information, which will depend on the data you have sent to PKB:

    1. The id of the Appointment that you wish to read

      1. The example below assumes the relevant appointment is: Appointment/f4efe66d-4cea-4199-9182-9d2113dd3108

  3. Generate an access token by following the OAuth 2.0 Client credentials walkthrough

    1. The example below assumes you have been granted an access token of: abcdef

  4. Read the Appointment by executing the following query.

Request

Code Block
curl -X GET --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: Bearer abcdef" 
  "https://acme.fhir-api.sandbox.patientsknowbest.com/fhir/Appointment/f4efe66d-4cea-4199-9182-9d2113dd3108"

...

See also: FHIR interaction: update

  1. Make sure you know the following pieces of information, which will have been issued to you by the Integration Team:

    1. Your client ID

    2. Your client secret

    3. The URL for your endpoint on the sandbox environment

      1. The example below assumes you have a server host of: acme.fhir-api.sandbox.patientsknowbest.com

  2. Make sure you know the following pieces of information, which will depend on the data you have sent to PKB:

    1. The id of the Appointment you wish to update

      1. The example below assumes the relevant appointment is: Appointment/f4efe66d-4cea-4199-9182-9d2113dd3108

  3. Generate an access token by following the OAuth 2.0 Client credentials walkthrough

    1. The example below assumes you have been granted an access token of: abcdef

  4. Update the existing Appointment resource by PUT-ing the Appointment resource to the Appointment instance service on your own endpoint (replacing the values with your own as required)

Request

Code Block
curl -X PUT --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: Bearer abcdef" 
  "https://acme.fhir-api.sandbox.patientsknowbest.com/fhir/Appointment/f4efe66d-4cea-4199-9182-9d2113dd3108" 
  --data "{ \"resourceType\": \"Appointment\", \"status\": \"noshow\", \"start\": \"2022-07-28T13:38:32\", \"end\": \"2022-07-28T14:38:32\", \"participant\": [ { \"actor\": { \"reference\": \"Patient/f7fffd5c-122f-4b15-bdb5-c87b9dc1850a\" }, \"status\": \"accepted\" } ] }"

...

See also: FHIR interaction: delete

  1. Make sure you know the following pieces of information, which will have been issued to you by the Integration Team:

    1. Your client ID

    2. Your client secret

    3. The URL for your endpoint on the sandbox environment

      1. The example below assumes you have a server host of: acme.fhir-api.sandbox.patientsknowbest.com

  2. Make sure you know the following pieces of information, which will depend on the data you have sent to PKB:

    1. The id of the Appointment that you wish to delete

      1. The example below assumes the relevant appointment is: Appointment/f4efe66d-4cea-4199-9182-9d2113dd3108

  3. Generate an access token by following the OAuth 2.0 Client credentials walkthrough

    1. The example below assumes you have been granted an access token of: abcdef

  4. Delete the Appointment by executing the following query.

Request

Code Block
curl -X DELETE --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: Bearer abcdef" 
  "https://acme.fhir-api.sandbox.patientsknowbest.com/fhir/Appointment/f4efe66d-4cea-4199-9182-9d2113dd3108"

...