FHIR Chat · Typing in FHIR · implementers

Stream: implementers

Topic: Typing in FHIR


view this post on Zulip Grahame Grieve (May 01 2016 at 03:25):

A number of implementers have been asking about this, so I took the time to write a candidate document:

view this post on Zulip Grahame Grieve (May 01 2016 at 03:25):

http://wiki.hl7.org/index.php?title=FHIR_Typing_System

view this post on Zulip Grahame Grieve (May 01 2016 at 03:26):

I put it on wiki so we can iterate on it quickly, but I propose that this gets added to the specification itself once it's mature

view this post on Zulip Grahame Grieve (May 01 2016 at 20:28):

after writing this, and working on a lot of type related code at the moment, I'd like to make 2 changes to structure definition:
- change baseType to type, and make it always be the type that the structure definition describes (not the one it's derived from - that's in baseDefinition)
- add a new kind "PrimitiveType" (with a constraint that a prmitive type URL must be http://hl7.org/fhir/StructureDefinition/[name])

view this post on Zulip Michel Rutten (May 01 2016 at 22:29):

@Grahame Grieve Looks good, your suggested StructureDef changes seem like an improvement that will probably simplify/clarify my STU3 implementation logic - once I get to work on that...

view this post on Zulip David Hay (May 02 2016 at 04:58):

what is primitiveType for?

view this post on Zulip Grahame Grieve (May 02 2016 at 06:46):

there's lots of place in the code where you apply 'compiler magic' (e,g. innate knowledge) of the primitive types, and treat them differently.

view this post on Zulip Grahame Grieve (May 02 2016 at 06:48):

if you hard code something, you can just list the primitive types in your code. But if you're writing something metadata driven, you might logically decide to list the primitive types off the structure definitions. But right now, the only way to determine if it's a primitive is to examine it for an XML attribute named 'value' - not satisfactory.

view this post on Zulip Grahame Grieve (May 02 2016 at 06:48):

so I'm proposing to add this is a new code for StructureDefinition.kind - primitiveType

view this post on Zulip Chris Grenz (May 02 2016 at 14:56):

+1 for primitiveType - I'm looking for @value in my code now (and URL starts-with hl7.org).

view this post on Zulip Chris Grenz (May 02 2016 at 15:42):

How best to comment on the wiki document? Do we use the discussion page? Or just start editing away (seems unruly)?

view this post on Zulip Grahame Grieve (May 02 2016 at 18:25):

discussion page, or comments here

view this post on Zulip Chris Grenz (May 02 2016 at 19:31):

For the "Type Binding" section both @Ewout Kramer and I have tried to put this together:
http://stackoverflow.com/questions/34183525/in-fhir-structuredefinitions-profiles-how-do-elements-aggregate-into-a-snapsho
https://github.com/ewoutkramer/strucdefdoc/wiki/SD's-expressing-constraints

view this post on Zulip Chris Grenz (May 02 2016 at 19:31):

Also, I've tried to describe exactly what elements to merge to get a snapshot element here:
https://github.com/chrisgrenz/FHIR-Primer/wiki/Snapshots-Determining-Refines

view this post on Zulip Ewout Kramer (May 02 2016 at 19:44):

Yes, and Chris for the final DSTU3 publication we have promised to merge this into the spec. We should sit together next week and plan the materials we'd like to add (you've mentioned examples before as well)...

view this post on Zulip Chris Grenz (May 02 2016 at 19:45):

Yeah, getting stuff up here for discussion: https://github.com/chrisgrenz/FHIR-Primer

view this post on Zulip Grahame Grieve (May 02 2016 at 20:37):

well, now you get to reconcile with what I wrote too ;-)

view this post on Zulip Ewout Kramer (May 02 2016 at 21:08):

+1 for primitiveType - I'm looking for @value in my code now (and URL starts-with hl7.org).

I think I just checked whether the name started with lowercase ;-)

view this post on Zulip Seref Arikan (May 05 2016 at 07:11):

This looks relevant to what I'm trying to get my head around. Thanks for taking the time to work on this.


Last updated: Apr 12 2022 at 19:14 UTC