FHIR Chat · Trouble w/ Vonk chained/reverse chained, and _include search · implementers

Stream: implementers

Topic: Trouble w/ Vonk chained/reverse chained, and _include search


view this post on Zulip Natasha Singh (Nov 07 2019 at 19:56):

Hello,

I'm having trouble getting chained, reverse chained, and _include search to work on Vonk (tried 2.0.0 and 3.0.0-beta2). I've loaded in 10 Patients, each of which have 2 Specimens.

I tried this chained search:
pasted image

which I expected to return 6 specimens (3 patients named Natasha x 2 Specimens per patient)

I also tried this reverse chained search which didn't seem to work either:
pasted image

Similarly, I cannot get the _include parameter to work either.
pasted image

Could someone please advise if I'm doing something wrong?

cc: @Mirjam Baltus

Thank you!

view this post on Zulip Mirjam Baltus (Nov 07 2019 at 21:48):

@Natasha Singh Could you check to see whether your subject reference in the Specimen is correct? I see that your Specimen has a guid as technical id - which is what you'd expect when you POST it to Vonk - but your Specimen.subject uses a custom id ('Patient/PT-00001'). The Patient resource can only have that specific id when you have chosen to PUT it to Vonk with it. If you have also used a POST for the Patient, your links will be broken, and the chained search/include will not work.

view this post on Zulip Natasha Singh (Nov 07 2019 at 21:57):

Hi @Mirjam Baltus , I'm not sure I follow. The custom ids seem to be ok. I tried this and it seems to work:

pasted image

view this post on Zulip Mirjam Baltus (Nov 07 2019 at 22:04):

Yes, that would work, since the reference in Specimen.subject has the PT-00001 value in it. But, I suspect that there is no Patient/PT-00001 on your server. You can test that by doing a GET <vonk>/Patient/PT-00001. If that is not there, Vonk will not be able to follow the reference from the Specimen.subject to an existing resource. The Specimen.subject field needs to contain a reference to an existing Patient resource on your server in order for the chain/include to work.

view this post on Zulip Natasha Singh (Nov 08 2019 at 15:53):

Hi @Mirjam Baltus ,

Ok I understand what you are saying about the custom id. GET /Patient/PT-00001 returns a 404. Since I used POST to create everything, all created resources got assigned a generated ID, rather than my custom IDs, which means the links are all broken between referenced resources.

So, I'm trying to PUT this time, but I'm running into a seperate issue which I'll just post here. Maybe you can help.

Here's what I did:
- PUT /Patient/PT-00001
- DELETE /Patient/PT-0001
- PUT /Patient/PT-00001 - this resulted in the following error that I don't understand:

{
  "resourceType": "OperationOutcome",
  "id": "3ad3a264-abcb-4070-a666-195035417f0f",
  "meta": {
    "versionId": "b24aa6e3-2029-473f-9a02-a415ea7561cd",
    "lastUpdated": "2019-11-08T15:46:31.189+00:00"
  },
  "issue": [
    {
      "severity": "warning",
      "code": "business-rule",
      "details": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/dotnet-api-operation-outcome",
            "code": "2007"
          }
        ],
        "text": "Element definition does not specify a 'min' value, which is required. Cardinality has not been validated"
      },
      "location": [
        "Patient"
      ]
    },
    {
      "severity": "error",
      "code": "exception",
      "details": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/dotnet-api-operation-outcome",
            "code": "5006"
          }
        ],
        "text": "Existing resource is in a different informationmodel: Fhir3.0."
      }
    }
  ]
}

All of my requests have the mimeType parameter fhirVersion=4.0. Is Vonk creating both STU3 and R4 resources and only deleting the R4 ones?

view this post on Zulip Natasha Singh (Nov 08 2019 at 17:31):

@Mirjam Baltus I'm still having the issue above ^ (can't PUT after DELETE due to existing resources in Fhir3.0 ) BUT after I used PUT to create all my resources for the first time, I am seeing that chaining, rev chaining, and _include is working now. The problem was exactly what you said - links were broken bc resources weren't being referenced by my custom IDs.
So thank you for helping me resolve that!

view this post on Zulip Mirjam Baltus (Nov 08 2019 at 18:02):

Great that that works now! You could also create a transaction Bundle to send all of the resources in one go. Vonk will then go through the references and keep the links if the Bundle contains all the referenced resources.
As to your other issue, this is something I cannot reproduce. Vonk does not create the resource for both versions. Could you send an email with your logfile to the vonk mailbox?

view this post on Zulip Natasha Singh (Nov 08 2019 at 18:28):

This happened using the Vonk 3.0.0-beta2 docker image btw. Let me send you the logs too

view this post on Zulip Natasha Singh (Nov 08 2019 at 19:55):

@Mirjam Baltus vonk-20191108.log

view this post on Zulip Alexander Zautke (Nov 08 2019 at 21:06):

@Natasha Singh This issue was resolved in the stable Vonk 3.0.0 release. Could you please update and re-test?

view this post on Zulip Natasha Singh (Nov 08 2019 at 21:09):

Ah I see. I had to fall back to using 3.0.0-beta2 only because of this issue: https://chat.fhir.org/#narrow/stream/179166-implementers/topic/Does.20Vonk.203.2E0.2E0.20try.20to.20fetch.20things.20at.20canonical.20URLs/near/179850218.


Last updated: Apr 12 2022 at 19:14 UTC