Stream: implementers
Topic: Hapi FHIR jpaserver
Sarankumar (Feb 12 2020 at 10:54):
I have setup the HAPI jpaserver in my machine without any auth.
what needs to do to setup authorization over the FHIR server?
Do i need to setup any other solutions?
Lloyd McKenzie (Feb 12 2020 at 15:05):
If you're running a production server, you'll presumably want some degree of authorization. First step is to figure out what you want your authorization rules to be. Second is to read through the HAPI documentation. If you have specific questions about the former, you'll probably need to reach out to your client or ask about regulations on a country-specific stream. If you have specific questions after reading through the documentation, it's probably best to ask them on #hapi
Finn Terpling (Feb 20 2020 at 11:32):
Have anyone made profiling of a resource for a Hapi FHIR jpaserver starter, e.g. Patient. What is needed?
I need to profile a test jpaserver, where Patient should have a middlename attribute, and created following:
package ca.uhn.fhir.rest.client;
import org.hl7.fhir.r4.model.Patient;
import org.hl7.fhir.r4.model.StringType;
import ca.uhn.fhir.model.api.annotation.*;
@ResourceDef(name = "Patient", profile = PPJPatient.HTTP_FOO_PROFILES_PROFILE)
public class PPJPatient extends Patient {
static final String HTTP_FOO_PROFILES_PROFILE = "http://localhost:8080/hapi-shir-jpaserver/Profile";
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* Each extension is defined in a field. Any valid HAPI Data Type
* can be used for the field type. Note that the [name=""] attribute
* in the @Child annotation needs to match the name for the bean accessor
* and mutator methods.
*/
@Child(name = "middleName")
@Extension(url = "http://example.com/dontuse#middlename", definedLocally = false, isModifier = false)
@Description(shortDefinition = "The middlename of the patient, if any")
private StringType middleName;
public StringType getMiddleName() { if (middleName == null) { middleName = new StringType(); } return middleName; } public void setMiddleName(StringType theMiddleName) { middleName = theMiddleName; }
}
What is needed to get this to work, so I can post a Patient using Postman and give a middlename in the hapi-fhir-jpaserver-starter?
Kind regards Finn Terpling
Lloyd McKenzie (Feb 20 2020 at 15:05):
You might want to ask on #hapi
Jens Villadsen (Feb 20 2020 at 15:33):
you can post the profile to the test instance of the HAPI fhir server if you have the profile defined in a structuredefinition
Jens Villadsen (Feb 20 2020 at 15:33):
afterwards you can create a test instance of the actual patient resource can call $validate to see if it conforms to your needs
Vibin_chander (Mar 04 2020 at 10:38):
Hi
Vibin_chander (Mar 04 2020 at 10:40):
Im facing one issue with Hapi JPA server. Like when I send a fhir resource with big payload, then it throws me this error.
ERROR MESSAGE: Error connecting to HTTP server -----org.apache.http.NoHttpResponseException: ------ mydomainname.com failes to respond
Vibin_chander (Mar 04 2020 at 10:40):
this happens only when I have a huge payload size
James Agnew (Mar 04 2020 at 14:24):
Unless there are errors in the server log, you may need to increase your client timeout
Last updated: Apr 12 2022 at 19:14 UTC