Illegal character in authority at index 14...

Hi all

I have this template:

which I have built using AD. It has an element ‘Procedure name’ from the Action Procedure archetype:

In AD I changed this to coded text and bound it to our Ontoserver instance and the OPCS-4 codeset, as OPCS is what the client is receiving from the original system.

So that looks like this:

and then this:


So that is all cool and AD is happy and can save the template.

When I then upload that to Apperta CKM, it is also happy to accept the template.

When I then export the template from Apperta CKM and try and open it Archetype Designer it throws this error:

To move on I simply deleted these lines from the *.oet file (lines 161-165)

<Rule path="/description[at0001]/items[at0002]">
                <constraint limitToList="false" xsi:type="tem:textConstraint">
                    <termQueryId queryName="CodeSystem?url=" terminologyID="NHS OPCS-4"/>

And it is happy, but back to DV_TEXT.

Grateful for any help. It would be nice to keep the terminology binding in the template on CKM if possible.

Thanks all


Can you post the relevant part of the .oet that you are originally sending up to CKM i.e the .oet export from AD?

I suspect a mismatch in the way that AD and CKM are handling the termQueryID parameters.

@sebastian.garde @borut.fabjan ?

This is what comes out of AD export to *.oet:

<Rule path="/description[at0001]/items[at0002]">
                <constraint xsi:type="tem:textConstraint">
                    <termQueryId queryName="CodeSystem?url=" terminologyID="NHS OPCS-4"/>

What happens if you try to re-import that to AD?

Illegal character error…

NHS OPCS-4 should not contain a space character.

Should terminology be a valid URI? Then the url part should be URI encoded.


Do I understand correctly that the same happens if you just export the oet and then directly reimport the oet into AD? That would exclude CKM from the equation. It looks like this to me because there is no visible difference to it?

In any case, I believe terminology id should be something like this, and it may well be that spaces are not allowed or at least not supported everywhere.

For example

1 Like

Yes, if I export it from AD then immediately import it I get this error, so that at least rules out a problem with CKM.

It looks from replies like it is the space character before OPCS. Can I substitute that with %20 ?

Should I get back to the Ontoserver people and get them to change something?


Can you download the original Codesystem json from Ontoserver? It would be interesting to know where “NHS OPCS-4” is carried in the FHIR structure and if there are more technical alternatives that we should pick up to populate terminologyID.

If you concat

[ontoserver-base-url] + [terminologyId] + [queryName]

this should point to the (expanded) value set or code system in ontoserver.

That’s beyond my ken.

I’ll ping our Dedalus expert and see if he can help.

Having looked at FHIR Codesystem resource, I suspect AD is using title as the terminologyName but that is human readable and may contain spaces vs. the name which is technical and contains underscores instead of spaces.

I’ll submit a PR to AD JIRA

1 Like

Give it a spin & check if fixed with AD 1.24.11 :wink:


Fab, thank you. That seems to work now :+1:


1 Like