FHIR Chat · referencing profiled resources · clinFHIR

Stream: clinFHIR

Topic: referencing profiled resources


view this post on Zulip David Hay (Oct 19 2017 at 17:29):

@Eric Haas - changing title.

Just thinking about this a bit more. What I think needs to happen is that when determining possible reference targets, CF will need to look at the ElementDefinition in the source (which will reference, say, argonaut Patient, retrieve the corresponding SD from a registry, determine the base type, and allow a reference to all resource instances conformant to the base type. So, for example, a target resource conformant to a CareConnect Patient would also be a valid target in this scenario, agree?

view this post on Zulip David Hay (Oct 19 2017 at 17:37):

putting it another way, the ability to make a reference will be based on the FHIR base type, irrespective of the profile in the source or the target...

view this post on Zulip Eric Haas (Oct 19 2017 at 19:22):

Yes, I agree with that

view this post on Zulip David Hay (Oct 20 2017 at 20:00):

OK - have uploaded an update that should work - can you take a look & check?

view this post on Zulip David Hay (Oct 21 2017 at 18:23):

btw - a logical model can also be the target of a reference, provided it has an extension like this in it (off the root). This is added by the Logical Modeller, but no reason why it won't work if added to a model created outside of CF... (Though do remember that the Scenario Builder won't handle very complex models)...

{
      "url": "http://clinfhir.com/fhir/StructureDefinition/baseTypeForModel",
      "valueString": "Condition"
    }

view this post on Zulip Eric Haas (Oct 23 2017 at 06:21):

I tested it out and got this alert....

view this post on Zulip Eric Haas (Oct 23 2017 at 06:23):

Screen-Shot-2017-10-22-at-11.21.12-PM.png

view this post on Zulip David Hay (Oct 23 2017 at 18:11):

Does your Logical Model have that URL? CF is looking for it on the HAPI sever using a query... Also - what were you doing when you got the error?

view this post on Zulip Eric Haas (Oct 23 2017 at 18:28):

I'll check

view this post on Zulip Eric Haas (Oct 24 2017 at 19:08):

SB still not allowing a reference to the FHIR base type, irrespective of the profile in the source or the target...

view this post on Zulip Eric Haas (Oct 24 2017 at 19:08):

10-24-2017-12-03-45-PM.png

view this post on Zulip David Hay (Oct 24 2017 at 22:47):

are both core resource types? I was able to create a reference from Communication -> PlanDefinition...

view this post on Zulip Eric Haas (Oct 24 2017 at 23:30):

Communication is a profile with a reference to a profile on PlanDef. SB would not let me use a core resource for PlanDef instead of the target profile on PlanDef.

view this post on Zulip Eric Haas (Oct 24 2017 at 23:31):

I uploaded this profile directly to hapi. I did not add the extension you mentioned above

view this post on Zulip David Hay (Oct 24 2017 at 23:51):

OK so both are profiles? I think the issue is that without the extension, SB doesn't know what 'type' it is profiling- hence it cannot create the reference. If you add the following extension to the planDef logical model, then you should be able to create the reference: (assuming that the reference from Comunication is to PlanDefinition...

{
      "url": "http://clinfhir.com/fhir/StructureDefinition/baseTypeForModel",
      "valueString": "PlanDefinition"
    }

view this post on Zulip Eric Haas (Oct 25 2017 at 00:38):

tried that and no luck - Is there an example in the library of what I am trying to do?

view this post on Zulip Eric Haas (Oct 25 2017 at 00:39):

works great with core resources though which is what i did.

view this post on Zulip David Hay (Oct 25 2017 at 04:30):

dang! both profiles are in the hapi server? what id's are they?

view this post on Zulip David Hay (Oct 25 2017 at 04:32):

oh, and I assume you are not creating the LM's in the Logical Modeler? (You shouldn't need to of course)...

view this post on Zulip Eric Haas (Oct 25 2017 at 15:28):

no I created using IG published and uploaded to HAPI. Ids are Communication = rr-communication and PlanDefinition = rr-plandefinition.

view this post on Zulip David Hay (Oct 25 2017 at 17:04):

should be fixed now. I was confusing myself between logical models and profiles - it's logical models that need the extension, not profiles. btw - do note that CF won't handle complicated profiles all that well at the moment - sliced profiles will confuse it, and where the 'child' elements of a complex datatype are displayed it will offer them up for potential data entry - then barf at the result. Working on that, but it's kinda complex!

view this post on Zulip Eric Haas (Oct 25 2017 at 20:04):

the communication profile is indeed complicated

view this post on Zulip Eric Haas (Oct 25 2017 at 23:54):

Unfortunately when I create a link between the Communication Profile and PlanDefinition core resource SB pops into read only mode :-(

view this post on Zulip Eric Haas (Oct 25 2017 at 23:55):

I am able to do want I want with the core resources right now so no need to hurry up and fix it right now.

view this post on Zulip Eric Haas (Oct 25 2017 at 23:55):

Thanks for your efforts so far

view this post on Zulip David Hay (Oct 26 2017 at 00:59):

no worries - glad for your testing! Did you download the scenario from the library, or create it directly?

view this post on Zulip Eric Haas (Oct 26 2017 at 16:28):

no worries - glad for your testing! Did you download the scenario from the library, or create it directly?

from library

view this post on Zulip David Hay (Oct 26 2017 at 17:13):

That's the issue then. I need to work on tidying that up...


Last updated: Apr 12 2022 at 19:14 UTC