FHIR Chat · cardinality for backbone in schema and data elements in d... · implementers

Stream: implementers

Topic: cardinality for backbone in schema and data elements in d...


view this post on Zulip Marvin Greenberg (Feb 28 2020 at 15:36):

Hi, I'm new to this chat so apologies if I'm asking in the wrong place. We have some code that we create validations schemas. Previously (dstu2, stu3) we used the dataelements.json to do this. But the structure of this changed significantly in r4 (https://www.hl7.org/fhir/definitions.json.zip) AND it seems like the new structure has lost some information, specifically the cardinality for the backbone elements. I also looked at the fhir.schema.json and it also seems not to have the cardinality. Am I just missing something? Thanks!

view this post on Zulip Lloyd McKenzie (Feb 28 2020 at 15:37):

@Grahame Grieve

view this post on Zulip Grahame Grieve (Feb 28 2020 at 19:00):

the json schema looks like it has the cardinality to me but it's subtle in json schema

view this post on Zulip Marvin Greenberg (Feb 28 2020 at 19:04):

So there is something that says array, 1..1 for 'source' in AuditEvent and 1..* for agent in AuditEvent?

view this post on Zulip Grahame Grieve (Feb 28 2020 at 19:06):

not in json schema, no. The type is array or not, and the element is in the required list or not

view this post on Zulip Marvin Greenberg (Feb 28 2020 at 19:08):

required list... Ahah

view this post on Zulip Marvin Greenberg (Feb 28 2020 at 19:08):

I get it. So a required elt of type array is 1..*

view this post on Zulip Grahame Grieve (Feb 28 2020 at 19:09):

as for the definitions file... that seems pretty screwed up on backbone elements. E.g. Account.coverage somehow magically morphs into http://hl7.org/fhir/StructureDefinition/de-Account.coverage.coverage and the cardinalities are wrong

view this post on Zulip Marvin Greenberg (Feb 28 2020 at 19:10):

Thanks. And I guess, the data elements StructureDefinitions don't have that info for backbone elements because they aren't intended to be a schema

view this post on Zulip Grahame Grieve (Feb 28 2020 at 19:10):

I think they are intended to be there

view this post on Zulip Marvin Greenberg (Feb 28 2020 at 19:10):

Um, that is what I guess I concluded. OK.

view this post on Zulip Marvin Greenberg (Feb 28 2020 at 19:11):

It isn't obvious where to put them the way dataelement is currently structured.

view this post on Zulip Grahame Grieve (Feb 28 2020 at 19:11):

Added to the list of R4 known issues: https://confluence.hl7.org/display/FHIR/Known+Issues+with+the+published+FHIR+Specifications

view this post on Zulip Marvin Greenberg (Feb 28 2020 at 19:12):

But thanks. I'll see if it is worth right now for me to switch to using the schema.

view this post on Zulip Grahame Grieve (Feb 28 2020 at 19:14):

if you're going to switch, just use the structure definitions... they are the formal authority

view this post on Zulip Marvin Greenberg (Feb 28 2020 at 19:17):

I am not sure I understand. The structure definitions in dataelements.json is what we were using - that is missing the backbone cardinality.

view this post on Zulip Marvin Greenberg (Feb 28 2020 at 19:19):

Maybe you are saying that the schema has certain elements that ARE StructureDefns? I'm not very familiar with json schema

view this post on Zulip Grahame Grieve (Feb 28 2020 at 19:22):

you should use the structure definitions in resources.json and types.json. Or even better, switch to the core package (hl7.fhir.r4.core), which is the same definitions, but the format we'll be maintaining going forward

view this post on Zulip Marvin Greenberg (Feb 28 2020 at 19:29):

OK, thanks


Last updated: Apr 12 2022 at 19:14 UTC