FHIR Chat · test.fhir.org validation or Java validator pack · australia

Stream: australia

Topic: test.fhir.org validation or Java validator pack


view this post on Zulip Chandan Datta (Feb 11 2020 at 05:13):

Does the FHIR reference implementation server validate the StructureDefinition for AU PD profiles or should I used the Java validator pack to test the validation service? I am getting a 201 on POST of a au-pd-healthcareservice sample (attached au-pd-healthcareservice-example.xml) on test.fhir.org, but not on other publicly available FHIR servers such as VONK R4. Has anyone ran across this issue?
pasted image
pasted image

au-pd-healthcareservice-example.xml

view this post on Zulip Grahame Grieve (Feb 11 2020 at 05:32):

you should use the validator. test.fhir.org has fallen behind

view this post on Zulip Chandan Datta (Feb 12 2020 at 21:46):

Thanks. will do. Is the java validator pack also used in the reference implementation and is the reference implementation deployed as test.fhir.org https://github.com/grahamegrieve/fhirserver

view this post on Zulip Grahame Grieve (Feb 12 2020 at 21:47):

test.fhir.org has fallen behind right now. It's on my list of things to do to bring it up to date

view this post on Zulip Chandan Datta (Feb 13 2020 at 03:29):

Is the java validator up-to-date? Related to the topic I posted earlier, it doesn't show the eld-13 validation error

