Skip to content

Conversation

@Rosnyni
Copy link
Contributor

@Rosnyni Rosnyni commented Oct 2, 2024

Hello,

I wrote map that are "correctly" executed using 3.8.X version of matchbox :

{
  "resourceType": "QuestionnaireResponse",
  "id": "test-qr",
  "status": "completed",
  "encounter": {
    "reference": "Encounter/47496867"
  },
  "item": [
    {
      "linkId": "5498268612387",
      "text": "Pose de cathéters",
      "item": [
        {
          "linkId": "718565916797",
          "text": "Cathéter123456789",
          "item": [
            {
              "linkId": "5374188134407",
              "text": "Numéro interne d'identification du cathéter",
              "answer": [
                {
                  "valueInteger": 1071714172
                }
              ]
            }
          ]
        },
        {
          "linkId": "718565916797",
          "text": "Cathéter10792651434"
        }
      ]
    }
  ]
}

But since I upgraded to 3.9.X version of matchbox it does not work anymore :

HAPI-0389: Failed to call access method: java.lang.Error: Cannot set property value on answer

you'll find in this pr a folder that contains :

  • the source structuredefinition
  • the target structuredefinition
  • the map that works in 3.8.X but not in 3.9.X
  • an http file that allows me to run my tests

It seems to me that the issue was in the management of the target StructureDefinition.

I made some test using base questionnaireResponse (http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse) and it works well both with 3.8.X and 3.9.X.

Sincerely

@oliveregger
Copy link
Member

The issue is, that you cannot use a derived profile as a target in the StructureDefinition. You have to use a type as a target, see also this zulip discussion: https://chat.fhir.org/#narrow/stream/181579-mapping-framework/topic/StructureMap.20-.20Expected.20format

->
uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QR as target

@Rosnyni
Copy link
Contributor Author

Rosnyni commented Oct 8, 2024

Thanks,
I'll take a look on the zulip discussion you point to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants