-
Notifications
You must be signed in to change notification settings - Fork 44
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
Versioned instances #1495
base: master
Are you sure you want to change the base?
Versioned instances #1495
Conversation
Hi @sebg-mio42. Thanks for submitting another contribution to SUSHI. After reviewing and testing this, I have a few concerns that I'd like to discuss. 1. Duplicate type/id pairings My first concern is that the capability you are enabling is technically invalid against the FHIR Shorthand specification. 3.3.12 Item Identifiers says:
So... FSH does not allow a single project to define two instances of the same type (e.g., 2. Compatibility with IG Publisher My second concern is that the IG publisher also does not allow this. I used your PR along with the example in #1494 to build a simple FSH project. When I ran it through the IG Publisher, I got the following error:
This means that if authors attempt to use this capability in an HL7 implementation guide (which must be published using the IG Publisher), it will fail. 3. Sensitivity to File Placement My third concern is that the functionality requires that each FSH instance definition be in a different file. I discovered that if you put multiple versions of the same instance into a single FSH file, it does not export all of the versions. This, unfortunately, is also a violation of the FSH spec. 3.2.2 Items says (emphasis mine):
4. Referring to Instances w/ Multiple Versions My last concern is how this affects authors' ability to deterministically refer to a specific instance when that instance has multiple versions. If an author refers to an instance via a FSH Reference (e.g., This could possibly be addressed by requiring that the entity name (what comes after
By the way, your PR actually already handles this -- and it has the added bonus of getting around the previous concern, because with this approach, you can put both definitions into the same file and it still exports both of them as well. Next Steps So... It seems there is a way around my last two concerns, but the first two concerns remain. Perhaps it would be helpful if you could describe your use case. What are you trying to achieve with this? Thanks again for your contribution. It's always exciting to see this type of involvement from the community. |
Hi @cmoesel, thank you very much for your in-depth review. Our specific use case is creating resources for different points in time that reflect the state of the FHIR server at that point in time.
Regarding your concerns: 1. Duplicate type/id pairingsThat is a fair concern that I overlooked. I was working off the FHIR specification https://www.hl7.org/fhir/resource.html: 2. Compatibility with IG PublisherI should have thought about the effect on the publisher. I tried running the publisher with versioned references but ran into the following problem:
To me, this appears to be a bug in the publisher as I cannot find any reason for this reference format according to FHIR. According to the FHIR specification, references may be version specific: https://hl7.org/fhir/references.html#Reference and there are no contradictory definitions for the ImplementationGuide reaource that I was able to find. 3. Sensitivity to File Placement / Referring to Instances w/ Multiple VersionsThese are both good points that I did not consider initially. I think your solution using a different entity name and specifying the id separately is elegant and avoids potential issues with referencing from FSH. |
Hi @sebg-mio42. Thanks for providing the use case. That's helpful. Regarding bundle constraint bdl-7, I agree that it seems to suggest that a bundle can have matching type/id pairs as long as the meta.versionId is different. SUSHI already supports this if you make the instances Regarding the IG Publisher, it does seem that it's more strict about the reference format than it should be. That said, SUSHI may have the same flaw -- we'd have to look at that. This, however, is separate from the concern that the IG Publisher won't allow two standalone instances with the same type/id -- that's still a problem, unless your use case is to always use them only inline in bundles. I think that perhaps this is a discussion worth surfacing on Zulip so the community can participate. It would be helpful to see if others would also like to have this capability and if the community has any other thoughts about it. Does that sound good to you? |
Hi @cmoesel, I think a discussion on Zulip is a great idea. Seeing as the potential issues / consequences and the effect on the rest of the tooling are greater than I first assumed, I will prepare a bit more for the discussion before bringing it up. |
Hi @sebg-mio42. I'm just checking in on this. Are you still planning to introduce this topic to the Zulip community? Or would you rather that I introduce it? |
@cmoesel , sorry for the late reply. Feel free to introduce the topic if you like. I have sadly not had time to go though in detail and prepare the topic fully. |
Description:
Allows multiple copies of the same instance, as long as the meta.versionId is unique.
Includes a new test for the instance generation.
It does not seem to break any of the current tests.
pattern for filenames changed to accomodate the changes:
Related Issue:
#1494