FHIR Chat · Validation Time · implementers

Stream: implementers

Topic: Validation Time


view this post on Zulip Shovan Roy (Aug 27 2020 at 01:27):

@Grahame Grieve just wondering if there is any way to find out the total time taken by the IG Publisher while validating all the resources (instance) as referenced from the IG?
I can see a log: "Finished. 01:22.0309. Validation output in C:\Users\...\qa.html
Errors: 0, Warnings: 8, Info: 11, Broken Links = 0 (01:47.0235)
Done"

Does it mean "01:22.0309" is the total validation time?

view this post on Zulip Grahame Grieve (Aug 27 2020 at 03:07):

no that's just the time since the process started. That's a real long time...

view this post on Zulip Shovan Roy (Aug 27 2020 at 03:25):

thanks @Grahame Grieve , yeah I though so, any log being produced for validation time?

view this post on Zulip Grahame Grieve (Aug 27 2020 at 03:56):

not at the moment

view this post on Zulip Shovan Roy (Aug 27 2020 at 04:10):

ok, is there any way I can run the validator_cli.jar locally with local profiles?. I looked at the https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator, but not able to figure out how I can run a resource instance pointing to a profile available in my computer (local system).

Background: I have been trying to figure-out the performance optimal way to draft a FHIR document profile which has entry slicing. At this moment all of my profiles have 'profile:resolve()' as slicing discriminator. I have noticed that pattern:$this.resolve().code.coding works now and could be more performant model. just have to find out benefit comparison. So trying options to record validation time.

view this post on Zulip Oliver Egger (Aug 27 2020 at 06:03):

you can add your local profile with the -ig parameter to the validator, just pass in the file/folder or ig of your local profile(s)

view this post on Zulip Shovan Roy (Aug 27 2020 at 06:34):

thanks @Oliver Egger , let me try that. "just pass in the file/folder " .. is this it he folder where all the profiles are placed?

view this post on Zulip Oliver Egger (Aug 27 2020 at 07:11):

yes

view this post on Zulip Shovan Roy (Aug 27 2020 at 22:33):

I'm still unable to run the validator in my local.

I'm using 'dev' as the version of my local package. any suggestion would be very helpful.

image.png

view this post on Zulip Shovan Roy (Aug 28 2020 at 00:32):

finally it worked.

I was using 'validator_cli.jar' as provided in the link: https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator and I was getting the errors. It started working when I downloaded the 'org.hl7.fhir.validator.jar' and used it.

May be it would be a good idea to update the page: https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator

view this post on Zulip Oliver Egger (Aug 28 2020 at 06:18):

@Shovan Roy confluence is pointing to the new validator (validator_cli.jar) and it should work with that one. Where did you still find a link to the org.hl7.fhir.validator.jar? Can you make your profile and bundle available?

view this post on Zulip Shovan Roy (Aug 28 2020 at 06:20):

@Oliver Egger I found it from the fhir download page: https://www.hl7.org/fhir/downloads.html

view this post on Zulip Shovan Roy (Aug 28 2020 at 06:22):

Attached the package and the sample used: Bundle-ncdhc-document-nb-exam-example.json package.tgz

view this post on Zulip Oliver Egger (Aug 28 2020 at 06:56):

added for the link jira FHIR#28368

view this post on Zulip Oliver Egger (Aug 28 2020 at 07:57):

@Shovan Roy I can reproduce the error here locally. It tries to resolve PractitionerRole/a01bacd2-pr5c-11ea-b3de-0242ac130003 in a FHIRPath expression and it looks likes in an observation context instead of the bundle. It appears that the invariant (dataAbsentReason.empty()) implies (performer.reference.resolve().where($this is PractitionerRole).exists()) is causing this. Not knowing your ig exactly i guess that this is an invariant on Obseration? I think the validator functionality would probably need to be enhanced that it could resolve the resource in the bundle (indicated by not done yet erorr message) . Next step would be probably to isolate this case and add it to the Validation TestSuite.

view this post on Zulip Shovan Roy (Aug 30 2020 at 23:58):

@Oliver Egger thanks heaps for looking into it.
some interesting facts:
Fact 1: When the publisher is running, it's not popping up with any validation error but I can see you are getting validation error with 'validator_cli.jar' on the same artifacts
Fact 2: As per our project requirement, we have two invariants added on Observation to check that two performers exits ( a PractitionerRole and Organization)in the instance. Sounds like the invariant is not working. I'll have to check on that.
Fact 3: Yes, more details in the error message showing the Bundle path would be definitely useful.
Fact 4: The validator_cli.jar is not working at all in my local. But it seems it's working for you. I'm using the following command and I'm getting the following errors. not sure what's missing here. I'm using java 1.8
Command: java -jar validator_cli.jar -ig package.tgz -version 4.0 Observation-p04bacd2-ob1c-01ea-b3de-0242ac130001.json -output validation-output.json
Error:
Exception in thread "main" java.lang.Error: Not done yet
at org.hl7.fhir.validation.cli.services.StandAloneValidatorFetcher.fetch(StandAloneValidatorFetcher.java:41)
at org.hl7.fhir.validation.ValidationEngine.fetch(ValidationEngine.java:1850)

view this post on Zulip Grahame Grieve (Aug 31 2020 at 00:31):

try the next version when it is released

view this post on Zulip Shovan Roy (Aug 31 2020 at 00:34):

thanks @Grahame Grieve

view this post on Zulip Oliver Egger (Aug 31 2020 at 06:05):

@Shovan Roy i had the same error like you (Fact 4) i got the information for using the validator in a development env.

view this post on Zulip Grahame Grieve (Aug 31 2020 at 06:51):

try with the latest PRs

view this post on Zulip Shovan Roy (Sep 01 2020 at 04:17):

I can see the new publisher reports the time taken for each steps and this includes the validation time. This will be very helpful. thanks a lot @Grahame Grieve
image.png


Last updated: Apr 12 2022 at 19:14 UTC