FHIR Chat · Validating DaVinci Representations · implementers

Stream: implementers

Topic: Validating DaVinci Representations


view this post on Zulip Charlie Filkins (Jul 07 2020 at 21:20):

I have been trying to validate some sample DaVinci resource representations with limited success. I'm running into problems that I think are related to DaVinci's dependency on VhDir. Here is DaVinci's package.json file.
{
"tools-version": 3,
"type": "fhir.ig",
"date": "20191024123102",
"license": "CC0-1.0",
"title": "DaVinci PDEX Plan Net",
"dependencies": {
"hl7.fhir.core": "4.0.0",
"hl7.fhir.uv.vhdir": "0.2.0"
},
"author": "HL7 Financial Management WG",
"directories": {
"lib": "package",
"example": "example"
},
"version": "0.1.0",
"name": "hl7.fhir.us.davinci-pdex-plan-net",
"url": "http://hl7.org/fhir/us/davinci-pdex-plan-net/2020Feb",
"canonical": "http://hl7.org/fhir/us/davinci-pdex-plan-net",
"fhirVersions": [
"4.0.0"
]
}

As you can see DaVinci depends on version 0.2.0 of VhDir. From what I can tell, v0.2.0 is rather old. Here is VhDir's package.json
{
"type": "fhir.ig",
"license": "CC0-1.0",
"title": "Validated Healthcare Directory",
"author": "HL7 Patient Administration Committee",
"version": "0.2.0",
"name": "hl7.fhir.uv.vhdir",
"url": "http://hl7.org/fhir/uv/vhdir/2018Sep",
"canonical": "http://hl7.org/fhir/uv/vhdir",
"fhirVersions": [
"3.5.0"
],
"tools-version": 3
}

When I try to validate VhDir's ImplementationGuide-ig.json file I receive the following message, along with a lot more
FAILURE validating ImplementationGuide-ig.json: error:255 warn:0 info:252
Error @ ImplementationGuide.fhirVersion (line 1, col667) : This property must be an Array, not a a primitive property

I'm new-ish to FHIR, so I'm speculating here ... It seems to me that the Implementation guide probably conforms to an older specification.

If I change DaVinci's dependency to VhDir to "current", the Validator doesn't explode as badly. I can even get some representations to validate.

Changing the dependency doesn't seem like the best answer to me, but it "works". Any guidance on what I might be doing wrong is appreciated.

Thanks ... Charlie

view this post on Zulip Grahame Grieve (Jul 07 2020 at 22:17):

how are you validating it?

view this post on Zulip Charlie Filkins (Jul 08 2020 at 11:29):

From the command line of my Mac, I execute

java -jar org.hl7.fhir.validator.jar -version 4.0 PractitionerRole-practitionerrole1.json -ig hl7.fhir.us.davinci-pdex-plan-net#0.1.0

The Validator responds with (slightly redacted)

