National Record Locator Service specification

Comments on:
http://data.developer.nhs.uk/fhir/nrls-v1-draft-a/Profile.RecordLocator/nrls-documentreference-1-0.html

The interaction model looks fine for the purpose.

There look to be some problems to be resolved around access rights e.g. can an organisation DELETE a record added by someone else? Also around sharing (especially wrt sensitivity) e.g. what happens if the record was recorded in a prison hospital/sexual health clinic/abortion clinic etc.

Dynamic endpoints

The model is tied to a document-centric model (i.e. XDS). The direction of travel is towards having computable, dynamic endpoints (e.g. GP Connect); it would be a shame if NRLS didnā€™t support that capability! I think that the gap is small and there is opportunity to cater for this.

content.attachment.size is mandatory. It might be unknown or change depending on details of the request.

Service discovery is a universal problem - has anyone spoken to the FHIR core team about this requirement?

Conformance

Great to see a conformance resource being published!

Iā€™m not sure what the read Conformance operation on the server is for. The conformance resource for the server would normally be published on the / or /metadata routes [https://www.hl7.org/fhir/http.html#conformance]

Business identifiers vs logical identifiers

There is a pattern being used in the spec where business identifiers are being used as logical identifiers, for example:
https://sds.proxy.nhs.uk/Organization/A83627
https://pds.proxy.nhs.uk/Patient/9409401122

This is potentially dangerous as it mixes business identifiers with logical identifiers. The implementation guidance does make this distinction. This could create problems when consumers are pointing to multiple systems:

For example, we can retrieve a Patient from PDS:
GET https://pds.proxy.nhs.uk/Patient/9409401122

{
    id: '9409401122'
    resourceType: 'Patient'
}

then retrieve the same patient from a GP system:
GET https://gpconnect.proxy.nhs.uk/Patient/9409401122

{
    id: '9409401122'
    resourceType: 'Patient'
}

This creates a number of problems:

  1. as the resources now have the same logical identifier, the consumer canā€™t distinguish them! They are no longer 2 different records about the same business entity; they are 2 versions of the same record.:frowning2:
  2. it will create confusion for application developers about the difference between logical identity and business identity. They are likely to start using the business identifiers to short-circuit lookups, but this isnā€™t a universal pattern, which adds unnecessary complexity.
  3. it limits the ecosystem to records attached to verified NHS Numbers. What happens if the patient is registered in England and Wales, but has an episode of emergency care in Scotland, or used to reside in Australia?

I would strongly recommend looking at alternatives to this pattern! If you havenā€™t see it already, there is ongoing discussion about how identifiers should be represented within references:
http://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=10659

Alternatively, if the proposal is that the request:
GET https://gpconnect.proxy.nhs.uk/Patient/9409401122

returns:

{
    id: '54698721165467132132322'
    resourceType: 'Patient',
    identifier: [
      {
         system: 'nhsnumber',
         value: '9409401122'
      }
    ]
}

then the service wonā€™t be behaving according to the specification and conventions of FHIR, which will have itā€™s own set of problems!

There is a knock-on effect in the search terms that need to be published.

Grahame Grieve was also asking for comments on logical identifiers http://www.healthintersections.com.au/?p=2557 (my comments are based on RLS).

My preference would be to add an attribute which indicates itā€™s a logical identifier. So

<reference value="https://pds.proxy.nhs.uk/Patient/9990001170"></reference>

becomes (using the NHSNumber system identifier and an attribute to indicate itā€™s logical)

<reference value="http://fhir.nhs.net/Id/nhs-number/9990001170" type="logical"></reference>

or (implied logical using a query)

<reference value="Patient?identifier=http://fhir.nhs.net/Id/nhs-number|9990001170" type="logical"></reference>

Iā€™d prefer to see DocumentReference.class added to the profile and use specialty. Every NHS Trust/Board Iā€™ve worked with classifies documents with type and specialty. IHE UK also proposed doing the same for Document.class.

We intend to reuse our facades weā€™d use for GPConnect (Patient and Organisation). Ideally weā€™d like to see the same security model (inc the use of JWT token).

1 Like

p.s. This thread has links to the SNOMED subsets referred to in the spec UK SNOMED subsets - online access?

Hi Dunmail, Kevin,
thanks for the comments, Iā€™m really glad to see people taking an interest!

On your points (I think there were three key ones):

  1. Authorisation:
    Weā€™ve intentionally pushed that out to a separate responsibility. In our alpha implementation weā€™ve made some compromises, but in reality I see this all being controlled by proper oAuth2 based access control. Ideally weā€™ll be able to grant granular access to each request based on a number of factors, including (of course) patient consent). Obviously thereā€™s quite a way to go to get to that, but I think we can safely say it shouldnā€™t be solved by the record locator?

  2. Dynamic endpoints:
    Agree, and I do worry that weā€™re effectively baking in the document-centric paradigm. Hopefully weā€™re not making any decisions which force us down that route, but I take the point that there are more mature approaches to sharing information.

  3. Business vs Technical identifiers:
    Hands up, my bad! Early in the thinking I pushed for the use of ā€˜obviousā€™ and intuitive identifiers to be our approach, but Iā€™ve since come to realise that this doesnā€™t support what we really need to do. You provide some good scenarios, but for me the (admittedly edge case, but very real) issue of citizens with no NHS Number, or with two NHS Numbers, or who change NHS Number for some reason makes it absolutely clear that we should use only opaque technical identifiers. Iā€™m now on a mission to convince others internally of this.

