Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI Validator | Resolving of external profile urls not working #1559

Closed
sebastianhelbig opened this issue Jan 31, 2024 · 2 comments
Closed

Comments

@sebastianhelbig
Copy link

sebastianhelbig commented Jan 31, 2024

The resolving of external (not supplied by an IG) profiles is not working for me.

Simple example: I download the following ressource example: https://simplifier.net/bfarm/example-diga-healthapp

java -jar validator_cli.jar Example-DiGA-HealthApp.xml -version 4.0.1 -debug -locale en-US -language en

SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J: Ignoring binding found at [jar:file:/Users/sh/Developer/Validierungspaket-MIO-DiGA-Toolkit/validator_cli.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.
FHIR Validation tool Version 6.2.15 (Git# 0bb2010409ad). Built 2024-01-30T11:13:28.136Z (18 hours old)
  Java:   11.0.21 from /usr/local/Cellar/openjdk@11/11.0.21/libexec/openjdk.jdk/Contents/Home on x86_64 (64bit). 8192MB available
  Paths:  Current = /Users/sh/Developer/Validierungspaket-MIO-DiGA-Toolkit, Package Cache = /Users/sh/.fhir/packages
  Params: Example-DiGA-HealthApp.xml -version 4.0.1 -debug -locale en-US -language en
  Locale: Deutschland/DE
  Jurisdiction: Germany
Loading
  Load FHIR v4.0 from hl7.fhir.r4.core#4.0.1 - 4576 resources (00:05.538)
  Load hl7.fhir.uv.extensions.r4#1.0.0 - 1328 resources (00:01.694)
  Load hl7.terminology#5.4.0 - 4202 resources (00:01.831)
  Load hl7.terminology.r5#5.0.0 - 4174 resources (00:01.209)
  Load hl7.fhir.uv.extensions#1.0.0 - 1328 resources (00:01.211)
  Terminology server https://tx.fhir.org - Version Connected to Terminology Server at https://tx.fhir.org (00:01.021)
  Package Summary: [hl7.fhir.r4.core#4.0.1, hl7.fhir.xver-extensions#0.1.0, hl7.fhir.uv.extensions.r4#1.0.0, hl7.terminology#5.4.0, hl7.terminology.r5#5.0.0, hl7.fhir.uv.extensions#1.0.0]
  Get set... Generating snapshot for https://hl7.org/fhir/StructureDefinition/string|4.0.1
 go (00:00.264)
Validating
  Validate Example-DiGA-HealthApp.xml
Validate DeviceDefinition against https://hl7.org/fhir/StructureDefinition/DeviceDefinition|4.0.1..........20..........40..........60..........80.........|
Validate DeviceDefinition against https://fhir.bfarm.de/StructureDefinition/HealthApp|
 00:01.805
Done. Times: Loading: 00:12.929, validation: 00:01.806. Memory = 757Mb

*FAILURE*: 4 errors, 1 warnings, 1 notes
  Error @ DeviceDefinition (line 1, col47): StructureDefinition hat keinen Snapshot - die Validierung erfolgt gegen den Snapshot, daher muss dieser bereitgestellt werden
  Error @ DeviceDefinition.extension[0] (line 9, col77): Die extension https://fhir.bfarm.de/StructureDefinition/HealthAppMedia ist nicht bekannt, and hier nicht erlaubt
  Error @ DeviceDefinition.extension[1] (line 16, col87): Die extension https://fhir.bfarm.de/StructureDefinition/HealthAppNutzungshinweis ist nicht bekannt, and hier nicht erlaubt
  Error @ DeviceDefinition.extension[2] (line 24, col81): Die extension https://fhir.bfarm.de/StructureDefinition/HealthAppSummaries ist nicht bekannt, and hier nicht erlaubt
  Information @ DeviceDefinition.meta.profile[0] (line 7, col76): Canonical URL 'https://fhir.bfarm.de/StructureDefinition/HealthApp' kann nicht aufgelöst werden
  Warning @ DeviceDefinition (line 1, col47): Constraint failed: dom-6: 'A resource should have narrative for robust management' (defined in https://hl7.org/fhir/StructureDefinition/DomainResource) (Best Practice Recommendation)
Done. Times: Loading: 00:12.929, validation: 00:01.806. Max Memory = 8Gb

I can see on the webserver that https://fhir.bfarm.de/StructureDefinition/HealthApp is fetched by the validator. I tested with returning the profile as fhir+json and fhir+xml. Right now it will serve based on the given accept header and redirect to simplifier for text/html with supplying fhir+xml as the default.

@sebastianhelbig sebastianhelbig changed the title Validator | Resolving of external profile urls not working CLI Validator | Resolving of external profile urls not working Jan 31, 2024
@grahamegrieve
Copy link
Collaborator

I don't believe that there's any documentation to say that it should work like this. I don't believe that this is true either:

I can see on the webserver that https://fhir.bfarm.de/StructureDefinition/HealthApp is fetched by the validator.

it it's true, I can't see why. The intent is that you nominate the profiles to fetch using the -ig parameter e.g. -ig https://fhir.bfarm.de/StructureDefinition/HealthAppMedia. There's a bug that means that won't work, but will start working from the next release

@sebastianhelbig
Copy link
Author

Nevermind. It is working, I just didn't notice that the error message had changed. The profile urls should point to snapshots of the profiles and validation works fine. (of course without the need to supply the -ig param).

markiantorno added a commit that referenced this issue Feb 28, 2024
## Validator Changes

* Fix significant bug where validator gets internal child lists incorrect and doesn't do complete validation when switching between validating profiles and resources directly
* Performance improvement for validator parsing - thanks Brian Postlethwaite
* Fix Crash on slicing a sliced element #862
* Fix ig loading from direct URL (#1559)
* Fix bug copying constraints into Bundle.entry.resource profiles
* Fix bug loading R5 extensions with imported value sets
* Replace dom-3 with custom java code, and check xhtml references to contained content
* Improve concept map code validation
* Update observation validator for committee decision not to enforce Blood Pressure profile for Mean Blood Pressure
* Validate value set internal codeSystem references
* Split value set validation into 10k batches for very large extensional value sets
* Hack fix for opd-3
* Fix bug where using ontoserver when not appropriate
* Fix issues with inferSystem
* Don't require HL7 committee for contained resources in HL7 namespace
* Fix where validator was ignoring minimum cardinality for XML attributes (especially in CDA)
* Improved ConceptMap validation
* Updated IG versions used for -cda and -ccda CLI validation options.
* Change validator so that it marks value properties in primitive data types as illegal

## Other code changes

* Fix code system rendering for uri properties
* Fix broken links Bundle and Profile rendering
* Take copy of code when doing local validation
* WIP: major refactor of cross version analysis
* Add support for subsumes in tx client
* Don't generate snapshots when scanning structure definitions for resource names
* Work on ConceptMap infrastructure for cross-version analysis
* Fix bug where not rendering ConceptMap relationships
* Fix wrong URLs rendering Profiles and Questionnaires
* Fix bug using wrong version constant for R3
* Updates for R5 StructureMap syntax
* Support for case sensitive Code system tests
* Add TurtleGeneratorTests for R5
* Introduce new validator cliContext option disableDefaultResourceFetcher (#1526)
* Render contained resources when rendering Patient resources
* Fix bug in FML Parser
***NO_CI***
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants