Stream: dotnet
Topic: Resolving of custom profiles
Timo Rosenblatt (Feb 05 2021 at 14:19):
Hello, I'm new to working with FHIR data and got stuck trying to load custom profiles.
I can use the official HL7 types via the zip file, but I can't find the resources from my local folder.
var dirSettings = new DirectorySourceSettings() { IncludeSubDirectories = true };
var resolver = new CachedResolver(new MultiResolver(
new DirectorySource(@"[my local path to profile]", dirSettings),
ZipSource.CreateValidationSource()));
var hl7 = resolver.ResolveByCanonicalUri("http://hl7.org/fhir/StructureDefinition/Task");
var gem = resolver.ResolveByCanonicalUri("https://gematik.de/fhir/StructureDefinition/erxTask");
Variable hl7 is set to a StructureDefinition/Task Resource while gem = null and was not found.
Does it have anything to do with the fact that it's a StructureDefinition XML File and not a XSD, like in the .ZIP file?
Or is it a problem that it's just a differential XML?
Any help's appreciated.
<StructureDefinition xmlns="http://hl7.org/fhir">
...
<url value="https://gematik.de/fhir/StructureDefinition/ErxTask" />
...
<differential>
...
</differential>
</StructureDefinition>
Mirjam Baltus (Feb 05 2021 at 15:02):
The canonical URL is case sensitive, and I notice that you have 'erxTask' in the URL for gem, but 'ErxTask' in the URL of the StructureDefinition. Could you try and see if that's why it fails?
Timo Rosenblatt (Feb 05 2021 at 15:08):
Thank you so much. I've taken the URL from a sample file that was provided. Seems They had their own sample messed up.
Now, I can proceed and get some real work done.
Thanks
Last updated: Apr 12 2022 at 19:14 UTC