Stream: implementers
Topic: hapi-fhir
Pietro Ghezzi (Jan 02 2018 at 18:21):
Anyone has used a dockerized hapi-fhir?
Joshua Bell (Jan 02 2018 at 18:24):
You will find more success if you ask a question stating the problem you are having, there is also a HAPI stream. Looking for topic experts instead of just asking your question is not super useful. #hapi
Pietro Ghezzi (Jan 02 2018 at 18:50):
@Joshua Bell I'm just looking for a docker image with hapi-fhir server.
Joshua Bell (Jan 02 2018 at 19:29):
@Pietro Ghezzi https://github.com/jamesagnew/hapi-fhir/tree/master/hapi-fhir-jpaserver-example this example server has a Docker file with some instructions for running it in the readme
Kevin Mayfield (Jan 04 2018 at 11:38):
Yes but this is UK equivalent of Argonaut. https://hub.docker.com/u/thorlogic/
Kevin Mayfield (Jan 04 2018 at 11:39):
and expect this isn't the hapi server you're looking for http://yellow.testlab.nhs.uk/careconnect-ri/
JP Ventura (May 25 2020 at 18:22):
Besides @James Agnew, is there anyone from Hapi FHIR project here? I've PR and update to Android Jetpack, but seems like the DSTU2 test server is down. Just wondering if anyone could turn it on in order to the CI run the test.
Lloyd McKenzie (May 25 2020 at 19:09):
#hapi is the best place to reach the HAPI folks...
James Agnew (May 25 2020 at 19:15):
@JP Ventura have commented on your github issue. fhirtest.uhn.ca is broken right now, but hapi.fhir.org is up
JP Ventura (May 25 2020 at 19:36):
@Lloyd McKenzie thx. i am still struggling to find the correct channels here
JP Ventura (May 25 2020 at 19:37):
@James Agnew thx. already fixed, pushed and now seems to be working perfectly.
Lloyd McKenzie (May 25 2020 at 19:51):
No worries @JP Ventura. There are a lot of channels and it takes a bit of time to know your way around :)
JP Ventura (May 25 2020 at 19:57):
@Lloyd McKenzie any special reason why you adopted Zulip instead of Spectrum, Discord, Slack?
Lloyd McKenzie (May 25 2020 at 20:19):
I wasn't a significant part of the evaluation. @Grahame Grieve @Josh Mandel
Grahame Grieve (May 27 2020 at 01:22):
we evaluated slack; it couldn't scale the way Zulip can. And Zulip has many features we love - particular topics in streams, the slack doesn't. Early on, the overall zulip experience wasn't as slick as slack, but I'm really glad we'e using zulip.
btw, the lead dev for Zulip is a friend of one the FHIR leads, which is where this all started (but we didn't land with Zulip just for that reason by a long shot)
David Johnson (May 27 2020 at 02:49):
I like that zulip is 100 percent open-source software (https://github.com/zulip/zulip). Before Zulip themselves took over hosting, we ran it on our own server, which we can do again if need ever be. Being on Zulip makes me feel closer to the FHIR community of developers.
Nicolas Duvivier (May 27 2020 at 14:11):
Hi everyone, few weeks ago, I was trying to upgrade my hapi-fhir jpa server starter with the new code. I failed, tried to debug and never could come to a solution before I had to work on something else. I wanted to get back to that task today, but I ran into the same error, which is: Error: HTTP 500 : ERROR: null value in column "search_last_returned" violates not-null constraint.
I basically have no idea why it doesn't work anymore, knowing the last working version I had was from commit d8d0f2aa the 9th of January. Did someone already run into that issue ?
Michele Mottini (May 27 2020 at 14:11):
Try in the #hapi channel?
Nicolas Duvivier (May 27 2020 at 14:12):
ah! not the right place? My bad... and thanks
James Agnew (May 27 2020 at 14:15):
Definitely that stream is better.. but while we're here, have you run the migrator tool? https://hapifhir.io/hapi-fhir/docs/server_jpa/upgrading.html
Nicolas Duvivier (May 27 2020 at 14:18):
Oh! Nope, I have not. I'll definitely check that out. Probably some info I skipped when I read the doc! Thanks.
Nicolas Duvivier (May 28 2020 at 09:10):
@James Agnew Thanks for the heads up on the database upgrade. Worked like a charm
Steven Wang (Jun 08 2020 at 20:22):
Hi everyone, I found for AWS lab https://github.com/mithun008/FHIRServer, in it's FHIR server, the rest capability is by using jersey, not using HAPI FHIR Plain Server. is this correct? can I use other rest frameworks for the rest capability, such as spring boot rest, etc? What's the advantage HAPI Rest Server provided which others not?
Michele Mottini (Jun 08 2020 at 20:49):
You can use any REST framework (or even no framework at all!), but I imagine a non-FHIR specific one would require more work
Jens Villadsen (Jun 08 2020 at 20:51):
@Steven Wang - there's also some JAX RS (jersey) supplied by the HAPI project, though I don't believe that it is heavily used
Steven Wang (Jun 08 2020 at 20:53):
Thanks Michele & Jens, I am a newbie in FHIR, compare with standard rest framework - Spring rest, Jersey. What's HAPI FHIR rest provide on top of standard rest? I could only image the powerful search in FHIR.
Jens Villadsen (Jun 08 2020 at 20:54):
HAPI FHIR provides the entire stack and you can cherry pick the elements you would like: a rich REST FHIR client , a parser framework for the entire REST part of the spec used by the server implementation as well as the model and also a full JPA implementation
Steven Wang (Jun 08 2020 at 20:58):
Correct, in that AWS lab https://github.com/mithun008/FHIRServer, as the backend is using Dynamo DB and REST using Jersey, so the lab only pick HAPI FHIR parser framework. In my project, I just wondering can I choose Spring REST + HAPI FHIR Parser, if I won't choose HAPI REST, what's the drawback.
Shweta Rajput (Jul 03 2020 at 08:54):
How can we convert hapi-fhir-jpaserver-starter to Spring boot project?
Or
Do we have any Spring boot version of this starter project?
James Agnew (Jul 03 2020 at 12:49):
I don't believe so.. I assume it wouldn't be too hard to add boot support to the starter, maybe using it to spin up an embedded jetty or whatever.
I'm not a boot user myself though so I don't actually know how hard that would be. Contributions definitely welcomed.
Jens Villadsen (Jul 06 2020 at 13:39):
That is easily achieved. When Im back from vacation i can make a PR on the starter project if no one beats me to it
Yengibar Manasyan (Jul 07 2020 at 16:38):
Hi everyone.
Is by FHIR specification allowed to specify a modifier with a chained reference parameter?
E.g. like this: {baseUrl}/PractitionerRole?practitioner.identifier:system=identifier_system
Lloyd McKenzie (Jul 07 2020 at 16:49):
I think it's allowed, but you may not find it broadly supported.
Yengibar Manasyan (Aug 13 2020 at 16:05):
Hi everyone.
I want to implement revincludes using HAPI FHIR. There is no example for that here (4.5.15 Reverse Resource Includes): https://hapifhir.io/hapi-fhir/docs/server_plain/rest_operations_search.html.
It's not clear how to return revincludes (unlike includes). Is there an example of that?
James Agnew (Aug 13 2020 at 17:28):
There is a parameter called reverse
on the @IncludeParam
annotation you need to set
Yengibar Manasyan (Aug 13 2020 at 17:58):
@James Agnew it's pretty clear how to receive the revinclude, as you mentioned we can specify reverse on the @IncludeParam. But let's imagine we received a search like this: Practitioner?_include?PractitionerRole:practitioner and we were able to find practitioners and all roles pointing to them. The search method returns List<Practitioner>. In case of includes we could set in the appropriate references the resources by Reference::setResource method and HAPI FHIR would return them with entry.search.mode include. What we can do in case of revincludes?
Michele Mottini (Aug 13 2020 at 18:10):
(deleted)
James Agnew (Aug 13 2020 at 19:40):
Oh, got it. You can just return a List<IBaseResource> and add these
resources directly to that list.
Yengibar Manasyan (Aug 13 2020 at 19:57):
@James Agnew in that case entry.search.mode won't be set to include. Maybe the framework is not supporting it?
Roshan (Aug 14 2020 at 09:29):
James Agnew said:
Oh, got it. You can just return a List<IBaseResource> and add these
resources directly to that list.
@James Agnew I have tried this but it's changing the total count in response. Suppose I have single resource as a resulted resource and five for reverse include then response should show total resource as 1 but as per the above implementation it's showing total resource as 6.
James Agnew (Aug 14 2020 at 15:14):
Ah right- You would want to return IBundleProvider instead of a List if you want to tell it the total.
To mark a resource you're returning as an include
and not a match
, you can do this:
ResourceMetadataKeyEnum.ENTRY_SEARCH_MODE.put(theResource, BundleEntrySearchModeEnum.INCLUDE);
Yengibar Manasyan (Aug 14 2020 at 16:22):
thank you @James Agnew, I also found it in the HAPI JPA Server solution.
Yengibar Manasyan (Aug 14 2020 at 18:16):
@James Agnew do you know how I can do it in the case of IBaseResource? I can't cast it to IResource
James Agnew (Aug 14 2020 at 19:27):
You can cast to IAnyResource
Yengibar Manasyan (Aug 14 2020 at 19:30):
@James Agnew but there is no such method: ResourceMetadataKeyEnum.ENTRY_SEARCH_MODE.put((IAnyResource) theResource, BundleEntrySearchModeEnum.INCLUDE)
, do I miss something?
James Agnew (Aug 14 2020 at 19:47):
ResourceMetadataKeyEnum.ENTRY_SEARCH_MODE.put((IAnyResource) theResource, BundleEntrySearchModeEnum.INCLUDE.getCode())
Yengibar Manasyan (Aug 14 2020 at 19:51):
@James Agnew thank you!
Ajith Aj (Aug 15 2020 at 10:07):
Hi,
I'm trying to submit a questionnaire response with a top level question and sub level question associated with that top level question.
Example :
"item": [
{
"id": "1",
"linkId": "1.2.208.176.7.200.2,q1,ehealth.sundhed.dk",
"answer": [
{
"valueString": "Top Question"
}
],
"item": [
{
"linkId": "1.2.208.176.7.200.2,q1.s1,ehealth.sundhed.dk",
"answer": [
{
"valueString": "Sub Question of Top Question"
}
]
}
]
}
]
But getting the below error response
Response : Nested item can't be beneath both item and answer [(answer.exists() and item.exists()).not()]
do i miss something?
Thanks in Advance.
Shriya Khatri (Aug 18 2020 at 10:27):
Hi All,
Currently I am developing FHIR Search api for MedicationRequest in java. I want to include the Medication Resource for which there is reference given in the MedicationRequest.I have provided snippet below
@IncludeParam(allow = { "MedicationRequest:medication" }) Set<Include> theIncludes //code
url = /MedicationRequest?_include=MedicationRequest:medication&status=stopped,active
Whenever I am hitting the url it is not including the Medication resource. Instead of "MedicationRequest:medication" if I am using "*" or MedicationRequest.medication then I am getting the dersired outcome that is medication resource is getting included other than this entire code is same.
@IncludeParam(allow = { "*" }) Set<Include> theIncludes
url = /MedicationRequest?_include=*&status=stopped,active
Can anyone please help me in understanding why I am not getting desired outcome when I am using "MedicationRequest:medication" ?
Vassil Peytchev (Aug 18 2020 at 13:08):
There is a #hapi stream, where you may get a faster response...
Jens Villadsen (Aug 20 2020 at 06:50):
Shweta Rajput said:
How can we convert hapi-fhir-jpaserver-starter to Spring boot project?
Or
Do we have any Spring boot version of this starter project?
Here you go: https://github.com/hapifhir/hapi-fhir-jpaserver-starter/pull/125
Roshan (Aug 26 2020 at 14:19):
James Agnew said:
Ah right- You would want to return IBundleProvider instead of a List if you want to tell it the total.
To mark a resource you're returning as an
include
and not amatch
, you can do this:ResourceMetadataKeyEnum.ENTRY_SEARCH_MODE.put(theResource, BundleEntrySearchModeEnum.INCLUDE);
@James Agnew when I am mentioning total of exact match in IBundleProvider, it eliminates included resource from the list in case of reverse include. I have marked the resource as an include and match. Is there any other configuration which I am missing?
James Agnew (Aug 26 2020 at 20:33):
Good question
I know there's a setting setBundleInclusionRule
on RestfulServer, does changing it make any difference?
If not, I might recommend putting a breakpoint into your resourceprovider method and tracing through the HAPI code after you return your provider to see if you can pinpoint where the data is getting dropped..
Roshan (Aug 27 2020 at 07:04):
James Agnew said:
Good question
I know there's a setting
setBundleInclusionRule
on RestfulServer, does changing it make any difference?If not, I might recommend putting a breakpoint into your resourceprovider method and tracing through the HAPI code after you return your provider to see if you can pinpoint where the data is getting dropped..
@James Agnew setting setBundleInclusionRule does not make any difference. I have checked with both the option BASED_ON_RESOURCE_PRESENCE & BASED_ON_INCLUDES.
I have debug the code through Hapi library, In BaseResourceReturningMethodBinding inside createBundleFromBundleProvider method at line number 126 data get dropped. line is resourceList = theResult.getResources(0, numToReturn);.
Is there any setting or opetion to handle this?
James Agnew (Aug 27 2020 at 10:00):
I'm sorry, I don't understand. That line is calling your IBundleProvider
implementation's "getResources(from,to)" Method. You have full control over
that since it's an interface you implement.
Roshan (Aug 28 2020 at 05:20):
James Agnew said:
I'm sorry, I don't understand. That line is calling your IBundleProvider
implementation's "getResources(from,to)" Method. You have full control over
that since it's an interface you implement.
@James Agnew I am using SimpleBundleProvider as a implementation of IBundlerProvider which is given by Hapi library.
In this class, they have implemented in such a way that the list get truncated as per inputs.
James Agnew (Aug 28 2020 at 15:15):
If you're using SimpleBundleProvider, it is definitely not filtering your resources. That class is basically a glorified ArrayList, it has no logic in it. You probably want to keep tracking the debugger beyond the calls to that class to see where the resources are actually being dropped before the Bundle resource that is ultimately returned is constructed.
Roshan (Aug 31 2020 at 09:45):
James Agnew said:
If you're using SimpleBundleProvider, it is definitely not filtering your resources. That class is basically a glorified ArrayList, it has no logic in it. You probably want to keep tracking the debugger beyond the calls to that class to see where the resources are actually being dropped before the Bundle resource that is ultimately returned is constructed.
@James Agnew I have debug through the code, resources are getting dropped in SimpleBundleProvider class inside the getResource method
due to below code:
@Override
public List<IBaseResource> getResources(int theFromIndex, int theToIndex) {
return (List<IBaseResource>) myList.subList(theFromIndex, Math.min(theToIndex, myList.size()));
}
This function get executed at BaseResourceReturningMethodBinding inside createBundleFromBundleProvider method at line number 126. line is resourceList = theResult.getResources(0, numToReturn);.
James Agnew (Aug 31 2020 at 09:59):
Ohh sorry, yes I do see how that would be happening. Technically they
aren't being dropped, they'll show up on the subsequent page I assume, but
that's not how the FHIR spec says it should work.
I think the easiest solution in that case is to provide your own
implementation of IBundleProvider instead of using SimpleBundleProvider so
that you can control what is returned on each page.
Roshan (Aug 31 2020 at 11:25):
James Agnew said:
Ohh sorry, yes I do see how that would be happening. Technically they
aren't being dropped, they'll show up on the subsequent page I assume, but
that's not how the FHIR spec says it should work.I think the easiest solution in that case is to provide your own
implementation of IBundleProvider instead of using SimpleBundleProvider so
that you can control what is returned on each page.
@James Agnew Thank you. Own implementation will resolve my issue.
Bhagyashri Sakpal (Sep 01 2020 at 08:57):
I am trying to implement API documentation for all my resource APIs, is there any standard way of achieving this defined by HAPI. I tried doing general swagger2 spring boot implementation way but since we do not support @RestController/RequestMapping annotations and instead are having other annotations like Read and Search, it is not working as per standard Rest APIs work. Please suggest some way of doing this
Kevin Mayfield (Sep 01 2020 at 08:59):
Do you get a conformance statement from your metadata endpoint?
Kevin Mayfield (Sep 01 2020 at 09:00):
If so you can probably use a project like this https://github.com/rbren/fhir-swagger
Bhagyashri Sakpal (Sep 01 2020 at 09:44):
Yes we have conformance statement from metadata endpoint. Will check the project you have given but this is implemented in node.js, do you have any link of java implementation
Gino Canessa (Sep 01 2020 at 15:21):
Currently fhir-codegen has experimental support for OpenAPI. You can point it at your server and generate OAS 2 or 3 files, generated with various options.
An example output is available on SwaggerHub, direct link to the docs here.
It's still CLI only at this point (UI is planned), but would love any feedback.
Roshan (Sep 02 2020 at 07:00):
Hi @James Agnew, I am trying to set searchRevInclude attribute in capability statement. But using default implementation of ServerCapabilityStatementProvider unable to set this attribute. Hence I am trying to provide own implementation for capability statement.
I am trying to add custom implementation for searchMethodBinding.getIncludes() method but facing issue with IncludeParameter class, not able to import since it is a package-private class. So in that case, Is there any other way/configuration to set searchRevInclude in capability statement.
Caleb Long (Sep 02 2020 at 16:39):
@James Agnew I am working with HAPI FHIR v5.1.0 and I am having some issues getting validation setup with the new NpmJpaValidationSupport class. I have not been able to find any documentation outlining where you should load the npm modules. Looking through the code there seems to be support for downloading the modules automatically. Can this be configured through the hapi.properties? Any help would be appreciated
James Agnew (Sep 02 2020 at 23:54):
@Roshan You could need to override getServerConformance
in order to customize the generated capability statement.
This sounds like a bug though- If you wanted to fix it right in ServerCapabilityStatementProvider and submit a PR, it would certainly be gladly considered.
James Agnew (Sep 02 2020 at 23:56):
@Caleb Long There isn't yet a way for this to be done via hapi.properties (currently you have to write code), but there is a PR under development by @Jens Villadsen to add such support: https://github.com/hapifhir/hapi-fhir-jpaserver-starter/pull/127
Roshan (Sep 03 2020 at 06:09):
James Agnew said:
Roshan You could need to override
getServerConformance
in order to customize the generated capability statement.This sounds like a bug though- If you wanted to fix it right in ServerCapabilityStatementProvider and submit a PR, it would certainly be gladly considered.
Thanks @James Agnew , I will work on this and will try to fix this issue through customized implementation of Capability statement.
Vikrant Chauhan (Sep 03 2020 at 07:16):
on my local system, I have setup the JPA server
Now I want the things below:
How to use FHIR to exchange ADT messages (Admission/Discharges/Transfers) as discussed in:
https://fhirblog.com/2015/03/18/more-fhir-messaging-adt-messages/
https://www.hl7.org/fhir/v2/0003/index.html
Once I know how to read ADT messages from the FHIR server your next challenge will be to learn how to subscribe to those messages:
https://www.hl7.org/fhir/subscription.html
Lloyd McKenzie (Sep 03 2020 at 12:59):
Be aware that there is very little implementation of ADT messaging in FHIR and no standard messages defined. If you're solely interested in FHIRizing v2 messages, you might look at the #v2 to FHIR stream. However, the community preference for FHIR interoperability tends to be REST because it provides greater re-use and requires less negotiation.
John Moehrke (Sep 03 2020 at 13:22):
IHE has an implementation guide on the use-case of a community managed golden patient record for use with a community based data exchange. Is this what you are looking for? https://wiki.ihe.net/index.php/Patient_Master_Identity_Registry_(PMIR)
It is not fully ADT, more focused on cooperative patient identity managagement
Awais Maqsood (Sep 07 2020 at 12:38):
can someone help me to get HAPI-FHIR a reference implementation for PHP.
James Agnew (Sep 07 2020 at 13:33):
I haven't personally used it but I've heard good thiings about this project for PHP FHIR: https://github.com/dcarbone/php-fhir
Awais Maqsood (Sep 08 2020 at 05:29):
@James Agnew thanks
Karel Groot (Sep 22 2020 at 19:34):
I need some help with getting started with an Andriod App. I downloaded the android folder but have no idea what to do? Any advise is appreciated!
Karel Groot (Sep 22 2020 at 19:43):
https://hapifhir.io/hapi-fhir/docs/android/client.html
Vassil Peytchev (Sep 22 2020 at 20:19):
Hello @Karel Groot , maybe you will get a quicker response in the #hapi stream...
Roshan (Nov 16 2020 at 12:13):
How to use the following Parameters for all resources as search parameter in resource.
_lastUpdated
_tag
_profile
_security
_text
_content
_list
_has
_type
I am able to use _id by using <ResourceName>.SP_RES_ID.
But did not find any way to implement rest of the parameters. I want to implement _lastUpdated
Grahame Grieve (Nov 16 2020 at 12:20):
this seems like a question you might ask on #hapi and you probably need to provide more code as an example of what you are doing
Farrukh Najmi (Nov 20 2020 at 13:37):
An example output is available on SwaggerHub, direct link to the docs here.
@Gino Canessa I do not see any openapi docs for FHIR in the page you referenced:
https://app.swaggerhub.com/apis-docs/GinoCanessa/fhir-r_4_4_0_1/1.0.0#/
It provides a swagger UI to the API generated by openapi but I am wondering how I can access the actual openapi yaml or json files. Any help would be terrific. Thanks.
Gino Canessa (Nov 20 2020 at 13:42):
On the left side of the screen, there should be a menu with the option to show/hide the code editor. Toggling this on will show the yaml in line. There is also a menu on the top-right of the screen to Export
, which has the option Download API
and different styles (e.g., json, yaml).
Farrukh Najmi (Nov 20 2020 at 14:20):
@Gino Canessa Thank you. The URL you shared did not open up the API for editing:
https://app.swaggerhub.com/apis-docs/GinoCanessa/fhir-r_4_4_0_1/1.0.0#/ (does not have openapi doc)
The following is the URL that opens the API for editing and has link to openapi docs:
https://app.swaggerhub.com/apis/GinoCanessa/fhir-r_4_4_0_1/1.0.0
Thanks very for making this awesome work available!
Gino Canessa (Nov 20 2020 at 14:21):
Ah, apologies - looks like it fixes that if you're logged in. Thanks for sorting it out!
Farrukh Najmi (Nov 20 2020 at 14:23):
Glad to make a teeny tiny contribution to this terrific work ;-)
BTW I was logged in and it did not seem to redirect the url to editor url. Odd that we are seeing different behavior.
Gino Canessa (Nov 20 2020 at 14:32):
I'm guessing it's because I'm the owner of that spec - a good reminder to always check in another window.
Farrukh Najmi (Nov 20 2020 at 14:38):
Very likely. BTW I just exported the API in resolved yaml format and tried processing it with openapi-generator using the typescript-fetch generator. It had some issues and generation failed. There were a lot of warning like this:
[deprecated] inheritance without use of 'discriminator.propertyName' is deprecated and will be removed in a future release. Generating model for composed schema name: null. Title: null
And then it failed with error:
Invalid inline schema defined in allOf in 'Address'. Per the OpenApi spec, for this case when a composed schema defines a discriminator, the allOf schemas must use $ref. Change this inline definition to a $ref definition
Note I am using a generator that expects openapi: 3.0.3 file and this is a swagger: 2.0 file.
What plans if any do you have to migrate this to 3.0.x?
I may be able help with this within some time constraints (after my day job) if this aligns with your plan for this good work.
Gino Canessa (Nov 20 2020 at 14:41):
Yes, the generator has a lot of options (e.g., v2 vs. v3). I'll add to my list to post a few versions of the same R4 file for comparison.
Farrukh Najmi (Nov 20 2020 at 14:52):
@Gino Canessa I cannot find an option in openapi-generator that will accept swagger 2.0 input yaml file. Are you sure there is such an option? Have you generated code using openapi-generator and the exported swagger 2.0 resolved yaml? If so, what is the option to tell generator that input is swagger 2.0? Really appreciate your patience with my newbie questions.
Gino Canessa (Nov 20 2020 at 16:11):
No worries! This highlights one of the issues with OpenAPI, which is that every workflow has different requirements. If you need an OAS 3.0 file, the codegen can export that directly as well. It's capable of exporting JSON as well, but I don't think it is exposed yet (needed testing before I flipped the switch).
For this case specifically, I have added it to my list to go through openapi-generator, but it may be a little bit before I can get to it.
Farrukh Najmi (Nov 20 2020 at 18:24):
@Gino Canessa I was able to generate kotlin and typescript code using openapi-generator 5.0.0-beta2. The changes needed were:
- Quoting the version in line 2
- Commenting out all allOf offending closures
Please see attached diff file. fhir-codegen-hack.patch
Please let me know if I can help test code generation when you do have a openapi 3.0 compatible yaml file.
Thanks again.
Farrukh Najmi (Nov 20 2020 at 20:13):
@Gino Canessa I also tried code generation with YAML Unresolved exported file. Thsi one did code generation without any changes. However, in teh generated code I found only generic attributes. What is the difference bwteen Resolved and Unresolved. It seems Resolved file shoudl not have the allOff closures that I commented out as they are pulling in stuff that has already been resolved.
Farrukh Najmi (Nov 23 2020 at 13:47):
@Gino Canessa I have some suggestions for improving the openapi specification for FHIR we have been discussing. I am unfamiliar with this forum and would appreciate some guidance as to where and how to have conversation threads about questions and feedback related to your openapi specification. TIA.
Gino Canessa (Nov 23 2020 at 15:33):
Hi Farrukh, if it's feedback about the particulars of the project, I'd say the best place would be to open an issue on github. If you want to continue on Zulip, I'd say either opening a new topic here on #implementers or on #tooling would make sense as well.
Farrukh Najmi (Nov 23 2020 at 19:18):
Thanks @Gino Canessa, will do . BTW do you or anyone else have a FHIR STU3 openapi specification similar to what you have for FHIR 4?
Lloyd McKenzie (Nov 24 2020 at 23:56):
No, and we won't. The JSON schema work was only well developed in R4 and there's no intention to revisit earlier releases to change them.
Gino Canessa (Nov 29 2020 at 16:34):
Hi Farrukh, sorry for the delay in responding. The generator works, but it looks like there's an issue in parsing some of the fields from STU3 and DSTU2 from a server (hadn't come up in my use cases yet). I've added it to my list to resolve them, and can post the docs when it's working.
Roshan (Dec 08 2020 at 05:56):
Hi,
How we can handle unknown search parameter.
for e.g.: <BaseUrl>/DocumentReference?status=superseded&_asjdflasjkdf=31562153
This parameter will not get at provider level, but still will able to access this API.
How we can restrict it by giving error message for this invalid parameter.
Elliot Silver (Dec 08 2020 at 06:00):
If this about how to return an error message using hapi, you may want to try on the #hapi stream. However, my recollection is that unrecognized parameters are ignored; the response bundle includes the query as it was processed so the client can tell if the server modified it.
Roshan (Dec 08 2020 at 06:09):
Elliot Silver said:
If this about how to return an error message using hapi, you may want to try on the #hapi stream. However, my recollection is that unrecognized parameters are ignored; the response bundle includes the query as it was processed so the client can tell if the server modified it.
Actually we are getting error message for below API like invalid request for asjdflasjkdf .
<BaseUrl>/DocumentReference?status=superseded&asjdflasjkdf=31562153
Only thing is, in case of invalid attribute with '_' not able to handle. So is there any way to handle this? Or we can ignore this.
Bhagyashri Sakpal (Dec 11 2020 at 10:35):
Can anyone provide link to understand the $expand operation more accurately. We have referred some links already but not able to understand the requirement properly. Below are the links, we already went through
- https://ontoserver.csiro.au/docs/5.6/api-fhir-valueset.html
- http://build.fhir.org/op-example-request.html
- http://build.fhir.org/operations.html
- https://embed.plnkr.co/oELW6BR7rN2vXNH3Yp4F/
http://hl7.org/fhir/R4/operation-valueset-expand.html
http://hl7.org/fhir/R4/operation-valueset-expand.html
Lloyd McKenzie (Dec 11 2020 at 14:37):
The gist of it is as follows. When you define some value sets, you don't want to list all of the possible codes because the list is too long, and in some cases, changes regularly. In some cases, the list of codes even varies by where you are (though SNOMED is the only code system I'm aware of that behaves that way). For example, you might define a value set that says "All SNOMED drug codes". That's going to evaluate to a different set of codes today than it did 6 months ago. It's also going to resolve differently in the UK than it does in Japan or in Canada. The 'expand' operation gives you the set of codes in the value set for the date and other metadata you specify. Sometimes the expansion itself is too big. (An expand on all of SNOMED would be enormous.) The expand operation allows you to filter what codes you get back or to page through the set of codes.
Carter (Jan 07 2021 at 21:48):
Heyhey. I'm coming from a bit of a different paradigm and I'm trying to wrap my head around grabbing values from extensions. The documentation I've been looking at shows good examples of adding extensions and pulling down lists of extensions, but I don't see anything about strictly just accessing inner values of extensions/nested objects.
Never mind. I threw stuff at the wall until it stuck and I'm walking away both ashamed and victorious.
NARASIMHA MURTHY (Jan 19 2021 at 01:25):
Hi All,
I need help in reading new properties added in application.yaml file in hapi-fhir-jpaserver-starter 5.2.0.
I have added the following 2 additional properties in application.yaml file in hapi-fhir-jpaserver-starter 5.2.0.
oauth_certs_token_uri: http://localhost:8080/auth/realms/SMART-ON-FHIR/protocol/openid-connect/certs
oauth_expected_issuer: http://localhost:8080/auth/realms/SMART-ON-FHIR
Then I added variables for each property in AppProperties.Java
public class AppProperties
{
......
......
private String oauth_certs_token_uri;
private String oauth_expected_issuer;
.....
getters and setters for the same properties
}
Next, I created a new class called MyUtils
package ca.uhn.fhir.jpa.starter.mycompany.utils
Class MyUtils
{
@Autowired
AppProperties appproperties;
public void ReadValues()
{
System.out.println(appproperties.getOauth_certs_token_uri);
System.out.println(appproperties.getOauth_expected_issuer);
}
}
My autowired appproperties value is null. I also tried to read using @Value annotation still the property value is coming as null.
I have tried various combinations of @ComponentScan by giving the base package name as ca.uhn.fhir.jpa.starter.mycompany in the application.java main class. But it gave runtime errors.
I have wasted lot of time in resolving this issue. Please help me resolve this issue by providing the steps required to read new properties in YAML file in case of HAPI FHIR 5.2.0 release.
Thanks in advance for your help.
David Pyke (Jan 19 2021 at 01:55):
You'll get better answers in the #hapi stream
NARASIMHA MURTHY (Jan 19 2021 at 02:10):
Thanks David. Now, I have posted it in #hapi stream.
Alonso Alberto Carvajal (Mar 04 2021 at 14:27):
Hello everyone, I'm trying to use an external PostgreSQL database with HAPI-FHIR service. I've been doing everything this https://github.com/hapifhir/hapi-fhir-jpaserver-starter manual mentioned without success. Apparently the docker service doesn't read the application.yaml configuration. Someone has been the same?
Yunwei Wang (Mar 04 2021 at 14:34):
@Alonso Alberto Carvajal There is #hapi stream. You could get better response there.
Alonso Alberto Carvajal (Mar 04 2021 at 14:38):
Thanks @Yunwei Wang
Mayur Bathar (Mar 09 2021 at 15:19):
Hi
Lloyd McKenzie (Mar 09 2021 at 15:20):
@Mayur Bathar Hi :smile:
Mayur Bathar (Mar 09 2021 at 15:21):
I have to use hapi fhir-R5 resourses in my spring boot rest API without using Plain server or JPA server. So how can I achive this.
I have to pass the R5 resourses in my REST APIs request body without using plain server or JPA server.
Please do the needful
James Agnew (Mar 09 2021 at 15:25):
If you aren't using HAPI's server framework, then you are going to be building a standard REST service. The HAPI FHIR parser may be helpful for this - you can find docs on it on the website.
Our recommendation though is to use the HAPI FHIR plain server framework - if you don't want to use that, unfortunately our docs won't be much help.
Notification Bot (Mar 11 2021 at 19:28):
This topic was moved by Josh Mandel to #hapi > hapi-fhir
Vibin_chander (Mar 15 2021 at 03:24):
Using FHIR as a "message" instead of http CRUD is a better way to achieve event-driven solution?
Vassil Peytchev (Mar 15 2021 at 03:52):
Have you looked at subscription (R5) as a way to achieve an event-driven solution?
Vibin_chander (Mar 15 2021 at 04:28):
Subscription is exactly what i was looking for, but it does not guarantee the reliable message delivery. I used it in R4. For example as a consumer i subscribed for certain resource, incase if my endpoint is down the HAPI FHIR is not storing the messages internally and waiting for my endpoint to come up
Vibin_chander (Mar 15 2021 at 04:29):
It does not behave like how kafka or rmq behaves -- so for reliable message delivery what should we use is the confusion
Vassil Peytchev (Mar 15 2021 at 11:34):
AFAIK, among the new things in R5, there is a way to "catch up" on any missed notifications - see http://build.fhir.org/subscriptions.html#errors-delivery
Vassil Peytchev (Mar 15 2021 at 11:35):
The Argonaut project is back-porting some of the R5 functionality to R4
Gino Canessa (Mar 15 2021 at 17:49):
Also of note is that one of the big changes in R5 (and being backported to R4) is to allow for additional channel types. It's beyond the scope of the standard to define channels like 'Message Queue <x>', but there's no reason they cannot be added.
Vibin_chander (Mar 16 2021 at 04:31):
In that case what queue mechanism does Hapi FHIR uses internally?
Lloyd McKenzie (Mar 16 2021 at 05:28):
@James Agnew
James Agnew (Mar 16 2021 at 09:49):
HAPI FHIR uses Spring Integration for orchestration. By default it will use a simple java collections (memory bound) queue but that can be replaced with anything supported by Spring Integration.
Vibin_chander (Mar 16 2021 at 10:21):
Thanks @James Agnew .
currently if I use the FHIR subscription mechanism, and if my consumer endpoint is down. In this case HAPI stores the messages internally ? and sends the message to the subscriber once its up?
James Agnew (Mar 16 2021 at 12:37):
It will, and it will retry indefinitely, but if the server is restarted it will be lost as the queue is only a memory queue.
This can be replaced though through spring integration config. In Smile CDR we wire spring integration up to either Apache ActiveMQ or Kafka, each of which has its own delivery and retry semantics.
Vibin_chander (Mar 16 2021 at 12:38):
Thanks for the detail @James Agnew
dsh (Apr 06 2021 at 22:05):
James Agnew said:
It will, and it will retry indefinitely, but if the server is restarted it will be lost as the queue is only a memory queue.
This can be replaced though through spring integration config. In Smile CDR we wire spring integration up to either Apache ActiveMQ or Kafka, each of which has its own delivery and retry semantics.
@James Agnew any documentation on this will be very helpful?
dsh (Apr 06 2021 at 22:13):
^ is the spring integration for ActiveMQ/RabbitMQ configurable using application.yml ?
Jens Villadsen (Apr 06 2021 at 22:14):
no - as @James Agnew writes - Apache ActiveMQ or Kafka is supported by SmileCDR
Jens Villadsen (Apr 06 2021 at 22:14):
which is the 'paid version' of HAPI FHIR
dsh (Apr 06 2021 at 22:15):
@Jens Villadsen so are you saying Spring integration is not even available in HAPI ?
Jens Villadsen (Apr 06 2021 at 23:09):
No
dsh (Apr 06 2021 at 23:24):
@Jens Villadsen so if Spring integration is available then is ActiveMQ or Kafka integration specifically disabled in HAPI ?
Jens Villadsen (Apr 07 2021 at 08:06):
I can't say. Its not a feature that I have had the use for yet, feel free to explore the project and make a PR if you think it brings value to the community
Jens Villadsen (Apr 07 2021 at 08:29):
(deleted)
Moritz Kähler (Apr 07 2021 at 13:01):
I'm trying to query resources based on a valueSet.
Therefore I'm using following request:
http://hapi.fhir.org/baseR4/Observation?code:in=http://hapi.fhir.org/baseR4/ValueSet/1160250
but I'm getting Unknown ValueSet: http%3A%2F%2Fhapi.fhir.org%2FbaseR4%2FValueSet%2F1160250
But the valueSet exists. And matching FHIR resources also exist.
I tried the same with condition resource against an DSTU3 version, and it also does not work.
There I did not receive an error, but the result was not filtered according to the valueSet.
Do I have a wrong understanding?
Is it possible to query for resources with a valueSet like it is describe here: https://www.hl7.org/fhir/search.html ?
Newt (Apr 07 2021 at 23:56):
Hey, wondering if anyone has used this https://hapifhir.io/hapi-fhir/docs/security/authorization_interceptor.html to try and restrict records to certain users and could share any experiences on what you were doing and how? This is in relation to:
Newt said:
Storing and implementing restricted resources in a FHIR server:
TLDR:
What is the best way to “store” data about which resources are restricted in such a way it makes sense from a FHIR point of view, but also the checks can be implemented on every interaction with the FHIR server in a somewhat efficient way?
Lloyd McKenzie (Apr 08 2021 at 02:16):
@Moritz Kähler - you might ask on #hapi. Same goes for @Newt
Moritz Kähler (Apr 08 2021 at 05:26):
Lloyd McKenzie said:
Moritz Kähler - you might ask on #hapi. Same goes for Newt
will raise the question again in #hapi . Thanks!
Srinivas Rupani (Jul 29 2021 at 12:58):
Hi can any one help on Android release build isssue with hapi-fhir
Srinivas Rupani (Jul 29 2021 at 12:58):
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not find the HAPI-FHIR structure JAR on the classpath for version R4. Note that as of HAPI-FHIR v0.8, a separate FHIR strcture JAR must be added to your classpath (or project pom.xml if you are using Maven)
at ca.uhn.fhir.context.FhirContext.<init>(Unknown Source:114)
at ca.uhn.fhir.context.FhirContext.<init>(Unknown Source:1)
at ca.uhn.fhir.context.FhirContext.forR4(Unknown Source:4)
Lloyd McKenzie (Jul 29 2021 at 13:21):
HAPI related questions will get better support on the #hapi stream
Srinivas Rupani (Jul 29 2021 at 13:29):
Lloyd McKenzie said:
HAPI related questions will get better support on the #hapi stream
Thanks Lloyd, I posted in #hapi
Gaurav Vaishnav (Jan 19 2022 at 13:24):
hi any one can guide me how can i customize the capability statement of hapi jpa server starter project ( https://github.com/hapifhir/hapi-fhir-jpaserver-starter.git) to show only terminology specific rest operation
Last updated: Apr 12 2022 at 19:14 UTC