Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of Index Instead of Slice Name Causes Error #57

Closed
markkramerus opened this issue Dec 11, 2020 · 1 comment
Closed

Use of Index Instead of Slice Name Causes Error #57

markkramerus opened this issue Dec 11, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@markkramerus
Copy link

Again, this is from attempting to roundtrip from mCODE FHIR (latest master branch) to FSH via GoFSH, and back to FHIR using SUSHI.

SUSHI errors on the the following example because ctcae-grade slice is required (1..1), and the value $ctcae-grade-code-system#2 "Moderate Adverse Event" is assigned to extension[0], which isn't the same as assigning it to extension[grade]:

Instance: ctc-adverse-event-example-1
InstanceOf: CTCAdverseEvent
Usage: #example
* contained[0] = mcode-medication-example-1
* extension[0].url = "http://hl7.org/fhir/us/mcode/StructureDefinition/ctcae-grade"
* extension[0].valueCodeableConcept = $ctcae-grade-code-system#2 "Moderate Adverse Event"
* extension[1].url = "http://hl7.org/fhir/us/mcode/StructureDefinition/adverse-event-expectation"
* extension[1].valueCodeableConcept = $ncithesaurus-stage#C41333 "Expected Adverse Event"
* extension[2].url = "http://hl7.org/fhir/us/mcode/StructureDefinition/adverse-event-resolved-date"
* extension[2].valueDateTime = "2020-05-21"
* actuality = #actual
---snip---
@markkramerus markkramerus changed the title Use of Indices Instead of Slice Names Causes Error Use of Index Instead of Slice Name Causes Error Dec 11, 2020
@cmoesel
Copy link
Member

cmoesel commented Dec 17, 2020

Oh boy. I have a feeling that this is going to be a tough one. In order to know what slice name to put, we would have to be able to analyze the data and figure out which of the slices it belongs to -- which, in the worst case, would require us to expand value sets to determine value set inclusion.

TBH, it may be that the only reasonable way to address this is to actually relax the error in SUSHI so that it no longer counts "missing" slices as errors. Or to put the logic in SUSHI to try to determine if an item fits in a slice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants