FHIR Chat · GF#17032 - Mapping Unknowns · implementers

Stream: implementers

Topic: GF#17032 - Mapping Unknowns


view this post on Zulip Grahame Grieve (Jun 13 2018 at 02:31):

in GF#17032 Lloyd asks for a way to map an unknown element. Well, you can't map an unknown element to nothing in a language that does things. But we could do this:

group for type+types  Binary extends Resource
  input src : BinaryR2 as source
  input tgt : Binary as target

  "Binary-contentType" : for src.contentType make tgt.contentType
  "Binary-content" : for src.content make tgt.content
  "Binary- securityContext" : for src. securityContext log "SecurityContext is lost"
endgroup

view this post on Zulip Grahame Grieve (Jun 13 2018 at 02:32):

e.g. add an explicit log option to make this stuff clear. You can use log in any statement....

view this post on Zulip Jean Duteau (Jun 13 2018 at 02:48):

I guess that is an option but I actually disagree with the tracker item. it's a mapping language and we have nothing to map to. You can indicate that via a comment in the mapping file. Why do we need an actual mapping statement that does nothing for this?

view this post on Zulip Grahame Grieve (Jun 13 2018 at 02:52):

well, I did think about just adding a comment in the mapping. it would work, but I realised, on reflection, that I often had to use FHIRPath log statements slipped inside conditions to figure out what was going on... so why not make it explicit?

view this post on Zulip Jean Duteau (Jun 13 2018 at 02:53):

i guess that does make it explicit.

view this post on Zulip Lloyd McKenzie (Jun 13 2018 at 02:56):

I like the proposed solution

view this post on Zulip Jean Duteau (Jun 13 2018 at 02:57):

i just don't think it does what you think it does but I don't agree with what you want. :)

view this post on Zulip Jean Duteau (Jun 13 2018 at 02:59):

from my ccda work, i don't think that FHIR mapping files will become the default means of enumerating a mapping. it's equivalent to telling people to look at the schematron to see the ccda conformance statements. so there needs to be less-programming way of expressing mappings and that is where you'd want to express that such and such an element isn't mapped.

view this post on Zulip Jean Duteau (Jun 13 2018 at 02:59):

but for the existing r2 to r3 mappings and such, the log statement is sort of equivalent to a comment

view this post on Zulip Grahame Grieve (Jun 13 2018 at 02:59):

the problem is that expression mappings in any less comprehensive way is misleading.

view this post on Zulip Lloyd McKenzie (Jun 13 2018 at 02:59):

It allows you to be explicit in the mapping definition and it also spits out the mapping at runtime. I agree it's evil to read, but if you want to see the details of what's happening it's where you need to go.


Last updated: Apr 12 2022 at 19:14 UTC