Stream: tooling
Topic: Firely Terminal: Snapshot error
Declan Kieran (Mar 04 2022 at 13:52):
Hi, I was able to generate a snapshot from a r4 StructureDefinition with only a diiferential by
fhir install hl7.fhir.r4.core
fhir push <sd_file>
fhir snapshot
I then tried to generate one for an stu3 StructureDefinition by doing
fhir install hl7.fhir.r3.core
fhir push <sd_file>
fhir snapshot
but I'm then I got an error
One or more errors occurred. (While building a POCO: Literal '3.0.2' is not a valid value for enumeration 'FHIRVersion' (as StructureDefinition.fhirVersion[0]))
So I tried going back to see if I could still generate the R4 snapshot and I'm still getting the same error, even after removing the r3 package to remove it from the scope
fhir uninstall hl7.fhir.r3.core
It seems my install is in a bad state, is there an easy way to reset it, is there local files I could clear to reset it to fresh?
Ward Weistra (Mar 09 2022 at 14:49):
Hi @Declan Kieran, a few pointers:
- Firely Terminal has a setting for the current FHIR version you are working with, which you can see with
fhir spec
. Try setting that to the desired FHIR version withfhir spec R3
etc. - With
fhir scope
you can see what packages are currently installed in the scope. You can also see in the package.json file in a folder what packages are set as dependencies for this scope, restore them (install them) withfhir restore
and in fhirpkg.lock.json you can see the results of that. Try not to mix different FHIR versions in one folder. fhir cache
shows all packages installed in your global FHIR package cache (or find them on disk: https://confluence.hl7.org/display/FHIR/FHIR+Package+Cache). You can safely delete them since they will be re-downloaded. But in this case, I don't expect the issue to be there.- With
fhir stack
you can see what you currently have on the stack, to make sure it's the resource you expect.
Declan Kieran (Mar 09 2022 at 15:51):
Thanks @Ward Weistra
I had checked fhir spec, and also tried restore as well as bake and unbake in various combinations. I also did have a look at the cache output and it seemed like the packages were being recognised ok. @Dave Barnet is going to raise an issue with the files that are mentioned below.
Debian11 error
dotget sdks installed
dotnet --list-sdks
3.1.416 [/usr/share/dotnet/sdk]
6.0.200 [/usr/share/dotnet/sdk]
fhir scope
hl7.fhir.r4.core 4.0.1
fhir push UKCoreAllergyIntolerance.json
fhir snapshot
fhir snapshot
Fhir version cannot be determined
Two spaces between 'version' and 'cannot' are as is
Windows error
Snapshot was generated for UKCoreAllergyIntolerance.json, although I've a different set of sdk's installed on the windows machine
dotnet --list-sdks
3.1.416 [C:\Program Files\dotnet\sdk]
3.1.416 [C:\Program Files\dotnet\sdk]
5.0.102 [C:\Program Files\dotnet\sdk]
5.0.102 [C:\Program Files\dotnet\sdk]
5.0.400 [C:\Program Files\dotnet\sdk]
5.0.400 [C:\Program Files\dotnet\sdk]
Procedure followed as before
Then tried to generate a snapshot for a version 3.0 resource
I removed hl7.fhir.r4.core
fhir remove hl7.fhir.r4.core
and installed hl7.fhir.r4.core
fhir install hl7.fhir.r3.core
Followed procedure as before and got error
One or more errors occurred. (While building a POCO: Literal '3.0.2' is not a valid value for enumeration 'FHIRVersion' (as StructureDefinition.fhirVersion[0]))
Now when trying to go back and generate the first snaphot, I get the same error.
Ward Weistra (Mar 10 2022 at 09:03):
@Declan Kieran Perfect we'll take them from there.
In your Windows ticket: It seems from the description as you are trying to create a R4 (with success) and STU3 (with error) snapshot both from the same UKCoreAllergyIntolerance resource?
Declan Kieran (Mar 10 2022 at 09:46):
@Ward Weistra Ah sorry, I never mentioned that in the description. It was for the CareConnect-AllergyIntolerance-1 profile
https://simplifier.net/hl7fhircareconnectbaselineforstu3/careconnect-allergyintolerance-1
Which has a snapshot, but I had removed just to test it. The ticket that was raised included the StructureDefintion that was used, where the snapshot was removed. I've attached the files here, which also has the badly word description! firely.terminal-issues.zip
Declan Kieran (Mar 10 2022 at 09:48):
Once I had tried to generate a snapshot for CareConnect-AllergyIntolerance-1, I was unable to then generate it again for UKCoreAllergyIntolerance, even after using clear, restore, unbake and removing and reinstalling the packages.
Last updated: Apr 12 2022 at 19:14 UTC