Personal Demographics Service Notification (FHIR) how to test publish-subscribe notifications?

Hi,

I’m working on the integration with NHS Personal Demographics Service FHIR API for one of our Clients. I’m reviewing documentation published on the digital.nhs.uk and I would like to receive more information about how to use NEMS API.

Despite query patient data I also need to implement logic to track patient record change and according to NHS documentation there is some testing tool which allows to simulate making changes on PDS and test message consumption. Could you please share some more details how to publish and subscribe such type of events? As I understand the API is available through internet but when I try to use https://msg.intspineservices.nhs.uk/STU3/Events/1/$process-message I’m receiving ECONNRESET error in Postman so I’m not sure if this API is still available or most probably some additional permissions are required to communicate with this API? I do not have any issues with PDS FHIR API communication either sandbox and integration testing API are available and I’m able to test Patient Search and Get methods, but I would like to also test publish-subscribe NEMS API in order to start development.

Thanks

2 Likes

Your auth is correct and permitted?

nrlnems.ls@nhs.net is the email address for the NEMS team , if you need more help.

Have you also had a look at their onboarding guide, which I think had more details on how to access their test environments? You can download it from here:

Cheers
Mick

1 Like

[quote=“jkisiel, post:1, topic:207”]
ECONNRESET error
[/quote] maybe behind VPN and the doc is not up-to-date.

1 Like

Hi thank you for your answer.

I just tried to use some mock example with the URL provided as the one available through internet https://msg.intspineservices.nhs.uk/STU3/Subscription I’m aware that the message is for sure not properly constructed but I suspect to receive at least some API error eg 401 unathorized instead of ECONNRESET error

curl --location --request POST 'https://msg.intspineservices.nhs.uk/STU3/Subscription/Bundle?type=message&serviceType=GP&Patient.identifier=http://fhir.nhs.net/Id/nhs-number|9434765919&MessageHeader.event=pds-change-of-address-1' \
--header 'fromASID: 200000000985' \
--header 'toASID: 200000000985' \
--header 'InteractionID: urn:nhs:names:services:clinicals-sync:SubscriptionsApiPost' \
--header 'Content-Type: application/xml+fhir' \
--header 'Authorization: Bearer YfYvQ.................' \
--data-raw '<Subscription xmlns="http://hl7.org/fhir">
	<meta>
		<profile value="https://fhir.nhs.uk/STU3/StructureDefinition/EMS-Subscription-1"/>
	</meta>
	<status value="requested"/>
	<contact>
		<system value="url"/>
		<value value="https://directory.spineservices.nhs.uk/STU3/Organization/RR8"/>
		<use value="work"/>
	</contact>
	<reason value="Health visiting service responsible for Leeds"/>
	<criteria value="/Bundle?type=message&amp;serviceType=UHV&amp;Patient.identifier=http://fhir.nhs.net/Id/nhs-number|9434765919&amp;MessageHeader.event=pds-change-of-address-1" />
	<channel>
		<type value="message"/>
		<endpoint value="Mailbox1234"/>
	</channel>
</Subscription>'

I followed this documentation: https://digital.nhs.uk/developer/api-catalogue/personal-demographics-service-notifications-fhir

Thank you mick.schonhut1NHS Digital, I will check the guide you provided.

Just another question it is possible to start testing Personal Demographics Service Notifications - FHIR without starting Onboarding process ?

1 Like

The NEMS team like to know who is interested in using their APIs, so it’s best to contact them to find out how to begin testing at the email address above.

They’ll probably want to ask about your plans, to make sure your use case is one that’s appropriate, so that you’re not wasting your time.

That’s most likely as far into onboarding as you need to go to start with, but do check with them.

2 Likes

Thanks I will try to contact with them via email.

I have tried to connect using python script and looks like there is some problem with SSL on the server side:

  raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='msg.intspineservices.nhs.uk', port=443): Max retries exceeded with url: /STU3/Subscription/Bundle?type=message&serviceType=GP&Patient.identifier=http://fhir.nhs.net/Id/nhs-number%7C9434765919&MessageHeader.event=pds-change-of-address-1 (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1122)')))

The Postman also return similar error:

Error: write EPROTO 64243464:error:10000410:SSL routines:OPENSSL_internal:SSLV3_ALERT_HANDSHAKE_FAILURE:../../../../src/third_party/boringssl/src/ssl/tls_record.cc:594:SSL alert number 40

what is Mailbox id ?