Clarification needed on sending UTF-8 characters to PDS FHIR API

Hello,

The requirement for updating PDS name field says that:

  • supplied name data must be UTF-8 encodable.

We noticed that PDS FHIR API accepts some of the UTF-8 characters, but not all. Does anybody know which subset of characters is supported? This is puzzling our testers.
For example “Vergnügen” or “7Ëavin” was accepted by the API, but “Λavin” was not.

Many thanks,
Rokas

Could you share details of which endpoint this is please? Retrieve, search, update?

Also an example payload and response would be incredibly useful.

1 Like

Chris, via the GP reg service we’ve recently found that suppliers such as EMIS don’t support UTF-8 and characters like é are not supported so can you loop Stewart the demographics product lead into this discussion. Even if we accept UTF-8 we wont be able to sync this information with the GP IT suppliers currently.

Hi Chris,

It’s partial update endpoint:
PATCH https://int.api.service.nhs.uk/personal-demographics/FHIR/R4/Patient/9727690033/

SUCCESS SCENARIO:
request body:

   {
      "patches" : [ {
      "op" : "replace",
      "path" : "/name/0/id",
      "value" : "NqAYl"
  }, {
      "op" : "replace",
      "path" : "/name/0/given",
      "value" : ["Vergnügen", "7Ëavin"]
  }, {
      "op" : "replace",
      "path" : "/name/0/family",
      "value" : "RYAN"
  }, {
      "op" : "test",
      "path" : "/name/0/id",
     "value" : "NqAYl"
  } ]
}

Headers:

X-Correlation-ID:21C46F5F-CDEF-4865-94B2-0EE0EDCC26C1
X-Request-ID:40E0B220-8136-4CA5-AE46-1D97EF59D0A1
If-Match:W/"5"
Authorization:Bearer <valid token>
Content-Type:application/json-patch+json

The response:
202 Accepted and the name has been successfully changed.

FAILURE (SILENT) SCENARIO:
request body:

   {
      "patches" : [ {
      "op" : "replace",
      "path" : "/name/0/id",
      "value" : "NqAYl"
  }, {
      "op" : "replace",
      "path" : "/name/0/given",
      "value" : ["Vergnügen", "Λavin"]
  }, {
      "op" : "replace",
      "path" : "/name/0/family",
      "value" : "RYAN"
  }, {
      "op" : "test",
      "path" : "/name/0/id",
     "value" : "NqAYl"
  } ]
}

Headers:

X-Correlation-ID:21C46F5F-CDEF-4865-94B2-0EE0EDCC26C7
X-Request-ID:40E0B220-8136-4CA5-AE46-1D97EF59D0A7
If-Match:W/"6"
Authorization:Bearer <valid token>
Content-Type:application/json-patch+json

Reposnse:
202 Accepted , but no changes to name fields happens:

Response body when retrieve the same patient resource:

  ...
   "meta": {
        "security": [
            {
                "code": "U",
                "display": "unrestricted",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality"
            }
        ],
        "versionId": "6"
    },
    "name": [
        {
            "family": "RYAN",
            "given": [
                "Vergnügen",
                "4avin"
            ],
            "id": "NqAYl",
            "period": {
                "start": "2019-05-04"
            },
            "prefix": [
                "MS"
            ],
            "use": "usual"
        }
    ],
    "resourceType": "Patient"
   ...

Thanks,
Rokas

@chris.clarke have you had chance to look into this any further please?

An internal ticket has been raised to look into this and is on the backlog

Available characters ranges are as follows:

(32, 32)  # allow for space (e.g de souza - although this is opt deed-poll compliant)
(39, 39)  # hyphen
(45, 45)  # apostrophe
(46, 46)  # full-stop
(48, 57)  # Numbers
(65, 90)  # A-Z
(97, 122)  # a-z
(192, 214)  # special latin 1
(216, 246)  # special latin 2
(248, 383)  # special latin 3

There’s a ticket on the backlog for the PDS FHIR spec to be updated to make this clear.

2 Likes

Thank you for your query, @rokas.valantinas

We have now amended the documentation with the list of acceptable character ranges, as previously provided by @chris.clarke

Regards,
David

1 Like