FHIR Chat · Transforms · r2 : r3 conversions

Stream: r2 : r3 conversions

Topic: Transforms


view this post on Zulip Grahame Grieve (Dec 15 2016 at 01:45):

@Stephen Royce @Oliver Egger @Brian Postlethwaite I have subscribed you to this new channel for the r2:r3 mapping work

view this post on Zulip Brian Postlethwaite (Dec 15 2016 at 01:46):

Thanks.

view this post on Zulip Grahame Grieve (Dec 15 2016 at 01:46):

today, my plan is to commit the following:
- candidate maps for R2/R3 in both directions
- a test application that executes all of the maps to test them
- extend the build to publish the maps along with their status

view this post on Zulip Grahame Grieve (Dec 15 2016 at 06:04):

ok. maps are all generated, and added

view this post on Zulip Grahame Grieve (Dec 15 2016 at 06:04):

see, for example:

view this post on Zulip Grahame Grieve (Dec 15 2016 at 06:04):

http://build.fhir.org/allergyintolerance-version-maps.html

view this post on Zulip Grahame Grieve (Dec 15 2016 at 06:05):

there's a set of JUnit test cases that test them all. They all fail. just committing that now

view this post on Zulip Stephen Royce (Dec 15 2016 at 06:08):

Suite! :)
I assume you're good for me to get into this after Christmas?

view this post on Zulip Grahame Grieve (Dec 15 2016 at 06:25):

sure

view this post on Zulip Oliver Egger (Dec 15 2016 at 07:02):

thx!

view this post on Zulip Grahame Grieve (Dec 16 2016 at 05:32):

ok, so, maps are committed for all the conversions I've been maintaining. A JUnit test case exists that tries to convert every r2 example to it's r3 equivalent using the map. Then it validates them. So far, 558 of the 729 examples fail - about what I expected.

view this post on Zulip Grahame Grieve (Dec 16 2016 at 05:32):

then the build picks up the maps and the outcome of the tests, and publishes them

view this post on Zulip Grahame Grieve (Dec 16 2016 at 05:33):

see, for example: http://build.fhir.org/flag-version-maps.html

view this post on Zulip Grahame Grieve (Dec 16 2016 at 05:34):

I now need to convert them back to R2, and check that they round trip ok. That will increase the number of failures.

view this post on Zulip Grahame Grieve (Dec 16 2016 at 05:35):

once I've done that, our task, between us, is to :
- run the JUnit test
- pick a resource that is failing, and edit the script so it succeeds.

view this post on Zulip Grahame Grieve (Dec 16 2016 at 05:35):

I think the place to start is with running the JUnit tests. Are you all confortable running them from in eclipse? that will save me lots of work packaging the JUnit tests a different way

view this post on Zulip Oliver Egger (Dec 16 2016 at 09:06):

i'm comfortable running org/hl7/fhir/conversion/tests/R2R3ConversionTests.java within eclipse, however I'm oxs based, so the path are nor the same, attached a patch which shoudl work on both (not verified on windows)R2R3ConversionTestsPatch.patch

view this post on Zulip Grahame Grieve (Dec 16 2016 at 20:49):

adopted a variant of your patch. When you run the tests, you have to set the working directory to the build folder.

view this post on Zulip Grahame Grieve (Dec 16 2016 at 20:49):

and also, you have to do a full build locally before running the tests. see

view this post on Zulip Grahame Grieve (Dec 16 2016 at 20:50):

http://wiki.hl7.org/index.php?title=FHIR_Build_Process

view this post on Zulip Grahame Grieve (Dec 17 2016 at 19:55):

ok, just committed full working stack, with Flag passing all tests

view this post on Zulip Grahame Grieve (Dec 17 2016 at 19:59):

we're now good to go. Your rough process is :
- update from svn
- run a full build
- run the R2R3ConversionTests java class from Eclipse (Run as a JUnit Application), and make sure the default directory is {build})
- now consult {build}\implementations\r2maps\management.txt to help choose a resource type to work on
- look in {build}\implementations\r2maps\outcomes.json to see what errors there are with the resource
- look in {build}\implementations\r2maps\test-output, and use some diff tool to compare the before/after on the round trips
- make adjustments to the mapping script
- rerun the tests and back to comparisons
- update management.txt, and commit along with updated script

view this post on Zulip Grahame Grieve (Dec 17 2016 at 20:22):

when running R2R3ConverstionTests, you can pass it a command line parameter to limit it to a particular resource type (e.g. -Dresource=X)

view this post on Zulip Grahame Grieve (Dec 17 2016 at 21:07):

a couple of other notes:
- the before/after comparison is on canonical XML and ignores comments. So you might see text differences in the before/after that the test says is ok
- order presently matters in the R3 -> R3 conversions. I'll have to fix that

view this post on Zulip Grahame Grieve (Dec 22 2016 at 01:30):

hmm, I've got concept map and value set round tripping working - but both caused some deep revisions to the mapping language. I'll let you know when I've updated the tutorial

view this post on Zulip David Hay (Dec 22 2016 at 01:32):

found them in the spec - way cool!

view this post on Zulip Grahame Grieve (Dec 22 2016 at 01:33):

Thx

view this post on Zulip Grahame Grieve (Dec 22 2016 at 21:34):

ok. doco is updated, order problem is fixed. I have round-tripping working for the hardest resources (ValueSet, ConceptMap, StructureDefinition - mostly, CapabilityStatement). All good to go for the simpler stuff

view this post on Zulip Grahame Grieve (Jan 04 2017 at 22:24):

well. So I got into gear and got the process of doing resource maps down to 5-10 min per type. So I decided to just do all the resources.

view this post on Zulip Grahame Grieve (Jan 04 2017 at 22:24):

shortly, a summary will become available at http://build.fhir.org/r2maps.html


Last updated: Apr 12 2022 at 19:14 UTC