Iā€™ve seen the propsal to allow resources to be referenced by identifier rather than just by ID, and I really donā€™t like it. I think that risks breaking one of the key strengths of FHIR, that resources should be resolvable. What do you do if you get a resource identified as:

<subject>
      <identifier>
        <system value="http://specific.supplier.system/patient_records"/>
        <value value="23"/>
      <identifier>
</subject>

I think Grahamā€™s propsal said that it: ā€œā€¦allows a resource writer to write resources it otherwise couldnā€™tā€ Iā€™d say that it: ā€œā€¦also allows a resource writer to write resources it shouldnā€™tā€

Tim

1 Like

Hi Tim,

Auth - absolutely agree that it isnā€™t part of record locator and a central authn/authz service would be a massive change in how apps and services could work.

Dynamic endpoints - Iā€™ll have a chat to the FHIR core team, as we (collectively) wonā€™t be the only people worrying about this.

Identifiers - Cool. Let me know if any of your colleagues need further education :grinning: For what itā€™s worth, the query string approach works for me for most cases (e.g. Patient?identifier=nhs|9123456789). Iā€™m not convinced that unresolvable but computable references lie in the 80%.

1 Like

In our ESB (large hospital). We probably wonā€™t be providing direct access to spine proxy.

Internally spine access would look like: http://spine.jorviktrust.nhs.uk.

So we may have to change national references between trust ESB standard and NHSEngland - having logical references help minimise this. Our internal proxy/facade would allow us convert handle security mappings and conversion to and from DSTU2 and STU3 (which allows us to standardise on STU3).

:slight_smile: I find it useful to remind myself that the purpose of the identity in /Patient/[identity] is to identify a single record about the patient, not to point to the Patient.

Wouldnā€™t you just have http://spine.jorviktrust.nhs.uk/Patient/[Any old GUID] but then inside the Patient resource have multiple identifiers, one of which uses the formal PDS url (once defined) for system and the NHS Number for value, and then any other(s) as required using a similar structure to hold any local Unit / Hospital Numbers ?

You can then identify that Patient record by the GUID:
/Patient/GUID_VALUE_HERE

Or by NHS Number:
/Patient?identifier=http://pds.nhs.uk|1234567890

Or by local number
/Patient?identifier=http://jorvik.nhs.uk|3456321

Itā€™s the DocumentReference POST to RLS thatā€™s behind my comments. If weā€™re doing it the full way it would be a Bundle which included a Patient resource. [I prefer the shorthand way suggested in the RLS spec though]. What I mean by full is: using a Bundle which contains all the resources the DocumentReference refers to, as shown in this XDS sample http://hl7.org/fhir/2016Sep/xds-example.xml.html

