Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using _summary=count #31

Open
MischaRo opened this issue Mar 14, 2020 · 0 comments
Open

Error when using _summary=count #31

MischaRo opened this issue Mar 14, 2020 · 0 comments

Comments

@MischaRo
Copy link

MischaRo commented Mar 14, 2020

I have a Server running with a couple of images on it. When I run the following code with postman:

....Media?modality:text=Sonstige&_summary=count

I am shown the amount of images I have with the modality:text=Sonstige

{
  "resourceType": "Bundle",
  "id": "8e41e384-6c1a-4da2-919f-b6b4622a8b7e",
  "meta": {
    "lastUpdated": "2020-03-14T12:37:26.558+00:00",
    "tag": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationValue",
        "code": "SUBSETTED",
        "display": "Resource encoded in summary mode"
      }
    ]
  },
  "total": 2
}

But when I try to replicate the same call in smart-swift, I get an Error in my client application.
I am using this call:
let search = Media.search(["modality":["$text": type],"_summary": "count"])
and I get the following Error in the Xcode Debugger:

ERROR

Optional(Failed to validate resource: Bundle.type: mandatory property “type” is missing)

When I call: print(search.construct()) the generated call is the same I used in postman:

Media?_summary=count&modality:text=Sonstige

To me, it looks like swift-SMART can't handle the server response, because the returned Bundle does not have a resource type, but this type of search does in fact not have one.
Is there an other way to use the _summary - search modifier in swift-SMART?

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

No branches or pull requests

1 participant