AllergyIntolerance clinicalStatus & verificationStatus don't conform to specification?

I’ve been trying to load a Bundle from the GP Connect test API into the smart-on-fhir python client, but getting some errors:

        `with_json()` on <class 'fhirclient.models.codeableconcept.CodeableConcept'> only takes dict or list of dict, but you provided <class 'str'>
        `with_json()` on <class 'fhirclient.models.codeableconcept.CodeableConcept'> only takes dict or list of dict, but you provided <class 'str'>

The responses from the API don’t seem to conform to the standard listed on the website.

The standard states that these responses should be in a Coding form, but the test API provides the values as strings:

            "clinicalStatus": "resolved",
            "verificationStatus": "unconfirmed",

Is this an error on my part, or is the test API returning the wrong type of values?

There seems to be a similar error with the ‘MedicationStatement’ resource type, where the following error occurs:

a Superfluous entry "taken" in data for <fhirclient.models.medicationstatement.MedicationStatement object at 0x1050226d0>

This is due to the presence of "taken": "unk", within the resource.


Hi James,

Thanks for getting in touch.

There are a few different GP connect APIs. Please could you provide the full name as it appears in API catalogue - NHS Digital please?


Hi Haroon. It should be: “GP Connect Access Record: Structured - FHIR API”


This is the URL the response came from:$gpc.getstructuredrecord

Looking at the FHIR spec for STU3 (AllergyIntolerance - FHIR v3.0.2), GP Connect is correctly returning a code

I think you are using a R4 client which is expecting a CodeableConcept.

I’m not a python developer but it seems you need to use version 3.0.0 of the client?

1 Like

Thank you @kevin.mayfield1. I was looking at the UK Core specification, but after your comment I’ve seen this is incorrect, as stated here: Access Record Structured | gpconnect

Will use a different client version! Thanks for your help.