At my previous trust weā€™d have the NHS Number in the Patient.identifier section, so this query would work /Patient?identifier=http://fhir.nhs.net/Id/nhs-number|9990001170. This finds the trustā€™s Patient that has that NHSNumber (we did the same for SMSP). Weā€™re at early stages of profiling Patient within the trust but itā€™s very likely weā€™d do the same - using NHSDigital identifier for NHS Number.
Which is why Iā€™d be reluctant to use these references https://pds.proxy.nhs.uk/Patient/9990001170 within the trust, it does not link to any identifiers used in the trust and doesnā€™t point to a real system (directly accessible within the trust).

Totally agree that having a canonical resolvable URL for Patients (and other resources) is essential to us adopting FHIR.

One observation is that if we express references as a search:

{
  ref: 'Patient?identifier=nhs|9123456789'
}

We can then resolve this on any FHIR server:
GET https://pds.nhs.uk/Patient?identifier=nhs|9123456789
GET https://yorvik.nhs.uk/Patient?identifier=nhs|9123456789
GET https://svc.blackpear.thirdparty.nhs.uk/Patient?identifier=nhs|9123456789
GET https://spark.furore.com/Patient?identifier=nhs|9123456789

This feels like a powerful pattern, though isnā€™t quite the intent of the relative reference in the FHIR spec. Is it a useful pattern?

Cheers,
Dunmail

For RLS this would apply in several areas such as DocumentReference.subject (Patient identifier is NHS Number), DocumentReference.custodian.reference (Organisation identifier is ODS Code) and DocumentReference.author (Practitioner identifier is GMP/GMC code)

All (NHS) consumers should be able to resolve the references.

Also how we resolve national references is down to local business rules. Do we use pds.nhs.uk, our own reference to a patient, social services or community? The address and contact numbers in pds.nhs.uk may not be current.
That would be very useful to us (acute trust).

As you mention, Itā€™s not relative but the reference does imply you need to resolve the reference and itā€™s a logical reference.

Iā€™ve pushed this idea to the FHIR core team to explain why itā€™s bad ā€¦

FYI

Iā€™m presuming the spine proxy service and the one in GP Connect are the same (or should be very similar).

GP Connect demonstrator is using this to search in Patient by NHSNumber
http://ec2-54-194-109-184.eu-west-1.compute.amazonaws.com/fhir/Patient?identifier=http://fhir.nhs.net/Id/nhs-number|9000000033

This returns the same Patient

http://ec2-54-194-109-184.eu-west-1.compute.amazonaws.com/fhir/Patient/4

The proxy service is just a notional recognition that weā€™d expect nationally mediated messaging (rather than expect everyone to allow connections from everywhere. There is going to be a challenge in making locally relative (not addressed via a proxy) references resolvable nationally (via a proxy) but itā€™s unlikely to be insurmountable.
For the initial tests weā€™re not going to have resolvable patients (or organisations etc), so a lot of whatā€™s inferred is still to be defined. See also: http://developer.nhs.uk/library/systems/national-record-locator-service/

@dunmail what was the outcome? Tried several links and still confused.

Last I got gleaned from http://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=10659

is the changes for logical references are for not for our use case - where we should be able to resolve a reference.

Spec has been changed on a trial basis with a review after 1 month. It doesnā€™t yet feel like a clean solution to their use case yet.

I think the conditional references may be what we need for our use case and it was agreed that it could be a useful pattern.

On a related note. Weā€™re looking at using this lookup internally for EDMS stores and RLS.

$BaseURL + ā€˜/DocumentReference?patient.identifier=http://fhir.nhs.net/Id/nhs-number|ā€™+$NHSNumber

This is different to RLS but itā€™s a pretty straight forward conversion

$RLSURL + ā€˜/DocumentReference?subject=https://pds.proxy.nhs.uk/Patient/ā€™+$NHSNumber

Both look correct to me and itā€™s a just where the query is being made. NHSNumber being a logical identifier within the trust and an actual reference on the RLS call.
Weā€™ve used HAPI FHIR Server to simulate the RLS and it was quite easy to POST in the examples from RLS and then use that with a simple client.

1 Like