# Illegal character in authority at index 14... **Category:** [Archetype Designer](https://discourse.openehr.org/c/archetype-designer/30) **Created:** 2024-05-17 08:01 UTC **Views:** 213 **Replies:** 13 **URL:** https://discourse.openehr.org/t/illegal-character-in-authority-at-index-14/5223 --- ## Post #1 by @Paulmiller Hi all I have this template: https://ckm.apperta.org/ckm/templates/1051.57.301 which I have built using AD. It has an element 'Procedure name' from the Action Procedure archetype: https://ckm.openehr.org/ckm/archetypes/1013.1.204 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: ![image|492x500](upload://34NQdUcPH62SL6Jv9MYLqwMv9js.png) and then this: ![image|439x240](upload://yQ6EDlXvASbBXLUAUsmeKtpla30.png) 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: ![image|690x52](upload://Oi5oFCuvdCBq5l7lankoMxK1G2.png) To move on I simply deleted these lines from the *.oet file (lines 161-165) ``` ``` 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 Paul --- ## Post #2 by @ian.mcnicoll 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 ? --- ## Post #3 by @Paulmiller This is what comes out of AD export to *.oet: ``` ``` --- ## Post #4 by @ian.mcnicoll What happens if you try to re-import that to AD? --- ## Post #5 by @Paulmiller Illegal character error... --- ## Post #6 by @borut.jures [quote="Paulmiller, post:1, topic:5223"] `terminology=//NHS OPCS-4/CodeSystem?url=http://fhir.hl7.org.uk/CodeSystem/OPCS-4` [/quote] `NHS OPCS-4` should not contain a space character. Should `terminology` be a valid URI? Then the `url` part should be [URI encoded](https://www.urlencoder.org/). --- ## Post #7 by @sebastian.garde 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 terminologyID="//fhir.hl7.org/" --- ## Post #8 by @Paulmiller 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? Paul --- ## Post #9 by @ian.mcnicoll 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. --- ## Post #10 by @sebastian.garde If you concat [ontoserver-base-url] + [terminologyId] + [queryName] this should point to the (expanded) value set or code system in ontoserver. --- ## Post #11 by @Paulmiller That's beyond my ken. I'll ping our Dedalus expert and see if he can help. --- ## Post #12 by @ian.mcnicoll @borut.fabjan 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 --- ## Post #13 by @borut.fabjan Give it a spin & check if fixed with AD 1.24.11 ;) --- ## Post #14 by @Paulmiller Fab, thank you. That seems to work now :+1: Paul --- **Canonical:** https://discourse.openehr.org/t/illegal-character-in-authority-at-index-14/5223 **Original content:** https://discourse.openehr.org/t/illegal-character-in-authority-at-index-14/5223