FHIR Chat · model file · cql

Stream: cql

Topic: model file


view this post on Zulip Georg Fette (Jan 30 2019 at 13:38):

Hello,
I would like to use CQL with a model with a lot of custom profiles. In the github project there is a project called xsd-to-modelinfo, which can be used to create model files from xsd-files. Where do I get those xsd-files from or how do they look like ? Can they be automatically generated using the bunch of StructureDefinition-files my FHIR-model is based on ? Is it recommended to write/generate such an xsd-file and let the xsd-to-modelinfo-propject generate my model file, or should I write my own generator that directly generates my model file ?
Greetings

view this post on Zulip Bryn Rhodes (Jan 30 2019 at 17:00):

Hi @Georg Fette , yes, you can use the xsd-to-modelinfo generator to create model info from any xsd schema, and the FHIR specifications and implementation guides produce xsd schemas as part of their output. However, because xsd's don't support everything the FHIR StructureDefinition does, the xsd's are a lower-fidelity model, so a generator directly from the StructureDefinitions is preferable.

view this post on Zulip Georg Fette (Jan 30 2019 at 18:54):

Hi @Bryn Rhodes , does such a generator from StructureDefinitions already exist ? How do the FHIR specifications produce these xsd's ?

view this post on Zulip Lloyd McKenzie (Jan 30 2019 at 19:31):

We use a custom set of java code to generate the schemas, HTML renderings as well as the Java reference implementations from the structure definitions. Other reference implementations also use custom code to generate their implementations.

view this post on Zulip Georg Fette (Jan 30 2019 at 20:05):

Are the ones used by xsd-to-modelinfo the ones provided on the page https://www.hl7.org/fhir/downloads.html linked by the 'Code Generation Schemas' link ? Are those xsd's (or the code generating them) related to a specific reference implementation ? Or do you mean that the implementations of the StructureDefinitions in Java specific and the schemas as well as the HTML renderings are generic (because xsd's and HTML are independent from specific implementations) ? Is the generator for the schemas from StructureDefinitions openly available ?

view this post on Zulip Grahame Grieve (Jan 30 2019 at 20:06):

all the generators are here:

view this post on Zulip Grahame Grieve (Jan 30 2019 at 20:07):

https://github.com/HL7/fhir/tree/master/tools/java/org.hl7.fhir.tools.core/src/org/hl7/fhir/definitions/generators

view this post on Zulip Bryn Rhodes (Jan 30 2019 at 20:08):

Yes, we use the schemas from the fhir download to generate the FHIR model infos.

view this post on Zulip Georg Fette (Jan 31 2019 at 08:36):

ah, thanks

view this post on Zulip Georg Fette (Feb 05 2019 at 10:07):

Hi @Grahame Grieve , how are the generators used ? Are there somewhere test-cases that demonstrate their usage ? I have checked out all code and everything compiles. I am looking at the SchemaGenerator, XSDBaseGenerator and XSDGenerator. Which generator generates what and how are they used ?
Greetings


Last updated: Apr 12 2022 at 19:14 UTC