FHIR Chat · Edit Resource XLS or StructureDefinition? · committers

Stream: committers

Topic: Edit Resource XLS or StructureDefinition?


view this post on Zulip Michelle (Moseman) Miller (Mar 15 2021 at 21:33):

Did I miss a communication that we should avoid editing resource spreadsheets in favor of the StructureDefinition? Oddly enough, I was able to edit Condition's spreadsheet (adding a comment), but then I got a build error when renaming an element within Goal (so I am shifting to editing the StructureDefinition now). If anyone has a link to the communication, I'd like to review it to see what else I might have missed.

view this post on Zulip Melva Peters (Mar 15 2021 at 21:44):

@Michelle (Moseman) Miller There are issues when you update the spreadsheet - which is still possible. The element identifier doesn't get added to the xml. There is a thread...I'll tag you on it....

view this post on Zulip John Moehrke (Apr 05 2021 at 18:57):

so I missed the transition to the new system in the FHIR core build... and am now trying to get some changes in.. Where is the explanation of when to use excel, and when not to?

view this post on Zulip Lloyd McKenzie (Apr 05 2021 at 20:04):

If you're comfortable not using Excel, don't. If you want to use Excel, run the build to create the Excel, make your changes, then run the build again to generate the XML.

view this post on Zulip John Moehrke (Apr 05 2021 at 20:05):

I expected that editing the spreadsheet in excel was still the right step. I seem to get the right result. But I get a complaint about my spreadsheet "not updated - open in excel"

view this post on Zulip John Moehrke (Apr 05 2021 at 20:06):

so I should edit the structure definition and ignore the spreadsheet?

view this post on Zulip John Moehrke (Apr 05 2021 at 20:06):

(I would be comfortable with that, just not sure about the recommendation)

view this post on Zulip Lloyd McKenzie (Apr 05 2021 at 20:07):

If you edited the spreadsheet and closed the spreadsheet and ran the build, it should propagate your content into the XML file.

view this post on Zulip John Moehrke (Apr 05 2021 at 20:11):

It did seem to propagate.. it just throws the warning

view this post on Zulip Lloyd McKenzie (Apr 05 2021 at 20:21):

I'll admit that I don't know what the warning means.

view this post on Zulip John Moehrke (Apr 05 2021 at 20:22):

I have since made changes to the structure defintion, and I still get the warning (well, it doesn't say it is a warning, it just prints a message)

view this post on Zulip John Moehrke (Apr 05 2021 at 20:23):

can I just delete the spreadsheet now? it will get regenerated?

view this post on Zulip Melva Peters (Apr 05 2021 at 21:26):

There were some issues with making changes in the spreadsheet where the content doesn't get updated in the StructureDefinition - element identifiers are missing. Also some issues with RIM mappings. Not sure if those have been fixed.

view this post on Zulip John Moehrke (Apr 05 2021 at 21:27):

I found mappings were only in the structuredefinition

view this post on Zulip John Moehrke (Apr 05 2021 at 21:31):

Im happy never working on a spreadsheet again.. I am still not clear on the recommendation for editors

view this post on Zulip Bryn Rhodes (Apr 05 2021 at 21:39):

My experience has been that if you edit the spreadsheet, it will produce the StructureDefinition (and it uses the timestamp file to know when to do what), but that the output sometimes misses the "id" element of the elements in the generated StructureDefinition. That seems to be the only thing, so if you have a bunch of new elements, you can just go in and set the id attribute and it works from there. I have had it mistakenly overwrite though, so at this point I don't use the spreadsheets at all anymore, and I delete the generated ones for structure defs I'm working on, just in case.

view this post on Zulip Bryn Rhodes (Apr 05 2021 at 21:40):

So the recommendation for editors depends on the editor. If you're happy using spreadsheets, you can continue to do so (with the caveats Melva and I are noting). But if you're happy to edit the XML, have at it.

view this post on Zulip Bryn Rhodes (Apr 05 2021 at 21:40):

Just don't commit the generated spreadsheets, the build drives off the StructureDefinition resource files now

view this post on Zulip John Moehrke (Apr 05 2021 at 21:46):

Bryn Rhodes said:

Just don't commit the generated spreadsheets, the build drives off the StructureDefinition resource files now

isn't there a .gitignore rule for this?

view this post on Zulip Bryn Rhodes (Apr 05 2021 at 21:55):

Yes, they are generally ignored

view this post on Zulip Craig Newman (Apr 06 2021 at 12:43):

I also missed the transition. Is there a set of instructions on the non-Excel method? I found several pages on editing, including one on using Forge to edit the core spec, but I'm not sure where the new protocol is described.

view this post on Zulip John Moehrke (Apr 06 2021 at 14:39):

so, it seems that if you edit the structuredefinition, then you really should delete the spreadsheet to force the build to ignore and rebuild the spreadsheet.

view this post on Zulip Lloyd McKenzie (Apr 06 2021 at 16:14):

I don't think there's any formal documentation. If you're comfortable editing the XML directly, that's easiest. If you're adding examples or extensions, you'll need to add them to the IG or List resource that lists those.


Last updated: Apr 12 2022 at 19:14 UTC