Stream: implementers
Topic: check a structure definition
Brian Reinhold (Sep 10 2018 at 12:38):
Is there a tool I can use to check a hand-edited structure definition for a profile? The IG publisher is currently unable to do this (or I am doing it wrong). I need to create these profiles by editing raw structure definitions which is very error prone. I would like to be able to test my definition to make sure I am doing it correctly. The Forge tool cannot be used because these are version 3.5.0 structures.
Michel Rutten (Sep 10 2018 at 12:48):
Hi @Brian Reinhold, if the IG Publisher fails to validate your profiles, then probably de-serialization fails because the xml/json is invalid. Maybe an XML editor can help you identify basic syntax errors?
Brian Reinhold (Sep 10 2018 at 12:54):
Hi @Brian Reinhold, if the IG Publisher fails to validate your profiles, then probably de-serialization fails because the xml/json is invalid. Maybe an XML editor can help you identify basic syntax errors?
@Michel Rutten The xml is valid. The IG Publisher simply does nothing. Gives no error messages and generates no output. I am probably doing it wrong; but I don't know. Its a fairly simple profile; generated in Forge and then modified for version 3.5.0. Thus the only changes are the fields specifying the versions. The difference fields are very limited. Wanted to start with something simple.
I tried
igpublisher -source [resources] -destination [output]
The only file in resources was my structure definition. When I do this nothing happens.
Michel Rutten (Sep 10 2018 at 12:56):
Hard to say. Maybe you can get an answer from the IG Creation stream?
Brian Reinhold (Sep 10 2018 at 13:00):
Hard to say. Maybe you can get an answer from the IG Creation stream?
I've asked there specifically on that issue but I don't think there is anyone in the waking hours who can answer that. It might also be that the IG publisher is undergoing changes so it doesn't work at the moment
Lloyd McKenzie (Sep 10 2018 at 14:41):
To just check a structure definition, you can use the validator - either to validate the profile or to validate an instance against the profile.
Lloyd McKenzie (Sep 10 2018 at 14:42):
The IGPublisher is working, but you need to do a whole lot of setup to make it run - you'll need a config.json, an ImplementationGuide and a bunch of other stuff. If all you want to do is check for profile validity, that's overkill.
Brian Reinhold (Sep 10 2018 at 14:42):
To just check a structure definition, you can use the validator - either to validate the profile or to validate an instance against the profile.
Can one reproduce the structure definition as seen in an IG guide to see if it is correct?
Brian Reinhold (Sep 10 2018 at 14:44):
The IGPublisher is working, but you need to do a whole lot of setup to make it run - you'll need a config.json, an ImplementationGuide and a bunch of other stuff. If all you want to do is check for profile validity, that's overkill.
I am writing an IG guide. Since I have to code the structure definitions in raw xml using Notepad++ it can be VERY error prone. So I want to check them as I write them. I already have my pages. Now I am just doing the hard part ... the xml files (profile structure definitions and Implementation Guide structure definition)
Lloyd McKenzie (Sep 10 2018 at 14:47):
Why don't you download a schema-validating editor? There are some open source ones. That will help a bit. You can also author profiles in spreadsheets which is a slightly easier UI. Take a look at the SDC IG to see how it's done. (In fact, it's best to start your IG by taking an existing working IG environment and adapting it slowly.)
Brian Reinhold (Sep 10 2018 at 14:52):
Why don't you download a schema-validating editor? There are some open source ones. That will help a bit. You can also author profiles in spreadsheets which is a slightly easier UI. Take a look at the SDC IG to see how it's done. (In fact, it's best to start your IG by taking an existing working IG environment and adapting it slowly.)
I am doing the latter. I have the working PoCD IG guide, I also have the input to an older PHD IG guide I created in Forge/Simplifier. That's how I got my pages done fast. Now I am trying to modify my DSTU3 version structure definitions to 3.6.0. There are significant changes in the Device as it has merged with the DeviceComponent and the latter no longer exists. I have not downloaded a schema-validating editor though I think I have the schema in that tgz file. I will still be short the final appearance to check what an end user sees and to see if it makes sense
Lloyd McKenzie (Sep 10 2018 at 14:56):
You can also just grab the schemas from the site. You only need 4 files - fhir-single, fhir-xhtml, xml, xmldsig-core-schema
Brian Reinhold (Sep 10 2018 at 14:58):
You can also just grab the schemas from the site. You only need 4 files - fhir-single, fhir-xhtml, xml, xmldsig-core-schema
I just grabbed the structure definition schema from the tgz file. Won't that be good enough to validate the structure defs?
Lloyd McKenzie (Sep 10 2018 at 14:59):
No - the individual resource schemas point to everything else eventually. fhir-single is easier
Brian Reinhold (Sep 10 2018 at 15:05):
No - the individual resource schemas point to everything else eventually. fhir-single is easier
Okay, took the fhir-single from the tgz. Unfortunately my Notepad++ xml plugin validator choked on line 612 of that file. Will need to get another.
By the way, am I giving the correct command to the IG publisher to just render my structure definitions? (IT was:
java -jar org.hl7.fhir.igpublisher.jar -source [resources] -destination [output]
Lloyd McKenzie (Sep 10 2018 at 15:38):
I've never run the igpublisher that way - I always point it to an igconfig.json file
Grahame Grieve (Sep 10 2018 at 19:02):
it should work like that, but since we transitioned to git, only the very last version works
Brian Reinhold (Sep 10 2018 at 19:05):
it should work like that, but since we transitioned to git, only the very last version works
THe one I downloaded a few hours ago gives a null pointer exception, even on a valid structure definition that I took from an IG that I can publish. Is there another newer version?
Grahame Grieve (Sep 10 2018 at 19:14):
yes can you stick to a single stream for this subject please? (In IG creation)
Last updated: Apr 12 2022 at 19:14 UTC