FHIR Chat · Simplest way to add single properties to a profile? · hapi

Stream: hapi

Topic: Simplest way to add single properties to a profile?


view this post on Zulip Andrew Broadbent (Jun 23 2017 at 14:17):

I'm currently in the process of modelling profiles for a few administrative objects that we want to store in fhir, which don't have anything to do with patients, and don't map on to any of the existing fhir types. To do this I'm creating a profile on basic.

I want to add a few basic properties to the resource, e.g. a name (string), a description (string), and identifier (identifier), and a few other similar properties. Am I right in thinking that the way to go here is to use an extension for each property, when the extension definition has just one item in it? It feels a bit heavy weight to just add single values. Is there a way of just defining straight on the profile that I want it to have a slot for a new string called name, a new string called description, etc?

If not, is there a technical reason for this? Extensions can have new elements defined on them, and profiles being StructureDefinitions too, I'm not totally sure why they cannot.

view this post on Zulip Andrew Broadbent (Jun 23 2017 at 14:27):

As an addition to that, if you do have to use extensions to do this; are there already extensions defined which just contain an instance of each datatype?

view this post on Zulip Andrew Broadbent (Jun 23 2017 at 14:37):

Just to add some further context, here is what I'm trying to do expressed in java classes:

class MyObject{
String name;
String description;
Identifier identifier;
etc...
}


Am I right in thinking that the only way to do this in fhir is like this:

// This is an extension
class Name {
String value;
}

// This is an extension
class Description {
String value;
}

// This is an extension
class Identifier {
Identifier value;
}

// This is a profile
class MyObject{
Name name;
Description description;
Identifier identifier;
etc...
}

view this post on Zulip Eric Haas (Jun 24 2017 at 00:12):

yes - you add elements to existing StructureDefinitions using extensions . If you want to purely model something in FHIR you can create a logical model

view this post on Zulip David Hay (Jun 24 2017 at 04:37):

If you're interested, there is a UI for creating logical models in clinFHIR. You can then generate instances of them in the Scenario Builder (though you can't save them to a FHIR server at the moment)...

view this post on Zulip Binu DGIT (Sep 13 2017 at 07:47):

If you're interested, there is a UI for creating logical models in clinFHIR. You can then generate instances of them in the Scenario Builder (though you can't save them to a FHIR server at the moment)...

Dear David,
I could create a logical model using clinFHIR was able to upload to HAPI test server. But could not send a message since server could not identify the resource name specified. Can you please provide me solution on this..

view this post on Zulip David Hay (Sep 13 2017 at 09:10):

Sorry - It's not possible to save a logical model to the HAPI server as it expects the resources to be conformant to the core FHIR resource types. The purpose of the logical model (in this context) is to identify the changes you need to make to the core types for your particular implementation - the new elements actually need to be represented by an extension (as you've said). You can then decide what extensions you need and build the profile...

view this post on Zulip Binu DGIT (Sep 14 2017 at 09:33):

Sorry - It's not possible to save a logical model to the HAPI server as it expects the resources to be conformant to the core FHIR resource types. The purpose of the logical model (in this context) is to identify the changes you need to make to the core types for your particular implementation - the new elements actually need to be represented by an extension (as you've said). You can then decide what extensions you need and build the profile...

Thank you very much for the information.
As per my understanding, Observation is the base resource type suitable to make a profile to keep pregnancy information. Further, I can add extensions. what do you think?

view this post on Zulip David Hay (Sep 14 2017 at 18:12):

Hi Binu - if you search the chat for 'pregnancy' you'll see quite a few references that might help you. I think the key thing is that there will be multiple observations over a period of time for any given pregnancy - much like vital signs (so might be worth taking a look at that profile for inspiration...


Last updated: Apr 12 2022 at 19:14 UTC