FHIR Chat · FHIR mapping language examples + best practice · mapping-framework

Stream: mapping-framework

Topic: FHIR mapping language examples + best practice


view this post on Zulip Corey Wen (Jun 04 2021 at 19:04):

Is there any way to find what the best practices are for the FHIR mapping language?
For example, I have been trying to transform a QuestionnaireResponse (QR) into a FHIR resource, and to do so need to get to the actual value in the QR which is nested. I have been doing by getting the item where linkID = 'some code', then getting the .answer field, then getting the .valueString or .valueCoding.
It looks something like the following, which I have been using for each question in the QR.

src.item as answerItem where linkId = 'some code' -> resource.field1 as nestedField1 then {
    answerItem.answer as answer -> nestedField1.nestedField2 as nf2 then {
        answer.valueString as vs -> nf2.nestedField3 = vs;
    }
}

On top of this, if the resource field the QR value is being transformed to is a resource type of its own, such as Medication.ingredient.strength.numerator, I also have to get into those nested fields which I have done with a chain of
then {... get into next nested field} similar to how I get the .valueString from above.
Is the method I am using bad, and are there any resources/examples that demonstrate better practices?

view this post on Zulip Lloyd McKenzie (Jun 04 2021 at 19:16):

@Joee Garcia


Last updated: Apr 12 2022 at 19:14 UTC