FHIR Chat · FHIR R3/R4 conversion · implementers

Stream: implementers

Topic: FHIR R3/R4 conversion


view this post on Zulip manasvi sharma (Feb 14 2020 at 05:42):

I am unable to transform a JSON file in STU 3 to R4 . I am using FHIR validator but it is unable to load the hl7.fhir.transforms.v4v3 implementation guide.

view this post on Zulip Lloyd McKenzie (Feb 14 2020 at 06:32):

Can you provide the details of the error you're getting?

view this post on Zulip manasvi sharma (Feb 14 2020 at 06:49):

when I run the following cmd:
java -jar org.hl7.fhir.validator.jar [r3-resource] -transform http://hl7.org/fhir/StructureMap/XX3to4 -ig hl7.fhir.transforms.v4v3 -output [dest-name]
I am getting the following error:

  • .. load IG from hl7.fhir.transforms.v4v3
    Exception in thread "main" org.hl7.fhir.exceptions.FHIRException: Unable to resolve the package 'hl7.fhir.transforms.v4v3'
    at org.hl7.fhir.utilities.cache.PackageCacheManager.loadPackage(PackageCacheManager.java:674)
    at org.hl7.fhir.r5.validation.ValidationEngine.resolvePackage(ValidationEngine.java:631)
    at org.hl7.fhir.r5.validation.ValidationEngine.fetchByPackage(ValidationEngine.java:620)
    at org.hl7.fhir.r5.validation.ValidationEngine.loadIgSource(ValidationEngine.java:459)
    at org.hl7.fhir.r5.validation.ValidationEngine.loadIg(ValidationEngine.java:723)
    at org.hl7.fhir.r5.validation.Validator.main(Validator.java:577)

view this post on Zulip manasvi sharma (Feb 20 2020 at 06:25):

I transformed a JSON file from STU 3 for to R4
using the FHIR validator jar

Using the following code to transform :

org.hl7.fhir.r4.model.Patient inR4= converter. convertPatient (p1);
this program is converting the version but the urls like the system in identifier as shown below

“identifier”: [
{
“use”: “usual”,
“type”: {
“coding”: [
{
“system”: “http://hl7.org/fhir/v2/0203”,
“code”: “MR”
}
]
}

are the same so the response is failing the validation for version 4.0.1 of the FHIR validator
I cant seem to find any code regarding the transformation of urls
do we need to change the urls? and how we do it?

view this post on Zulip Lloyd McKenzie (Feb 20 2020 at 06:41):

Yes, you'll need to change the URLs. the v2, v3 and some of the FHIR code systems moved to the terminology.hl7.org root. @Grahame Grieve, is this translation something we could add into translation code - at least for the v2 and v3 stuff? (FHIR stuff is messier because not all of it moves.)

view this post on Zulip Lloyd McKenzie (Feb 20 2020 at 06:42):

Side note - please don't ask the same question here and on stack overflow simultaneously - pick one and give the community time to respond before asking in the other place...

view this post on Zulip manasvi sharma (Feb 24 2020 at 05:25):

In the list of all the changes (https://www.hl7.org/fhir/diff.html)
under Patient column there is no change in "system" field mentioned but it has been moved to terminology.hl7.org root
so is there a list of all the changes in the urls?

view this post on Zulip Grahame Grieve (Feb 24 2020 at 05:28):

I haven't made a list of those.

view this post on Zulip manasvi sharma (Feb 24 2020 at 05:36):

Can you give the estimate of time when this information will be provided? or if you let me know a way to get this information it would be really helpful

view this post on Zulip Grahame Grieve (Mar 03 2020 at 06:56):

ok see https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator#UsingtheFHIRValidator-VersionConversion. new release tomorrow, that does this tomorrow

view this post on Zulip manasvi sharma (Mar 09 2020 at 08:45):

Thank you.I will look into this
Also how to convert a Claim type resource? I cant seems to find any conversion code for claim type resource in the validator.

view this post on Zulip manasvi sharma (Mar 09 2020 at 10:17):

when I run the following command :
java -jar org.hl7.fhir.validator.jar /Users/anuragshukla/Desktop/eobject/input/test1.json -version 3.0 -to-version 4.0 -output /Users/anuragshukla/Desktop/eobject/out.json

it gives the following error:
...Failure: No matches found for rule for 'id to id' from http://hl7.org/fhir/StructureMap/Resource3to4, from rule 'Resource-id'
org.hl7.fhir.exceptions.FHIRException: No matches found for rule for 'id to id' from http://hl7.org/fhir/StructureMap/Resource3to4, from rule 'Resource-id'
at org.hl7.fhir.r5.utils.StructureMapUtilities.resolveGroupByTypes(StructureMapUtilities.java:1577)
at org.hl7.fhir.r5.utils.StructureMapUtilities.executeRule(StructureMapUtilities.java:1428)
at org.hl7.fhir.r5.utils.StructureMapUtilities.executeGroup(StructureMapUtilities.java:1398)
at org.hl7.fhir.r5.utils.StructureMapUtilities.executeGroup(StructureMapUtilities.java:1394)
at org.hl7.fhir.r5.utils.StructureMapUtilities.executeGroup(StructureMapUtilities.java:1394)
at org.hl7.fhir.r5.utils.StructureMapUtilities.transform(StructureMapUtilities.java:1360)
at org.hl7.fhir.validation.ValidationEngine.transformVersion(ValidationEngine.java:1729)
at org.hl7.fhir.validation.Validator.main(Validator.java:612)

view this post on Zulip Grahame Grieve (Mar 09 2020 at 20:02):

what is in test1.json?

view this post on Zulip manasvi sharma (Mar 11 2020 at 04:25):

it is a JSON file of Patient Resource type in STU 3
an example of Patient Resource given on FHIR website


Last updated: Apr 12 2022 at 19:14 UTC