-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
SubscriptionTopic support #398
Comments
We'll investigate what it takes to update the |
Is there a way for me to add custom resource types into the test framework so I can still use the fhir_read and fhir_search methods in the tests that we write? We also have a couple of resource types that we have invented on our own and not published anywhere which we are using for internal APIs that I wanted to test using inferno. So in that case I would hand craft a data model module and want to register it with the test framework so I can use fhir_search to test it. If there is a way to do that, then I could do the same thing with SubscriptionTopic instead of asking yall to support R4B. |
So the necessary change would be in The quickest possible way to hack this in would be to create files with definitions for SubscriptionTopic, etc. that look just like the model I linked above. Then put a The more complicated version which may end up being less work (or may not work at all, depending on the scope of the changes in R4B) would involve something like this:
|
You know... before opening this issue I had created my own data model file for the resource type that extended FHIR::Model, but I didn't figure out that I had to require it from my test code. I figured it would be able to find it automatically somehow. So close :D Looks like the next hurdle is that the assertion method I wanted to use is trying to send the resource to the validator and I think it's failing because the validator doesn't know about the resource type. I can keep debugging that or just do some custom assertions. At least I can use the fhir_search method now. Here is the current error in case you are curios:
Thanks for the help. Is this approach documented in the framework docs? If it isn't then I'd be happy with the resolution of this ticket being just to update the docs there to tell people how they can do this. |
Actually on that stacktrace, after looking some more I think my hunch was right. I was really just looking for the test to iterate through the entries and check that each contained resource was of type SubscriptionTopic. I don't really need it to run complete validations. I can just iterate through them on my own. |
Hey all,
I was trying to write some custom tests for the SubscriptionTopic resource, and it seems like it is not supported. I was digging into the fhir_models gem since it seems like that is the source of the supported resource types. I do not see SubscriptionTopic listed in there, so I'm guessing that gem doesn't support the R4B version of the fhir spec.
Can we get inferno updated to support these resources? Is there another way I can tell the fhir client in the inferno framework to support new/custom resource types?
I can work around the issue by using the http_client instead of the fhir_client, but it would be nice to have official support for this.
Thanks.
The text was updated successfully, but these errors were encountered: