FHIR Chat · How to generate xsd and sch schema from structureDefinition? · implementers

Stream: implementers

Topic: How to generate xsd and sch schema from structureDefinition?


view this post on Zulip Andersson Paz (Apr 09 2018 at 16:31):

Hi, I have a tool in php to generate class from xsd roesources schemas and trying to generate structures definition (profiling), but its only for validataion right? I not having validation tool in php, not yet. I will like generate class on fly from my profile, but need this in xsd-sch schema.

Somebody can help me? Thanks!

view this post on Zulip Lloyd McKenzie (Apr 09 2018 at 20:59):

To clarify - you're asking if there are xsds and schematron files for profiles?

view this post on Zulip Andersson Paz (Apr 09 2018 at 21:27):

No, I am searching a tool to generate xsds and schematron file from a profile. Thanks!

view this post on Zulip Lloyd McKenzie (Apr 09 2018 at 22:34):

The IGPublisher tool will produce schematron files. We haven't found trying to generate XSDs very useful because most profiles define different constraints on different repetitions and XSDs can't handle that.

view this post on Zulip Andersson Paz (Apr 10 2018 at 00:51):

ohhh thanks very much, I wa trying to execute the IGPublisher but my default jre was 1.7 and not worked a few weeks ago

view this post on Zulip Andersson Paz (Apr 10 2018 at 00:53):

Do you have an example? I am trying with terminology Server at http://tx.fhir.org/r3 and default r4 but not work

view this post on Zulip Andersson Paz (Apr 10 2018 at 00:57):

java -jar org.hl7.fhir.igpublisher.2.jar -source patient.json -destination ./ -tx http://tx.fhir.org/r3

view this post on Zulip Andersson Paz (Apr 10 2018 at 01:09):

patient.json is the default profile in fhir for patient https://www.hl7.org/fhir/patient.profile.json

view this post on Zulip Andersson Paz (Apr 10 2018 at 01:11):

I'm doing something definitely very wrong!

view this post on Zulip Andersson Paz (Apr 10 2018 at 01:12):

Sorry!

view this post on Zulip Lloyd McKenzie (Apr 10 2018 at 02:29):

The IGPublisher doesn't convert a single profile - you need to set up an implementation guide project. Alternatively, you could take a look at the code and figure out how to invoke the schematron generator alone.

view this post on Zulip Lloyd McKenzie (Apr 10 2018 at 02:29):

IGPublisher documentation is here: http://wiki.hl7.org/index.php?title=IG_Publisher_Documentation
(and discussion of issues is on the #IG creation stream)

view this post on Zulip Grahame Grieve (Apr 10 2018 at 07:28):

it should be possible to generate schematrons and schemas for a single profile. It's just a matter of packaging up the logic, which all exists.

view this post on Zulip Grahame Grieve (Apr 10 2018 at 07:29):

btw, with regard to producing schemas, this is possible, though it degrades on slices, as Lloyd points out. But it can still rule out elements that are never used in any slice

view this post on Zulip Lloyd McKenzie (Apr 10 2018 at 13:33):

You only want to rule out elements that are actively prohibited by the profile - which most profiles shouldn't do. (Prohibiting ignorable elements significantly raises costs for other systems to integrate.)

view this post on Zulip Andersson Paz (Apr 10 2018 at 18:41):

I have it! thanks! I'll get to work!

view this post on Zulip Andersson Paz (Apr 11 2018 at 02:40):

waoo is a geat tool! too complex! I managed to execute an example recently.

view this post on Zulip Andersson Paz (Apr 11 2018 at 02:51):

But it does not generate the xsd only sch ... I will try to validate the resources with the structuredefinition class that I have in php... Thank you very much!


Last updated: Apr 12 2022 at 19:14 UTC