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

Snapshot generator does not expand complex extensions defined in a an extension. #2799

Closed
Rob5045 opened this issue Jun 11, 2024 · 5 comments · Fixed by #2877
Closed

Snapshot generator does not expand complex extensions defined in a an extension. #2799

Rob5045 opened this issue Jun 11, 2024 · 5 comments · Fixed by #2877
Assignees

Comments

@Rob5045
Copy link
Contributor

Rob5045 commented Jun 11, 2024

The bug was originally submitted to Forge:
https://firely.atlassian.net/browse/FOR-872

The project to reproduce the issue is attached.
The issue is for file: NLLArticleInfoCorrect.xml.

The snapshot generator method Generate returns 2 of the same errors:

https://electronichealth.se/fhir/StructureDefinition/NLLArticleInfo2 (Element Extension.extension.extension has neither a type nor a nameReference.)

They correspond to the extension element definitions for currentProductName and history.
These two element definitions are not expanded.

  • FHIR Version: R4
  • Version: 5.8.1

swedishnationalmedicationlist(5).zip

@mmsmits
Copy link
Member

mmsmits commented Jul 25, 2024

Don't spend more than 2 days researching what's going on here

@mmsmits
Copy link
Member

mmsmits commented Aug 20, 2024

@MatthijsvdWielen You've had a call about this with @alexzautke , what was the conclusion ?

@MatthijsvdWielen
Copy link

@mmsmits that call did not solve the issue unfortunately.

The customer provided some additional information. In version 23 everything was still working and from version 24 the issue started. https://simplifier.net/SwedishNationalMedicationList/NLLMedication/~history

@mmsmits mmsmits self-assigned this Sep 24, 2024
@mmsmits
Copy link
Member

mmsmits commented Sep 27, 2024

I found out the problem. It's not the snapshot generator. But the order of the ElementDefinitions in the differential.

I attached the correct file here:
NLLArticleInfoCorrect.txt

Please note that the order of the elements in a Differential matter a lot.
And Extension.extension comes before Extension.url and Extension.value[x].

I don't if Forge created this (I think not), but the user should be informed.

@mmsmits
Copy link
Member

mmsmits commented Sep 27, 2024

See unit test for this here as well:
https://github.com/FirelyTeam/firely-net-sdk/pull/2877/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants