Stream: implementers
Topic: Models: Source of Truth and Builds, etc.
Karl M. Davis (Feb 16 2020 at 17:50):
:wave:
Afternoon, all! I'm considering trying to build out FHIR models for a new language (Rustlang) and have some questions:
- What is the source of truth for the FHIR models in the SVN repository, i.e. what gets edited by folks when new fields/resources are added? Where can I find those files in SVN?
- I'm lazy: anyone now of a well-maintained Git mirror for the SVN repo?
- Is it better to try and add this support in-tree or out-of-tree?
- Anyone know of any good documentation, blog posts, etc. on these topics?
Thanks much for any help you can offer!
Grahame Grieve (Feb 16 2020 at 20:06):
- we don't use svn anymore. Did you find some documentation that says that we do?
- the source of truth is messy and unreliable. You should really use the StructureDefinitions (other code generators do)
- the best source is the core package (hl7.fhir.r[v].core)
- if you really want a git repo for these, see https://github.com/FHIR/packages
Karl M. Davis (Feb 16 2020 at 20:56):
@Grahame Grieve Thanks!
I ended up at SVN by following the link on this page: https://confluence.hl7.org/display/FHIR/Open+Source+Implementations
FHIR build tool itself is open source and includes various definitional and reasoning tools. ... (then the "[2]" link)
Karl M. Davis (Feb 16 2020 at 20:56):
The only code generator I found that's based on the structure defs is the IBM one. Are there others you know of?
Karl M. Davis (Feb 16 2020 at 20:56):
Oh, and also: what's the canonical location to grab all of the structure defs from?
Karl M. Davis (Feb 16 2020 at 21:40):
(Silly me: fixed the Confluence link above.)
Michele Mottini (Feb 16 2020 at 23:12):
The .NET library code generation uses the StructureDefinition (XML): https://github.com/FirelyTeam/fhir-net-api/blob/develop-1.x/stu3/src/Hl7.Fhir.Core/Model/Generated/Template-Model.tt
Michele Mottini (Feb 16 2020 at 23:12):
Grahame Grieve (Feb 17 2020 at 01:11):
ok fixed the link, thanks
Grahame Grieve (Feb 17 2020 at 01:15):
other code generators:
- Java (HAPI): https://github.com/hapifhir/org.hl7.fhir.core/blob/master/org.hl7.fhir.core.generator/src/org/hl7/fhir/core/generator/engine/JavaCoreGenerator.java
- Pascal: https://github.com/grahamegrieve/fhirserver/blob/master/utilities/generator/project/src/org/fhir/pascal/generator/engine/PascalGenerator.java
Ward Weistra (Feb 17 2020 at 14:02):
Barely understanding the topic, I believe this is a code generator too: https://github.com/smart-on-fhir/fhir-parser. Used by the Swift and (one of the) Python implementations of FHIR.
Lee Surprenant (Feb 17 2020 at 21:03):
Karl M. Davis said:
Oh, and also: what's the canonical location to grab all of the structure defs from?
you're probably looking for the "FHIR Definitions" downloads from https://www.hl7.org/fhir/downloads.html (this would be specific to the currently published version, R4)
Karl M. Davis (Feb 18 2020 at 02:40):
:100: Thanks, @Lee Surprenant!
Last updated: Apr 12 2022 at 19:14 UTC