FHIR Validation tool Version 5.0.7-SNAPSHOT (Git# 6bc790d98b04). Built 2020-06-07T08:35:37.25+10:00 (31 days old)
Detected Java version: 13.0.2 from /Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home on x86_64 (64bit). 4096MB available
Arguments: -version 4.0 PractitionerRole-practitionerrole1.json -ig hl7.fhir.us.davinci-pdex-plan-net#0.1.0
Directories: Current = xxx, Package Cache = ~/.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 hl7.fhir.us.davinci-pdex-plan-net#0.1.0
  • .. load IG from hl7.fhir.uv.vhdir#0.2.0
  • load file: ImplementationGuide-ig.json - ignored due to error: class com.google.gson.JsonPrimitive cannot be cast to class com.google.gson.JsonArray (com.google.gson.JsonPrimitive and com.google.gson.JsonArray are in unnamed module of loader 'app')
    java.lang.ClassCastException: class com.google.gson.JsonPrimitive cannot be cast to class com.google.gson.JsonArray (com.google.gson.JsonPrimitive and com.google.gson.JsonArray are in unnamed module of loader 'app')
    ...

There is only one instance of ImplementationGuide-ig.json on my machine. It is in ~/.fhir/packages/hl7.fhir.uv.vhdir#0.2.0

Thanks for looking into this ... Charlie

view this post on Zulip Grahame Grieve (Jul 08 2020 at 12:01):

this is what I get:

FHIR Validation tool Version 5.0.7-SNAPSHOT (Git# 6bc790d98b04). Built 2020-06-07T08:35:37.25+10:00 (31 days old)
Detected Java version: 1.8.0_251 from C:\Program Files\Java\jre1.8.0_251 on amd64 (64bit). 14526MB available
Arguments: -version 4.0 C:/work/org.hl7.fhir/build/publish/practitionerrole-example.json -ig hl7.fhir.us.davinci-pdex-plan-net#0.1.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)
+  .. load IG from hl7.fhir.us.davinci-pdex-plan-net#0.1.0
  .. validate [C:/work/org.hl7.fhir/build/publish/practitionerrole-example.json]
Terminology server: Check for supported code systems for http://snomed.info/sct
Success...validating C:/work/org.hl7.fhir/build/publish/practitionerrole-example.json:  error:0 warn:0 info:1
  Information @ ?? : All OK

view this post on Zulip Grahame Grieve (Jul 08 2020 at 12:01):

and looking at the hl7.fhir.us.davinci-pdex-plan-net#0.1.0 package, I see no reason for vhdir to get in the picture.

view this post on Zulip Grahame Grieve (Jul 08 2020 at 12:02):

what do you have at ~/.fhir/packages/hl7.fhir.us.davinci-pdex-plan-net#0.1.0/package/package.json?

view this post on Zulip Charlie Filkins (Jul 08 2020 at 12:17):

{
"tools-version": 3,
"type": "fhir.ig",
"date": "20191024123102",
"license": "CC0-1.0",
"title": "DaVinci PDEX Plan Net",
"dependencies": {
"hl7.fhir.core": "4.0.0",
"hl7.fhir.uv.vhdir": "0.2.0"
},
"author": "HL7 Financial Management WG",
"directories": {
"lib": "package",
"example": "example"
},
"version": "0.1.0",
"name": "hl7.fhir.us.davinci-pdex-plan-net",
"url": "http://hl7.org/fhir/us/davinci-pdex-plan-net/2020Feb",
"canonical": "http://hl7.org/fhir/us/davinci-pdex-plan-net",
"fhirVersions": [
"4.0.0"
]
}

view this post on Zulip Grahame Grieve (Jul 08 2020 at 12:24):

ok. delete the directory ~/.fhir/packages/hl7.fhir.us.davinci-pdex-plan-net#0.1.0, then run the validator again, and then tell me what's in that file

view this post on Zulip Charlie Filkins (Jul 08 2020 at 13:07):

When I ran the validation, I did not specify a version for the IG, just hl7.fhir.us.davinci-pdex-plan-net. Here is the package.json
{
"tools-version": 3,
"type": "fhir.ig",
"date": "20191024123102",
"license": "CC0-1.0",
"title": "DaVinci PDEX Plan Net",
"dependencies": {
"hl7.fhir.core": "4.0.0"
},
"author": "HL7 Financial Management WG",
"directories": {
"lib": "package",
"example": "example"
},
"version": "0.1.0",
"name": "hl7.fhir.us.davinci-pdex-plan-net",
"url": "http://hl7.org/fhir/us/davinci-pdex-plan-net/2020Feb",
"canonical": "http://hl7.org/fhir/us/davinci-pdex-plan-net",
"fhirVersions": [
"4.0.0"
]
}

I no longer see the dependency to VhDir, but now I see errors about extensions
Error @ PractitionerRole.extension[0] (line 14, col6) : Problem with use of resolve() - profile '[CanonicalType[http://hl7.org/fhir/uv/vhdir/StructureDefinition/newpatientprofile]]' on PractitionerRole.extension:newpatientprofile could not be resolved

Please tell me if I'm providing too much information here, or not enough. Like I said before, I'm fairly new to the FHIR game.

Thanks ... Charlie

view this post on Zulip Grahame Grieve (Jul 08 2020 at 19:58):

so I don't know what the vhdir thing was about.

view this post on Zulip Grahame Grieve (Jul 08 2020 at 19:58):

now what you report looks like a bug somewhere. can you attach the resource you are validating?

view this post on Zulip Charlie Filkins (Jul 08 2020 at 22:02):

I'm thinking that the 0.2.0 version of the VhDir fires are old and probably incompatible. Attached is a DaVinci PractitionerRole instance that I retrieved from the DaVinci Examples. PractitionerRole-practitionerrole1.json

view this post on Zulip Charlie Filkins (Jul 10 2020 at 12:20):

Grahame ... thank you for your help with this. Do you know who I can talk to about CARIN's Implementation Guide? I suspect that version 0.2.0 is built on old standards, or is otherwise broken in some way.

view this post on Zulip Michele Mottini (Jul 10 2020 at 13:52):

There is a #CARIN Blue Button IG channel

view this post on Zulip Charlie Filkins (Jul 10 2020 at 17:36):

Thanks Michele!


Last updated: Apr 12 2022 at 19:14 UTC