FHIR Chat · Code sample for Canonical Ref · dotnet

Stream: dotnet

Topic: Code sample for Canonical Ref


view this post on Zulip Hugh Glover (Jan 06 2021 at 20:50):

Can someone give me a code snippet for using a canonical reference in Firely .NET SDK please. I want a PlanDefinition.ActionComponent.Definition that is an existing ActivityDefinition. I'm missing something somewhere ... :sad:

view this post on Zulip Mirjam Baltus (Jan 07 2021 at 07:43):

@Hugh Glover Could you clarify your question a bit more: do you have a PlanDefinition resource and want to get the url for the ActivityDefinition out of it, or do you want to create a PlanDefinition and set the url of the ActivityDefinition?

view this post on Zulip Hugh Glover (Jan 07 2021 at 09:52):

@Mirjam Baltus I have a set of ActivitiyDefinition resources created. I then want to create a PlanDefinition and this will have a set of actions each of which will be defined by one of the ActivityDefinitions I have already created. My understanding is that I use the Definition element of the Action to do this which has type canonical(ActivityDefinition | PlanDefinition | Questionnaire). I haven't done this before and I just don't know how to write the code to wire it up.

view this post on Zulip Mirjam Baltus (Jan 11 2021 at 15:32):

Adding a canonical to the PlanDefinition.action.definition field can be done like this:

  var pd = new PlanDefinition();
  var pda = new PlanDefinition.ActionComponent();
  pda.Definition = new Canonical("http://myserver.org/ActivityDefinition/1234");
  pd.Action.Add(pda);

view this post on Zulip Mallesh (Jan 19 2021 at 07:46):

Please anyone share patch method code

view this post on Zulip René Spronk (Jan 19 2021 at 07:51):

@mallesh Please create a new topic - your question is not related to the topic of this thread, which is "Code sample for canonical Ref".


Last updated: Apr 12 2022 at 19:14 UTC