java -jar .\org.hl7.fhir.validator.jar .\StructureDefinition-au-healthcareservice.xml -version 4.0.1
FHIR Validation tool Version 4.1.61-SNAPSHOT (Git# b6ba504320f6). Built 2020-02-07T10:55:33.966+11:00 (6 days old)
Detected Java version: 1.8.0_181 from C:\Program Files\Java\jre1.8.0_181 on amd64 (64bit). 1801MB available
Arguments: .\StructureDefinition-au-healthcareservice.xml -version 4.0.1
Directories: Current = D:\sajith\work\fhir-directory-r4-bb\SRAStructureDefinitions, Package Cache = C:\Users\sajithj\.fhir\packages
  .. FHIR Version 4.0, definitions from hl7.fhir.r4.core#4.0.1
  .. connect to tx server @ http://tx.fhir.org
    (v4.0.1)
  .. validate [.\StructureDefinition-au-healthcareservice.xml]
Terminology server: Check for supported code systems for http://terminology.hl7.org.au/CodeSystem/v2-0203
Success...validating .\StructureDefinition-au-healthcareservice.xml:  PS D:\sajith\work\fhir-directory-r4-bb\SRAStructureDefinitions> java -jar .\org.hl7.fhir.validator.jar .\StructureDefinition-au-healthcareservice.xml -version 4.0.1
FHIR Validation tool Version 4.1.61-SNAPSHOT (Git# b6ba504320f6). Built 2020-02-07T10:55:33.966+11:00 (6 days old)
Detected Java version: 1.8.0_181 from C:\Program Files\Java\jre1.8.0_181 on amd64 (64bit). 1801MB available
Arguments: .\StructureDefinition-au-healthcareservice.xml -version 4.0.1
Directories: Current = D:\sajith\work\fhir-directory-r4-bb\SRAStructureDefinitions, Package Cache = C:\Users\sajithj\.fhir\packages
  .. FHIR Version 4.0, definitions from hl7.fhir.r4.core#4.0.1
  .. connect to tx server @ http://tx.fhir.org
    (v4.0.1)
  .. validate [.\StructureDefinition-au-healthcareservice.xml]
Terminology server: Check for supported code systems for http://terminology.hl7.org.au/CodeSystem/v2-0203
Success...validating .\StructureDefinition-au-healthcareservice.xml:  error:0 warn:0 info:2
  Information @ StructureDefinition.snapshot.element[14].pattern.ofType(CodeableConcept).coding[0] (line 496, col17) : Code System URI 'http://terminology.hl7.org.au/CodeSystem/v2-0203' is unknown so the code cannot be validated
  Information @ StructureDefinition.differential.element[4].pattern.ofType(CodeableConcept).coding[0] (line 1845, col17) : Code System URI 'http://terminology.hl7.org.au/CodeSystem/v2-0203' is unknown so the code cannot be validated
PS D:\sajith\work\fhir-directory-r4-bb\SRAStructureDefinitions> java -jar .\org.hl7.fhir.validator.jar .\StructureDefinition-au-healthcareservice.xml -version 4.0.1 -ig http://build.fhir.org/ig/hl7au/au-fhir-pd
FHIR Validation tool Version 4.1.61-SNAPSHOT (Git# b6ba504320f6). Built 2020-02-07T10:55:33.966+11:00 (6 days old)
Detected Java version: 1.8.0_181 from C:\Program Files\Java\jre1.8.0_181 on amd64 (64bit). 1801MB available
Arguments: .\StructureDefinition-au-healthcareservice.xml -version 4.0.1 -ig http://build.fhir.org/ig/hl7au/au-fhir-pd
Directories: Current = D:\sajith\work\fhir-directory-r4-bb\SRAStructureDefinitions, Package Cache = C:\Users\sajithj\.fhir\packages
  .. FHIR Version 4.0, definitions from hl7.fhir.r4.core#4.0.1
  .. connect to tx server @ http://tx.fhir.org
    (v4.0.1)
+  .. load IG from http://build.fhir.org/ig/hl7au/au-fhir-pd
  .. validate [.\StructureDefinition-au-healthcareservice.xml]
Terminology server: Check for supported code systems for http://terminology.hl7.org.au/CodeSystem/v2-0203
Success...validating .\StructureDefinition-au-healthcareservice.xml:  error:0 warn:0 info:2
  Information @ StructureDefinition.snapshot.element[14].pattern.ofType(CodeableConcept).coding[0] (line 496, col17) : Code System URI 'http://terminology.hl7.org.au/CodeSystem/v2-0203' is unknown so the code cannot be validated
  Information @ StructureDefinition.differential.element[4].pattern.ofType(CodeableConcept).coding[0] (line 1845, col17) : Code System URI 'http://terminology.hl7.org.au/CodeSystem/v2-0203' is unknown so the code cannot be validated
  Information @ StructureDefinition.snapshot.element[14].pattern.ofType(CodeableConcept).coding[0] (line 496, col17) : Code System URI 'http://terminology.hl7.org.au/CodeSystem/v2-0203' is unknown so the code cannot be validated
  Information @ StructureDefinition.differential.element[4].pattern.ofType(CodeableConcept).coding[0] (line 1845, col17) : Code System URI 'http://terminology.hl7.org.au/CodeSystem/v2-0203' is unknown so the code cannot be validated
PS D:\sajith\work\fhir-directory-r4-bb\SRAStructureDefinitions> java -jar .\org.hl7.fhir.validator.jar .\StructureDefinition-au-healthcareservice.xml -version 4.0.1 -ig http://build.fhir.org/ig/hl7au/au-fhir-pd
FHIR Validation tool Version 4.1.61-SNAPSHOT (Git# b6ba504320f6). Built 2020-02-07T10:55:33.966+11:00 (6 days old)
Detected Java version: 1.8.0_181 from C:\Program Files\Java\jre1.8.0_181 on amd64 (64bit). 1801MB available
Arguments: .\StructureDefinition-au-healthcareservice.xml -version 4.0.1 -ig http://build.fhir.org/ig/hl7au/au-fhir-pd
Directories: Current = D:\sajith\work\fhir-directory-r4-bb\SRAStructureDefinitions, Package Cache = C:\Users\sajithj\.fhir\packages
  .. FHIR Version 4.0, definitions from hl7.fhir.r4.core#4.0.1
  .. connect to tx server @ http://tx.fhir.org
    (v4.0.1)
+  .. load IG from http://build.fhir.org/ig/hl7au/au-fhir-pd
  .. validate [.\StructureDefinition-au-healthcareservice.xml]
Terminology server: Check for supported code systems for http://terminology.hl7.org.au/CodeSystem/v2-0203
Success...validating .\StructureDefinition-au-healthcareservice.xml:  error:0 warn:0 info:2
  Information @ StructureDefinition.snapshot.element[14].pattern.ofType(CodeableConcept).coding[0] (line 496, col17) : Code System URI 'http://terminology.hl7.org.au/CodeSystem/v2-0203' is unknown so the code cannot be validated
  Information @ StructureDefinition.differential.element[4].pattern.ofType(CodeableConcept).coding[0] (line 1845, col17) : Code System URI 'http://terminology.hl7.org.au/CodeSystem/v2-0203' is unknown so the code cannot be validated

view this post on Zulip Grahame Grieve (Feb 13 2020 at 05:47):

so I took this instance and saved it on my local disk:

<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-repeated-type"/>
  <url value="http://hl7.org/fhir/test/StructureDefinition/profile-repeated-type"/>
  <name value="RepeatedTypeChoice"/>
  <status value="draft"/>
  <date value="3017-09-06T06:30:54+00:00"/>
  <fhirVersion value="4.0.0"/>
  <kind value="resource"/>
  <abstract value="false"/>
  <type value="HealthcareService"/>
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/HealthcareService"/>
  <derivation value="constraint"/>
  <differential>
    <element id="HealthcareService.endpoint">
      <path value="HealthcareService.endpoint" />
      <short value="Technical endpoints for this healthcare service, including secure messaging endpoints" />
      <type>
          <code value="Reference" />
          <targetProfile value="http://hl7.org.au/fhir/pd/StructureDefinition/au-pd-sm-endpoint" />
      </type>
      <type>
          <code value="Reference" />
          <targetProfile value="http://hl7.org/fhir/StructureDefinition/Endpoint" />
      </type>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>

Then I validated it:

FHIR Validation tool Version 4.1.62-SNAPSHOT (Git# bc1f87e29f93). Built 2020-02-13T12:26:41.736+11:00 (4 hours old)
Detected Java version: 1.8.0_211 from C:\Program Files\Java\jre1.8.0_211 on amd64 (64bit). 7223MB available
Arguments: [file] -version 4.0
Directories: Current = c:\temp, Package Cache = C:\Users\graha\.fhir\packages
  .. FHIR Version 4.0, definitions from hl7.fhir.r4.core#4.0.1
  .. connect to tx server @ http://tx.fhir.org
    (v4.0.1)
  .. validate [path]
*FAILURE* validating [path]:  error:2 warn:1 info:0
  Error @ StructureDefinition.url (line 3, col84) : URL value 'http://hl7.org/fhir/test/StructureDefinition/profile-repeated-type' does not resolve
  Error @ StructureDefinition.differential.element[0] (line 14, col46) : eld-13: Types must be unique by code [type.select(code).isDistinct()]
  Warning @ StructureDefinition.date (line 6, col44) : The value '3017-09-06T06:30:54+00:00' is outside the range of reasonable years - check for data entry error

view this post on Zulip Grahame Grieve (Feb 13 2020 at 05:47):

that's pretty much what I expected...

view this post on Zulip Chandan Datta (Feb 17 2020 at 05:19):

Thanks Grahame, Where can I find the version(4.1.62-SNAPSHOT (Git# bc1f87e29f93)) you have run on - is it on github? I just followed the link in the FHIR downloads. I used version 4.1.61 and it did not flag any errors.
pasted image

view this post on Zulip Grahame Grieve (Feb 17 2020 at 08:21):

current is 4.1.63 - so you should get that from the link you referenced


Last updated: Apr 12 2022 at 19:14 UTC