Short answer: A 200 from the Command API means we've checked your submission and stored it. It's filed into the GP record afterwards, usually within 2-5 minutes. To check it arrived, read the patient's record after 15 minutes, so you don't see a cached copy.
What happens after the 200
- We store your QuestionnaireResponse and reply with 200.
- We look up the patient's registered GP practice on the NHS Personal Demographics Service (PDS). You don't need to send an ODS code.
- We extract the coded entries using the rules in your Questionnaire and write them, with any attachment, to the practice's clinical system as one consultation (EMIS Web) or one event (SystmOne).
There's no status endpoint or callback for steps 2 and 3, and the response can't include the consultation ID, because the entry doesn't exist yet when we reply. A submission that can't be filed still returns 200, because those checks happen after we respond.
How long it takes
Entries usually reach the record within 2-5 minutes. SystmOne handles one request at a time for each practice, so a busy practice can take longer. On Beta, several test endpoints share the same demo systems, so times are slower and less consistent than in production.
Checking an entry arrived
Read the patient's record through the EMIS Web or SystmOne API 15 minutes after submitting. We cache each patient's record for 15 minutes, so a read made soon after the write can return a copy from before the entry was filed. On Beta, you can also ask us for a screenshot of a test write-back.
If a write-back fails
When a writeback to the clinical system fails with a recoverable error, it is retried up to 6 times with exponential backoff, waiting 2, 4, 8, 16, 32 and 64 seconds between attempts. This gives a total retry window of approximately 2 minutes.
After retires are exhausted, failed executions are escalated to Black Pear support for resolution, and failures that support cannot resolve are escalated to the service owner. Our operations team will email your agreed contacts (see 3). Automated failure notification is not currently available and has been noted as a potential future development.
On Beta, failures aren't usually chased because of the volume of testing, so let us know if a Beta write-back didn't arrive.
Common reasons a write-back doesn't arrive:
- The NHS number isn't on PDS, so we can't find the patient's practice. Use the patients in Which test patients and test systems can we use?
- SystmOne rejected part of the write, such as a code it doesn't accept. Nothing from that write is filed, including the note.
- The free text was 6,000 characters or more, or the attachment was over 3 MB. See How do we build our QuestionnaireResponse, and what are the limits?
- Practice has not enabled the integration: This results in an error which Black Pear detects. We mitigate this with routine connection testing, and continuous failures result in us contacting yourselves.
- Extended TPP/SystmOne outage: Writes are retried as described above. Where an outage lasts longer than the retry window, failed executions are escalated to support.
Where the entry goes
Write-backs are routed by patient, not by who made the submission. The entry goes to the patient's registered GP practice. If another connected organisation is also set up to receive write-backs for that patient, it receives its own copy. Each copy is recorded against that organisation's API user (see Why entries written back are recorded against the API user).
Record sharing in the clinical system lets each organisation see the other's entries, but it doesn't create them. If a note should go to one organisation only, talk to us before you go live.
Sending a submission again
Every accepted submission creates a new entry, even if you reuse the same QuestionnaireResponse ID. Only resend a submission when you know the first one wasn't filed.
If you need us to investigate any write-back event, please send
- The QuestionnaireResponse ID
- The
X-Amzn-Trace-Idof the submission (how to find it) - The time it was sent (UTC)
0 Comments