...
See also: FHIR interaction: create
Make sure you know the following pieces of information, which will have been issued to you by the Integration Team:
Your client ID
Your client secret
The URL for your endpoint on the sandbox environment
The example below assumes you have a server host of: acme.fhir-api.sandbox.patientsknowbest.com
Generate an access token by following the OAuth 2.0 Client credentials walkthrough
The example below assumes you have been granted an access token of: abcdef
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
Make sure you know the following pieces of information, which will have been issued to you by the Integration Team:
Your client ID
Your client secret
The URL for your endpoint on the sandbox environment
The example below assumes you have a server host of: acme.fhir-api.sandbox.patientsknowbest.com
Generate an access token by following the OAuth 2.0 Client credentials walkthrough
The example below assumes you have been granted an access token of: abcdef
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
Make sure you know the following pieces of information, which will have been issued to you by the Integration Team:
Your client ID
Your client secret
The URL for your endpoint on the sandbox environment
The example below assumes you have a server host of: acme.fhir-api.sandbox.patientsknowbest.com
Make sure you know the following pieces of information, which will depend on the data you have sent to PKB:
The id of the Patient for whom the Appointment is scheduled
The example below assumes the relevant patient is: Patient/f7fffd5c-122f-4b15-bdb5-c87b9dc1850a
Generate an access token by following the OAuth 2.0 Client credentials walkthrough
The example below assumes you have been granted an access token of: abcdef
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
Make sure you know the following pieces of information, which will have been issued to you by the Integration Team:
Your client ID
Your client secret
The URL for your endpoint on the sandbox environment
The example below assumes you have a server host of: acme.fhir-api.sandbox.patientsknowbest.com
Make sure you know the following pieces of information, which will depend on the data you have sent to PKB:
The id of the Appointment that you wish to read
The example below assumes the relevant appointment is: Appointment/f4efe66d-4cea-4199-9182-9d2113dd3108
Generate an access token by following the OAuth 2.0 Client credentials walkthrough
The example below assumes you have been granted an access token of: abcdef
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
Make sure you know the following pieces of information, which will have been issued to you by the Integration Team:
Your client ID
Your client secret
The URL for your endpoint on the sandbox environment
The example below assumes you have a server host of: acme.fhir-api.sandbox.patientsknowbest.com
Make sure you know the following pieces of information, which will depend on the data you have sent to PKB:
The id of the Appointment you wish to update
The example below assumes the relevant appointment is: Appointment/f4efe66d-4cea-4199-9182-9d2113dd3108
Generate an access token by following the OAuth 2.0 Client credentials walkthrough
The example below assumes you have been granted an access token of: abcdef
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
Make sure you know the following pieces of information, which will have been issued to you by the Integration Team:
Your client ID
Your client secret
The URL for your endpoint on the sandbox environment
The example below assumes you have a server host of: acme.fhir-api.sandbox.patientsknowbest.com
Make sure you know the following pieces of information, which will depend on the data you have sent to PKB:
The id of the Appointment that you wish to delete
The example below assumes the relevant appointment is: Appointment/f4efe66d-4cea-4199-9182-9d2113dd3108
Generate an access token by following the OAuth 2.0 Client credentials walkthrough
The example below assumes you have been granted an access token of: abcdef
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" |
...