FHIR Chat · schema complex types · implementers

Stream: implementers

Topic: schema complex types


view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:07):

The schema seems to have different representations of the data-types than the profiles do... For example, Composition.status in the schema shows as type "CompositionStatus", where in the FHIR website (http://www.hl7.org/fhir/composition.html), Composition.status shows as "code". Does anyone know why this is?

view this post on Zulip Josh Mandel (Mar 10 2016 at 02:13):

In FHIR, a bare "code" datatype is typically bound to a fixed valueset (e.g. Patient.gender). In the schema, it sounds like the valueset is effectively collapsed into element-specific data types. The net result is the same (a field that must be populated with values from a fixed list).

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:14):

That makes some sense... However, it makes it very difficult to trace the schema to the profile definitions. For example, if I am exporting a StructureDefinition using the schema, I cannot find the correct "Type" code to use for the ElementDefinitions

view this post on Zulip Grahame Grieve (Mar 10 2016 at 02:17):

"if I am exporting a StructureDefinition using the schema" - uh?

view this post on Zulip Grahame Grieve (Mar 10 2016 at 02:17):

building the schema involves a lossy transform

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:18):

Yah... that sounds a little confusing. But, basically, I am building a StructureDefinition. I have the schema loaded already and know where in the schemas my StructureDefinition and ElementDefinitions relate to. If I want to determine what "type" should be output for the ElementDefinition based on the element within the schema, I cannot

view this post on Zulip Grahame Grieve (Mar 10 2016 at 02:19):

I don't understand what you are doing - building a structure definition from a schema? why?

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:23):

In Trifolia, we allow users to define constraints (ElementDefinitions) based on the structure of the FHIR schema

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:24):

In other words, we make a visual representation of the schema in a web browser, and let the users select an element and constrain in (or create an ElementDefinition)

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:24):

but, unless I add logic in here to have it use base profiles for FHIR, I cannot determine what the valid "type" is for a given ElementDefinition

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:25):

rather, I cannot determine that JUST using the schema

view this post on Zulip Grahame Grieve (Mar 10 2016 at 02:29):

well I wouldn't have even started from a schema - I would've used the structure definition. but I can tell you that if the schema contains an enumeration, the correct type is 'code', though you won't be able to tell what the value set is

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:31):

Trifolia is a schema-based template/profile designer. It's been using schemas for 5+ years. So, it would be an effort to re-design it to base it on the XML representations of a profile, instead of using the schema

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:31):

Regardless, though, my point is that if I'm having a problem tracing this, someone else will, and I think we need to update the schemas to be more accurate to the FHIR website

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:32):

Not sure if that means updating the schema to have Composition.status be an extension of a complex type called "code"... would have to play around with that concept

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:32):

But, at the least, I think the schema should have annotations to address this

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:33):

so that you can trace the schema to the standard

view this post on Zulip Grahame Grieve (Mar 10 2016 at 02:34):

well, we can do that by making the simple rule: any element with an enumerated type is a code. But there's way more important stuff that doesn't go in the schema; it's a stupid brain dead thing

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:35):

make an annotation ;)

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:36):

adding another "rule" to have to read seems more implementer-complex then just annotating the schema

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:40):

Any idea where I can download all of the profiles for the base standard?

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:40):

in XML format?

view this post on Zulip Sean McIlvenna (Mar 10 2016 at 02:48):

nm. found them in the standard's download


Last updated: Apr 12 2022 at 19:14 UTC