Hi all
We have an issue affecting our ReSPECT implementation which runs on an instance of EHRbase.
Essentially, for our Composer values in ReSPECT compositions, we store this:
"composer": { "_type": "PARTY_IDENTIFIED", "name": "John Smith", "external_ref": { "type": "PERSON", "namespace": "NHSScotland", "id": { "_type": "GENERIC_ID", "value": "john.smith@nhs.scot", "scheme": "NHSScotland" } } }
This was fine until last week when the format of someone’s name (from their AAD token) changed from ‘Surname, Forename (Organisation Name)’ to ‘Forename Surname’.
This then caused EHRbase to return an error, and we could not commit the record.
‘composer.name’ and ‘composer.external_ref.id.value’ are taken from Azure Active Directory token values for ‘Name’ and ‘e-mail’ respectively. Neither of these values is immutable in the AAD token.
We think what is happening is that when a composer value is sent, EHRBase checks the ID and if it finds it in a previous record (all IDs are stored in a table*), and the name does not match what it has stored for the same ‘composer.external_ref’, then it throws an error.
We are not bothered by the ‘name’ value changing as that is for display purposes and people should be able to format that as they wish. Names may also change, for e.g. marriage, other choices. The ID value unique to the person is their e-mail.
Any suggestions as to how to handle this issue?
Our devs propose one of:
- Remove the Composer Name and External Reference Check in EHRBase
- ReSPECT Queries EHRBase for the User’s Name Before Sending the Composition
- ReSPECT Adds a Layer of User Management
none of which are super nor necessarily achievable, so we are still investigating an approach.
I’d appreciate any suggestions or comments that could help us resolve this.
Thanks all
Paul
*I am told this table: org.ehrbase.jooq.pg.tables.PartyIdentified