hl7au / au-fhir-pd

Australian context FHIR profile for provider directory services
MIT License
5 stars 7 forks source link

Validation error - Invalid HTTP response 404 #43

Open dattachandan opened 1 year ago

dattachandan commented 1 year ago

Hi team

I tried the validation CLI tool in the format and got this error - Invalid HTTP response 404 from https://build.fhir.org/ig/AuDigitalHealth/au-fhir-pd/branches/main/package.tgz

java -jar validator_cli.jar aupd-r4-validate-sample-HealthcareService-example0.json -version 4.0.1 -ig hl7.fhir.au.pd#current

FHIR Validation tool Version 6.0.25 (Git# bc3f3481080e). Built 2023-08-04T17:55:29.839Z (58 days old)
  Java:   12-ea from /Users/*/12.ea.20-open on x86_64 (64bit). 4096MB available
  Paths:  Current = /Users/*/fhir-validator-cli, Package Cache = /Users/*/packages
  Params: aupd-r4-validate-sample-HealthcareService-example0.json -version 4.0.1 -ig hl7.fhir.au.pd#current
*
Loading
  Load FHIR v4.0 from hl7.fhir.r4.core#4.0.1 - 4576 resources (00:05.720)
  Load hl7.fhir.uv.extensions.r4#1.0.0 - 1328 resources (00:01.016)
  Load hl7.terminology#5.3.0 - 4201 resources (00:01.297)
  Load hl7.terminology.r5#5.0.0 - 4174 resources (00:02.829)
  Load hl7.fhir.uv.extensions#1.0.0 - 1328 resources (00:00.035)
  Terminology server http://tx.fhir.org - Version 3.0.0 (00:01.815)
Installing hl7.fhir.au.pd#current to the package cache
  Fetching:
Exception in thread "main" org.hl7.fhir.exceptions.FHIRException: Unable to fetch: Invalid HTTP response 404 from https://build.fhir.org/ig/AuDigitalHealth/au-fhir-pd/branches/main/package.tgz (Not Found) (no content)
    at org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager.fetchFromUrlSpecific(FilesystemPackageCacheManager.java:637)
    at org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager.loadFromCIBuild(FilesystemPackageCacheManager.java:649)
    at org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager.loadPackage(FilesystemPackageCacheManager.java:613)

However, these 2 worked according to the available versions, although the warning and info notes were different from the AU base, not sure why pd shows 1 warnings, 1 notes while base shows 0 errors, 0 warnings, 3 notes ?

image


java -jar validator_cli.jar aupd-r4-validate-sample-HealthcareService-example0.json -version 4.0.0 -ig hl7.fhir.au.pd#2.0.1

Loading
  Load FHIR v4.0 from hl7.fhir.r4.core#4.0.1 - 4576 resources (00:05.462)
  Load hl7.fhir.uv.extensions.r4#1.0.0 - 1328 resources (00:00.884)
  Load hl7.terminology#5.3.0 - 4201 resources (00:02.581)
  Load hl7.terminology.r5#5.0.0 - 4174 resources (00:02.211)
  Load hl7.fhir.uv.extensions#1.0.0 - 1328 resources (00:00.045)
  Terminology server http://tx.fhir.org - Version 3.0.0 (00:01.983)
Installing hl7.fhir.au.pd#2.0.1 to the package cache
  Fetching:

Installing hl7.fhir.au.pd#2.0.1 done.
  Load hl7.fhir.au.pd#2.0.1 - 14 resources (00:01.093)
  Package Summary: [hl7.fhir.r4.core#4.0.1, hl7.fhir.xver-extensions#0.0.12, hl7.fhir.uv.extensions.r4#1.0.0, hl7.terminology#5.3.0, hl7.terminology.r5#5.0.0, hl7.fhir.uv.extensions#1.0.0, hl7.fhir.au.pd#2.0.1]
  Get set...  go (00:03.243)
Validating
  Validate aupd-r4-validate-sample-HealthcareService-example0.json
Validate HealthcareService against http://hl7.org/fhir/StructureDefinition/HealthcareService|4.0.1..........20..........40..........60..........80.........|
Validate HealthcareService against http://hl7.org.au/fhir/pd/StructureDefinition/au-pd-healthcareservice..........20..........40..........60..........80..........100.|
 00:01.240

Done. Times: Loading: 00:17.798, validation: 00:01.240. Memory = 458Mb

Success: 0 errors, 1 warnings, 1 notes
  Information @ HealthcareService.specialty[0] (line 18, col6): None of the codings provided are in the value set 'Practice Setting Code Value Set' (http://hl7.org/fhir/ValueSet/c80-practice-codes|4.0.1), and a coding is recommended to come from this value set) (codes = http://snomed.info/sct#310000008)
  Warning @ HealthcareService.specialty[0] (line 18, col6): ValueSet http://hl7.org.au/fhir/ValueSet/snomed-healthcareservice-specialties not found
Done. Times: Loading: 00:17.798, validation: 00:01.240. Max Memory = 4Gb

The AU base log

java -jar validator_cli.jar  aupd-r4-validate-sample-HealthcareService-example0.json -version 4.0.1 -ig hl7.fhir.au.base#2.1.0

Loading
  Load FHIR v4.0 from hl7.fhir.r4.core#4.0.1 - 4576 resources (00:06.152)
  Load hl7.fhir.uv.extensions.r4#1.0.0 - 1328 resources (00:01.023)
  Load hl7.terminology#5.3.0 - 4201 resources (00:02.696)
  Load hl7.terminology.r5#5.0.0 - 4174 resources (00:01.642)
  Load hl7.fhir.uv.extensions#1.0.0 - 1328 resources (00:00.023)
  Terminology server http://tx.fhir.org - Version 3.0.0 (00:02.087)
  Load hl7.fhir.au.base#2.1.0 - 93 resources (00:00.010)
  Package Summary: [hl7.fhir.r4.core#4.0.1, hl7.fhir.xver-extensions#0.0.12, hl7.fhir.uv.extensions.r4#1.0.0, hl7.terminology#5.3.0, hl7.terminology.r5#5.0.0, hl7.fhir.uv.extensions#1.0.0, hl7.fhir.au.base#2.1.0]
  Get set...  go (00:03.693)
Validating
  Validate aupd-r4-validate-sample-HealthcareService-example0.json
Validate HealthcareService against http://hl7.org/fhir/StructureDefinition/HealthcareService|4.0.1..........20..........40..........60..........80.........|
Validate HealthcareService against http://hl7.org.au/fhir/pd/StructureDefinition/au-pd-healthcareservice..........20..........40..........60..........80..........100.|
 00:02.769
Done. Times: Loading: 00:17.647, validation: 00:02.770. Memory = 496Mb

Success: 0 errors, 0 warnings, 3 notes
  Information @ HealthcareService.specialty[0] (line 18, col6): None of the codings provided are in the value set 'Healthcare Service Specialties (SNOMED)' (http://hl7.org.au/fhir/ValueSet/snomed-healthcareservice-specialties|2.1.0), and a coding is recommended to come from this value set) (codes = http://snomed.info/sct#310000008)
  Information @ HealthcareService.specialty[0] (line 18, col6): None of the codings provided are in the value set 'Practice Setting Code Value Set' (http://hl7.org/fhir/ValueSet/c80-practice-codes|4.0.1), and a coding is recommended to come from this value set) (codes = http://snomed.info/sct#310000008)
  Information @ HealthcareService.meta.profile[0] (line 6, col78): Canonical URL 'http://hl7.org.au/fhir/pd/StructureDefinition/au-pd-healthcareservice' does not resolve
Done. Times: Loading: 00:17.647, validation: 00:02.770. Max Memory = 4Gb

Further, noticed that the profile switch resulted in an Exception with the AU base as below.


java -jar validator_cli.jar  aupd-r4-validate-sample-HealthcareService-example0.json -version 4.0.1 -ig hl7.fhir.au.base#2.1.0  -profile http://hl7.org.au/fhir/pd/StructureDefinition/au-pd-healthcareservice

Loading
  Load FHIR v4.0 from hl7.fhir.r4.core#4.0.1 - 4576 resources (00:06.303)
  Load hl7.fhir.uv.extensions.r4#1.0.0 - 1328 resources (00:01.098)
  Load hl7.terminology#5.3.0 - 4201 resources (00:02.487)
  Load hl7.terminology.r5#5.0.0 - 4174 resources (00:02.280)
  Load hl7.fhir.uv.extensions#1.0.0 - 1328 resources (00:00.053)
  Terminology server http://tx.fhir.org - Version 3.0.0 (00:02.112)
  Load hl7.fhir.au.base#2.1.0 - 93 resources (00:00.377)
  Package Summary: [hl7.fhir.r4.core#4.0.1, hl7.fhir.xver-extensions#0.0.12, hl7.fhir.uv.extensions.r4#1.0.0, hl7.terminology#5.3.0, hl7.terminology.r5#5.0.0, hl7.fhir.uv.extensions#1.0.0, hl7.fhir.au.base#2.1.0]
  Get set...  go (00:04.009)
  Fetch Profile from http://hl7.org.au/fhir/pd/StructureDefinition/au-pd-healthcareservice
Exception in thread "main" org.hl7.fhir.exceptions.FHIRFormatError: This does not appear to be a FHIR resource (wrong namespace 'http://www.w3.org/1999/xhtml') (@ /)
    at org.hl7.fhir.r5.formats.XmlParserBase.parse(XmlParserBase.java:143)
    at org.hl7.fhir.r5.formats.XmlParserBase.parse(XmlParserBase.java:128)
    at org.hl7.fhir.r5.formats.ParserBase.parse(ParserBase.java:65)
    at org.hl7.fhir.validation.ValidationEngine.loadProfile(ValidationEngine.java:541)
brettesler-ext commented 1 year ago

Hi Chandan - that URL https://build.fhir.org/ig/AuDigitalHealth/au-fhir-pd/branches/main/package.tgz looks wrong (is the internal agency fork I think, @robeastwood-agency ?) would normally be http://build.fhir.org/ig/au-fhir-pd/branches/main/package.tgz - I think this may have been automatically registered against the package by the build tools - I will investigate....

dattachandan commented 1 year ago

Hi Brett, Thanks. Is the FHIR version 4.0.1 and IG pack version 2.1.0 the current but not published to the public yet version in the CI build through the PR @robeastwood-agency mentioned in my earlier issue

robeastwood-agency commented 1 year ago

Hi @dattachandan and @brettesler-ext - apologies for the delay, I have been on 3 weeks leave.

I will have a close look tomorrow and will respond - however, having fixed the issue re our internal fork package link, it may well now work as expected.

robeastwood-agency commented 1 year ago

As mentioned yesterday, I have fixed the package link issue that resulted in the 404 [^1].

When I run something similar to your original validator command, it succeeds. java -jar validator_cli.jar HealthcareService-example0.json -version 4.0.1 -ig hl7.fhir.au.pd#current

Results in

Success: 0 errors, 1 warnings, 1 notes
  Information @ HealthcareService.specialty[0] (line 15, col4): None of the codings provided are in the value set 'Practice Setting Code Value Set' (http://hl7.org/fhir/ValueSet/c80-practice-codes|4.0.1), and a coding is recommended to come from this value set) (codes = http://snomed.info/sct#310000008)
  Warning @ HealthcareService.specialty[0] (line 15, col4): ValueSet http://hl7.org.au/fhir/ValueSet/snomed-healthcareservice-specialties not found

A few other notes:

[^1]: the fix: The validator processes the -ig hl7.fhir.au.pd argument by looking over the wire for that package, looking in build.fhir.org/ig. Our AuDigitalHealth organisation contributions to the PD repository are via a GitHub fork that has also been configured to use the autobuilder. Following an update to master on the HL7AU PD repo, the autobuilder runs and the new hl7.fhir.au.pd package can be found. However, when our fork has master synchronised, it also then autobuilds, and the new hl7.fhir.au.pd package is somehow connected to our fork instead of the HL7AU source. The fix was simply to trigger an autobuild of the source HL7AU PD IG so that the hl7.fhir.au.pd package gets associated to the source.