FAQs - Measurements (Extracting Data) REST API

Question

Response

Can all measurements be extracted from PKB, regardless of how they were added?

Yes, as long as the person who granted access is able to view the measurements in PKB, they can be extracted.

Is there any indication of whether a measurement was entered by a patient?

No. There is no way to identify from the extracted measurements how they were entered into PKB and by who.

Is it possible to only extract measurements added to a record after a specific date/time?

No, it is not possible to include a timestamp parameter when pulling measurements.

However the response from PKB includes the date/time that each measurement was added to the record in PKB. So it is possible to determine from this information, which measurements were added after a specific date/time.

Is it possible to only extract specific measurements that we are interested in?

Yes. It is necessary to specify which types of measurement you want to extract by including the associated ‘apiRefs’. You can include as few or as many apiRefs as you want.

Is it possible to pull all measurements in a patient record?

Yes, however to do this it would be necessary to include all available Measurement ‘apiRefs’ in your API call.

When pulling measurements I need to include ‘apiRefs’. How do I find out what they are?

This API can be used to obtain all of the available measurements and their associated apiRefs.

What access needs to be granted in order to pull patient measurements?

Measurements can be pulled using either Coordinator, Clinician or Patient granted access.

How does who grants access change which measurements can be extracted?

The party that grants access to the API determines which patient records measurements can be pulled from.

 

For example, Patient granted access can only be used to extract measurements from that one patient record. But Clinician or Coordinator granted access will provide access to all patients who that particular Clinician/Coordinator is permitted to access in PKB.

In the responses from PKB, in what format are the timestamps provided?

All timestamps are provided as Unix timestamps.

Is it possible to use patient NHS numbers as an identifier in the API call?

No. Only patientId is accepted as an identifier.

How do I obtain the patientId for a patient?

The patientId is a unique patient ID created by PKB. This can be obtained by using one of PKBs User REST APIs.

Is it always necessary to provide a patientId?

Only if using Clinician or Coordinator granted access. When using Patient granted access, it is not necessary to provide the patientId as the patient record is already determined by the patient who granted access.