Forms!: Identity and Auto population

I recently posted about PHR’s (and a ‘bit’ about cycling) and having spent some time looking at forms it reminded me of some annoyances I’ve had with forms.

By far the main one is organisations asking me for data they hold. E.g. for HMRC when they want paying they ask for a UTR (unique tax reference), they know this and validate against it… It’s like some perverse game where I open another window on the site and try to find it. I know I’ve got the right one when it asks me to add a letter K to the end of it…

Ok so this is about health (tech) and I’m going to look at ways of automating this data capture

NHS Number

I don’t know mine, I may have a record when I changed GP a few years ago but they don’t do that now. Like many I know my NI number, my EHIC card is in my wallet with my driving license and if required I could get my passport number…

So how can I find out my NHS Number electronically… I’ve not tried the NHS App but I presume it has a screen that shows it?

NHS-App

The app knows the NHS Number via NHS Login. The signup process to NHS Login takes a bit of time but is only done once, the process is described in the link above but involves submitting pictures of identity documents (e.g. driving license, passport) and creating a short video where you read out some numbers.
An app using this login will get to know the NHS Number of the citizen via data returned from the login (tech note: this is using openid).

nhslogin

Other details we may get back from this login include:

  • Forename
  • Surname
  • Date Of Birth
  • GP Surgery (SDS Code)

So if our form needed these details we could auto populate it.

If we wanted more details then we have a number of options. For GP Surgery we can call out to the FHIR ODS API and retrieve Organisation details

Patient details

We have a number of options, we may have the patient recorded on our system but if we didn’t the official answer is to use Patient Demographics Service. Alternatively you can use a more light weight version called Spine Mini Services Provider.

GP Connect

Patient demographics are also available via GP Connect. Again this is another service available from NHS Digital but back to demographics, you can explore the GP Connect API via this swagger page https://orange.testlab.nhs.uk/swagger/v1/
So with our NHS number returned from using the NHS Login Service we can now find the Patient and their demographics e.g.
https://orange.testlab.nhs.uk/gpconnect-demonstrator/v1/fhir/Patient?identifier=https%3A%2F%2Ffhir.nhs.uk%2FId%2Fnhs-number|9658218873 [Use the swagger page to do this]

Care Connect

Likewise if your (non GP) system also supports FHIR, then it probably uses Care Connect and a very similar query can be used to retrieve Patient Demographics. On the CareConnectReference implementation this would look like

https://data.developer.nhs.uk/ccri-fhir/STU3/Patient?identifier=https%3A%2F%2Ffhir.nhs.uk%2FId%2Fnhs-number|9658218873 [This works best in postman. This instance isn’t secured, a secure version is available]

Example

Back to forms, I’m only going to use a small patient facing form - the NHS BMI Calculator. It collects a few details and then produces a score called BMI. The setup I’ve just talked about is a bit of an overkill for such a simple form but for this discussion it illustrates points.

If you looked at the GP Connect example you will see that the questions:

  • Age
  • Sex
  • Ethnic group

Could be auto-populated, in order to do that we would need to use:

  • NHS Login - to get an authenticated user and their NHS Number
  • GP Connect - use the NHS Number to get Patient demographics.

In the future we would probably be able to retrieve weight and height Observations from GP Connect. The query would look something like:

https://data.developer.nhs.uk/ccri-fhir/STU3/Observation?patient=2&code=27113001
27113001 is the code for weight, in practice I would probably add in a date range.

Likewise for body height, this query https://data.developer.nhs.uk/ccri-fhir/STU3/Observation?patient=1060&code=50373000 returns height values.

I’m not sure how I would query for exercise but I’m sure a code could be found. Some of these Observations are not up to date, my GP (and the NHS) doesn’t hold recent height and data for me but my PHR’s do (Apple, Withings and Strava) - would it be a good idea to connect to them via FHIR??? YouTube - Working With Personal Health Devices in FHIR.

So all of the form could be populated and my BMI score generated automatically without me entering in any data. In practice I probably would have to enter a few values or amend the form. It’s a lot more work for the forms team to integrate with these services and the patient has to now logon BUT … once we move onto the next form say Cardiac Risk and the next e.g. Growth Chart it becomes a lot simpler.
[Note: these apps don’t directly use logon, the host application performs the identity checks and the app is launched by passing the user/patient identity and permissions to access the host EPR].

FHIR Questionnaire

So what I’ve suggested is we can use a number of standards API’s (primarily openid and FHIR) to access patient data. Most of the forms questions can be turned into FHIR queries e.g if I had a question asking about smoking status, this may convert to asking for the Smoking Finding which is SNOMED code Tobacco smoking behaviour - finding. To get any previously recorded answers from an EPR via FHIR the query could look like:
https://data.developer.nhs.uk/ccri-fhir/STU3/Observation?code=365981007 (these examples are missing coded values… argh). In FHIR we have a way of defining forms, I’m not going into detail but Smoking Status we could add an item (aka definition of question) like this:

<item>
<extension url="http://hl7.org/fhir/StructureDefinition/questionnaire-observationLinkPeriod">
    <valueDuration>
        <value value="3"/>
        <system value="http://unitsofmeasure.org"/>
        <code value="mo"/>
    </valueDuration>
</extension>
<linkId value="smoking"/>
<code>
    <system value="http://snomed.info/sct"/>
    <code value="365981007"/>
    <display value="Finding of tobacco smoking behavior"/>
</code>
<text value="Smoking Status"/>
<type value="quantity"/>

It’s a bit technical but this says: I’m looking for smoking status findings within the last 3 months. An app could automatically change that into a query. Perhaps the app could answer all the questions automatically and the patient doesn’t need to fill in the form.
So if we had a patient pre-admission form, defined as a FHIR Questionnaire. This questionnaire can be:

  • Sent to the GP system which automatically completes it and sends it back.
  • Sent to the patient and they use app to connect to their connected EPR + PHR’s to automatically complete and return it.
  • Sent to the patient with a link to a forms product which has a form corresponding to the questionnaire which the patient can complete.
  • Alternatively the questionnaire request can be turned into an equivalent paper form and posted to the patient.

Just some possibilities if you want to read more see FHIR Structured Data Capture

1 Like