FHIR Chat · URLs for custom profile and extensions · implementers

Stream: implementers

Topic: URLs for custom profile and extensions


view this post on Zulip Chris Munro (Feb 14 2017 at 16:05):

I've uploaded a custom profile (based on Basic) and extensions to simplifier, and I am trying to retrieve it using the C# API,

However when I retrieve it, I only get the properties of Basic and not the extra ones I have defined. Here is the example https://simplifier.net/test230/Citation
A suggestion is that the URLs are wrong. How are you supposed to define the URL of the extension in this case? I can't find any examples of custom profiles/extensions in simplfier to check against.

view this post on Zulip Michel Rutten (Feb 14 2017 at 16:57):

@Chris Hills Munro Have you seen the "Endpoint" drop-down menu in the toolbar at the top of the Simplifier resource page? Here you can find private & public endpoint urls that you can use to fetch the resource via the API. If you paste the public endpoint in your browser's url bar, then Simplifier will return the XML version of your resource.

view this post on Zulip Michel Rutten (Feb 14 2017 at 16:59):

Note: https://simplifier.net/test230/Citation is the so-called canonical url of the profile. If you publish the same profile to multiple FHIR servers, then each published instance will have a unique resource id. However all instances share the same canonical url.

view this post on Zulip Chris Munro (Feb 15 2017 at 13:54):

@Michel Rutten

Thanks for the reply.

I'm doing the following using the C# API

location = new Uri( <endpoint of profile>)
StructureDefinition stdef = client.Read<StructureDefinition>(location);
List<ElementDefinition> tmp = stdef.Snapshot.Element.ToList();

Which works if I use the endpoint "https://simplifier.net/api/fhir/StructureDefinition/Account"

However, if I build a custom profile in Forge and upload to simplifier, and take the newly created endpoint:
https://simplifier.net/api/fhir/StructureDefinition/c797cf91-d694-4518-8ef7-31084ca12405

Then it does not allow me to retrieve the profile, I just get 'object not found'.

It is not clear to me what the error is in the profile causing this to happen?

view this post on Zulip Mirjam Baltus (Feb 16 2017 at 09:34):

Your code works fine for me retrievingyour profile, except for the bit where you're trying to access the snapshot. Your profile doesn't have a snapshot component, so that's where I get a NullReferenceException.

view this post on Zulip Richard Kavanagh (Feb 17 2017 at 08:53):

It's not obvious but Forge does not build snapshots by default. You have to switch it on in the settings - that might be your issue.

view this post on Zulip Chris Munro (Feb 17 2017 at 09:12):

Thanks Mirjam

view this post on Zulip Chris Munro (Feb 17 2017 at 09:24):

Thanks Richard, yes this isn't obvious

view this post on Zulip Michel Rutten (Feb 17 2017 at 11:02):

I would prefer to integrate a checkbox "Save snapshot" into the File Save dialog. However this is complicated because Forge uses the standard Windows common dialog. I know that the Windows API allows an application to customize the standard dialogs via API hooks. However from a .NET WPF application this would require large amounts of hideous interop logic, which isn't really worth it.


Last updated: Apr 12 2022 at 19:14 UTC