-
Notifications
You must be signed in to change notification settings - Fork 1
Search logic
(Run once for each ODS code - provider, consumer)
- Is ODS empty or whitespace?
If yes, stop for this ODS code. If no, continue to next step.
- Is ODS code present in the Spine Directory? / Retrieve organisation details
Run LDAP query:
Search tree "ou=organisations, o=nhs"
Search query "(uniqueidentifier=ODS_CODE)"
If entry not present:
- stop (for this ODS code).
If entry present:
- save organisation details in organisation table
- and validate next ODS code or continue to next step.
(Run for just the provider ODS code)
- Is ODS code configured in Spine Directory as an GP Connect Appointments provider system? / Retrieve provider endpoint and party key from Spine Directory
"ou=services, o=nhs"
"(&(nhsIDCode=ODS_CODE)(objectClass=nhsMhs)(nhsMhsSvcIA=urn:nhs:names:services:gpconnect:structured:fhir:rest:read:metadata-1))"
If entry present:
- Retrieve endpoint and party key from results
- ODS code is a GP Connect Appointments provider system
- Continue to next step
If entry not present:
- ODS code is not a GP Connect Appointments provider system, return this information to the front end
- Stop for this ODS code.
- Retrieve provider ASID from Spine Directory
Use party key retrieved from previous step.
"ou=services, o=nhs"
"(&(nhsIDCode=ODS_CODE)(objectClass=nhsAs)(nhsMhsPartyKey=PARTY_KEY))"
If entry present:
- Retrieve provider ASID from results
- Continue to next step
If entry not present:
- ODS code is not fully configured as a GP Connect provider system, return this information to the front end
- Stop for this ODS code.
- Send capability statement query (GET /metadata)
If error occured:
- see GP Connect message error handling appendix
If metadata statement retrieved:
- continue to next step.
- Send search for free slots
If error occured:
- See GP Connect message error handling appendix
If results retrieved: - Display results.
-
If timeout or other network related issue (allow for up to 31 seconds) display error message to user
-
If error response received:
https://developer.nhs.uk/apis/gpconnect-1-2-7/development_fhir_error_handling_guidance.html
Display error message to user:
An error occured when sending a message to the provider system. The error returned was "DISPLAY - DIAGNOSTICS (CODE)".
Where DIAGNOSTICS, DISPLAY and CODE are taken from the OperationOutcome.