FHIR Chat · Validate Command · IG creation

Stream: IG creation

Topic: Validate Command


view this post on Zulip Grahame Grieve (Jun 29 2020 at 04:40):

After reviewing some of my support work around validation, it's evident that we would be better to provide explicit validation instructions for people to follow. So from the next release of the IG Publisher, there'll be another fragment generated {{{type}}}-{{{id}}}-validate.html which contains something like this:

Validation Links:

Validate using FHIR Validator (Java): java -jar org.hl7.fhir.validator.jar -ig hl7.fhir.uv.ipa#dev C:/work/org.hl7.fhir.igs/ipa-candidate/output/Patient-example.json

where the package id and the file name are correct for the user

I can add additional instructions for validating, and will over time. Requests/Suggestions welcome

view this post on Zulip Grahame Grieve (Jun 29 2020 at 04:40):

@Lloyd McKenzie it would be good to add this to profiles and instances (and also questionnaire responses)

view this post on Zulip Lloyd McKenzie (Jun 29 2020 at 05:11):

It seems like overkill to do this for every single file. Wouldn't including a more generic instruction with an example we can stick on the downloads page suffice?

view this post on Zulip Lloyd McKenzie (Jun 29 2020 at 05:12):

(also, should probably put quotes around the example filename in case there are spaces in the path)

view this post on Zulip Grahame Grieve (Jun 29 2020 at 07:07):

I had thought so, but experience suggests otherwise - just put it in every example and every profile. And there won't be any spaces in these file names

view this post on Zulip Grahame Grieve (Jun 29 2020 at 07:07):

oh no. maybe if you work locally.

view this post on Zulip Michael Lawley (Jun 29 2020 at 11:15):

I would hope there's no absolute paths like C:/blah being generated?

view this post on Zulip Vassil Peytchev (Jun 29 2020 at 13:12):

in the same vein - is it possible to avoid C: for those who are not using Windows?

view this post on Zulip Lloyd McKenzie (Jun 29 2020 at 14:00):

We won't be able to know the full file path, so we can't include that. We'd have to say something like:
java -jar "some-path/to/jar/org.hl7.fhir.validator.jar" -ig hl7.fhir.uv.ipa#dev "some-path/to/example/Patient-example.json"

view this post on Zulip Grahame Grieve (Jun 29 2020 at 20:49):

I do know the full path since it's generated on the fly using javascript from the browser url

view this post on Zulip Grahame Grieve (Jun 29 2020 at 20:50):

I said:

where the package id and the file name are correct for the user

view this post on Zulip Lloyd McKenzie (Jun 29 2020 at 22:02):

How could you know the full path to where someone put the validator jar on their local system or the example?

view this post on Zulip Lloyd McKenzie (Jun 29 2020 at 22:02):

Because that's what people will actually be executing against...

view this post on Zulip Grahame Grieve (Jun 29 2020 at 22:11):

oh not the validator path, that's true

view this post on Zulip Lloyd McKenzie (Jun 29 2020 at 22:22):

Even the example path. On the CI build or a publication, the location will be a website. Users want to know how to validate stuff on their hard drive...

view this post on Zulip Jose Costa Teixeira (Jul 01 2020 at 08:13):

can we use an online validator?

view this post on Zulip Jens Villadsen (Jul 01 2020 at 19:15):

Not for local profiles and valuesets

view this post on Zulip Grahame Grieve (Jul 01 2020 at 20:06):

soon that will be possible.

view this post on Zulip Reece Adamson (Jul 02 2020 at 15:28):

@Grahame Grieve is this work ongoing somewhere in a public repo? The Inferno team is working on a web-based FHIR Validator that primarily uses the HL7 FHIR Validator classes under the hood. We haven't broadly advertised it yet as its still actively being developed and we wanted to get in a couple more features (including broader support for any IG via the package registry). It certainly can be used as is, but we don't want to unnecessarily reinvent the wheel here!

A live instance is hosted here: inferno.healthit.gov/validator
The source for the frontend app is here](https://github.com/inferno-community/fhir-validator-app)
And the super simple backend service which is launched with it is here

I'd love to able to look at some of the code you're talking about/working on to see if there's any opportunities to share or collaborate!

view this post on Zulip Grahame Grieve (Jul 02 2020 at 21:46):

well, the code for this is here:

view this post on Zulip Grahame Grieve (Jul 02 2020 at 21:47):

https://github.com/HL7/fhir-ig-publisher/blob/master/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/Publisher.java#L6872

view this post on Zulip Grahame Grieve (Jul 02 2020 at 21:48):

feel free to make a PR to add a reference to inferno. if it makes sense to add something here

view this post on Zulip Grahame Grieve (Jul 02 2020 at 21:48):

but this runs for all IGs - there are 100s of them not just US-Core

view this post on Zulip Chris Moesel (Jul 03 2020 at 00:18):

@Grahame Grieve -- I think @Reece Adamson was referring to your statement, "soon that will be possible", which appears to be in reference to a question about having an online validator. Are you (or someone else besides Inferno) working on an online validator?

view this post on Zulip Grahame Grieve (Jul 03 2020 at 00:42):

oh right. Yes, I have long worked on the innards of the validator, but the only way to run it is a command line interface that isn't what many people want. So @Mark Iantorno is working on the UX now (after fixing up - and nearly being finished - the build process).

Roughly our goals are:

  • ship a cross-platform UI so the user can run the validator.
  • based that on a Web-UI so that in the background, it runs as web service
  • the web service will be usable from another service as well - e.g. offer a validation web service for integration into other FHIR servers (beyond the way it is already integrated into HAPI)
  • we will make that available on the web at validation.fhir.org

If you're interested in this - and yes, it will all be open source - I suggest you discuss in the #hapi stream. I'll create a topic there


Last updated: Apr 12 2022 at 19:14 UTC