LHNCBC/lforms-fhir-app

How to change to STU3?

Closed this issue · 2 comments

Hi, I;m running your app locally and I connected to a STU3 server, but uploading a (correct) STU3 questionnaire results in the following error:

image

Looks like it wants to validate it as R4?

The app looks at the Questionnaire content to try to determine whether the Questionnaire is STU3 or R4. The version of the FHIR server is only used for saving/loading to/from the FHIR server. If you set meta.profile to one of the URLs it expects for STU3, that should fix it. I see the warning message only gives you R4 URLs. I will have to fix that. If you set meta.profile=[{'http://hl7.org/fhir/3.0/StructureDefinition/Questionnaire'}], that should work. (If it doesn't, please post an example that doesn't work.) Without the meta.profile URL set, it attempts to guess whether the Questionnaire is STU3 or R4 based on the fields it finds in the Questionnaire. We could improve that guessing if you think there is another field it should be paying attention to.

setting meta.profile=[{'http://hl7.org/fhir/3.0/StructureDefinition/Questionnaire'}] works!

We normally do not put the fhir version in our canonical URL.. Could it be an idea to resolve the StructureDefintion and read out the fhir version from that resource?

I have no opinion on what element it should use to guess the version.

tnx for the help!